mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-07 21:28:11 +08:00
Coding - Revert type definitions for Standard_CString replacements (#1021)
Fix the replacement issue when Standard_CString was replaced to const char* even when it was const. Now "const Standard_CString" is replaced with "const char* const". Only places which were before const Standard_CString is replaced.
This commit is contained in:
@@ -1201,7 +1201,7 @@ void MeshVS_Mesh::ClearSelected()
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<MeshVS_PrsBuilder> MeshVS_Mesh::FindBuilder(const char* theTypeName) const
|
||||
occ::handle<MeshVS_PrsBuilder> MeshVS_Mesh::FindBuilder(const char* const theTypeName) const
|
||||
{
|
||||
for (const occ::handle<MeshVS_PrsBuilder>& aBuilder : myBuilders)
|
||||
{
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
Standard_DEPRECATED("This method will be removed right after 7.9 release. \
|
||||
Use FindBuilder(const occ::handle<Standard_Type>&) instead \
|
||||
or directly iterate under sequence of builders.")
|
||||
Standard_EXPORT occ::handle<MeshVS_PrsBuilder> FindBuilder(const char* TypeString) const;
|
||||
Standard_EXPORT occ::handle<MeshVS_PrsBuilder> FindBuilder(const char* const TypeString) const;
|
||||
|
||||
//! Finds builder by its type the type represents
|
||||
Standard_EXPORT occ::handle<MeshVS_PrsBuilder> FindBuilder(
|
||||
|
||||
@@ -656,7 +656,7 @@ void OpenGl_GraphicDriver::SetBuffersNoSwap(const bool theIsNoSwap)
|
||||
//=================================================================================================
|
||||
|
||||
void OpenGl_GraphicDriver::TextSize(const occ::handle<Graphic3d_CView>& theView,
|
||||
const char* theText,
|
||||
const char* const theText,
|
||||
const float theHeight,
|
||||
float& theWidth,
|
||||
float& theAscent,
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
|
||||
public:
|
||||
Standard_EXPORT void TextSize(const occ::handle<Graphic3d_CView>& theView,
|
||||
const char* theText,
|
||||
const char* const theText,
|
||||
const float theHeight,
|
||||
float& theWidth,
|
||||
float& theAscent,
|
||||
|
||||
@@ -65,11 +65,11 @@ public:
|
||||
|
||||
public:
|
||||
//! Creates a NSWindow and NSView defined by his position and size in pixels
|
||||
Standard_EXPORT Cocoa_Window(const char* theTitle,
|
||||
const int thePxLeft,
|
||||
const int thePxTop,
|
||||
const int thePxWidth,
|
||||
const int thePxHeight);
|
||||
Standard_EXPORT Cocoa_Window(const char* const theTitle,
|
||||
const int thePxLeft,
|
||||
const int thePxTop,
|
||||
const int thePxWidth,
|
||||
const int thePxHeight);
|
||||
|
||||
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
|
||||
//! Creates a wrapper over existing UIView handle
|
||||
|
||||
@@ -98,7 +98,7 @@ static int getScreenBottom()
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
Cocoa_Window::Cocoa_Window (const char* theTitle,
|
||||
Cocoa_Window::Cocoa_Window (const char* const theTitle,
|
||||
const int thePxLeft,
|
||||
const int thePxTop,
|
||||
const int thePxWidth,
|
||||
|
||||
@@ -554,7 +554,7 @@ bool Font_FontMgr::CheckFont(NCollection_Sequence<occ::handle<Font_SystemFont>>&
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<Font_SystemFont> Font_FontMgr::CheckFont(const char* theFontPath) const
|
||||
occ::handle<Font_SystemFont> Font_FontMgr::CheckFont(const char* const theFontPath) const
|
||||
{
|
||||
occ::handle<Font_FTLibrary> aFtLibrary = new Font_FTLibrary();
|
||||
NCollection_Sequence<occ::handle<Font_SystemFont>> aFonts;
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
const TCollection_AsciiString& theFontPath) const;
|
||||
|
||||
//! Read font file and retrieve information from it.
|
||||
Standard_EXPORT occ::handle<Font_SystemFont> CheckFont(const char* theFontPath) const;
|
||||
Standard_EXPORT occ::handle<Font_SystemFont> CheckFont(const char* const theFontPath) const;
|
||||
|
||||
//! Register new font.
|
||||
//! If there is existing entity with the same name and properties but different path
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
}
|
||||
|
||||
//! Modifies the font.
|
||||
void SetFont(const char* theFont) { SetFont(TCollection_AsciiString(theFont)); }
|
||||
void SetFont(const char* const theFont) { SetFont(TCollection_AsciiString(theFont)); }
|
||||
|
||||
//! Return the text style.
|
||||
Aspect_TypeOfStyleText Style() const { return myTextStyle; }
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
|
||||
//! Computes text width.
|
||||
virtual void TextSize(const occ::handle<Graphic3d_CView>& theView,
|
||||
const char* theText,
|
||||
const char* const theText,
|
||||
const float theHeight,
|
||||
float& theWidth,
|
||||
float& theAscent,
|
||||
|
||||
@@ -274,7 +274,7 @@ void Graphic3d_Group::Marker(const Graphic3d_Vertex& thePoint, const bool theToE
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void Graphic3d_Group::Text(const char* theText,
|
||||
void Graphic3d_Group::Text(const char* const theText,
|
||||
const Graphic3d_Vertex& thePoint,
|
||||
const double theHeight,
|
||||
const double /*theAngle*/,
|
||||
@@ -293,7 +293,7 @@ void Graphic3d_Group::Text(const char* theText,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void Graphic3d_Group::Text(const char* theText,
|
||||
void Graphic3d_Group::Text(const char* const theText,
|
||||
const Graphic3d_Vertex& thePoint,
|
||||
const double theHeight,
|
||||
const bool theToEvalMinMax)
|
||||
@@ -346,9 +346,9 @@ void Graphic3d_Group::Text(const TCollection_ExtendedString& theText,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void Graphic3d_Group::Text(const char* theText,
|
||||
const gp_Ax2& theOrientation,
|
||||
const double theHeight,
|
||||
void Graphic3d_Group::Text(const char* const theText,
|
||||
const gp_Ax2& theOrientation,
|
||||
const double theHeight,
|
||||
const double /*theAngle*/,
|
||||
const Graphic3d_TextPath /*theTp*/,
|
||||
const Graphic3d_HorizontalTextAlignment theHta,
|
||||
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
//! (with respect to the horizontal).
|
||||
Standard_DEPRECATED(
|
||||
"Deprecated method Text() with obsolete arguments, use AddText() instead of it")
|
||||
Standard_EXPORT virtual void Text(const char* AText,
|
||||
Standard_EXPORT virtual void Text(const char* const AText,
|
||||
const Graphic3d_Vertex& APoint,
|
||||
const double AHeight,
|
||||
const double AAngle,
|
||||
@@ -230,7 +230,7 @@ public:
|
||||
//! AVta : VTA_BOTTOM
|
||||
Standard_DEPRECATED(
|
||||
"Deprecated method Text() with obsolete arguments, use AddText() instead of it")
|
||||
Standard_EXPORT void Text(const char* AText,
|
||||
Standard_EXPORT void Text(const char* const AText,
|
||||
const Graphic3d_Vertex& APoint,
|
||||
const double AHeight,
|
||||
const bool EvalMinMax = true);
|
||||
@@ -279,7 +279,7 @@ public:
|
||||
//! Creates the string <theText> at orientation <theOrientation> in 3D space.
|
||||
Standard_DEPRECATED(
|
||||
"Deprecated method Text() with obsolete arguments, use AddText() instead of it")
|
||||
Standard_EXPORT virtual void Text(const char* theTextUtf,
|
||||
Standard_EXPORT virtual void Text(const char* const theTextUtf,
|
||||
const gp_Ax2& theOrientation,
|
||||
const double theHeight,
|
||||
const double theAngle,
|
||||
|
||||
@@ -675,7 +675,7 @@ const char* Graphic3d_MaterialAspect::MaterialName(const int theRank)
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
bool Graphic3d_MaterialAspect::MaterialFromName(const char* theName,
|
||||
bool Graphic3d_MaterialAspect::MaterialFromName(const char* const theName,
|
||||
Graphic3d_NameOfMaterial& theMat)
|
||||
{
|
||||
TCollection_AsciiString aName(theName);
|
||||
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
//! @param[in] theName name to find
|
||||
//! @param[out] theMat found material
|
||||
//! @return FALSE if name was unrecognized
|
||||
Standard_EXPORT static bool MaterialFromName(const char* theName,
|
||||
Standard_EXPORT static bool MaterialFromName(const char* const theName,
|
||||
Graphic3d_NameOfMaterial& theMat);
|
||||
|
||||
//! Returns the material for specified name or Graphic3d_NameOfMaterial_DEFAULT if name is
|
||||
//! unknown.
|
||||
static Graphic3d_NameOfMaterial MaterialFromName(const char* theName)
|
||||
static Graphic3d_NameOfMaterial MaterialFromName(const char* const theName)
|
||||
{
|
||||
Graphic3d_NameOfMaterial aMat = Graphic3d_NameOfMaterial_DEFAULT;
|
||||
MaterialFromName(theName, aMat);
|
||||
|
||||
@@ -140,7 +140,7 @@ private:
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
WNT_Window::WNT_Window(const char* theTitle,
|
||||
WNT_Window::WNT_Window(const char* const theTitle,
|
||||
const occ::handle<WNT_WClass>& theClass,
|
||||
const WNT_Dword& theStyle,
|
||||
const int thePxLeft,
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
//! Creates a Window defined by his position and size in pixels from the Parent Window.
|
||||
//! Trigger: Raises WindowDefinitionError if the Position out of the Screen Space or the window
|
||||
//! creation failed.
|
||||
Standard_EXPORT WNT_Window(const char* theTitle,
|
||||
Standard_EXPORT WNT_Window(const char* const theTitle,
|
||||
const occ::handle<WNT_WClass>& theClass,
|
||||
const WNT_Dword& theStyle,
|
||||
const int thePxLeft,
|
||||
|
||||
@@ -33,7 +33,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Xw_Window, Aspect_Window)
|
||||
//=================================================================================================
|
||||
|
||||
Xw_Window::Xw_Window(const occ::handle<Aspect_DisplayConnection>& theXDisplay,
|
||||
const char* theTitle,
|
||||
const char* const theTitle,
|
||||
const int thePxLeft,
|
||||
const int thePxTop,
|
||||
const int thePxWidth,
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
//! Creates a XLib window defined by his position and size in pixels.
|
||||
//! Throws exception if window can not be created or Display do not support GLX extension.
|
||||
Standard_EXPORT Xw_Window(const occ::handle<Aspect_DisplayConnection>& theXDisplay,
|
||||
const char* theTitle,
|
||||
const char* const theTitle,
|
||||
const int thePxLeft,
|
||||
const int thePxTop,
|
||||
const int thePxWidth,
|
||||
|
||||
@@ -31,7 +31,7 @@ void DsgPrs_XYZAxisPresentation::Add(const occ::handle<Prs3d_Presentation>& aPre
|
||||
const occ::handle<Prs3d_LineAspect>& aLineAspect,
|
||||
const gp_Dir& aDir,
|
||||
const double aVal,
|
||||
const char* theText,
|
||||
const char* const theText,
|
||||
const gp_Pnt& aPfirst,
|
||||
const gp_Pnt& aPlast)
|
||||
{
|
||||
@@ -60,7 +60,7 @@ void DsgPrs_XYZAxisPresentation::Add(const occ::handle<Prs3d_Presentation>& aPre
|
||||
const occ::handle<Prs3d_TextAspect>& aTextAspect,
|
||||
const gp_Dir& aDir,
|
||||
const double aVal,
|
||||
const char* theText,
|
||||
const char* const theText,
|
||||
const gp_Pnt& aPfirst,
|
||||
const gp_Pnt& aPlast)
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
const occ::handle<Prs3d_LineAspect>& anLineAspect,
|
||||
const gp_Dir& aDir,
|
||||
const double aVal,
|
||||
const char* aText,
|
||||
const char* const aText,
|
||||
const gp_Pnt& aPfirst,
|
||||
const gp_Pnt& aPlast);
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
const occ::handle<Prs3d_TextAspect>& aTextAspect,
|
||||
const gp_Dir& aDir,
|
||||
const double aVal,
|
||||
const char* aText,
|
||||
const char* const aText,
|
||||
const gp_Pnt& aPfirst,
|
||||
const gp_Pnt& aPlast);
|
||||
};
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
void SetColor(const Quantity_Color& theColor) { myTextAspect->SetColor(theColor); }
|
||||
|
||||
//! Sets the font used in text display.
|
||||
void SetFont(const char* theFont) { myTextAspect->SetFont(theFont); }
|
||||
void SetFont(const char* const theFont) { myTextAspect->SetFont(theFont); }
|
||||
|
||||
//! Sets the height of the text.
|
||||
void SetHeight(const double theHeight) { myHeight = theHeight; }
|
||||
|
||||
@@ -179,7 +179,8 @@ const char* V3d::TypeOfOrientationToString(V3d_TypeOfOrientation theType)
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
bool V3d::TypeOfOrientationFromString(const char* theTypeString, V3d_TypeOfOrientation& theType)
|
||||
bool V3d::TypeOfOrientationFromString(const char* const theTypeString,
|
||||
V3d_TypeOfOrientation& theType)
|
||||
{
|
||||
TCollection_AsciiString aName(theTypeString);
|
||||
aName.UpperCase();
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
//! comparison).
|
||||
//! @param theTypeString string identifier
|
||||
//! @return orientation type or V3d_TypeOfOrientation if string identifier is invalid
|
||||
static V3d_TypeOfOrientation TypeOfOrientationFromString(const char* theTypeString)
|
||||
static V3d_TypeOfOrientation TypeOfOrientationFromString(const char* const theTypeString)
|
||||
{
|
||||
V3d_TypeOfOrientation aType = V3d_Xpos;
|
||||
TypeOfOrientationFromString(theTypeString, aType);
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
//! @param theTypeString string identifier
|
||||
//! @param theType detected shape type
|
||||
//! @return TRUE if string identifier is known
|
||||
Standard_EXPORT static bool TypeOfOrientationFromString(const char* theTypeString,
|
||||
Standard_EXPORT static bool TypeOfOrientationFromString(const char* const theTypeString,
|
||||
V3d_TypeOfOrientation& theType);
|
||||
};
|
||||
|
||||
|
||||
@@ -563,7 +563,7 @@ void V3d_View::SetBgGradientStyle(const Aspect_GradientFillMethod theFillStyle,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void V3d_View::SetBackgroundImage(const char* theFileName,
|
||||
void V3d_View::SetBackgroundImage(const char* const theFileName,
|
||||
const Aspect_FillMethod theFillStyle,
|
||||
const bool theToUpdate)
|
||||
{
|
||||
@@ -2636,7 +2636,7 @@ void V3d_View::Init()
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
bool V3d_View::Dump(const char* theFile, const Graphic3d_BufferType& theBufferType)
|
||||
bool V3d_View::Dump(const char* const theFile, const Graphic3d_BufferType& theBufferType)
|
||||
{
|
||||
int aWinWidth, aWinHeight;
|
||||
MyWindow->Size(aWinWidth, aWinHeight);
|
||||
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
|
||||
//! Defines the background texture of the view by supplying the texture image file name
|
||||
//! and fill method (centered by default).
|
||||
Standard_EXPORT void SetBackgroundImage(const char* theFileName,
|
||||
Standard_EXPORT void SetBackgroundImage(const char* const theFileName,
|
||||
const Aspect_FillMethod theFillStyle = Aspect_FM_CENTERED,
|
||||
const bool theToUpdate = false);
|
||||
|
||||
@@ -920,7 +920,7 @@ public:
|
||||
//! .bmp, .jpg)
|
||||
//! @param theBufferType buffer to dump
|
||||
//! @return FALSE when the dump has failed
|
||||
Standard_EXPORT bool Dump(const char* theFile,
|
||||
Standard_EXPORT bool Dump(const char* const theFile,
|
||||
const Graphic3d_BufferType& theBufferType = Graphic3d_BT_RGB);
|
||||
|
||||
//! Dumps the full contents of the view to a pixmap with specified parameters.
|
||||
@@ -948,7 +948,7 @@ public:
|
||||
const Graphic3d_ZLayerId theTargetZLayerId = Graphic3d_ZLayerId_BotOSD,
|
||||
const int theIsSingleLayer = false,
|
||||
const V3d_StereoDumpOptions theStereoOptions = V3d_SDO_MONO,
|
||||
const char* theLightName = "")
|
||||
const char* const theLightName = "")
|
||||
{
|
||||
V3d_ImageDumpOptions aParams;
|
||||
aParams.Width = theWidth;
|
||||
|
||||
Reference in New Issue
Block a user