diff --git a/adm/scripts/migration_800/migrate_standard_types.py b/adm/scripts/migration_800/migrate_standard_types.py index 5ee58557c3..70658afee4 100755 --- a/adm/scripts/migration_800/migrate_standard_types.py +++ b/adm/scripts/migration_800/migrate_standard_types.py @@ -40,7 +40,8 @@ Type Transformations: Special handling: - Function-style casts like Standard_CString(x) -> static_cast(x) - Multi-token type casts like Standard_Utf8UChar(x) -> static_cast(x) -- const Standard_CString -> const char* (avoids 'const const char*') +- const Standard_CString -> const char* const (preserves const pointer semantics) +- const Standard_ExtString -> const char16_t* const (preserves const pointer semantics) Usage: python3 migrate_standard_types.py [options] @@ -304,20 +305,23 @@ class StandardTypeMigrator: counts['Standard_ExtString'] = counts.get('Standard_ExtString', 0) + extstring_cast_matches modified_line = re.sub(extstring_cast_pattern, 'static_cast(', modified_line) - # Handle 'const Standard_CString' specially to avoid 'const const char*' - # Standard_CString is already 'const char*', so 'const Standard_CString' becomes just 'const char*' + # Handle 'const Standard_CString' specially + # Standard_CString is 'const char*' (pointer to const char) + # 'const Standard_CString' is 'const (const char*)' = 'const char* const' (const pointer to const char) const_cstring_pattern = r'\bconst\s+Standard_CString\b' if re.search(const_cstring_pattern, modified_line): const_cstring_matches = len(re.findall(const_cstring_pattern, modified_line)) counts['Standard_CString'] = counts.get('Standard_CString', 0) + const_cstring_matches - modified_line = re.sub(const_cstring_pattern, 'const char*', modified_line) + modified_line = re.sub(const_cstring_pattern, 'const char* const', modified_line) - # Handle 'const Standard_ExtString' specially to avoid 'const const char16_t*' + # Handle 'const Standard_ExtString' specially + # Standard_ExtString is 'const char16_t*' (pointer to const char16_t) + # 'const Standard_ExtString' is 'const (const char16_t*)' = 'const char16_t* const' (const pointer to const char16_t) const_extstring_pattern = r'\bconst\s+Standard_ExtString\b' if re.search(const_extstring_pattern, modified_line): const_extstring_matches = len(re.findall(const_extstring_pattern, modified_line)) counts['Standard_ExtString'] = counts.get('Standard_ExtString', 0) + const_extstring_matches - modified_line = re.sub(const_extstring_pattern, 'const char16_t*', modified_line) + modified_line = re.sub(const_extstring_pattern, 'const char16_t* const', modified_line) # Apply other type replacements for old_type, new_type in mappings.items(): diff --git a/src/ApplicationFramework/TKBinL/BinMDF/BinMDF_ADriver.cxx b/src/ApplicationFramework/TKBinL/BinMDF/BinMDF_ADriver.cxx index 03a57316dc..71d1d94b1c 100644 --- a/src/ApplicationFramework/TKBinL/BinMDF/BinMDF_ADriver.cxx +++ b/src/ApplicationFramework/TKBinL/BinMDF/BinMDF_ADriver.cxx @@ -20,7 +20,7 @@ IMPLEMENT_STANDARD_RTTIEXT(BinMDF_ADriver, Standard_Transient) //================================================================================================= BinMDF_ADriver::BinMDF_ADriver(const occ::handle& theMsgDriver, - const char* theName) + const char* const theName) : myMessageDriver(theMsgDriver) { if (theName) diff --git a/src/ApplicationFramework/TKBinL/BinMDF/BinMDF_ADriver.hxx b/src/ApplicationFramework/TKBinL/BinMDF/BinMDF_ADriver.hxx index 5587138f81..214133b50c 100644 --- a/src/ApplicationFramework/TKBinL/BinMDF/BinMDF_ADriver.hxx +++ b/src/ApplicationFramework/TKBinL/BinMDF/BinMDF_ADriver.hxx @@ -62,7 +62,7 @@ public: protected: Standard_EXPORT BinMDF_ADriver(const occ::handle& theMsgDriver, - const char* theName = nullptr); + const char* const theName = nullptr); TCollection_AsciiString myTypeName; diff --git a/src/ApplicationFramework/TKBinL/BinObjMgt/BinObjMgt_Persistent.cxx b/src/ApplicationFramework/TKBinL/BinObjMgt/BinObjMgt_Persistent.cxx index 4150687310..65e556f516 100644 --- a/src/ApplicationFramework/TKBinL/BinObjMgt/BinObjMgt_Persistent.cxx +++ b/src/ApplicationFramework/TKBinL/BinObjMgt/BinObjMgt_Persistent.cxx @@ -319,7 +319,7 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutShortReal(const float theValue) // purpose : Offset in output buffer is not aligned //======================================================================= -BinObjMgt_Persistent& BinObjMgt_Persistent::PutCString(const char* theValue) +BinObjMgt_Persistent& BinObjMgt_Persistent::PutCString(const char* const theValue) { alignOffset(1); int aSize = (int)(strlen(theValue) + 1); diff --git a/src/ApplicationFramework/TKBinL/BinObjMgt/BinObjMgt_Persistent.hxx b/src/ApplicationFramework/TKBinL/BinObjMgt/BinObjMgt_Persistent.hxx index e532d4799c..0cdb9b107b 100644 --- a/src/ApplicationFramework/TKBinL/BinObjMgt/BinObjMgt_Persistent.hxx +++ b/src/ApplicationFramework/TKBinL/BinObjMgt/BinObjMgt_Persistent.hxx @@ -81,9 +81,9 @@ public: BinObjMgt_Persistent& operator<<(const float theValue) { return PutShortReal(theValue); } //! Offset in output buffer is not aligned - Standard_EXPORT BinObjMgt_Persistent& PutCString(const char* theValue); + Standard_EXPORT BinObjMgt_Persistent& PutCString(const char* const theValue); - BinObjMgt_Persistent& operator<<(const char* theValue) { return PutCString(theValue); } + BinObjMgt_Persistent& operator<<(const char* const theValue) { return PutCString(theValue); } //! Offset in output buffer is word-aligned Standard_EXPORT BinObjMgt_Persistent& PutAsciiString(const TCollection_AsciiString& theValue); diff --git a/src/ApplicationFramework/TKCAF/AppStd/AppStd_Application.cxx b/src/ApplicationFramework/TKCAF/AppStd/AppStd_Application.cxx index b63d6981bf..8fcea1349a 100644 --- a/src/ApplicationFramework/TKCAF/AppStd/AppStd_Application.cxx +++ b/src/ApplicationFramework/TKCAF/AppStd/AppStd_Application.cxx @@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(AppStd_Application, TDocStd_Application) const char* AppStd_Application::ResourcesName() { - const char* aRes = "Standard"; + const char* const aRes = "Standard"; return aRes; } diff --git a/src/ApplicationFramework/TKCAF/TNaming/TNaming_Identifier.cxx b/src/ApplicationFramework/TKCAF/TNaming/TNaming_Identifier.cxx index 612d2494a1..570a4b16f0 100644 --- a/src/ApplicationFramework/TKCAF/TNaming/TNaming_Identifier.cxx +++ b/src/ApplicationFramework/TKCAF/TNaming/TNaming_Identifier.cxx @@ -34,7 +34,7 @@ // unreferenced function, commented /*static void ModDbgTools_Write(const TopoDS_Shape& shape, - const char* filename) + const char* const filename) { std::ofstream save; save.open(filename); diff --git a/src/ApplicationFramework/TKCAF/TNaming/TNaming_Localizer.cxx b/src/ApplicationFramework/TKCAF/TNaming/TNaming_Localizer.cxx index 1471d59360..404f018846 100644 --- a/src/ApplicationFramework/TKCAF/TNaming/TNaming_Localizer.cxx +++ b/src/ApplicationFramework/TKCAF/TNaming/TNaming_Localizer.cxx @@ -45,7 +45,7 @@ void LPrintEntry(const TDF_Label& label) std::cout << "LabelEntry = " << entry << std::endl; } -static void LWrite(const TopoDS_Shape& shape, const char* filename) +static void LWrite(const TopoDS_Shape& shape, const char* const filename) { char buf[256]; if (strlen(filename) > 256) @@ -72,7 +72,7 @@ static void LWrite(const TopoDS_Shape& shape, const char* filename) } //======================================================================= -static void LWriteNSOnLabel(const occ::handle& NS, const char* filename) +static void LWriteNSOnLabel(const occ::handle& NS, const char* const filename) { if (!NS.IsNull() && !NS->IsEmpty()) { diff --git a/src/ApplicationFramework/TKCAF/TNaming/TNaming_Name.cxx b/src/ApplicationFramework/TKCAF/TNaming/TNaming_Name.cxx index 630907065d..2fe0b82273 100644 --- a/src/ApplicationFramework/TKCAF/TNaming/TNaming_Name.cxx +++ b/src/ApplicationFramework/TKCAF/TNaming/TNaming_Name.cxx @@ -96,7 +96,7 @@ void PrintEntries(const NCollection_Map& map) } #ifdef OCCT_DEBUG_DBGTOOLS_WRITE //======================================================================= -static void DbgTools_Write(const TopoDS_Shape& shape, const char* filename) +static void DbgTools_Write(const TopoDS_Shape& shape, const char* const filename) { char buf[256]; if (strlen(filename) > 256) @@ -120,7 +120,7 @@ static void DbgTools_Write(const TopoDS_Shape& shape, const char* filename) //======================================================================= static void DbgTools_Write(const NCollection_IndexedMap& MS, - const char* filename) + const char* const filename) { if (!MS.IsEmpty()) { @@ -134,7 +134,8 @@ static void DbgTools_Write(const NCollection_IndexedMap& NS, const char* filename) +static void DbgTools_WriteNSOnLabel(const occ::handle& NS, + const char* const filename) { if (!NS.IsNull() && !NS->IsEmpty()) { diff --git a/src/ApplicationFramework/TKCAF/TNaming/TNaming_Naming.cxx b/src/ApplicationFramework/TKCAF/TNaming/TNaming_Naming.cxx index df3f71feb6..47c2b73791 100644 --- a/src/ApplicationFramework/TKCAF/TNaming/TNaming_Naming.cxx +++ b/src/ApplicationFramework/TKCAF/TNaming/TNaming_Naming.cxx @@ -80,7 +80,7 @@ void Print_Entry(const TDF_Label& label) std::cout << "LabelEntry = " << entry << std::endl; } -static void Write(const TopoDS_Shape& shape, const char* filename) +static void Write(const TopoDS_Shape& shape, const char* const filename) { char buf[256]; if (strlen(filename) > 256) diff --git a/src/ApplicationFramework/TKCAF/TNaming/TNaming_NamingTool.cxx b/src/ApplicationFramework/TKCAF/TNaming/TNaming_NamingTool.cxx index 24439e1792..6797c2ed06 100644 --- a/src/ApplicationFramework/TKCAF/TNaming/TNaming_NamingTool.cxx +++ b/src/ApplicationFramework/TKCAF/TNaming/TNaming_NamingTool.cxx @@ -28,7 +28,7 @@ #include #include -static void WriteS(const TopoDS_Shape& shape, const char* filename) +static void WriteS(const TopoDS_Shape& shape, const char* const filename) { char buf[256]; if (strlen(filename) > 255) diff --git a/src/ApplicationFramework/TKCAF/TNaming/TNaming_Selector.cxx b/src/ApplicationFramework/TKCAF/TNaming/TNaming_Selector.cxx index 264d59a577..6578300bad 100644 --- a/src/ApplicationFramework/TKCAF/TNaming/TNaming_Selector.cxx +++ b/src/ApplicationFramework/TKCAF/TNaming/TNaming_Selector.cxx @@ -61,7 +61,7 @@ void PrintEntry(const TDF_Label& label, const bool allLevels) #include -static void Write(const TopoDS_Shape& shape, const char* filename) +static void Write(const TopoDS_Shape& shape, const char* const filename) { char buf[256]; if (strlen(filename) > 255) diff --git a/src/ApplicationFramework/TKCAF/TNaming/TNaming_Tool.cxx b/src/ApplicationFramework/TKCAF/TNaming/TNaming_Tool.cxx index c5e1165d96..2e548c8f34 100644 --- a/src/ApplicationFramework/TKCAF/TNaming/TNaming_Tool.cxx +++ b/src/ApplicationFramework/TKCAF/TNaming/TNaming_Tool.cxx @@ -574,7 +574,7 @@ void TNamingTool_DumpLabel(const TopoDS_Shape& S, const TDF_Label& Acces) //================================================================================================= -void TNamingTool_Write(const TopoDS_Shape& S, const char* File) +void TNamingTool_Write(const TopoDS_Shape& S, const char* const File) { BRepTools::Write(S, File); } diff --git a/src/ApplicationFramework/TKCDF/CDF/CDF_Application.cxx b/src/ApplicationFramework/TKCDF/CDF/CDF_Application.cxx index 5547cb87be..b733adbf7c 100644 --- a/src/ApplicationFramework/TKCDF/CDF/CDF_Application.cxx +++ b/src/ApplicationFramework/TKCDF/CDF/CDF_Application.cxx @@ -212,7 +212,7 @@ const char16_t* CDF_Application::DefaultFolder() //================================================================================================= -bool CDF_Application::SetDefaultFolder(const char16_t* aFolder) +bool CDF_Application::SetDefaultFolder(const char16_t* const aFolder) { bool found = myMetaDataDriver->FindFolder(aFolder); if (found) diff --git a/src/ApplicationFramework/TKCDF/CDF/CDF_Application.hxx b/src/ApplicationFramework/TKCDF/CDF/CDF_Application.hxx index 4c44aebd2f..d7adffe439 100644 --- a/src/ApplicationFramework/TKCDF/CDF/CDF_Application.hxx +++ b/src/ApplicationFramework/TKCDF/CDF/CDF_Application.hxx @@ -179,7 +179,7 @@ public: Standard_EXPORT const char16_t* DefaultFolder(); - Standard_EXPORT bool SetDefaultFolder(const char16_t* aFolder); + Standard_EXPORT bool SetDefaultFolder(const char16_t* const aFolder); //! returns MetaDatdDriver of this application Standard_EXPORT occ::handle MetaDataDriver() const; diff --git a/src/ApplicationFramework/TKCDF/CDF/CDF_Store.cxx b/src/ApplicationFramework/TKCDF/CDF/CDF_Store.cxx index d6645d827b..680856137f 100644 --- a/src/ApplicationFramework/TKCDF/CDF/CDF_Store.cxx +++ b/src/ApplicationFramework/TKCDF/CDF/CDF_Store.cxx @@ -78,7 +78,7 @@ occ::handle CDF_Store::Name() const return new TCollection_HExtendedString(myCurrentDocument->RequestedName()); } -bool CDF_Store::SetFolder(const char16_t* aFolder) +bool CDF_Store::SetFolder(const char16_t* const aFolder) { TCollection_ExtendedString f(aFolder); return SetFolder(f); @@ -135,7 +135,7 @@ CDF_StoreSetNameStatus CDF_Store::SetName(const TCollection_ExtendedString& aNam return CDF_SSNS_OK; } -CDF_StoreSetNameStatus CDF_Store::SetName(const char16_t* aName) +CDF_StoreSetNameStatus CDF_Store::SetName(const char16_t* const aName) { TCollection_ExtendedString theName(aName); return SetName(theName); @@ -204,7 +204,7 @@ occ::handle CDF_Store::PreviousVersion() const return blank; } -bool CDF_Store::SetPreviousVersion(const char16_t* aPreviousVersion) +bool CDF_Store::SetPreviousVersion(const char16_t* const aPreviousVersion) { if (theMetaDataDriver->HasVersionCapability()) { @@ -227,7 +227,7 @@ bool CDF_Store::SetPreviousVersion(const char16_t* aPreviousVersion) return true; } -void CDF_Store::SetCurrent(const char16_t* /*aPresentation*/) +void CDF_Store::SetCurrent(const char16_t* const /*aPresentation*/) { myIsMainDocument = myCurrentDocument == myMainDocument; } @@ -264,7 +264,7 @@ void CDF_Store::FindDefault() } } -void CDF_Store::SetComment(const char16_t* aComment) +void CDF_Store::SetComment(const char16_t* const aComment) { myCurrentDocument->SetRequestedComment(aComment); } diff --git a/src/ApplicationFramework/TKCDF/CDF/CDF_Store.hxx b/src/ApplicationFramework/TKCDF/CDF/CDF_Store.hxx index 3f7b38000a..341adda563 100644 --- a/src/ApplicationFramework/TKCDF/CDF/CDF_Store.hxx +++ b/src/ApplicationFramework/TKCDF/CDF/CDF_Store.hxx @@ -68,9 +68,9 @@ public: Standard_EXPORT bool SetFolder(const TCollection_ExtendedString& aFolder); //! defines the name under which the document should be stored. - Standard_EXPORT CDF_StoreSetNameStatus SetName(const char16_t* aName); + Standard_EXPORT CDF_StoreSetNameStatus SetName(const char16_t* const aName); - Standard_EXPORT void SetComment(const char16_t* aComment); + Standard_EXPORT void SetComment(const char16_t* const aComment); Standard_EXPORT occ::handle Comment() const; @@ -78,7 +78,7 @@ public: //! uses for example after modification of the folder. Standard_EXPORT CDF_StoreSetNameStatus RecheckName(); - Standard_EXPORT bool SetPreviousVersion(const char16_t* aPreviousVersion); + Standard_EXPORT bool SetPreviousVersion(const char16_t* const aPreviousVersion); Standard_EXPORT void Realize(const Message_ProgressRange& theRange = Message_ProgressRange()); @@ -92,7 +92,7 @@ public: //! returns the description of the format of the main object. Standard_EXPORT occ::handle Description() const; - Standard_EXPORT void SetCurrent(const char16_t* aPresentation); + Standard_EXPORT void SetCurrent(const char16_t* const aPresentation); //! the two following methods can be used just after //! Realize or Import -- method to know if @@ -109,7 +109,7 @@ public: //! defines the folder in which the document should be //! stored. returns true if the Folder exists, //! false otherwise. - Standard_EXPORT bool SetFolder(const char16_t* aFolder); + Standard_EXPORT bool SetFolder(const char16_t* const aFolder); private: Standard_EXPORT CDF_Store(); diff --git a/src/ApplicationFramework/TKCDF/CDM/CDM_Application.cxx b/src/ApplicationFramework/TKCDF/CDM/CDM_Application.cxx index df72ff0780..7462611088 100644 --- a/src/ApplicationFramework/TKCDF/CDM/CDM_Application.cxx +++ b/src/ApplicationFramework/TKCDF/CDM/CDM_Application.cxx @@ -58,7 +58,7 @@ occ::handle CDM_Application::MessageDriver() //================================================================================================= -void CDM_Application::Write(const char16_t* aString) +void CDM_Application::Write(const char16_t* const aString) { MessageDriver()->Send(aString); } diff --git a/src/ApplicationFramework/TKCDF/CDM/CDM_Application.hxx b/src/ApplicationFramework/TKCDF/CDM/CDM_Application.hxx index 5d5889a59a..de8fe8714f 100644 --- a/src/ApplicationFramework/TKCDF/CDM/CDM_Application.hxx +++ b/src/ApplicationFramework/TKCDF/CDM/CDM_Application.hxx @@ -53,7 +53,7 @@ public: const TCollection_ExtendedString& ErrorString); //! writes the string in the application MessagerDriver. - Standard_EXPORT void Write(const char16_t* aString); + Standard_EXPORT void Write(const char16_t* const aString); //! Returns the application name. Standard_EXPORT virtual TCollection_ExtendedString Name() const; diff --git a/src/ApplicationFramework/TKCDF/UTL/UTL.cxx b/src/ApplicationFramework/TKCDF/UTL/UTL.cxx index 2463c4061a..3023b8c91a 100644 --- a/src/ApplicationFramework/TKCDF/UTL/UTL.cxx +++ b/src/ApplicationFramework/TKCDF/UTL/UTL.cxx @@ -29,7 +29,7 @@ #include #include -TCollection_ExtendedString UTL::xgetenv(const char* aCString) +TCollection_ExtendedString UTL::xgetenv(const char* const aCString) { TCollection_ExtendedString x; OSD_Environment theEnv(aCString); diff --git a/src/ApplicationFramework/TKCDF/UTL/UTL.hxx b/src/ApplicationFramework/TKCDF/UTL/UTL.hxx index 1520442dbf..d39cc6e290 100644 --- a/src/ApplicationFramework/TKCDF/UTL/UTL.hxx +++ b/src/ApplicationFramework/TKCDF/UTL/UTL.hxx @@ -39,7 +39,7 @@ class UTL public: DEFINE_STANDARD_ALLOC - Standard_EXPORT static TCollection_ExtendedString xgetenv(const char* aCString); + Standard_EXPORT static TCollection_ExtendedString xgetenv(const char* const aCString); Standard_EXPORT static Storage_Error OpenFile(const occ::handle& aFile, const TCollection_ExtendedString& aName, diff --git a/src/ApplicationFramework/TKLCAF/AppStdL/AppStdL_Application.cxx b/src/ApplicationFramework/TKLCAF/AppStdL/AppStdL_Application.cxx index 51c552d83a..cc8eee7a54 100644 --- a/src/ApplicationFramework/TKLCAF/AppStdL/AppStdL_Application.cxx +++ b/src/ApplicationFramework/TKLCAF/AppStdL/AppStdL_Application.cxx @@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(AppStdL_Application, TDocStd_Application) const char* AppStdL_Application::ResourcesName() { - const char* aRes = "StandardLite"; + const char* const aRes = "StandardLite"; return aRes; } diff --git a/src/ApplicationFramework/TKLCAF/TDF/TDF_Tool.cxx b/src/ApplicationFramework/TKLCAF/TDF/TDF_Tool.cxx index 8b7fdd64d8..1b8fe8d7de 100644 --- a/src/ApplicationFramework/TKLCAF/TDF/TDF_Tool.cxx +++ b/src/ApplicationFramework/TKLCAF/TDF/TDF_Tool.cxx @@ -461,7 +461,7 @@ void TDF_Tool::Label(const occ::handle& aDF, //======================================================================= void TDF_Tool::Label(const occ::handle& aDF, - const char* anEntry, + const char* const anEntry, TDF_Label& aLabel, const bool create) { diff --git a/src/ApplicationFramework/TKLCAF/TDF/TDF_Tool.hxx b/src/ApplicationFramework/TKLCAF/TDF/TDF_Tool.hxx index 2a17e34390..b7ebd4eebe 100644 --- a/src/ApplicationFramework/TKLCAF/TDF/TDF_Tool.hxx +++ b/src/ApplicationFramework/TKLCAF/TDF/TDF_Tool.hxx @@ -136,7 +136,7 @@ public: //! the label if it does not exist and if is //! true. Standard_EXPORT static void Label(const occ::handle& aDF, - const char* anEntry, + const char* const anEntry, TDF_Label& aLabel, const bool create = false); diff --git a/src/ApplicationFramework/TKTObj/TObj/TObj_Assistant.cxx b/src/ApplicationFramework/TKTObj/TObj/TObj_Assistant.cxx index a1f2c0f37f..f7f9df7715 100644 --- a/src/ApplicationFramework/TKTObj/TObj/TObj_Assistant.cxx +++ b/src/ApplicationFramework/TKTObj/TObj/TObj_Assistant.cxx @@ -58,7 +58,7 @@ int& TObj_Assistant::getVersion() //================================================================================================= -occ::handle TObj_Assistant::FindModel(const char* theName) +occ::handle TObj_Assistant::FindModel(const char* const theName) { TCollection_ExtendedString aName(theName, true); int i = getModels().Length(); diff --git a/src/ApplicationFramework/TKTObj/TObj/TObj_Assistant.hxx b/src/ApplicationFramework/TKTObj/TObj/TObj_Assistant.hxx index 398ea617a9..3dcba4dae7 100644 --- a/src/ApplicationFramework/TKTObj/TObj/TObj_Assistant.hxx +++ b/src/ApplicationFramework/TKTObj/TObj/TObj_Assistant.hxx @@ -40,7 +40,7 @@ public: */ //! Finds model by name - static Standard_EXPORT occ::handle FindModel(const char* theName); + static Standard_EXPORT occ::handle FindModel(const char* const theName); //! Binds model to the map static Standard_EXPORT void BindModel(const occ::handle& theModel); diff --git a/src/ApplicationFramework/TKTObj/TObj/TObj_Object.cxx b/src/ApplicationFramework/TKTObj/TObj/TObj_Object.cxx index 8cd6014343..a23b4d3e97 100644 --- a/src/ApplicationFramework/TKTObj/TObj/TObj_Object.cxx +++ b/src/ApplicationFramework/TKTObj/TObj/TObj_Object.cxx @@ -198,7 +198,7 @@ occ::handle TObj_Object::GetChildren( //======================================================================= #ifdef DFBROWSE -static TDF_Label getLabelByRank(const TDF_Label& theL, const int theRank, const char* theName) +static TDF_Label getLabelByRank(const TDF_Label& theL, const int theRank, const char* const theName) { TDF_Label L = theL.FindChild(theRank, false); if (L.IsNull()) @@ -276,7 +276,7 @@ bool TObj_Object::SetName(const occ::handle& theName) //================================================================================================= -bool TObj_Object::SetName(const char* theName) const +bool TObj_Object::SetName(const char* const theName) const { occ::handle aName = new TCollection_HAsciiString(theName); return SetName(aName); diff --git a/src/ApplicationFramework/TKTObj/TObj/TObj_Object.hxx b/src/ApplicationFramework/TKTObj/TObj/TObj_Object.hxx index bd0c8ce7bc..59e35c989c 100644 --- a/src/ApplicationFramework/TKTObj/TObj/TObj_Object.hxx +++ b/src/ApplicationFramework/TKTObj/TObj/TObj_Object.hxx @@ -175,7 +175,7 @@ public: Standard_EXPORT bool SetName(const occ::handle& theName) const; //! Sets name of the object. Returns False if theName is not unique. - Standard_EXPORT bool SetName(const char* name) const; + Standard_EXPORT bool SetName(const char* const theName) const; //! Returns name for copy //! default implementation returns the same name diff --git a/src/ApplicationFramework/TKTObj/TObj/TObj_Persistence.cxx b/src/ApplicationFramework/TKTObj/TObj/TObj_Persistence.cxx index 39861ecc3c..740df876b0 100644 --- a/src/ApplicationFramework/TKTObj/TObj/TObj_Persistence.cxx +++ b/src/ApplicationFramework/TKTObj/TObj/TObj_Persistence.cxx @@ -34,7 +34,7 @@ NCollection_DataMap& TObj_Persistence::getMapOfT // purpose : Register the type for persistence //======================================================================= -TObj_Persistence::TObj_Persistence(const char* theType) +TObj_Persistence::TObj_Persistence(const char* const theType) { myType = theType; getMapOfTypes().Bind(theType, this); @@ -49,8 +49,8 @@ TObj_Persistence::~TObj_Persistence() //================================================================================================= -occ::handle TObj_Persistence::CreateNewObject(const char* theType, - const TDF_Label& theLabel) +occ::handle TObj_Persistence::CreateNewObject(const char* const theType, + const TDF_Label& theLabel) { if (getMapOfTypes().IsBound(theType)) { diff --git a/src/ApplicationFramework/TKTObj/TObj/TObj_Persistence.hxx b/src/ApplicationFramework/TKTObj/TObj/TObj_Persistence.hxx index e456677125..781f9566d5 100644 --- a/src/ApplicationFramework/TKTObj/TObj/TObj_Persistence.hxx +++ b/src/ApplicationFramework/TKTObj/TObj/TObj_Persistence.hxx @@ -47,8 +47,8 @@ public: //! Creates and returns a new object of the registered type //! If the type is not registered, returns Null handle - static Standard_EXPORT occ::handle CreateNewObject(const char* theType, - const TDF_Label& theLabel); + static Standard_EXPORT occ::handle CreateNewObject(const char* const theType, + const TDF_Label& theLabel); //! Dumps names of all the types registered for persistence to the //! specified stream @@ -60,7 +60,7 @@ protected: */ //! The constructor registers the object - Standard_EXPORT TObj_Persistence(const char* theType); + Standard_EXPORT TObj_Persistence(const char* const theType); //! The destructor unregisters the object virtual Standard_EXPORT ~TObj_Persistence(); diff --git a/src/ApplicationFramework/TKXmlL/XmlMDF/XmlMDF_ADriver.cxx b/src/ApplicationFramework/TKXmlL/XmlMDF/XmlMDF_ADriver.cxx index 0ede4e5396..59ec3e8274 100644 --- a/src/ApplicationFramework/TKXmlL/XmlMDF/XmlMDF_ADriver.cxx +++ b/src/ApplicationFramework/TKXmlL/XmlMDF/XmlMDF_ADriver.cxx @@ -26,8 +26,8 @@ IMPLEMENT_STANDARD_RTTIEXT(XmlMDF_ADriver, Standard_Transient) //================================================================================================= XmlMDF_ADriver::XmlMDF_ADriver(const occ::handle& theMsgDriver, - const char* theNS, - const char* theName) + const char* const theNS, + const char* const theName) : myNamespace(theNS == nullptr ? "" : theNS), myMessageDriver(theMsgDriver) { @@ -62,7 +62,7 @@ occ::handle XmlMDF_ADriver::SourceType() const const TCollection_AsciiString& XmlMDF_ADriver::TypeName() const { - const char* aString = myTypeName.ToCString(); + const char* const aString = myTypeName.ToCString(); if (myTypeName.Length() == 0 || aString[myTypeName.Length() - 1] == ':') (TCollection_AsciiString&)myTypeName += SourceType()->Name(); return myTypeName; diff --git a/src/ApplicationFramework/TKXmlL/XmlMDF/XmlMDF_ADriver.hxx b/src/ApplicationFramework/TKXmlL/XmlMDF/XmlMDF_ADriver.hxx index c4a23d65c3..733e3479b9 100644 --- a/src/ApplicationFramework/TKXmlL/XmlMDF/XmlMDF_ADriver.hxx +++ b/src/ApplicationFramework/TKXmlL/XmlMDF/XmlMDF_ADriver.hxx @@ -72,8 +72,8 @@ public: protected: Standard_EXPORT XmlMDF_ADriver(const occ::handle& theMessageDriver, - const char* theNamespace, - const char* theName = nullptr); + const char* const theNamespace, + const char* const theName = nullptr); TCollection_AsciiString myTypeName; TCollection_AsciiString myNamespace; diff --git a/src/DataExchange/TKDECascade/DEBRepCascade/FILES.cmake b/src/DataExchange/TKDECascade/DEBRepCascade/FILES.cmake new file mode 100644 index 0000000000..03bebd3f94 --- /dev/null +++ b/src/DataExchange/TKDECascade/DEBRepCascade/FILES.cmake @@ -0,0 +1,6 @@ +# Source files for DEBRepCascade package +set(OCCT_DEBRepCascade_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}") + +set(OCCT_DEBRepCascade_FILES + +) diff --git a/src/DataExchange/TKDECascade/DEXCAFCascade/FILES.cmake b/src/DataExchange/TKDECascade/DEXCAFCascade/FILES.cmake new file mode 100644 index 0000000000..8cbd6f56c3 --- /dev/null +++ b/src/DataExchange/TKDECascade/DEXCAFCascade/FILES.cmake @@ -0,0 +1,6 @@ +# Source files for DEXCAFCascade package +set(OCCT_DEXCAFCascade_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}") + +set(OCCT_DEXCAFCascade_FILES + +) diff --git a/src/DataExchange/TKDECascade/PACKAGES.cmake b/src/DataExchange/TKDECascade/PACKAGES.cmake index 05e30fd55d..67aa2ef61d 100644 --- a/src/DataExchange/TKDECascade/PACKAGES.cmake +++ b/src/DataExchange/TKDECascade/PACKAGES.cmake @@ -1,5 +1,7 @@ # Auto-generated list of packages for TKDECascade toolkit set(OCCT_TKDECascade_LIST_OF_PACKAGES + DEBRepCascade + DEXCAFCascade DEBREP DEXCAF ) diff --git a/src/DataExchange/TKDEIGES/BRepToIGES/BRepToIGES_BREntity.cxx b/src/DataExchange/TKDEIGES/BRepToIGES/BRepToIGES_BREntity.cxx index b481d4f7fe..ddf470e0ba 100644 --- a/src/DataExchange/TKDEIGES/BRepToIGES/BRepToIGES_BREntity.cxx +++ b/src/DataExchange/TKDEIGES/BRepToIGES/BRepToIGES_BREntity.cxx @@ -192,7 +192,7 @@ occ::handle BRepToIGES_BREntity::TransferShape( //================================================================================================= -void BRepToIGES_BREntity::AddFail(const TopoDS_Shape& start, const char* amess) +void BRepToIGES_BREntity::AddFail(const TopoDS_Shape& start, const char* const amess) { occ::handle Mapper = new TransferBRep_ShapeMapper(start); TheMap->AddFail(Mapper, amess); @@ -200,7 +200,7 @@ void BRepToIGES_BREntity::AddFail(const TopoDS_Shape& start, const char* amess) //================================================================================================= -void BRepToIGES_BREntity::AddWarning(const TopoDS_Shape& start, const char* amess) +void BRepToIGES_BREntity::AddWarning(const TopoDS_Shape& start, const char* const amess) { occ::handle Mapper = new TransferBRep_ShapeMapper(start); TheMap->AddWarning(Mapper, amess); @@ -208,7 +208,8 @@ void BRepToIGES_BREntity::AddWarning(const TopoDS_Shape& start, const char* ames //================================================================================================= -void BRepToIGES_BREntity::AddFail(const occ::handle& start, const char* amess) +void BRepToIGES_BREntity::AddFail(const occ::handle& start, + const char* const amess) { occ::handle Mapper = new Transfer_TransientMapper(start); TheMap->AddFail(Mapper, amess); @@ -217,7 +218,7 @@ void BRepToIGES_BREntity::AddFail(const occ::handle& start, //================================================================================================= void BRepToIGES_BREntity::AddWarning(const occ::handle& start, - const char* amess) + const char* const amess) { occ::handle Mapper = new Transfer_TransientMapper(start); TheMap->AddWarning(Mapper, amess); diff --git a/src/DataExchange/TKDEIGES/BRepToIGES/BRepToIGES_BREntity.hxx b/src/DataExchange/TKDEIGES/BRepToIGES/BRepToIGES_BREntity.hxx index 81c187e44c..80d523d387 100644 --- a/src/DataExchange/TKDEIGES/BRepToIGES/BRepToIGES_BREntity.hxx +++ b/src/DataExchange/TKDEIGES/BRepToIGES/BRepToIGES_BREntity.hxx @@ -66,16 +66,18 @@ public: const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Records a new Fail message - Standard_EXPORT void AddFail(const TopoDS_Shape& start, const char* amess); + Standard_EXPORT void AddFail(const TopoDS_Shape& start, const char* const amess); //! Records a new Warning message - Standard_EXPORT void AddWarning(const TopoDS_Shape& start, const char* amess); + Standard_EXPORT void AddWarning(const TopoDS_Shape& start, const char* const amess); //! Records a new Fail message - Standard_EXPORT void AddFail(const occ::handle& start, const char* amess); + Standard_EXPORT void AddFail(const occ::handle& start, + const char* const amess); //! Records a new Warning message - Standard_EXPORT void AddWarning(const occ::handle& start, const char* amess); + Standard_EXPORT void AddWarning(const occ::handle& start, + const char* const amess); //! Returns True if start was already treated and has a result in "TheMap" //! else returns False. diff --git a/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Reader.cxx b/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Reader.cxx index 203fed428b..f57031526c 100644 --- a/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Reader.cxx +++ b/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Reader.cxx @@ -374,7 +374,7 @@ bool IGESCAFControl_Reader::Transfer(const occ::handle& doc, //================================================================================================= -bool IGESCAFControl_Reader::Perform(const char* filename, +bool IGESCAFControl_Reader::Perform(const char* const filename, const occ::handle& doc, const Message_ProgressRange& theProgress) { diff --git a/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Reader.hxx b/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Reader.hxx index a51ed3610f..cba0189e1a 100644 --- a/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Reader.hxx +++ b/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Reader.hxx @@ -82,7 +82,7 @@ public: //! Translate IGES file given by filename into the document //! Return True if succeeded, and False in case of fail - Standard_EXPORT bool Perform(const char* theFileName, + Standard_EXPORT bool Perform(const char* const theFileName, const occ::handle& theDoc, const Message_ProgressRange& theProgress = Message_ProgressRange()); diff --git a/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Writer.cxx b/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Writer.cxx index 703f1e4aed..26afc260f5 100644 --- a/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Writer.cxx +++ b/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Writer.cxx @@ -134,7 +134,7 @@ IGESCAFControl_Writer::IGESCAFControl_Writer(const occ::handle& WS, - const char* theUnit) + const char* const theUnit) : IGESControl_Writer(theUnit) { @@ -209,7 +209,7 @@ bool IGESCAFControl_Writer::Transfer(const NCollection_Sequence& labe //================================================================================================= bool IGESCAFControl_Writer::Perform(const occ::handle& doc, - const char* filename, + const char* const filename, const Message_ProgressRange& theProgress) { if (!Transfer(doc, theProgress)) diff --git a/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Writer.hxx b/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Writer.hxx index adfc2538ca..057e6558d3 100644 --- a/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Writer.hxx +++ b/src/DataExchange/TKDEIGES/IGESCAFControl/IGESCAFControl_Writer.hxx @@ -75,7 +75,7 @@ public: //! Clears the session if it was not yet set for IGES //! Sets target Unit for the writing process. Standard_EXPORT IGESCAFControl_Writer(const occ::handle& theWS, - const char* theUnit); + const char* const theUnit); //! Transfers a document to a IGES model //! Returns True if translation is OK @@ -99,7 +99,7 @@ public: //! Transfers a document and writes it to a IGES file //! Returns True if translation is OK Standard_EXPORT bool Perform(const occ::handle& doc, - const char* filename, + const char* const filename, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Set ColorMode for indicate write Colors or not. diff --git a/src/DataExchange/TKDEIGES/IGESControl/IGESControl_Writer.cxx b/src/DataExchange/TKDEIGES/IGESControl/IGESControl_Writer.cxx index fb73b5e156..7f8fbd6cc4 100644 --- a/src/DataExchange/TKDEIGES/IGESControl/IGESControl_Writer.cxx +++ b/src/DataExchange/TKDEIGES/IGESControl/IGESControl_Writer.cxx @@ -65,7 +65,7 @@ IGESControl_Writer::IGESControl_Writer() //============================================================================= -IGESControl_Writer::IGESControl_Writer(const char* theUnit, const int theModecr) +IGESControl_Writer::IGESControl_Writer(const char* const theUnit, const int theModecr) : myTP(new Transfer_FinderProcess(10000)), myWriteMode(theModecr), myIsComputed(false) @@ -266,7 +266,7 @@ bool IGESControl_Writer::Write(Standard_OStream& S, const bool fnes) //============================================================================= -bool IGESControl_Writer::Write(const char* file, const bool fnes) +bool IGESControl_Writer::Write(const char* const file, const bool fnes) { const occ::handle& aFileSystem = OSD_FileSystem::DefaultFileSystem(); std::shared_ptr aStream = diff --git a/src/DataExchange/TKDEIGES/IGESControl/IGESControl_Writer.hxx b/src/DataExchange/TKDEIGES/IGESControl/IGESControl_Writer.hxx index 4819c7b09c..b03c6909fb 100644 --- a/src/DataExchange/TKDEIGES/IGESControl/IGESControl_Writer.hxx +++ b/src/DataExchange/TKDEIGES/IGESControl/IGESControl_Writer.hxx @@ -53,7 +53,7 @@ public: public: //! Creates a writer object with the //! default unit (millimeters) and write mode (Face). - //! IGESControl_Writer (const char* unit, + //! IGESControl_Writer (const char* const unit, //! const int modecr = 0); Standard_EXPORT IGESControl_Writer(); @@ -64,7 +64,7 @@ public: //! theModecr defines the write mode and may be: //! - 0: Faces (default) //! - 1: BRep. - Standard_EXPORT IGESControl_Writer(const char* theUnit, const int theModecr = 0); + Standard_EXPORT IGESControl_Writer(const char* const theUnit, const int theModecr = 0); //! Creates a writer object with the //! prepared IGES model theModel in write mode. @@ -111,7 +111,7 @@ public: //! Returns True if the operation was performed correctly and //! False if an error occurred (for instance, //! if the processor could not create the file). - Standard_EXPORT bool Write(const char* file, const bool fnes = false); + Standard_EXPORT bool Write(const char* const file, const bool fnes = false); //! Sets parameters for shape processing. //! @param theParameters the parameters for shape processing. diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_BasicEditor.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_BasicEditor.cxx index 07008489ce..16865a5a83 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_BasicEditor.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_BasicEditor.cxx @@ -131,7 +131,7 @@ int IGESData_BasicEditor::GetFlagByValue(const double theValue) //================================================================================================= -bool IGESData_BasicEditor::SetUnitName(const char* name) +bool IGESData_BasicEditor::SetUnitName(const char* const name) { if (themodel.IsNull()) return false; @@ -375,7 +375,7 @@ int IGESData_BasicEditor::AutoCorrectModel() //================================================================================================= -int IGESData_BasicEditor::UnitNameFlag(const char* name) +int IGESData_BasicEditor::UnitNameFlag(const char* const name) { char* nam = (char*)&name[0]; if (name[1] == 'H') diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_BasicEditor.hxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_BasicEditor.hxx index 5c0ca71fed..83b8c673a6 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_BasicEditor.hxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_BasicEditor.hxx @@ -78,7 +78,7 @@ public: //! Returns True if done, False if is incorrect //! Remark : if has been set to 3 (user defined), //! is then free - Standard_EXPORT bool SetUnitName(const char* name); + Standard_EXPORT bool SetUnitName(const char* const name); //! Applies unit value to convert header data : Resolution, //! MaxCoord, MaxLineWeight @@ -110,7 +110,7 @@ public: //! From the name of unit, computes flag number, 0 if incorrect //! (in this case, user defined entity remains possible) - Standard_EXPORT static int UnitNameFlag(const char* name); + Standard_EXPORT static int UnitNameFlag(const char* const name); //! From the flag of unit, determines value in MM, 0 if incorrect Standard_EXPORT static double UnitFlagValue(const int flag); diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_DirPart.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_DirPart.cxx index 635a54e52f..97d7caef82 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_DirPart.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_DirPart.cxx @@ -17,27 +17,27 @@ IGESData_DirPart::IGESData_DirPart() = default; -void IGESData_DirPart::Init(const int i1, - const int i2, - const int i3, - const int i4, - const int i5, - const int i6, - const int i7, - const int i8, - const int i9, - const int i10, - const int i11, - const int i12, - const int i13, - const int i14, - const int i15, - const int i16, - const int i17, - const char* res1, - const char* res2, - const char* label, - const char* subscript) +void IGESData_DirPart::Init(const int i1, + const int i2, + const int i3, + const int i4, + const int i5, + const int i6, + const int i7, + const int i8, + const int i9, + const int i10, + const int i11, + const int i12, + const int i13, + const int i14, + const int i15, + const int i16, + const int i17, + const char* const res1, + const char* const res2, + const char* const label, + const char* const subscript) { thevals[0] = i1; thevals[1] = i2; @@ -73,35 +73,29 @@ void IGESData_DirPart::Init(const int i1, //================================================================================================= -void IGESData_DirPart::Values(int& i1, - int& i2, - int& i3, - int& i4, - int& i5, - int& i6, - int& i7, - int& i8, - int& i9, - int& i10, - int& i11, - int& i12, - int& i13, - int& i14, - int& i15, - int& i16, - int& i17, - const char* res1, - const char* res2, - const char* label, - const char* subscript) const +void IGESData_DirPart::Values(int& i1, + int& i2, + int& i3, + int& i4, + int& i5, + int& i6, + int& i7, + int& i8, + int& i9, + int& i10, + int& i11, + int& i12, + int& i13, + int& i14, + int& i15, + int& i16, + int& i17, + char* res1, + char* res2, + char* label, + char* subscript) const { - Standard_PCharacter pres1, pres2, plabel, psubscript; - int i; - // - pres1 = (Standard_PCharacter)res1; - pres2 = (Standard_PCharacter)res2; - plabel = (Standard_PCharacter)label; - psubscript = (Standard_PCharacter)subscript; + int i; // i1 = thevals[0]; i2 = thevals[1]; @@ -122,15 +116,15 @@ void IGESData_DirPart::Values(int& i1, i17 = thevals[16]; for (i = 0; i < 8; ++i) { - pres1[i] = theres1[i]; - pres2[i] = theres2[i]; - plabel[i] = thelabl[i]; - psubscript[i] = thesubs[i]; + res1[i] = theres1[i]; + res2[i] = theres2[i]; + label[i] = thelabl[i]; + subscript[i] = thesubs[i]; } - pres1[8] = '\0'; - pres2[8] = '\0'; - plabel[8] = '\0'; - psubscript[8] = '\0'; + res1[8] = '\0'; + res2[8] = '\0'; + label[8] = '\0'; + subscript[8] = '\0'; } IGESData_IGESType IGESData_DirPart::Type() const diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_DirPart.hxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_DirPart.hxx index faa0f888b9..4f2fe8a6e7 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_DirPart.hxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_DirPart.hxx @@ -33,51 +33,51 @@ public: Standard_EXPORT IGESData_DirPart(); //! fills DirPart with consistent data read from file - Standard_EXPORT void Init(const int i1, - const int i2, - const int i3, - const int i4, - const int i5, - const int i6, - const int i7, - const int i8, - const int i9, - const int i19, - const int i11, - const int i12, - const int i13, - const int i14, - const int i15, - const int i16, - const int i17, - const char* res1, - const char* res2, - const char* label, - const char* subscript); + Standard_EXPORT void Init(const int i1, + const int i2, + const int i3, + const int i4, + const int i5, + const int i6, + const int i7, + const int i8, + const int i9, + const int i19, + const int i11, + const int i12, + const int i13, + const int i14, + const int i15, + const int i16, + const int i17, + const char* const res1, + const char* const res2, + const char* const label, + const char* const subscript); //! returns values recorded in DirPart //! (content of cstrings are modified) - Standard_EXPORT void Values(int& i1, - int& i2, - int& i3, - int& i4, - int& i5, - int& i6, - int& i7, - int& i8, - int& i9, - int& i19, - int& i11, - int& i12, - int& i13, - int& i14, - int& i15, - int& i16, - int& i17, - const char* res1, - const char* res2, - const char* label, - const char* subscript) const; + Standard_EXPORT void Values(int& i1, + int& i2, + int& i3, + int& i4, + int& i5, + int& i6, + int& i7, + int& i8, + int& i9, + int& i19, + int& i11, + int& i12, + int& i13, + int& i14, + int& i15, + int& i16, + int& i17, + char* res1, + char* res2, + char* label, + char* subscript) const; //! returns "type" and "form" info, used to recognize the entity Standard_EXPORT IGESData_IGESType Type() const; diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_FreeFormatEntity.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_FreeFormatEntity.cxx index ba02148882..ce5f1e1cbf 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_FreeFormatEntity.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_FreeFormatEntity.cxx @@ -92,7 +92,7 @@ void IGESData_FreeFormatEntity::AddLiteral(const Interface_ParamType UndefinedContent()->AddLiteral(ptype, val); } -void IGESData_FreeFormatEntity::AddLiteral(const Interface_ParamType ptype, const char* val) +void IGESData_FreeFormatEntity::AddLiteral(const Interface_ParamType ptype, const char* const val) { UndefinedContent()->AddLiteral(ptype, new TCollection_HAsciiString(val)); } diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_FreeFormatEntity.hxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_FreeFormatEntity.hxx index 072d041e38..e934d284c9 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_FreeFormatEntity.hxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_FreeFormatEntity.hxx @@ -98,7 +98,7 @@ public: const occ::handle& val); //! Adds a literal Parameter to the list (builds an HAsciiString) - Standard_EXPORT void AddLiteral(const Interface_ParamType ptype, const char* val); + Standard_EXPORT void AddLiteral(const Interface_ParamType ptype, const char* const val); //! Adds a Parameter which references an Entity. If the Entity is //! Null, the added parameter will define a "Null Pointer" (0) diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESEntity.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESEntity.cxx index db22b7ba1f..a07739c075 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESEntity.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESEntity.cxx @@ -272,25 +272,20 @@ occ::handle IGESData_IGESEntity::Color() const //================================================================================================= -bool IGESData_IGESEntity::CResValues(const char* res1, const char* res2) const +bool IGESData_IGESEntity::CResValues(char* res1, char* res2) const { - bool res = false; - Standard_PCharacter pres1, pres2; - // - pres1 = (Standard_PCharacter)res1; - pres2 = (Standard_PCharacter)res2; - // + bool res = false; for (int i = 0; i < 8; i++) { - pres1[i] = theRes1[i]; - pres2[i] = theRes2[i]; + res1[i] = theRes1[i]; + res2[i] = theRes2[i]; if (theRes1[i] > ' ' || theRes2[i] > ' ') { res = true; } } - pres1[8] = '\0'; - pres2[8] = '\0'; + res1[8] = '\0'; + res2[8] = '\0'; // return res; } diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESEntity.hxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESEntity.hxx index 49791e9f5e..910c821a42 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESEntity.hxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESEntity.hxx @@ -163,7 +163,7 @@ public: //! (remark : their content is changed) //! returned values are ended by null character in 9th //! returned Boolean is False if res1 and res2 are blank, true else - Standard_EXPORT bool CResValues(const char* res1, const char* res2) const; + Standard_EXPORT bool CResValues(char* res1, char* res2) const; //! Returns true if a short label is defined. //! A short label is a non-blank 8-character string. diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESModel.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESModel.cxx index 8ff886b85a..a19bb6aac5 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESModel.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESModel.cxx @@ -35,7 +35,7 @@ static const char* voidline = ""; // Internal routine used for VerifyCheck void IGESData_VerifyDate(const occ::handle& str, occ::handle& ach, - const char* mess); + const char* const mess); //================================================================================================= @@ -213,7 +213,7 @@ void IGESData_IGESModel::SetStartSection( //================================================================================================= -void IGESData_IGESModel::AddStartLine(const char* line, const int atnum) +void IGESData_IGESModel::AddStartLine(const char* const line, const int atnum) { if (atnum <= 0 || atnum > thestart->Length()) thestart->Append(new TCollection_HAsciiString(line)); @@ -230,7 +230,7 @@ void IGESData_IGESModel::SetGlobalSection(const IGESData_GlobalSection& header) //================================================================================================= -bool IGESData_IGESModel::ApplyStatic(const char* param) +bool IGESData_IGESModel::ApplyStatic(const char* const param) { if (param[0] == '\0') { @@ -501,7 +501,7 @@ void IGESData_IGESModel::VerifyCheck(occ::handle& ach) const void IGESData_VerifyDate(const occ::handle& str, occ::handle& ach, - const char* mess) + const char* const mess) { // MGE 23/07/98 // ===================================== diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESModel.hxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESModel.hxx index ed68dfdc50..185b2846fc 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESModel.hxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESModel.hxx @@ -82,7 +82,7 @@ public: //! Adds a new string to the existing //! Start section at the end if atnum is 0 or not given, or before //! atnumth line. - Standard_EXPORT void AddStartLine(const char* line, const int atnum = 0); + Standard_EXPORT void AddStartLine(const char* const line, const int atnum = 0); //! Returns the Global section of the IGES file. const IGESData_GlobalSection& GlobalSection() const { return theheader; } @@ -103,7 +103,7 @@ public: //! Returns True when done and if param is given, False if param is //! unknown or empty. Note: Set the unit in the IGES //! file Global section via IGESData_BasicEditor class. - Standard_EXPORT bool ApplyStatic(const char* param = ""); + Standard_EXPORT bool ApplyStatic(const char* const param = ""); //! Returns an IGES entity given by its rank number. Standard_EXPORT occ::handle Entity(const int num) const; diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESReaderData.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESReaderData.cxx index e42f51632b..787a0b8de4 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESReaderData.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESReaderData.cxx @@ -36,7 +36,7 @@ IGESData_IGESReaderData::IGESData_IGESReaderData(const int nbe, const int nbp) thechk = new Interface_Check; } -void IGESData_IGESReaderData::AddStartLine(const char* aval) +void IGESData_IGESReaderData::AddStartLine(const char* const aval) { thestar->Append(new TCollection_HAsciiString(aval)); } @@ -47,7 +47,7 @@ occ::handle>> IGESDa return thestar; } -void IGESData_IGESReaderData::AddGlobal(const Interface_ParamType atype, const char* aval) +void IGESData_IGESReaderData::AddGlobal(const Interface_ParamType atype, const char* const aval) { theparh->Append(aval, (int)strlen(aval), atype, 0); } @@ -62,28 +62,28 @@ const IGESData_GlobalSection& IGESData_IGESReaderData::GlobalSection() const return thehead; } -void IGESData_IGESReaderData::SetDirPart(const int num, - const int i1, - const int i2, - const int i3, - const int i4, - const int i5, - const int i6, - const int i7, - const int i8, - const int i9, - const int i10, - const int i11, - const int i12, - const int i13, - const int i14, - const int i15, - const int i16, - const int i17, - const char* res1, - const char* res2, - const char* label, - const char* subs) +void IGESData_IGESReaderData::SetDirPart(const int num, + const int i1, + const int i2, + const int i3, + const int i4, + const int i5, + const int i6, + const int i7, + const int i8, + const int i9, + const int i10, + const int i11, + const int i12, + const int i13, + const int i14, + const int i15, + const int i16, + const int i17, + const char* const res1, + const char* const res2, + const char* const label, + const char* const subs) { IGESData_DirPart& DP = thedirs(num); DP.Init(i1, @@ -116,28 +116,28 @@ const IGESData_DirPart& IGESData_IGESReaderData::DirPart(const int num) const return thedirs(num); } -void IGESData_IGESReaderData::DirValues(const int num, - int& i1, - int& i2, - int& i3, - int& i4, - int& i5, - int& i6, - int& i7, - int& i8, - int& i9, - int& i10, - int& i11, - int& i12, - int& i13, - int& i14, - int& i15, - int& i16, - int& i17, - const char*& res1, - const char*& res2, - const char*& label, - const char*& subs) const +void IGESData_IGESReaderData::DirValues(const int num, + int& i1, + int& i2, + int& i3, + int& i4, + int& i5, + int& i6, + int& i7, + int& i8, + int& i9, + int& i10, + int& i11, + int& i12, + int& i13, + int& i14, + int& i15, + int& i16, + int& i17, + char* res1, + char* res2, + char* label, + char* subs) const { thedirs(num).Values(i1, i2, diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESReaderData.hxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESReaderData.hxx index 181eaf1c55..f25a43c6ed 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESReaderData.hxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESReaderData.hxx @@ -52,14 +52,14 @@ public: Standard_EXPORT IGESData_IGESReaderData(const int nbe, const int nbp); //! adds a start line to start section - Standard_EXPORT void AddStartLine(const char* aval); + Standard_EXPORT void AddStartLine(const char* const aval); //! Returns the Start Section in once Standard_EXPORT occ::handle>> StartSection() const; //! adds a parameter to global section's parameter list - Standard_EXPORT void AddGlobal(const Interface_ParamType atype, const char* aval); + Standard_EXPORT void AddGlobal(const Interface_ParamType atype, const char* const aval); //! reads header (as GlobalSection) content from the ParamSet //! after it has been filled by successive calls to AddGlobal @@ -70,55 +70,55 @@ public: //! fills a DirPart, designated by its rank (that is, (N+1)/2 if N //! is its first number in section D) - Standard_EXPORT void SetDirPart(const int num, - const int i1, - const int i2, - const int i3, - const int i4, - const int i5, - const int i6, - const int i7, - const int i8, - const int i9, - const int i10, - const int i11, - const int i12, - const int i13, - const int i14, - const int i15, - const int i16, - const int i17, - const char* res1, - const char* res2, - const char* label, - const char* subs); + Standard_EXPORT void SetDirPart(const int num, + const int i1, + const int i2, + const int i3, + const int i4, + const int i5, + const int i6, + const int i7, + const int i8, + const int i9, + const int i10, + const int i11, + const int i12, + const int i13, + const int i14, + const int i15, + const int i16, + const int i17, + const char* const res1, + const char* const res2, + const char* const label, + const char* const subs); //! returns DirPart identified by record no (half Dsect number) Standard_EXPORT const IGESData_DirPart& DirPart(const int num) const; //! returns values recorded in directory part n0 - Standard_EXPORT void DirValues(const int num, - int& i1, - int& i2, - int& i3, - int& i4, - int& i5, - int& i6, - int& i7, - int& i8, - int& i9, - int& i10, - int& i11, - int& i12, - int& i13, - int& i14, - int& i15, - int& i16, - int& i17, - const char*& res1, - const char*& res2, - const char*& label, - const char*& subs) const; + Standard_EXPORT void DirValues(const int num, + int& i1, + int& i2, + int& i3, + int& i4, + int& i5, + int& i6, + int& i7, + int& i8, + int& i9, + int& i10, + int& i11, + int& i12, + int& i13, + int& i14, + int& i15, + int& i16, + int& i17, + char* res1, + char* res2, + char* label, + char* subs) const; //! returns "type" and "form" info from a directory part Standard_EXPORT IGESData_IGESType DirType(const int num) const; diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESWriter.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESWriter.cxx index f209c06810..57d919d0ec 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESWriter.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESWriter.cxx @@ -93,7 +93,7 @@ int& IGESData_IGESWriter::WriteMode() //================================================================================================= -void IGESData_IGESWriter::SendStartLine(const char* startline) +void IGESData_IGESWriter::SendStartLine(const char* const startline) { Standard_PCharacter pstartline; // @@ -408,7 +408,7 @@ void IGESData_IGESWriter::AddString(const occ::handle& AddString(val->ToCString(), val->Length(), more); } -void IGESData_IGESWriter::AddString(const char* val, const int lnval, const int more) +void IGESData_IGESWriter::AddString(const char* const val, const int lnval, const int more) { int lnstr = lnval; if (lnstr <= 0) @@ -542,7 +542,7 @@ occ::handle>> IGESDa return res; } -static void writefnes(Standard_OStream& S, const char* ligne) +static void writefnes(Standard_OStream& S, const char* const ligne) { char val; for (int i = 0; i < 80; i++) diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESWriter.hxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESWriter.hxx index 3841447cde..b8f7dd4ede 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESWriter.hxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_IGESWriter.hxx @@ -74,7 +74,7 @@ public: //! send comments in an IGES File (at beginning of the file). //! If the line is more than 72 chars long, it is split into //! as many lines as required to send it completely - Standard_EXPORT void SendStartLine(const char* startline); + Standard_EXPORT void SendStartLine(const char* const startline); //! Sends the complete IGESModel (Global Section, Entities as //! Directory Entries & Parameter Lists, etc...) @@ -191,7 +191,7 @@ private: //! given, it is computed by strlen(val). //! , if precised, requires that characters will //! remain free on the current line once this AddString done - Standard_EXPORT void AddString(const char* val, const int lnval = 0, const int more = 0); + Standard_EXPORT void AddString(const char* const val, const int lnval = 0, const int more = 0); //! Adds a string defined as a single character (for instance, the //! parameter separator). Manages size limit diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_ParamReader.cxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_ParamReader.cxx index 05e9e8190c..695ec18366 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_ParamReader.cxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_ParamReader.cxx @@ -232,7 +232,7 @@ bool IGESData_ParamReader::PrepareRead(const IGESData_ParamCursor& PC, //================================================================================================= bool IGESData_ParamReader::PrepareRead(const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, const bool several, const int size) { @@ -343,7 +343,9 @@ bool IGESData_ParamReader::ReadInteger(const IGESData_ParamCursor& PC, int& val) //================================================================================================= -bool IGESData_ParamReader::ReadInteger(const IGESData_ParamCursor& PC, const char* mess, int& val) +bool IGESData_ParamReader::ReadInteger(const IGESData_ParamCursor& PC, + const char* const mess, + int& val) { if (!PrepareRead(PC, mess, false)) return false; @@ -408,7 +410,7 @@ bool IGESData_ParamReader::ReadBoolean(const IGESData_ParamCursor& PC, //================================================================================================= bool IGESData_ParamReader::ReadBoolean(const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, bool& val, const bool exact) { @@ -460,7 +462,9 @@ bool IGESData_ParamReader::ReadReal(const IGESData_ParamCursor& PC, double& val) //================================================================================================= -bool IGESData_ParamReader::ReadReal(const IGESData_ParamCursor& PC, const char* mess, double& val) +bool IGESData_ParamReader::ReadReal(const IGESData_ParamCursor& PC, + const char* const mess, + double& val) { if (!PrepareRead(PC, mess, false)) return false; @@ -484,7 +488,9 @@ bool IGESData_ParamReader::ReadXY(const IGESData_ParamCursor& PC, Message_Msg& / //================================================================================================= -bool IGESData_ParamReader::ReadXY(const IGESData_ParamCursor& PC, const char* mess, gp_XY& val) +bool IGESData_ParamReader::ReadXY(const IGESData_ParamCursor& PC, + const char* const mess, + gp_XY& val) { if (!PrepareRead(PC, mess, false, 2)) return false; @@ -515,7 +521,9 @@ bool IGESData_ParamReader::ReadXYZ(const IGESData_ParamCursor& PC, //================================================================================================= -bool IGESData_ParamReader::ReadXYZ(const IGESData_ParamCursor& PC, const char* mess, gp_XYZ& val) +bool IGESData_ParamReader::ReadXYZ(const IGESData_ParamCursor& PC, + const char* const mess, + gp_XYZ& val) { if (!PrepareRead(PC, mess, false, 3)) return false; @@ -586,7 +594,7 @@ bool IGESData_ParamReader::ReadText(const IGESData_ParamCursor& thePC //================================================================================================= bool IGESData_ParamReader::ReadText(const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, occ::handle& val) { if (!PrepareRead(PC, mess, false)) @@ -684,7 +692,7 @@ bool IGESData_ParamReader::ReadEntity(const occ::handle bool IGESData_ParamReader::ReadEntity(const occ::handle& IR, const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, occ::handle& val, const bool canbenul) { @@ -759,7 +767,7 @@ bool IGESData_ParamReader::ReadEntity(const occ::handle bool IGESData_ParamReader::ReadEntity(const occ::handle& IR, const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, const occ::handle& type, occ::handle& val, const bool canbenul) @@ -820,7 +828,7 @@ bool IGESData_ParamReader::ReadInts(const IGESData_ParamCursor& PC, //================================================================================================= bool IGESData_ParamReader::ReadInts(const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, occ::handle>& val, const int index) { @@ -885,7 +893,7 @@ bool IGESData_ParamReader::ReadReals(const IGESData_ParamCursor& PC, //================================================================================================= bool IGESData_ParamReader::ReadReals(const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, occ::handle>& val, const int index) { @@ -966,7 +974,7 @@ bool IGESData_ParamReader::ReadTexts( bool IGESData_ParamReader::ReadTexts( const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, occ::handle>>& val, const int index) { @@ -1081,7 +1089,7 @@ bool IGESData_ParamReader::ReadEnts( bool IGESData_ParamReader::ReadEnts( const occ::handle& IR, const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, occ::handle>>& val, const int index) { @@ -1198,7 +1206,7 @@ bool IGESData_ParamReader::ReadEntList(const occ::handle& IR, const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, Interface_EntityList& val, const bool ord) { @@ -1309,7 +1317,7 @@ bool IGESData_ParamReader::ReadingReal(const int num, double& val) //================================================================================================= -bool IGESData_ParamReader::ReadingReal(const int num, const char* mess, double& val) +bool IGESData_ParamReader::ReadingReal(const int num, const char* const mess, double& val) { const Interface_FileParameter& FP = theparams->Value(num + thebase); if (FP.ParamType() == Interface_ParamInteger) @@ -1407,7 +1415,7 @@ bool IGESData_ParamReader::ReadingEntityNumber(const int num, int& val) //================================================================================================= -bool IGESData_ParamReader::ReadingEntityNumber(const int num, const char* mess, int& val) +bool IGESData_ParamReader::ReadingEntityNumber(const int num, const char* const mess, int& val) { const Interface_FileParameter& FP = theparams->Value(num + thebase); val = ParamNumber(num); @@ -1448,7 +1456,7 @@ void IGESData_ParamReader::SendWarning(const Message_Msg& amsg) //================================================================================================= -void IGESData_ParamReader::AddFail(const char* idm, +void IGESData_ParamReader::AddFail(const char* const idm, const occ::handle& afail, const occ::handle& bfail) { @@ -1461,7 +1469,9 @@ void IGESData_ParamReader::AddFail(const char* //================================================================================================= -void IGESData_ParamReader::AddFail(const char* idm, const char* afail, const char* bfail) +void IGESData_ParamReader::AddFail(const char* const idm, + const char* const afail, + const char* const bfail) { occ::handle af = new TCollection_HAsciiString(afail); occ::handle bf = af; @@ -1472,7 +1482,7 @@ void IGESData_ParamReader::AddFail(const char* idm, const char* afail, const cha //================================================================================================= -void IGESData_ParamReader::AddWarning(const char* idm, +void IGESData_ParamReader::AddWarning(const char* const idm, const occ::handle& aw, const occ::handle& bw) { @@ -1484,7 +1494,9 @@ void IGESData_ParamReader::AddWarning(const char* //================================================================================================= -void IGESData_ParamReader::AddWarning(const char* idm, const char* awarn, const char* bwarn) +void IGESData_ParamReader::AddWarning(const char* const idm, + const char* const awarn, + const char* const bwarn) { occ::handle aw = new TCollection_HAsciiString(awarn); occ::handle bw = aw; @@ -1495,7 +1507,7 @@ void IGESData_ParamReader::AddWarning(const char* idm, const char* awarn, const //================================================================================================= -void IGESData_ParamReader::AddFail(const char* afail, const char* bfail) +void IGESData_ParamReader::AddFail(const char* const afail, const char* const bfail) { thelast = false; thecheck->AddFail(afail, bfail); @@ -1512,7 +1524,7 @@ void IGESData_ParamReader::AddFail(const occ::handle& //================================================================================================= -void IGESData_ParamReader::AddWarning(const char* amess, const char* bmess) +void IGESData_ParamReader::AddWarning(const char* const amess, const char* const bmess) { thecheck->AddWarning(amess, bmess); } @@ -1527,7 +1539,7 @@ void IGESData_ParamReader::AddWarning(const occ::handleMend(pref); thelast = true; diff --git a/src/DataExchange/TKDEIGES/IGESData/IGESData_ParamReader.hxx b/src/DataExchange/TKDEIGES/IGESData/IGESData_ParamReader.hxx index a744062d0b..618593635a 100644 --- a/src/DataExchange/TKDEIGES/IGESData/IGESData_ParamReader.hxx +++ b/src/DataExchange/TKDEIGES/IGESData/IGESData_ParamReader.hxx @@ -164,7 +164,9 @@ public: //! Note that if a count (not 1) is given, it is ignored //! If it is not an Integer, fills Check with a Fail (using mess) //! and returns False - Standard_EXPORT bool ReadInteger(const IGESData_ParamCursor& PC, const char* mess, int& val); + Standard_EXPORT bool ReadInteger(const IGESData_ParamCursor& PC, + const char* const mess, + int& val); Standard_EXPORT bool ReadBoolean(const IGESData_ParamCursor& PC, const Message_Msg& amsg, @@ -180,7 +182,7 @@ public: //! In case of error (not an Integer, or not 0/1 and exact True), //! Check is filled with a Fail (using mess) and return is False Standard_EXPORT bool ReadBoolean(const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, bool& val, const bool exact = true); @@ -190,7 +192,9 @@ public: //! An Integer is accepted (Check is filled with a Warning //! message) and causes return to be True (as normal case) //! In other cases, Check is filled with a Fail and return is False - Standard_EXPORT bool ReadReal(const IGESData_ParamCursor& PC, const char* mess, double& val); + Standard_EXPORT bool ReadReal(const IGESData_ParamCursor& PC, + const char* const mess, + double& val); Standard_EXPORT bool ReadXY(const IGESData_ParamCursor& PC, Message_Msg& amsg, gp_XY& val); @@ -198,7 +202,7 @@ public: //! Integers are accepted (Check is filled with a Warning //! message) and cause return to be True (as normal case) //! In other cases, Check is filled with a Fail and return is False - Standard_EXPORT bool ReadXY(const IGESData_ParamCursor& PC, const char* mess, gp_XY& val); + Standard_EXPORT bool ReadXY(const IGESData_ParamCursor& PC, const char* const mess, gp_XY& val); Standard_EXPORT bool ReadXYZ(const IGESData_ParamCursor& PC, Message_Msg& amsg, gp_XYZ& val); @@ -207,7 +211,7 @@ public: //! message) and cause return to be True (as normal case) //! In other cases, Check is filled with a Fail and return is False //! For Message - Standard_EXPORT bool ReadXYZ(const IGESData_ParamCursor& PC, const char* mess, gp_XYZ& val); + Standard_EXPORT bool ReadXYZ(const IGESData_ParamCursor& PC, const char* const mess, gp_XYZ& val); Standard_EXPORT bool ReadText(const IGESData_ParamCursor& thePC, const Message_Msg& theMsg, @@ -218,7 +222,7 @@ public: //! If it is not a String, fills Check with a Fail (using mess) //! and returns False Standard_EXPORT bool ReadText(const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, occ::handle& val); Standard_EXPORT bool ReadEntity(const occ::handle& IR, @@ -237,7 +241,7 @@ public: //! Check with a Fail (using mess) and returns False Standard_EXPORT bool ReadEntity(const occ::handle& IR, const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, occ::handle& val, const bool canbenul = false); @@ -270,7 +274,7 @@ public: //! (in such a case, returns False and givel = Null) Standard_EXPORT bool ReadEntity(const occ::handle& IR, const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, const occ::handle& type, occ::handle& val, const bool canbenul = false); @@ -279,7 +283,7 @@ public: template bool ReadEntity(const occ::handle& IR, const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, const occ::handle& type, occ::handle& val, const bool canbenul = false) @@ -302,7 +306,7 @@ public: //! If all params are not Integer, Check is filled (using mess) //! and return value is False Standard_EXPORT bool ReadInts(const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, occ::handle>& val, const int index = 1); @@ -318,7 +322,7 @@ public: //! If all params are neither Real nor Integer, Check is filled //! (using mess) and return value is False Standard_EXPORT bool ReadReals(const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, occ::handle>& val, const int index = 1); @@ -335,7 +339,7 @@ public: //! and return value is False Standard_EXPORT bool ReadTexts( const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, occ::handle>>& val, const int index = 1); @@ -358,7 +362,7 @@ public: Standard_EXPORT bool ReadEnts( const occ::handle& IR, const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, occ::handle>>& val, const int index = 1); @@ -380,7 +384,7 @@ public: //! Warning: Give "ord" to False ONLY if order is not significant Standard_EXPORT bool ReadEntList(const occ::handle& IR, const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, Interface_EntityList& val, const bool ord = true); @@ -388,7 +392,7 @@ public: //! Routine which reads a Real parameter, given its number //! Same conditions as ReadReal for mess, val, and return value - Standard_EXPORT bool ReadingReal(const int num, const char* mess, double& val); + Standard_EXPORT bool ReadingReal(const int num, const char* const mess, double& val); Standard_EXPORT bool ReadingEntityNumber(const int num, int& val); @@ -398,25 +402,25 @@ public: //! Same conditions as ReadEntity for mess, val, and return value //! In particular, returns True and val to zero means Null Entity, //! and val not zero means Entity read by BoundEntity - Standard_EXPORT bool ReadingEntityNumber(const int num, const char* mess, int& val); + Standard_EXPORT bool ReadingEntityNumber(const int num, const char* const mess, int& val); Standard_EXPORT void SendFail(const Message_Msg& amsg); Standard_EXPORT void SendWarning(const Message_Msg& amsg); - Standard_EXPORT void AddFail(const char* afail, const char* bfail = ""); + Standard_EXPORT void AddFail(const char* const afail, const char* const bfail = ""); //! feeds the Check with a new fail (as a String or as a CString) Standard_EXPORT void AddFail(const occ::handle& af, const occ::handle& bf); - Standard_EXPORT void AddWarning(const char* awarn, const char* bwarn = ""); + Standard_EXPORT void AddWarning(const char* const awarn, const char* const bwarn = ""); //! feeds the Check with a new Warning message Standard_EXPORT void AddWarning(const occ::handle& aw, const occ::handle& bw); - Standard_EXPORT void Mend(const char* pref = ""); + Standard_EXPORT void Mend(const char* const pref = ""); //! says if fails have been recorded into the Check Standard_EXPORT bool HasFailed() const; @@ -446,7 +450,7 @@ private: //! If one of above condition is not satisfied, a Fail Message is //! recorded into Check, using the root "mess" and return is False Standard_EXPORT bool PrepareRead(const IGESData_ParamCursor& PC, - const char* mess, + const char* const mess, const bool several, const int size = 1); @@ -464,25 +468,29 @@ private: //! identification "idm" and a diagnostic ("afail") //! Also feeds LastReadStatus //! for final message, bf (can be different) for original - Standard_EXPORT void AddFail(const char* idm, + Standard_EXPORT void AddFail(const char* const idm, const occ::handle& af, const occ::handle& bf); //! Same as above but with CString //! empty means = - Standard_EXPORT void AddFail(const char* idm, const char* afail, const char* bfail); + Standard_EXPORT void AddFail(const char* const idm, + const char* const afail, + const char* const bfail); //! internal method which builds a Warning message from an //! identification "idm" and a diagnostic //! is final message, bw is original (can be different) //! Also feeds LastReadStatus - Standard_EXPORT void AddWarning(const char* idm, + Standard_EXPORT void AddWarning(const char* const idm, const occ::handle& aw, const occ::handle& bw); //! Same as above but with CString //! empty means = - Standard_EXPORT void AddWarning(const char* idm, const char* aw, const char* bw); + Standard_EXPORT void AddWarning(const char* const idm, + const char* const aw, + const char* const bw); occ::handle theparams; occ::handle thecheck; diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_Activator.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_Activator.cxx index eabcd40c78..27e75fb270 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_Activator.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_Activator.cxx @@ -107,10 +107,10 @@ IGESSelect_Activator::IGESSelect_Activator() IFSelect_ReturnStatus IGESSelect_Activator::Do(const int number, const occ::handle& pilot) { - int argc = pilot->NbWords(); - const char* arg1 = pilot->Word(1).ToCString(); - const char* arg2 = pilot->Word(2).ToCString(); - // const char* arg3 = pilot->Word(3).ToCString(); + int argc = pilot->NbWords(); + const char* const arg1 = pilot->Word(1).ToCString(); + const char* const arg2 = pilot->Word(2).ToCString(); + // const char* const arg3 = pilot->Word(3).ToCString(); occ::handle WS = pilot->Session(); switch (number) diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_AddFileComment.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_AddFileComment.cxx index 1c7a8945d0..0755deaeae 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_AddFileComment.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_AddFileComment.cxx @@ -34,7 +34,7 @@ void IGESSelect_AddFileComment::Clear() thelist->Clear(); } -void IGESSelect_AddFileComment::AddLine(const char* line) +void IGESSelect_AddFileComment::AddLine(const char* const line) { thelist->Append(new TCollection_HAsciiString(line)); } diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_AddFileComment.hxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_AddFileComment.hxx index a39a6059f4..278938afa8 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_AddFileComment.hxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_AddFileComment.hxx @@ -45,7 +45,7 @@ public: //! Adds a line for file comment //! Remark: Lines are limited to 72 useful chars. A line of more than //! 72 chars will be split into several ones of 72 max each. - Standard_EXPORT void AddLine(const char* line); + Standard_EXPORT void AddLine(const char* const line); //! Adds a list of lines for file comment //! Each of them must comply with demand of AddLine diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_EditDirPart.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_EditDirPart.cxx index 2bebb6a6e9..b3b82983ed 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_EditDirPart.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_EditDirPart.cxx @@ -32,7 +32,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_EditDirPart, IFSelect_Editor) -static occ::handle NewDefType(const char* name) +static occ::handle NewDefType(const char* const name) { occ::handle deftype = new Interface_TypedValue(name, Interface_ParamEnum); deftype->StartEnum(0); @@ -42,7 +42,7 @@ static occ::handle NewDefType(const char* name) return deftype; } -static occ::handle NewDefList(const char* name) +static occ::handle NewDefList(const char* const name) { occ::handle deftype = new Interface_TypedValue(name, Interface_ParamEnum); deftype->StartEnum(0); diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_FloatFormat.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_FloatFormat.cxx index e51cb6dffd..6c3c3b1875 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_FloatFormat.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_FloatFormat.cxx @@ -59,13 +59,15 @@ void IGESSelect_FloatFormat::SetZeroSuppress(const bool mode) thezerosup = mode; } -void IGESSelect_FloatFormat::SetFormat(const char* format) +void IGESSelect_FloatFormat::SetFormat(const char* const format) { themainform.Clear(); themainform.AssignCat(format); } -void IGESSelect_FloatFormat::SetFormatForRange(const char* form, const double R1, const double R2) +void IGESSelect_FloatFormat::SetFormatForRange(const char* const form, + const double R1, + const double R2) { theformrange.Clear(); theformrange.AssignCat(form); diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_FloatFormat.hxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_FloatFormat.hxx index ef3ff4a79f..ca07cdb475 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_FloatFormat.hxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_FloatFormat.hxx @@ -50,7 +50,7 @@ public: //! Sets Main Format to a new value //! Remark : SetFormat, SetZeroSuppress and SetFormatForRange are //! independent - Standard_EXPORT void SetFormat(const char* format = "%E"); + Standard_EXPORT void SetFormat(const char* const format = "%E"); //! Sets Format for Range to a new value with its range of //! application. @@ -59,9 +59,9 @@ public: //! verified, this secondary format will be ignored. //! Moreover, this secondary format is intended to be used in a //! range around 1. - Standard_EXPORT void SetFormatForRange(const char* format = "%f", - const double Rmin = 0.1, - const double Rmax = 1000.0); + Standard_EXPORT void SetFormatForRange(const char* const format = "%f", + const double Rmin = 0.1, + const double Rmax = 1000.0); //! Returns all recorded parameters : //! zerosup : ZeroSuppress status diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_WorkLibrary.cxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_WorkLibrary.cxx index 448443a194..48150908d2 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_WorkLibrary.cxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_WorkLibrary.cxx @@ -70,7 +70,7 @@ IGESSelect_WorkLibrary::IGESSelect_WorkLibrary(const bool modefnes) SetDumpHelp(6, "Complete + Transformed data"); } -int IGESSelect_WorkLibrary::ReadFile(const char* name, +int IGESSelect_WorkLibrary::ReadFile(const char* const name, occ::handle& model, const occ::handle& protocol) const { diff --git a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_WorkLibrary.hxx b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_WorkLibrary.hxx index 0f07de0b04..f9aad3fe6e 100644 --- a/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_WorkLibrary.hxx +++ b/src/DataExchange/TKDEIGES/IGESSelect/IGESSelect_WorkLibrary.hxx @@ -40,7 +40,7 @@ public: //! Reads a IGES File and returns a IGES Model (into ), //! or lets "Null" in case of Error //! Returns 0 if OK, 1 if Read Error, -1 if File not opened - Standard_EXPORT int ReadFile(const char* name, + Standard_EXPORT int ReadFile(const char* const name, occ::handle& model, const occ::handle& protocol) const override; diff --git a/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_BasicCurve.cxx b/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_BasicCurve.cxx index 982c4377a2..8c2719354e 100644 --- a/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_BasicCurve.cxx +++ b/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_BasicCurve.cxx @@ -1010,8 +1010,8 @@ occ::handle IGESToBRep_BasicCurve::TransferBSplineCurve( int maxMult = (i == 1 || i == KnotIndex ? Degree + 1 : Degree); if (aMult > maxMult) { - Message_Msg msg1200("IGES_1200"); // #61 rln 05.01.99 - const char* vide(""); + Message_Msg msg1200("IGES_1200"); // #61 rln 05.01.99 + const char* const vide(""); msg1200.Arg(vide); msg1200.Arg(vide); msg1200.Arg(vide); @@ -1064,8 +1064,8 @@ occ::handle IGESToBRep_BasicCurve::TransferBSplineCurve( if (!(SumOfMult == newNbPoles + Degree + 1)) { - Message_Msg msg1210("IGES_1210"); - const char* vide(""); + Message_Msg msg1210("IGES_1210"); + const char* const vide(""); msg1210.Arg(vide); msg1210.Arg(vide); SendWarning(start, msg1210); diff --git a/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_BasicSurface.cxx b/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_BasicSurface.cxx index 006229364a..db99f2e67a 100644 --- a/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_BasicSurface.cxx +++ b/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_BasicSurface.cxx @@ -912,8 +912,8 @@ occ::handle IGESToBRep_BasicSurface::TransferBSplineSurface } if (polynomial) { - Message_Msg msg1220("IGES_1220"); - const char* surface("surface"); + Message_Msg msg1220("IGES_1220"); + const char* const surface("surface"); msg1220.Arg(surface); SendWarning(start, msg1220); } diff --git a/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_Reader.cxx b/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_Reader.cxx index fccf6cf09e..047a7aae3f 100644 --- a/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_Reader.cxx +++ b/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_Reader.cxx @@ -125,7 +125,7 @@ IGESToBRep_Reader::IGESToBRep_Reader() //============================================================================= -int IGESToBRep_Reader::LoadFile(const char* filename) +int IGESToBRep_Reader::LoadFile(const char* const filename) { if (theProc.IsNull()) theProc = new Transfer_TransientProcess; diff --git a/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_Reader.hxx b/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_Reader.hxx index 59c8c87e67..041e395fe6 100644 --- a/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_Reader.hxx +++ b/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_Reader.hxx @@ -48,7 +48,7 @@ public: //! Loads a Model from a file.Returns 0 if success. //! returns 1 if the file could not be opened, //! returns -1 if an error occurred while the file was being loaded. - Standard_EXPORT int LoadFile(const char* filename); + Standard_EXPORT int LoadFile(const char* const filename); //! Specifies a Model to work on //! Also clears the result and Done status, sets TransientProcess diff --git a/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_TopoSurface.cxx b/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_TopoSurface.cxx index 708f462c3b..a0d1cbca20 100644 --- a/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_TopoSurface.cxx +++ b/src/DataExchange/TKDEIGES/IGESToBRep/IGESToBRep_TopoSurface.cxx @@ -418,7 +418,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferRuledSurface( if (shape1.IsNull()) { Message_Msg msg1156("IGES_1156"); - const char* typeName(igesCurve1->DynamicType()->Name()); + const char* const typeName(igesCurve1->DynamicType()->Name()); occ::handle label = GetModel()->StringLabel(igesCurve1); msg1156.Arg(typeName); msg1156.Arg(label); @@ -438,7 +438,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferRuledSurface( // shape1 = TC.TransferTopoCurve(igesCurve1); // if (shape1.IsNull()) { // Message_Msg msg1156("IGES_1156"); - // const char* typeName(igesCurve1->DynamicType()->Name()); + // const char* const typeName(igesCurve1->DynamicType()->Name()); // occ::handle label = GetModel()->StringLabel(igesCurve1); // msg1156.Arg(typeName); // msg1156.Arg(label); @@ -495,7 +495,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferRuledSurface( if (shape2.IsNull()) { Message_Msg msg1156("IGES_1156"); - const char* typeName(igesCurve2->DynamicType()->Name()); + const char* const typeName(igesCurve2->DynamicType()->Name()); occ::handle label = GetModel()->StringLabel(igesCurve2); msg1156.Arg(typeName); msg1156.Arg(label); @@ -725,7 +725,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferSurfaceOfRevolution( if (generatrix.IsNull()) { Message_Msg msg1156("IGES_1156"); - const char* typeName("generatrix"); + const char* const typeName("generatrix"); occ::handle label = GetModel()->StringLabel(igesGeneratrix); msg1156.Arg(typeName); msg1156.Arg(label); @@ -890,7 +890,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferTabulatedCylinder( if (directrix.IsNull()) { Message_Msg msg1156("IGES_1156"); - const char* typeName("directrix"); + const char* const typeName("directrix"); occ::handle label = GetModel()->StringLabel(igesDirectrix); msg1156.Arg(typeName); msg1156.Arg(label); @@ -1044,7 +1044,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferOffsetSurface( if (igesShape.IsNull()) { Message_Msg msg1156("IGES_1156"); - const char* typeName("basis surface"); + const char* const typeName("basis surface"); occ::handle label = GetModel()->StringLabel(igesSrf); msg1156.Arg(typeName); msg1156.Arg(label); @@ -1072,7 +1072,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferOffsetSurface( [[fallthrough]]; default: { Message_Msg msg1156("IGES_1156"); - const char* typeName("basis surface"); + const char* const typeName("basis surface"); occ::handle label = GetModel()->StringLabel(igesSrf); msg1156.Arg(typeName); msg1156.Arg(label); @@ -1243,7 +1243,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferTrimmedSurface( if (nbfaces != 1) { Message_Msg msg1156("IGES_1156"); - const char* typeName("basis surface"); + const char* const typeName("basis surface"); occ::handle label = GetModel()->StringLabel(igesSurface); msg1156.Arg(typeName); msg1156.Arg(label); @@ -1254,7 +1254,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferTrimmedSurface( break; default: { Message_Msg msg1156("IGES_1156"); - const char* typeName("basis surface"); + const char* const typeName("basis surface"); occ::handle label = GetModel()->StringLabel(igesSurface); msg1156.Arg(typeName); msg1156.Arg(label); @@ -1419,7 +1419,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferBoundedSurface( if (nbfaces != 1) { Message_Msg msg1156("IGES_1156"); - const char* typeName("basis surface"); + const char* const typeName("basis surface"); occ::handle label = GetModel()->StringLabel(igesSrf); msg1156.Arg(typeName); msg1156.Arg(label); @@ -1431,7 +1431,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferBoundedSurface( break; default: { Message_Msg msg1156("IGES_1156"); - const char* typeName("basis surface"); + const char* const typeName("basis surface"); occ::handle label = GetModel()->StringLabel(igesSrf); msg1156.Arg(typeName); msg1156.Arg(label); @@ -1540,7 +1540,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferPerforate( if (wire.ShapeType() != TopAbs_WIRE) { Message_Msg msg1156("IGES_1156"); - const char* typeName("hole"); + const char* const typeName("hole"); occ::handle label = GetModel()->StringLabel(pi); msg1156.Arg(typeName); msg1156.Arg(label); @@ -1677,7 +1677,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferPlaneParts(const occ::handle label = GetModel()->StringLabel(crv); msg1156.Arg(typeName); msg1156.Arg(label); @@ -1725,7 +1725,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferPlaneParts(const occ::handle label = GetModel()->StringLabel(crv); msg1156.Arg(typeName); msg1156.Arg(label); @@ -1784,7 +1784,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::ParamSurface(const occ::handle label = GetModel()->StringLabel(st); msg1156.Arg(typeName); msg1156.Arg(label); diff --git a/src/DataExchange/TKDEOBJ/RWObj/RWObj.cxx b/src/DataExchange/TKDEOBJ/RWObj/RWObj.cxx index 6b21309629..7f9a6dd3f1 100644 --- a/src/DataExchange/TKDEOBJ/RWObj/RWObj.cxx +++ b/src/DataExchange/TKDEOBJ/RWObj/RWObj.cxx @@ -18,7 +18,7 @@ //================================================================================================= -occ::handle RWObj::ReadFile(const char* theFile, +occ::handle RWObj::ReadFile(const char* const theFile, const Message_ProgressRange& theProgress) { RWObj_TriangulationReader aReader; diff --git a/src/DataExchange/TKDEOBJ/RWObj/RWObj.hxx b/src/DataExchange/TKDEOBJ/RWObj/RWObj.hxx index 5d4a28bbab..849b8c0190 100644 --- a/src/DataExchange/TKDEOBJ/RWObj/RWObj.hxx +++ b/src/DataExchange/TKDEOBJ/RWObj/RWObj.hxx @@ -27,7 +27,7 @@ public: //! Read specified OBJ file and returns its content as triangulation. //! In case of error, returns Null handle. Standard_EXPORT static occ::handle ReadFile( - const char* theFile, + const char* const theFile, const Message_ProgressRange& aProgress = Message_ProgressRange()); }; diff --git a/src/DataExchange/TKDESTEP/APIHeaderSection/APIHeaderSection_MakeHeader.cxx b/src/DataExchange/TKDESTEP/APIHeaderSection/APIHeaderSection_MakeHeader.cxx index 9833c9656d..d45f26ec06 100644 --- a/src/DataExchange/TKDESTEP/APIHeaderSection/APIHeaderSection_MakeHeader.cxx +++ b/src/DataExchange/TKDESTEP/APIHeaderSection/APIHeaderSection_MakeHeader.cxx @@ -85,7 +85,7 @@ APIHeaderSection_MakeHeader::APIHeaderSection_MakeHeader(const int shapetype) } } -void APIHeaderSection_MakeHeader::Init(const char* nameval) +void APIHeaderSection_MakeHeader::Init(const char* const nameval) { done = true; diff --git a/src/DataExchange/TKDESTEP/APIHeaderSection/APIHeaderSection_MakeHeader.hxx b/src/DataExchange/TKDESTEP/APIHeaderSection/APIHeaderSection_MakeHeader.hxx index d41116c3a2..c14cc31249 100644 --- a/src/DataExchange/TKDESTEP/APIHeaderSection/APIHeaderSection_MakeHeader.hxx +++ b/src/DataExchange/TKDESTEP/APIHeaderSection/APIHeaderSection_MakeHeader.hxx @@ -49,7 +49,7 @@ public: //! Cancels the former definition and gives a FileName //! To be used when a Model has no well defined Header - Standard_EXPORT void Init(const char* nameval); + Standard_EXPORT void Init(const char* const nameval); //! Returns True if all data have been defined (see also //! HasFn, HasFs, HasFd) diff --git a/src/DataExchange/TKDESTEP/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx b/src/DataExchange/TKDESTEP/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx index d2b99bb62a..70329d7d3a 100644 --- a/src/DataExchange/TKDESTEP/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx +++ b/src/DataExchange/TKDESTEP/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx @@ -27,11 +27,11 @@ #include #include -static occ::handle MakeAxis2Placement3d(const gp_Pnt& O, - const gp_Dir& D, - const gp_Dir& X, - const char* nom, - double aFactor) +static occ::handle MakeAxis2Placement3d(const gp_Pnt& O, + const gp_Dir& D, + const gp_Dir& X, + const char* const nom, + double aFactor) { occ::handle Axe; occ::handle P; diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWAheadOrBehind.pxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWAheadOrBehind.pxx index a63867688f..51a6f9c2e3 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWAheadOrBehind.pxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWAheadOrBehind.pxx @@ -44,7 +44,8 @@ inline const char* ConvertToString(const StepBasic_AheadOrBehind theSourceEnum) //! @param theAheadOrBehindStr The string to convert //! @param theResultEnum The corresponding StepBasic_AheadOrBehind value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* theAheadOrBehindStr, StepBasic_AheadOrBehind& theResultEnum) +inline bool ConvertToEnum(const char* const theAheadOrBehindStr, + StepBasic_AheadOrBehind& theResultEnum) { if (IsEqual(theAheadOrBehindStr, aobAhead)) { diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWSiPrefix.pxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWSiPrefix.pxx index 4f313da6ea..9f60b340d2 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWSiPrefix.pxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWSiPrefix.pxx @@ -83,7 +83,7 @@ inline const char* ConvertToString(const StepBasic_SiPrefix theSourceEnum) //! @param thePrefixStr The string to convert //! @param theResultEnum The corresponding StepBasic_SiPrefix value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* thePrefixStr, StepBasic_SiPrefix& theResultEnum) +inline bool ConvertToEnum(const char* const thePrefixStr, StepBasic_SiPrefix& theResultEnum) { if (IsEqual(thePrefixStr, spExa)) { diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWSiUnitName.pxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWSiUnitName.pxx index 18dbfd90d3..72627365cc 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWSiUnitName.pxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWSiUnitName.pxx @@ -119,7 +119,7 @@ inline const char* ConvertToString(const StepBasic_SiUnitName theNameEnum) //! @param theNameStr The string to convert //! @param theResultEnum The corresponding StepBasic_SiUnitName value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* theNameStr, StepBasic_SiUnitName& theResultEnum) +inline bool ConvertToEnum(const char* const theNameStr, StepBasic_SiUnitName& theResultEnum) { if (IsEqual(theNameStr, sunHertz)) { diff --git a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWSource.pxx b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWSource.pxx index db03d1ef2a..05eca96afe 100644 --- a/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWSource.pxx +++ b/src/DataExchange/TKDESTEP/RWStepBasic/RWStepBasic_RWSource.pxx @@ -44,7 +44,7 @@ inline const char* ConvertToString(const StepBasic_Source theSourceEnum) //! @param theSourceStr The string to convert //! @param theResultEnum The corresponding StepBasic_Source value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* theSourceStr, StepBasic_Source& theResultEnum) +inline bool ConvertToEnum(const char* const theSourceStr, StepBasic_Source& theResultEnum) { if (IsEqual(theSourceStr, sBought)) { diff --git a/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWBSplineCurveForm.pxx b/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWBSplineCurveForm.pxx index 1af547b440..8b22f9e248 100644 --- a/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWBSplineCurveForm.pxx +++ b/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWBSplineCurveForm.pxx @@ -53,7 +53,7 @@ inline const char* ConvertToString(const StepGeom_BSplineCurveForm theSourceEnum //! @param theFormString The string to convert //! @param theResultEnum The corresponding StepGeom_BSplineCurveForm value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* theFormString, StepGeom_BSplineCurveForm& theResultEnum) +inline bool ConvertToEnum(const char* const theFormString, StepGeom_BSplineCurveForm& theResultEnum) { if (IsEqual(theFormString, bscfEllipticArc)) { diff --git a/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWBSplineSurfaceForm.pxx b/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWBSplineSurfaceForm.pxx index 5a91648f65..8bc0b4f93a 100644 --- a/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWBSplineSurfaceForm.pxx +++ b/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWBSplineSurfaceForm.pxx @@ -68,7 +68,8 @@ inline const char* ConvertToString(const StepGeom_BSplineSurfaceForm theSourceEn //! @param theFormString The string to convert //! @param theResultEnum The corresponding StepGeom_BSplineSurfaceForm value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* theFormString, StepGeom_BSplineSurfaceForm& theResultEnum) +inline bool ConvertToEnum(const char* const theFormString, + StepGeom_BSplineSurfaceForm& theResultEnum) { if (IsEqual(theFormString, bssfSurfOfLinearExtrusion)) { diff --git a/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWKnotType.pxx b/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWKnotType.pxx index d77b7858bc..268e17a179 100644 --- a/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWKnotType.pxx +++ b/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWKnotType.pxx @@ -48,7 +48,7 @@ inline const char* ConvertToString(const StepGeom_KnotType theSourceEnum) //! @param theKnotTypeString The string to convert //! @param theResultEnum The corresponding StepGeom_KnotType value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* theKnotTypeString, StepGeom_KnotType& theResultEnum) +inline bool ConvertToEnum(const char* const theKnotTypeString, StepGeom_KnotType& theResultEnum) { if (IsEqual(theKnotTypeString, ktUniformKnots)) { diff --git a/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWPreferredSurfaceCurveRepresentation.pxx b/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWPreferredSurfaceCurveRepresentation.pxx index f6255f0862..b4985b1500 100644 --- a/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWPreferredSurfaceCurveRepresentation.pxx +++ b/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWPreferredSurfaceCurveRepresentation.pxx @@ -44,7 +44,7 @@ inline const char* ConvertToString(const StepGeom_PreferredSurfaceCurveRepresent //! @param theRepresentationStr The string to convert //! @param theResultEnum The corresponding StepGeom_PreferredSurfaceCurveRepresentation value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* theRepresentationStr, +inline bool ConvertToEnum(const char* const theRepresentationStr, StepGeom_PreferredSurfaceCurveRepresentation& theResultEnum) { if (IsEqual(theRepresentationStr, pscrPcurveS2)) diff --git a/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWTransitionCode.pxx b/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWTransitionCode.pxx index e968a8111d..9773dd9133 100644 --- a/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWTransitionCode.pxx +++ b/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWTransitionCode.pxx @@ -47,7 +47,8 @@ inline const char* ConvertToString(const StepGeom_TransitionCode theTransitionCo //! @param theTransitionCodeStr The string to convert //! @param theResultEnum The corresponding StepGeom_TransitionCode value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* theTransitionCodeStr, StepGeom_TransitionCode& theResultEnum) +inline bool ConvertToEnum(const char* const theTransitionCodeStr, + StepGeom_TransitionCode& theResultEnum) { if (IsEqual(theTransitionCodeStr, tcDiscontinuous)) { diff --git a/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWTrimmingPreference.pxx b/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWTrimmingPreference.pxx index e846234be0..7e61133252 100644 --- a/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWTrimmingPreference.pxx +++ b/src/DataExchange/TKDESTEP/RWStepGeom/RWStepGeom_RWTrimmingPreference.pxx @@ -44,7 +44,8 @@ inline const char* ConvertToString(const StepGeom_TrimmingPreference theSourceEn //! @param thePreferenceStr The string to convert //! @param theResultEnum The corresponding StepGeom_TrimmingPreference value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* thePreferenceStr, StepGeom_TrimmingPreference& theResultEnum) +inline bool ConvertToEnum(const char* const thePreferenceStr, + StepGeom_TrimmingPreference& theResultEnum) { if (IsEqual(thePreferenceStr, tpParameter)) { diff --git a/src/DataExchange/TKDESTEP/RWStepShape/RWStepShape_RWBooleanOperator.pxx b/src/DataExchange/TKDESTEP/RWStepShape/RWStepShape_RWBooleanOperator.pxx index 511819939d..06fe029083 100644 --- a/src/DataExchange/TKDESTEP/RWStepShape/RWStepShape_RWBooleanOperator.pxx +++ b/src/DataExchange/TKDESTEP/RWStepShape/RWStepShape_RWBooleanOperator.pxx @@ -44,7 +44,8 @@ inline const char* ConvertToString(const StepShape_BooleanOperator theSourceEnum //! @param theOperatorStr The string to convert //! @param theResultEnum The corresponding StepShape_BooleanOperator value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* theOperatorStr, StepShape_BooleanOperator& theResultEnum) +inline bool ConvertToEnum(const char* const theOperatorStr, + StepShape_BooleanOperator& theResultEnum) { if (IsEqual(theOperatorStr, boDifference)) { diff --git a/src/DataExchange/TKDESTEP/RWStepVisual/RWStepVisual_RWCentralOrParallel.pxx b/src/DataExchange/TKDESTEP/RWStepVisual/RWStepVisual_RWCentralOrParallel.pxx index e69e5b1a4d..4aa822c1d6 100644 --- a/src/DataExchange/TKDESTEP/RWStepVisual/RWStepVisual_RWCentralOrParallel.pxx +++ b/src/DataExchange/TKDESTEP/RWStepVisual/RWStepVisual_RWCentralOrParallel.pxx @@ -41,7 +41,7 @@ inline const char* ConvertToString(const StepVisual_CentralOrParallel theSourceE //! @param theCentralOrParallelStr The string to convert //! @param theResultEnum The corresponding StepVisual_CentralOrParallel value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* theCentralOrParallelStr, +inline bool ConvertToEnum(const char* const theCentralOrParallelStr, StepVisual_CentralOrParallel& theResultEnum) { if (IsEqual(theCentralOrParallelStr, copCentral)) diff --git a/src/DataExchange/TKDESTEP/RWStepVisual/RWStepVisual_RWSurfaceSide.pxx b/src/DataExchange/TKDESTEP/RWStepVisual/RWStepVisual_RWSurfaceSide.pxx index 6b6c8cc67d..53ff76e1bf 100644 --- a/src/DataExchange/TKDESTEP/RWStepVisual/RWStepVisual_RWSurfaceSide.pxx +++ b/src/DataExchange/TKDESTEP/RWStepVisual/RWStepVisual_RWSurfaceSide.pxx @@ -44,7 +44,7 @@ inline const char* ConvertToString(const StepVisual_SurfaceSide theSourceEnum) //! @param theSideStr The string to convert //! @param theResultEnum The corresponding StepVisual_SurfaceSide value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* theSideStr, StepVisual_SurfaceSide& theResultEnum) +inline bool ConvertToEnum(const char* const theSideStr, StepVisual_SurfaceSide& theResultEnum) { if (IsEqual(theSideStr, ssNegative)) { diff --git a/src/DataExchange/TKDESTEP/RWStepVisual/RWStepVisual_RWTextPath.pxx b/src/DataExchange/TKDESTEP/RWStepVisual/RWStepVisual_RWTextPath.pxx index 231b1ff460..287052e32f 100644 --- a/src/DataExchange/TKDESTEP/RWStepVisual/RWStepVisual_RWTextPath.pxx +++ b/src/DataExchange/TKDESTEP/RWStepVisual/RWStepVisual_RWTextPath.pxx @@ -48,7 +48,7 @@ inline const char* ConvertToString(const StepVisual_TextPath theSourceEnum) //! @param thePathStr The string to convert //! @param theResultEnum The corresponding StepVisual_TextPath value //! @return true if the conversion was successful, false otherwise -inline bool ConvertToEnum(const char* thePathStr, StepVisual_TextPath& theResultEnum) +inline bool ConvertToEnum(const char* const thePathStr, StepVisual_TextPath& theResultEnum) { if (IsEqual(thePathStr, tpUp)) { diff --git a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.cxx index 1c37ba7414..5317d542d0 100644 --- a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -342,14 +342,14 @@ TCollection_ExtendedString STEPCAFControl_Reader::convertName( //================================================================================================= -IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile(const char* theFileName) +IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile(const char* const theFileName) { return myReader.ReadFile(theFileName); } //================================================================================================= -IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile(const char* theFileName, +IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile(const char* const theFileName, const DESTEP_Parameters& theParams) { return myReader.ReadFile(theFileName, theParams); @@ -357,8 +357,8 @@ IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile(const char* t //================================================================================================= -IFSelect_ReturnStatus STEPCAFControl_Reader::ReadStream(const char* theName, - std::istream& theIStream) +IFSelect_ReturnStatus STEPCAFControl_Reader::ReadStream(const char* const theName, + std::istream& theIStream) { return myReader.ReadStream(theName, theIStream); } @@ -391,7 +391,7 @@ bool STEPCAFControl_Reader::Transfer(const occ::handle& doc, //================================================================================================= -bool STEPCAFControl_Reader::Perform(const char* filename, +bool STEPCAFControl_Reader::Perform(const char* const filename, const occ::handle& doc, const Message_ProgressRange& theProgress) { @@ -404,7 +404,7 @@ bool STEPCAFControl_Reader::Perform(const char* filenam //================================================================================================= -bool STEPCAFControl_Reader::Perform(const char* filename, +bool STEPCAFControl_Reader::Perform(const char* const filename, const occ::handle& doc, const DESTEP_Parameters& theParams, const Message_ProgressRange& theProgress) @@ -453,7 +453,7 @@ const NCollection_DataMap& ef) const { ef.Nullify(); @@ -661,7 +661,7 @@ bool STEPCAFControl_Reader::Transfer(STEPControl_Reader& reader #endif // get and check filename of the current extern ref - const char* filename = ExtRefs.FileName(i); + const char* const filename = ExtRefs.FileName(i); #ifdef OCCT_DEBUG std::cout << "filename=" << filename << std::endl; @@ -906,8 +906,8 @@ TDF_Label STEPCAFControl_Reader::AddShape( //================================================================================================= occ::handle STEPCAFControl_Reader::ReadExternFile( - const char* file, - const char* fullname, + const char* const file, + const char* const fullname, const occ::handle& doc, const Message_ProgressRange& theProgress) { diff --git a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.hxx b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.hxx index 039fea00fb..92f2dbf2d8 100644 --- a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.hxx +++ b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Reader.hxx @@ -89,21 +89,22 @@ public: //! Provided for use like single-file reader. //! @param[in] theFileName file to open //! @return read status - Standard_EXPORT IFSelect_ReturnStatus ReadFile(const char* theFileName); + Standard_EXPORT IFSelect_ReturnStatus ReadFile(const char* const theFileName); //! Loads a file and returns the read status //! Provided for use like single-file reader. //! @param[in] theFileName file to open //! @param[in] theParams default configuration parameters //! @return read status - Standard_EXPORT IFSelect_ReturnStatus ReadFile(const char* theFileName, + Standard_EXPORT IFSelect_ReturnStatus ReadFile(const char* const theFileName, const DESTEP_Parameters& theParams); //! Loads a file from stream and returns the read status. //! @param[in] theName auxiliary stream name //! @param[in] theIStream stream to read from //! @return read status - Standard_EXPORT IFSelect_ReturnStatus ReadStream(const char* theName, std::istream& theIStream); + Standard_EXPORT IFSelect_ReturnStatus ReadStream(const char* const theName, + std::istream& theIStream); //! Returns number of roots recognized for transfer //! Shortcut for Reader().NbRootsForTransfer() @@ -134,13 +135,13 @@ public: //! Translate STEP file given by filename into the document //! Return True if succeeded, and False in case of fail - Standard_EXPORT bool Perform(const char* filename, + Standard_EXPORT bool Perform(const char* const filename, const occ::handle& doc, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Translate STEP file given by filename into the document //! Return True if succeeded, and False in case of fail - Standard_EXPORT bool Perform(const char* filename, + Standard_EXPORT bool Perform(const char* const filename, const occ::handle& doc, const DESTEP_Parameters& theParams, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -153,7 +154,7 @@ public: //! Returns data on external file by its name //! Returns False if no external file with given name is read - Standard_EXPORT bool ExternFile(const char* name, + Standard_EXPORT bool ExternFile(const char* const name, occ::handle& ef) const; //! Returns basic reader @@ -291,8 +292,8 @@ protected: //! Reads (or if returns already read) extern file with //! given name Standard_EXPORT occ::handle ReadExternFile( - const char* file, - const char* fullpath, + const char* const file, + const char* const fullpath, const occ::handle& doc, const Message_ProgressRange& theProgress = Message_ProgressRange()); diff --git a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Writer.cxx index d6389f361f..9974b73cf8 100644 --- a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -295,7 +295,7 @@ void STEPCAFControl_Writer::Init(const occ::handle& theWS //================================================================================================= -IFSelect_ReturnStatus STEPCAFControl_Writer::Write(const char* theFileName) +IFSelect_ReturnStatus STEPCAFControl_Writer::Write(const char* const theFileName) { if (myIsCleanDuplicates) { @@ -386,7 +386,7 @@ IFSelect_ReturnStatus STEPCAFControl_Writer::WriteStream(std::ostream& theStream bool STEPCAFControl_Writer::Transfer(const occ::handle& theDoc, const STEPControl_StepModelType theMode, - const char* theMulti, + const char* const theMulti, const Message_ProgressRange& theProgress) { const occ::handle aModel = @@ -400,7 +400,7 @@ bool STEPCAFControl_Writer::Transfer(const occ::handle& theDoc bool STEPCAFControl_Writer::Transfer(const occ::handle& theDoc, const DESTEP_Parameters& theParams, const STEPControl_StepModelType theMode, - const char* theMulti, + const char* const theMulti, const Message_ProgressRange& theProgress) { occ::handle aShTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main()); @@ -421,7 +421,7 @@ bool STEPCAFControl_Writer::Transfer(const occ::handle& theDoc bool STEPCAFControl_Writer::Transfer(const TDF_Label& theLabel, const STEPControl_StepModelType theMode, - const char* theIsMulti, + const char* const theIsMulti, const Message_ProgressRange& theProgress) { const occ::handle aModel = @@ -435,7 +435,7 @@ bool STEPCAFControl_Writer::Transfer(const TDF_Label& theLabel, bool STEPCAFControl_Writer::Transfer(const TDF_Label& theLabel, const DESTEP_Parameters& theParams, const STEPControl_StepModelType theMode, - const char* theIsMulti, + const char* const theIsMulti, const Message_ProgressRange& theProgress) { if (theLabel.IsNull()) @@ -456,7 +456,7 @@ bool STEPCAFControl_Writer::Transfer(const TDF_Label& theLabel, bool STEPCAFControl_Writer::Transfer(const NCollection_Sequence& theLabels, const STEPControl_StepModelType theMode, - const char* theIsMulti, + const char* const theIsMulti, const Message_ProgressRange& theProgress) { const occ::handle aModel = @@ -470,7 +470,7 @@ bool STEPCAFControl_Writer::Transfer(const NCollection_Sequence& theL bool STEPCAFControl_Writer::Transfer(const NCollection_Sequence& theLabels, const DESTEP_Parameters& theParams, const STEPControl_StepModelType theMode, - const char* theIsMulti, + const char* const theIsMulti, const Message_ProgressRange& theProgress) { myRootLabels.Clear(); @@ -492,7 +492,7 @@ bool STEPCAFControl_Writer::Transfer(const NCollection_Sequence& theL //================================================================================================= bool STEPCAFControl_Writer::Perform(const occ::handle& theDoc, - const char* theFileName, + const char* const theFileName, const Message_ProgressRange& theProgress) { if (!Transfer(theDoc, STEPControl_AsIs, nullptr, theProgress)) @@ -503,7 +503,7 @@ bool STEPCAFControl_Writer::Perform(const occ::handle& theDoc, //================================================================================================= bool STEPCAFControl_Writer::Perform(const occ::handle& theDoc, - const char* theFileName, + const char* const theFileName, const DESTEP_Parameters& theParams, const Message_ProgressRange& theProgress) { @@ -537,7 +537,7 @@ bool STEPCAFControl_Writer::ExternFile(const TDF_Label& t //================================================================================================= -bool STEPCAFControl_Writer::ExternFile(const char* theName, +bool STEPCAFControl_Writer::ExternFile(const char* const theName, occ::handle& theExtFile) const { theExtFile.Nullify(); @@ -598,7 +598,7 @@ const XSAlgo_ShapeProcessor::ProcessingFlags& STEPCAFControl_Writer::GetShapePro bool STEPCAFControl_Writer::transfer(STEPControl_Writer& theWriter, const NCollection_Sequence& theLabels, const STEPControl_StepModelType theMode, - const char* theIsMulti, + const char* const theIsMulti, const bool theIsExternFile, const Message_ProgressRange& theProgress) { @@ -841,7 +841,7 @@ TopoDS_Shape STEPCAFControl_Writer::transferExternFiles(const TDF_Label& const STEPControl_StepModelType theMode, NCollection_Sequence& theLabels, const StepData_Factors& theLocalFactors, - const char* thePrefix, + const char* const thePrefix, const Message_ProgressRange& theProgress) { // if label already translated, just return the shape @@ -893,7 +893,7 @@ TopoDS_Shape STEPCAFControl_Writer::transferExternFiles(const TDF_Label& aStepWriter.Model()->InternalParameters.WriteAssembly; aStepWriter.Model()->InternalParameters.WriteAssembly = DESTEP_Parameters::WriteMode_Assembly_Off; - const char* anIsMulti = nullptr; + const char* const anIsMulti = nullptr; anExtFile->SetTransferStatus( transfer(aStepWriter, aLabelSeq, theMode, anIsMulti, true, theProgress)); aStepWriter.Model()->InternalParameters.WriteAssembly = anAssemblymode; @@ -1837,7 +1837,7 @@ void STEPCAFControl_Writer::writeMetadataRepresentationItem( static bool WritePropsForLabel(const occ::handle& theWS, const NCollection_DataMap& theLabels, const TDF_Label& theLabel, - const char* theIsMulti) + const char* const theIsMulti) { if (theLabel.IsNull()) return false; @@ -1891,7 +1891,7 @@ static bool WritePropsForLabel(const occ::handle& bool STEPCAFControl_Writer::writeValProps(const occ::handle& theWS, const NCollection_Sequence& theLabels, - const char* theIsMulti) const + const char* const theIsMulti) const { if (theLabels.IsEmpty()) return false; @@ -2745,7 +2745,7 @@ static occ::handle CreateDimValue( const double theValue, const StepBasic_Unit& theUnit, const occ::handle& theName, - const char* theMeasureName, + const char* const theMeasureName, const bool theIsAngle, const bool theIsQualified = false, const occ::handle& theQRI = nullptr) diff --git a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Writer.hxx b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Writer.hxx index edcf841657..9287d449be 100644 --- a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Writer.hxx +++ b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Writer.hxx @@ -80,7 +80,7 @@ public: //! filename will be a name of root file, all other files //! have names of corresponding parts //! Provided for use like single-file writer - Standard_EXPORT IFSelect_ReturnStatus Write(const char* theFileName); + Standard_EXPORT IFSelect_ReturnStatus Write(const char* const theFileName); //! Writes all the produced models into the stream. //! Provided for use like single-file writer @@ -94,7 +94,7 @@ public: //! Returns True if translation is OK Standard_EXPORT bool Transfer(const occ::handle& theDoc, const STEPControl_StepModelType theMode = STEPControl_AsIs, - const char* theIsMulti = nullptr, + const char* const theIsMulti = nullptr, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Transfers a document (or single label) to a STEP model @@ -110,13 +110,13 @@ public: Standard_EXPORT bool Transfer(const occ::handle& theDoc, const DESTEP_Parameters& theParams, const STEPControl_StepModelType theMode = STEPControl_AsIs, - const char* theIsMulti = nullptr, + const char* const theIsMulti = nullptr, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Method to transfer part of the document specified by label Standard_EXPORT bool Transfer(const TDF_Label& theLabel, const STEPControl_StepModelType theMode = STEPControl_AsIs, - const char* theIsMulti = nullptr, + const char* const theIsMulti = nullptr, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Method to transfer part of the document specified by label @@ -125,14 +125,14 @@ public: Standard_EXPORT bool Transfer(const TDF_Label& theLabel, const DESTEP_Parameters& theParams, const STEPControl_StepModelType theMode = STEPControl_AsIs, - const char* theIsMulti = nullptr, + const char* const theIsMulti = nullptr, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Method to writing sequence of root assemblies //! or part of the file specified by use by one label Standard_EXPORT bool Transfer(const NCollection_Sequence& theLabelSeq, const STEPControl_StepModelType theMode = STEPControl_AsIs, - const char* theIsMulti = nullptr, + const char* const theIsMulti = nullptr, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Method to writing sequence of root assemblies @@ -142,7 +142,7 @@ public: Standard_EXPORT bool Transfer(const NCollection_Sequence& theLabelSeq, const DESTEP_Parameters& theParams, const STEPControl_StepModelType theMode = STEPControl_AsIs, - const char* theIsMulti = nullptr, + const char* const theIsMulti = nullptr, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT bool Perform(const occ::handle& theDoc, @@ -152,7 +152,7 @@ public: //! Transfers a document and writes it to a STEP file //! Returns True if translation is OK Standard_EXPORT bool Perform(const occ::handle& theDoc, - const char* theFileName, + const char* const theFileName, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Transfers a document and writes it to a STEP file @@ -160,7 +160,7 @@ public: //! initialization from Interface_Static //! Returns True if translation is OK Standard_EXPORT bool Perform(const occ::handle& theDoc, - const char* theFileName, + const char* const theFileName, const DESTEP_Parameters& theParams, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -179,7 +179,7 @@ public: //! Returns data on external file by its name //! Returns False if no external file with given name is read - Standard_EXPORT bool ExternFile(const char* theName, + Standard_EXPORT bool ExternFile(const char* const theName, occ::handle& theExtFile) const; //! Returns basic reader for root file @@ -288,7 +288,7 @@ protected: bool transfer(STEPControl_Writer& theWriter, const NCollection_Sequence& theLabels, const STEPControl_StepModelType theMode = STEPControl_AsIs, - const char* theIsMulti = nullptr, + const char* const theIsMulti = nullptr, const bool isExternFile = false, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -303,7 +303,7 @@ protected: const STEPControl_StepModelType theMode, NCollection_Sequence& theLabelSeq, const StepData_Factors& theLocalFactors = StepData_Factors(), - const char* thePrefix = "", + const char* const thePrefix = "", const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Write external references to STEP @@ -357,7 +357,7 @@ protected: //! to STEP model bool writeValProps(const occ::handle& theWS, const NCollection_Sequence& theLabels, - const char* theIsMulti) const; + const char* const theIsMulti) const; //! Write layers assigned to specified labels, to STEP model bool writeLayers(const occ::handle& theWS, diff --git a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ExternRefs.cxx b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ExternRefs.cxx index e5d1a7f8a9..65006a487f 100644 --- a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ExternRefs.cxx +++ b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ExternRefs.cxx @@ -521,9 +521,9 @@ occ::handle STEPConstruct_ExternRefs::Format(const int //================================================================================================= -int STEPConstruct_ExternRefs::AddExternRef(const char* filename, +int STEPConstruct_ExternRefs::AddExternRef(const char* const filename, const occ::handle& PD, - const char* format) + const char* const format) { occ::handle EmptyString = new TCollection_HAsciiString(""); occ::handle fmt = new TCollection_HAsciiString(format); @@ -841,7 +841,7 @@ bool STEPConstruct_ExternRefs::addAP214ExterRef( const occ::handle& ADR, const occ::handle& PD, const occ::handle& DF, - const char* filename) + const char* const filename) { occ::handle> DRIs = new NCollection_HArray1(1, 1); diff --git a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ExternRefs.hxx b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ExternRefs.hxx index 669608f44f..ed41529895 100644 --- a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ExternRefs.hxx +++ b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ExternRefs.hxx @@ -92,9 +92,9 @@ public: //! can be Null string, in that case this information //! is not written. Else, it can be "STEP AP214" or "STEP AP203" //! Returns index of a new extern ref - Standard_EXPORT int AddExternRef(const char* filename, + Standard_EXPORT int AddExternRef(const char* const filename, const occ::handle& PD, - const char* format); + const char* const format); //! Check (create if it is null) all shared entities for the model Standard_EXPORT void checkAP214Shared(); @@ -116,7 +116,7 @@ protected: Standard_EXPORT bool addAP214ExterRef(const occ::handle& ADR, const occ::handle& PD, const occ::handle& DF, - const char* filename); + const char* const filename); private: NCollection_Sequence> myAEIAs; diff --git a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ValidationProps.cxx b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ValidationProps.cxx index 42312cd138..49530f28e7 100644 --- a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ValidationProps.cxx +++ b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ValidationProps.cxx @@ -354,7 +354,7 @@ bool STEPConstruct_ValidationProps::AddProp( const StepRepr_CharacterizedDefinition& target, const occ::handle& Context, const occ::handle& Prop, - const char* Descr) + const char* const Descr) { // FINALLY, create a structure of 5 entities describing a link between a shape and its property occ::handle PropDefName = @@ -397,7 +397,7 @@ bool STEPConstruct_ValidationProps::AddProp( bool STEPConstruct_ValidationProps::AddProp(const TopoDS_Shape& Shape, const occ::handle& Prop, - const char* Descr, + const char* const Descr, const bool instance) { StepRepr_CharacterizedDefinition target; diff --git a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ValidationProps.hxx b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ValidationProps.hxx index ad54d53ac2..a507ab77e5 100644 --- a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ValidationProps.hxx +++ b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_ValidationProps.hxx @@ -60,7 +60,7 @@ public: //! Returns True if success, False in case of fail Standard_EXPORT bool AddProp(const TopoDS_Shape& Shape, const occ::handle& Prop, - const char* Descr, + const char* const Descr, const bool instance = false); //! General method for adding (writing) a validation property @@ -70,7 +70,7 @@ public: Standard_EXPORT bool AddProp(const StepRepr_CharacterizedDefinition& target, const occ::handle& Context, const occ::handle& Prop, - const char* Descr); + const char* const Descr); //! Adds surface area property for given shape (already mapped). //! Returns True if success, False in case of fail diff --git a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Reader.cxx b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Reader.cxx index db5a115bda..50378fd4d1 100644 --- a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Reader.cxx +++ b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Reader.cxx @@ -93,7 +93,7 @@ occ::handle STEPControl_Reader::StepModel() const //================================================================================================= -IFSelect_ReturnStatus STEPControl_Reader::ReadFile(const char* filename) +IFSelect_ReturnStatus STEPControl_Reader::ReadFile(const char* const filename) { occ::handle aLibrary = WS()->WorkLibrary(); occ::handle aProtocol = WS()->Protocol(); @@ -136,7 +136,7 @@ IFSelect_ReturnStatus STEPControl_Reader::ReadFile(const char* filename) //================================================================================================= -IFSelect_ReturnStatus STEPControl_Reader::ReadFile(const char* filename, +IFSelect_ReturnStatus STEPControl_Reader::ReadFile(const char* const filename, const DESTEP_Parameters& theParams) { occ::handle aLibrary = WS()->WorkLibrary(); @@ -180,7 +180,8 @@ IFSelect_ReturnStatus STEPControl_Reader::ReadFile(const char* file //================================================================================================= -IFSelect_ReturnStatus STEPControl_Reader::ReadStream(const char* theName, std::istream& theIStream) +IFSelect_ReturnStatus STEPControl_Reader::ReadStream(const char* const theName, + std::istream& theIStream) { occ::handle aLibrary = WS()->WorkLibrary(); occ::handle aProtocol = WS()->Protocol(); @@ -223,7 +224,7 @@ IFSelect_ReturnStatus STEPControl_Reader::ReadStream(const char* theName, std::i //================================================================================================= -IFSelect_ReturnStatus STEPControl_Reader::ReadStream(const char* theName, +IFSelect_ReturnStatus STEPControl_Reader::ReadStream(const char* const theName, const DESTEP_Parameters& theParams, std::istream& theIStream) { diff --git a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Reader.hxx b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Reader.hxx index 21037a6f2a..352ea45e2f 100644 --- a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Reader.hxx +++ b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Reader.hxx @@ -85,19 +85,19 @@ public: //! Loads a file and returns the read status //! Zero for a Model which compies with the Controller - Standard_EXPORT IFSelect_ReturnStatus ReadFile(const char* filename) override; + Standard_EXPORT IFSelect_ReturnStatus ReadFile(const char* const filename) override; //! Loads a file from stream and returns the read status - Standard_EXPORT IFSelect_ReturnStatus ReadStream(const char* theName, - std::istream& theIStream) override; + Standard_EXPORT IFSelect_ReturnStatus ReadStream(const char* const theName, + std::istream& theIStream) override; //! Loads a file and returns the read status //! Zero for a Model which compies with the Controller - Standard_EXPORT IFSelect_ReturnStatus ReadFile(const char* filename, + Standard_EXPORT IFSelect_ReturnStatus ReadFile(const char* const filename, const DESTEP_Parameters& theParams); //! Loads a file from stream and returns the read status - Standard_EXPORT IFSelect_ReturnStatus ReadStream(const char* theName, + Standard_EXPORT IFSelect_ReturnStatus ReadStream(const char* const theName, const DESTEP_Parameters& theParams, std::istream& theIStream); diff --git a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.cxx b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.cxx index b3d3167923..6afffb5410 100644 --- a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.cxx +++ b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.cxx @@ -155,7 +155,7 @@ IFSelect_ReturnStatus STEPControl_Writer::Transfer(const TopoDS_Shape& //================================================================================================= -IFSelect_ReturnStatus STEPControl_Writer::Write(const char* theFileName) +IFSelect_ReturnStatus STEPControl_Writer::Write(const char* const theFileName) { occ::handle aModel = Model(); if (aModel.IsNull()) diff --git a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.hxx b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.hxx index dc9674390c..ba1d792887 100644 --- a/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.hxx +++ b/src/DataExchange/TKDESTEP/STEPControl/STEPControl_Writer.hxx @@ -103,7 +103,7 @@ public: const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Writes a STEP model in the file identified by filename. - Standard_EXPORT IFSelect_ReturnStatus Write(const char* theFileName); + Standard_EXPORT IFSelect_ReturnStatus Write(const char* const theFileName); //! Writes a STEP model in the std::ostream. Standard_EXPORT IFSelect_ReturnStatus WriteStream(std::ostream& theOStream); diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_MeasureValueMember.cxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_MeasureValueMember.cxx index 6227622832..9620b0326b 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_MeasureValueMember.cxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_MeasureValueMember.cxx @@ -78,7 +78,7 @@ const char* StepBasic_MeasureValueMember::Name() const //================================================================================================= -bool StepBasic_MeasureValueMember::SetName(const char* name) +bool StepBasic_MeasureValueMember::SetName(const char* const name) { if (!name || name[0] == '\0') thecase = 0; diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_MeasureValueMember.hxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_MeasureValueMember.hxx index 32a4aa4c34..632a1a8344 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_MeasureValueMember.hxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_MeasureValueMember.hxx @@ -39,7 +39,7 @@ public: Standard_EXPORT const char* Name() const override; - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; DEFINE_STANDARD_RTTIEXT(StepBasic_MeasureValueMember, StepData_SelectReal) diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_SizeMember.cxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_SizeMember.cxx index a7af02d02a..b83399e899 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_SizeMember.cxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_SizeMember.cxx @@ -28,7 +28,7 @@ const char* StepBasic_SizeMember::Name() const return "POSITIVE_LENGTH_MEASURE"; } -bool StepBasic_SizeMember::SetName(const char* /*name*/) +bool StepBasic_SizeMember::SetName(const char* const /*name*/) { return true; } diff --git a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_SizeMember.hxx b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_SizeMember.hxx index b620b391a3..a625dc9a43 100644 --- a/src/DataExchange/TKDESTEP/StepBasic/StepBasic_SizeMember.hxx +++ b/src/DataExchange/TKDESTEP/StepBasic/StepBasic_SizeMember.hxx @@ -34,7 +34,7 @@ public: Standard_EXPORT const char* Name() const override; - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; DEFINE_STANDARD_RTTIEXT(StepBasic_SizeMember, StepData_SelectReal) }; diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_Described.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_Described.hxx index 1313a46312..1eaedf567d 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_Described.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_Described.hxx @@ -42,21 +42,21 @@ public: //! Tells if a step type is matched by //! For a Simple Entity : own type or super type //! For a Complex Entity : one of the members - Standard_EXPORT virtual bool Matches(const char* steptype) const = 0; + Standard_EXPORT virtual bool Matches(const char* const steptype) const = 0; //! Returns a Simple Entity which matches with a Type in : //! For a Simple Entity : me if it matches, else a null handle //! For a Complex Entity : the member which matches, else null - Standard_EXPORT virtual occ::handle As(const char* steptype) const = 0; + Standard_EXPORT virtual occ::handle As(const char* const steptype) const = 0; //! Tells if a Field brings a given name - Standard_EXPORT virtual bool HasField(const char* name) const = 0; + Standard_EXPORT virtual bool HasField(const char* const name) const = 0; //! Returns a Field from its name; read-only - Standard_EXPORT virtual const StepData_Field& Field(const char* name) const = 0; + Standard_EXPORT virtual const StepData_Field& Field(const char* const name) const = 0; //! Returns a Field from its name; read or write - Standard_EXPORT virtual StepData_Field& CField(const char* name) = 0; + Standard_EXPORT virtual StepData_Field& CField(const char* const name) = 0; //! Fills a Check by using its Description Standard_EXPORT virtual void Check(occ::handle& ach) const = 0; diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_ECDescr.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_ECDescr.cxx index 05b6dc670d..e33ccf1cde 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_ECDescr.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_ECDescr.cxx @@ -63,7 +63,7 @@ occ::handle> StepData_ECDescr::Ty return tl; } -bool StepData_ECDescr::Matches(const char* name) const +bool StepData_ECDescr::Matches(const char* const name) const { int i, nb = NbMembers(); for (i = 1; i <= nb; i++) diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_ECDescr.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_ECDescr.hxx index a0c5d2b739..38d9e3fb7c 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_ECDescr.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_ECDescr.hxx @@ -52,7 +52,7 @@ public: Standard_EXPORT occ::handle> TypeList() const; //! Tells if a ESDescr matches a step type : exact or super type - Standard_EXPORT bool Matches(const char* steptype) const override; + Standard_EXPORT bool Matches(const char* const steptype) const override; //! Returns True Standard_EXPORT bool IsComplex() const override; diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_EDescr.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_EDescr.hxx index 098783330a..9c83422147 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_EDescr.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_EDescr.hxx @@ -30,7 +30,7 @@ class StepData_EDescr : public Standard_Transient public: //! Tells if a ESDescr matches a step type : exact or super type - Standard_EXPORT virtual bool Matches(const char* steptype) const = 0; + Standard_EXPORT virtual bool Matches(const char* const steptype) const = 0; //! Tells if a EDescr is complex (ECDescr) or simple (ESDescr) Standard_EXPORT virtual bool IsComplex() const = 0; diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_ESDescr.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_ESDescr.cxx index ac722f9890..0bc071329d 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_ESDescr.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_ESDescr.cxx @@ -20,7 +20,7 @@ IMPLEMENT_STANDARD_RTTIEXT(StepData_ESDescr, StepData_EDescr) -StepData_ESDescr::StepData_ESDescr(const char* name) +StepData_ESDescr::StepData_ESDescr(const char* const name) : thenom(name) { // Constructor for Simple Entity Descriptor with the given type name @@ -56,7 +56,7 @@ void StepData_ESDescr::SetNbFields(const int nb) } void StepData_ESDescr::SetField(const int num, - const char* name, + const char* const name, const occ::handle& descr) { // Set field descriptor at specified position with given name and parameter descriptor @@ -130,7 +130,7 @@ int StepData_ESDescr::NbFields() const return (thedescr.IsNull() ? 0 : thedescr->Length()); } -int StepData_ESDescr::Rank(const char* name) const +int StepData_ESDescr::Rank(const char* const name) const { int rank; if (!thenames.Find(name, rank)) @@ -153,7 +153,7 @@ occ::handle StepData_ESDescr::Field(const int num) const return GetCasted(StepData_PDescr, thedescr->Value(num)); } -occ::handle StepData_ESDescr::NamedField(const char* name) const +occ::handle StepData_ESDescr::NamedField(const char* const name) const { occ::handle pde; int rank = Rank(name); @@ -162,7 +162,7 @@ occ::handle StepData_ESDescr::NamedField(const char* name) cons return pde; } -bool StepData_ESDescr::Matches(const char* name) const +bool StepData_ESDescr::Matches(const char* const name) const { // Check if this descriptor matches the given type name (including inheritance) if (thenom.IsEqual(name)) diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_ESDescr.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_ESDescr.hxx index 1910e76937..27abacb1b7 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_ESDescr.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_ESDescr.hxx @@ -38,7 +38,7 @@ class StepData_ESDescr : public StepData_EDescr public: //! Creates an ESDescr with a type name - Standard_EXPORT StepData_ESDescr(const char* name); + Standard_EXPORT StepData_ESDescr(const char* const name); //! Sets a new count of fields //! Each one is described by a PDescr @@ -47,7 +47,7 @@ public: //! Sets a PDescr to describe a field //! A Field is designated by its rank and name Standard_EXPORT void SetField(const int num, - const char* name, + const char* const name, const occ::handle& descr); //! Sets an ESDescr as based on another one @@ -78,7 +78,7 @@ public: Standard_EXPORT int NbFields() const; //! Returns the rank of a field from its name. 0 if unknown - Standard_EXPORT int Rank(const char* name) const; + Standard_EXPORT int Rank(const char* const name) const; //! Returns the name of a field from its rank. empty if outofrange Standard_EXPORT const char* Name(const int num) const; @@ -87,10 +87,10 @@ public: Standard_EXPORT occ::handle Field(const int num) const; //! Returns the PDescr for the field named (or Null) - Standard_EXPORT occ::handle NamedField(const char* name) const; + Standard_EXPORT occ::handle NamedField(const char* const name) const; //! Tells if a ESDescr matches a step type : exact or super type - Standard_EXPORT bool Matches(const char* steptype) const override; + Standard_EXPORT bool Matches(const char* const steptype) const override; //! Returns False Standard_EXPORT bool IsComplex() const override; diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_EnumTool.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_EnumTool.cxx index 25b3a7dcb0..b60d8fb618 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_EnumTool.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_EnumTool.cxx @@ -14,46 +14,46 @@ #include #include -StepData_EnumTool::StepData_EnumTool(const char* e0, - const char* e1, - const char* e2, - const char* e3, - const char* e4, - const char* e5, - const char* e6, - const char* e7, - const char* e8, - const char* e9, - const char* e10, - const char* e11, - const char* e12, - const char* e13, - const char* e14, - const char* e15, - const char* e16, - const char* e17, - const char* e18, - const char* e19, - const char* e20, - const char* e21, - const char* e22, - const char* e23, - const char* e24, - const char* e25, - const char* e26, - const char* e27, - const char* e28, - const char* e29, - const char* e30, - const char* e31, - const char* e32, - const char* e33, - const char* e34, - const char* e35, - const char* e36, - const char* e37, - const char* e38, - const char* e39) +StepData_EnumTool::StepData_EnumTool(const char* const e0, + const char* const e1, + const char* const e2, + const char* const e3, + const char* const e4, + const char* const e5, + const char* const e6, + const char* const e7, + const char* const e8, + const char* const e9, + const char* const e10, + const char* const e11, + const char* const e12, + const char* const e13, + const char* const e14, + const char* const e15, + const char* const e16, + const char* const e17, + const char* const e18, + const char* const e19, + const char* const e20, + const char* const e21, + const char* const e22, + const char* const e23, + const char* const e24, + const char* const e25, + const char* const e26, + const char* const e27, + const char* const e28, + const char* const e29, + const char* const e30, + const char* const e31, + const char* const e32, + const char* const e33, + const char* const e34, + const char* const e35, + const char* const e36, + const char* const e37, + const char* const e38, + const char* const e39) { AddDefinition(e0); AddDefinition(e1); @@ -99,7 +99,7 @@ StepData_EnumTool::StepData_EnumTool(const char* e0, theopt = true; } -void StepData_EnumTool::AddDefinition(const char* term) +void StepData_EnumTool::AddDefinition(const char* const term) { char text[80]; if (!term) @@ -178,7 +178,7 @@ const TCollection_AsciiString& StepData_EnumTool::Text(const int num) const return thetexts.Value(num + 1); } -int StepData_EnumTool::Value(const char* txt) const +int StepData_EnumTool::Value(const char* const txt) const { int nb = thetexts.Length(); for (int i = 1; i <= nb; i++) diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_EnumTool.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_EnumTool.hxx index bcb27f7e50..c2bfad2b18 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_EnumTool.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_EnumTool.hxx @@ -59,46 +59,46 @@ public: //! A null definition can be input by given "$" :the corresponding //! position is attached to "null/undefined" value (as one //! particular item of the enumeration list) - Standard_EXPORT StepData_EnumTool(const char* e0 = "", - const char* e1 = "", - const char* e2 = "", - const char* e3 = "", - const char* e4 = "", - const char* e5 = "", - const char* e6 = "", - const char* e7 = "", - const char* e8 = "", - const char* e9 = "", - const char* e10 = "", - const char* e11 = "", - const char* e12 = "", - const char* e13 = "", - const char* e14 = "", - const char* e15 = "", - const char* e16 = "", - const char* e17 = "", - const char* e18 = "", - const char* e19 = "", - const char* e20 = "", - const char* e21 = "", - const char* e22 = "", - const char* e23 = "", - const char* e24 = "", - const char* e25 = "", - const char* e26 = "", - const char* e27 = "", - const char* e28 = "", - const char* e29 = "", - const char* e30 = "", - const char* e31 = "", - const char* e32 = "", - const char* e33 = "", - const char* e34 = "", - const char* e35 = "", - const char* e36 = "", - const char* e37 = "", - const char* e38 = "", - const char* e39 = ""); + Standard_EXPORT StepData_EnumTool(const char* const e0 = "", + const char* const e1 = "", + const char* const e2 = "", + const char* const e3 = "", + const char* const e4 = "", + const char* const e5 = "", + const char* const e6 = "", + const char* const e7 = "", + const char* const e8 = "", + const char* const e9 = "", + const char* const e10 = "", + const char* const e11 = "", + const char* const e12 = "", + const char* const e13 = "", + const char* const e14 = "", + const char* const e15 = "", + const char* const e16 = "", + const char* const e17 = "", + const char* const e18 = "", + const char* const e19 = "", + const char* const e20 = "", + const char* const e21 = "", + const char* const e22 = "", + const char* const e23 = "", + const char* const e24 = "", + const char* const e25 = "", + const char* const e26 = "", + const char* const e27 = "", + const char* const e28 = "", + const char* const e29 = "", + const char* const e30 = "", + const char* const e31 = "", + const char* const e32 = "", + const char* const e33 = "", + const char* const e34 = "", + const char* const e35 = "", + const char* const e36 = "", + const char* const e37 = "", + const char* const e38 = "", + const char* const e39 = ""); //! Processes a definition, splits it according blanks if any //! empty definitions are ignored @@ -106,7 +106,7 @@ public: //! position is attached to "null/undefined" value (as one //! particular item of the enumeration list) //! See also IsSet - Standard_EXPORT void AddDefinition(const char* term); + Standard_EXPORT void AddDefinition(const char* const term); //! Returns True if at least one definition has been entered after //! creation time (i.e. by AddDefinition only) @@ -145,7 +145,7 @@ public: //! Returns the numeric value found for a text //! The text must be in capitals and limited by dots //! A non-suitable text gives a negative value to be returned - Standard_EXPORT int Value(const char* txt) const; + Standard_EXPORT int Value(const char* const txt) const; //! Same as above but works on an AsciiString Standard_EXPORT int Value(const TCollection_AsciiString& txt) const; diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_Field.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_Field.cxx index 6868be8237..807000ccf7 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_Field.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_Field.cxx @@ -267,7 +267,7 @@ void StepData_Field::SetReal(const double val) thereal = val; } -void StepData_Field::SetString(const char* val) +void StepData_Field::SetString(const char* const val) { if (thekind == KindSelect) { @@ -283,7 +283,7 @@ void StepData_Field::SetString(const char* val) theany = new TCollection_HAsciiString(val); } -void StepData_Field::SetEnum(const int val, const char* text) +void StepData_Field::SetEnum(const int val, const char* const text) { Clear(KindEnum); SetInt(val); @@ -518,7 +518,7 @@ void StepData_Field::SetLogical(const int num, const StepData_Logical val) SetInt(num, 2, KindLogical); } -void StepData_Field::SetEnum(const int num, const int val, const char* text) +void StepData_Field::SetEnum(const int num, const int val, const char* const text) { DeclareAndCast(NCollection_HArray1>, ht, theany); if (ht.IsNull()) @@ -558,7 +558,7 @@ void StepData_Field::SetReal(const int num, const double val) sm->SetReal(val); } -void StepData_Field::SetString(const int num, const char* val) +void StepData_Field::SetString(const int num, const char* const val) { DeclareAndCast(NCollection_HArray1>, hs, theany); if (!hs.IsNull()) diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_Field.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_Field.hxx index 3cac3293c6..b9e3787d3e 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_Field.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_Field.hxx @@ -85,13 +85,13 @@ public: //! Sets a String Value (or predeclares a list as String) //! Does not redefine the Kind if it is already String or Enum - Standard_EXPORT void SetString(const char* val = ""); + Standard_EXPORT void SetString(const char* const val = ""); //! Sets an Enum Value (as its integer counterpart) //! (or predeclares a list as Enum) //! If is given , also sets its textual expression //! negative means unknown (known values begin at 0) - Standard_EXPORT void SetEnum(const int val = -1, const char* text = ""); + Standard_EXPORT void SetEnum(const int val = -1, const char* const text = ""); //! Sets a SelectMember (for Integer,Boolean,Enum,Real,Logical) //! Hence, the value of the field is accessed through this member @@ -135,11 +135,11 @@ public: //! Sets an Enum Value (Integer counterpart), also its text //! expression if known (if list has been set as "any") - Standard_EXPORT void SetEnum(const int num, const int val, const char* text = ""); + Standard_EXPORT void SetEnum(const int num, const int val, const char* const text = ""); Standard_EXPORT void SetReal(const int num, const double val); - Standard_EXPORT void SetString(const int num, const char* val); + Standard_EXPORT void SetString(const int num, const char* const val); Standard_EXPORT void SetEntity(const int num, const occ::handle& val); diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_FreeFormEntity.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_FreeFormEntity.cxx index 2b0054b1fa..8b48393732 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_FreeFormEntity.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_FreeFormEntity.cxx @@ -19,7 +19,7 @@ IMPLEMENT_STANDARD_RTTIEXT(StepData_FreeFormEntity, Standard_Transient) -void StepData_FreeFormEntity::SetStepType(const char* typenam) +void StepData_FreeFormEntity::SetStepType(const char* const typenam) { // Set the STEP entity type name for this free-form entity thetype.Clear(); @@ -58,7 +58,7 @@ bool StepData_FreeFormEntity::IsComplex() const return (!thenext.IsNull()); } -occ::handle StepData_FreeFormEntity::Typed(const char* typenam) const +occ::handle StepData_FreeFormEntity::Typed(const char* const typenam) const { occ::handle res; if (thetype.IsEqual(typenam)) diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_FreeFormEntity.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_FreeFormEntity.hxx index a184b7d930..7907dc29d4 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_FreeFormEntity.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_FreeFormEntity.hxx @@ -45,7 +45,7 @@ public: //! Sets the type of an entity //! For a complex one, the type of this member - Standard_EXPORT void SetStepType(const char* typenam); + Standard_EXPORT void SetStepType(const char* const typenam); //! Returns the recorded StepType //! For a complex one, the type of this member @@ -68,7 +68,7 @@ public: //! Returns the member of a FreeFormEntity of which the type name //! is given (exact match, no sub-type) - Standard_EXPORT occ::handle Typed(const char* typenam) const; + Standard_EXPORT occ::handle Typed(const char* const typenam) const; //! Returns the list of types (one type for a simple entity), //! as is (non reordered) diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_PDescr.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_PDescr.cxx index 8bc565b667..638181ec39 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_PDescr.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_PDescr.cxx @@ -37,7 +37,7 @@ StepData_PDescr::StepData_PDescr() { } -void StepData_PDescr::SetName(const char* name) +void StepData_PDescr::SetName(const char* const name) { thename.Clear(); thename.AssignCat(name); @@ -76,7 +76,7 @@ void StepData_PDescr::AddMember(const occ::handle& member) thesel = 2; } -void StepData_PDescr::SetMemberName(const char* memname) +void StepData_PDescr::SetMemberName(const char* const memname) { thesnam.Clear(); thesnam.AssignCat(memname); @@ -112,7 +112,7 @@ void StepData_PDescr::SetEnum() thekind = KindEnum; } -void StepData_PDescr::AddEnumDef(const char* enumdef) +void StepData_PDescr::AddEnumDef(const char* const enumdef) { theenum.AddDefinition(enumdef); } @@ -124,7 +124,7 @@ void StepData_PDescr::SetType(const occ::handle& atype) thednam.Clear(); } -void StepData_PDescr::SetDescr(const char* dscnam) +void StepData_PDescr::SetDescr(const char* const dscnam) { thekind = KindEntity; thetype.Nullify(); @@ -171,7 +171,7 @@ void StepData_PDescr::SetDerived(const bool der) theder = der; } -void StepData_PDescr::SetField(const char* name, const int rank) +void StepData_PDescr::SetField(const char* const name, const int rank) { thefnam.Clear(); thefnam.AssignCat(name); @@ -187,7 +187,7 @@ bool StepData_PDescr::IsSelect() const return (thesel > 0); } -occ::handle StepData_PDescr::Member(const char* name) const +occ::handle StepData_PDescr::Member(const char* const name) const { if (!thefrom.IsNull()) return thefrom->Member(name); @@ -234,7 +234,7 @@ int StepData_PDescr::EnumMax() const return theenum.MaxValue(); } -int StepData_PDescr::EnumValue(const char* name) const +int StepData_PDescr::EnumValue(const char* const name) const { return theenum.Value(name); } diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_PDescr.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_PDescr.hxx index 1319e5ba49..c18aa3061d 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_PDescr.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_PDescr.hxx @@ -40,7 +40,7 @@ class StepData_PDescr : public Standard_Transient public: Standard_EXPORT StepData_PDescr(); - Standard_EXPORT void SetName(const char* name); + Standard_EXPORT void SetName(const char* const name); Standard_EXPORT const char* Name() const; @@ -53,7 +53,7 @@ public: //! Sets a name for SELECT member. To be used if a member is for //! an immediate type - Standard_EXPORT void SetMemberName(const char* memname); + Standard_EXPORT void SetMemberName(const char* const memname); //! Sets for an Integer value Standard_EXPORT void SetInteger(); @@ -75,14 +75,14 @@ public: Standard_EXPORT void SetEnum(); //! Adds an enum value as a string - Standard_EXPORT void AddEnumDef(const char* enumdef); + Standard_EXPORT void AddEnumDef(const char* const enumdef); //! Sets for an Entity which must match a Type (early-bound) Standard_EXPORT void SetType(const occ::handle& atype); //! Sets for a Described Entity, whose Description must match //! the type name - Standard_EXPORT void SetDescr(const char* dscnam); + Standard_EXPORT void SetDescr(const char* const dscnam); //! Adds an arity count to , by default 1 //! 1 : a simple field passes to a LIST/ARRAY etc @@ -108,7 +108,7 @@ public: //! Sets to describe a field of an entity //! With a name and a rank - Standard_EXPORT void SetField(const char* name, const int rank); + Standard_EXPORT void SetField(const char* const name, const int rank); //! Tells if is for a SELECT Standard_EXPORT bool IsSelect() const; @@ -121,7 +121,7 @@ public: //! Hence, following IsInteger .. Enum* only apply on and //! require Member //! While IsType applies on and all Select Members - Standard_EXPORT occ::handle Member(const char* name) const; + Standard_EXPORT occ::handle Member(const char* const name) const; //! Tells if is for an Integer Standard_EXPORT bool IsInteger() const; @@ -149,7 +149,7 @@ public: //! Returns the numeric value found for an enum text //! The text must be in capitals and limited by dots //! A non-suitable text gives a negative value to be returned - Standard_EXPORT int EnumValue(const char* name) const; + Standard_EXPORT int EnumValue(const char* const name) const; //! Returns the text which corresponds to a numeric value, //! between 0 and EnumMax. It is limited by dots diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_Plex.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_Plex.cxx index f794f98c8a..dfacf2016f 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_Plex.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_Plex.cxx @@ -44,7 +44,7 @@ bool StepData_Plex::IsComplex() const return true; } -bool StepData_Plex::Matches(const char* steptype) const +bool StepData_Plex::Matches(const char* const steptype) const { int i, nb = NbMembers(); for (i = 1; i <= nb; i++) @@ -55,7 +55,7 @@ bool StepData_Plex::Matches(const char* steptype) const return false; } -occ::handle StepData_Plex::As(const char* steptype) const +occ::handle StepData_Plex::As(const char* const steptype) const { occ::handle ent; int i, nb = NbMembers(); @@ -69,7 +69,7 @@ occ::handle StepData_Plex::As(const char* steptype) const return ent; } -bool StepData_Plex::HasField(const char* name) const +bool StepData_Plex::HasField(const char* const name) const { int i, nb = NbMembers(); for (i = 1; i <= nb; i++) @@ -80,7 +80,7 @@ bool StepData_Plex::HasField(const char* name) const return false; } -const StepData_Field& StepData_Plex::Field(const char* name) const +const StepData_Field& StepData_Plex::Field(const char* const name) const { occ::handle ent; int i, nb = NbMembers(); @@ -93,7 +93,7 @@ const StepData_Field& StepData_Plex::Field(const char* name) const throw Interface_InterfaceMismatch("StepData_Plex : Field"); } -StepData_Field& StepData_Plex::CField(const char* name) +StepData_Field& StepData_Plex::CField(const char* const name) { occ::handle ent; int i, nb = NbMembers(); diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_Plex.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_Plex.hxx index 0ddd892a09..18b4513c96 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_Plex.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_Plex.hxx @@ -55,21 +55,21 @@ public: //! Tells if a step type is matched by //! For a Simple Entity : own type or super type //! For a Complex Entity : one of the members - Standard_EXPORT bool Matches(const char* steptype) const override; + Standard_EXPORT bool Matches(const char* const steptype) const override; //! Returns a Simple Entity which matches with a Type in : //! For a Simple Entity : me if it matches, else a null handle //! For a Complex Entity : the member which matches, else null - Standard_EXPORT occ::handle As(const char* steptype) const override; + Standard_EXPORT occ::handle As(const char* const steptype) const override; //! Tells if a Field brings a given name - Standard_EXPORT bool HasField(const char* name) const override; + Standard_EXPORT bool HasField(const char* const name) const override; //! Returns a Field from its name; read-only - Standard_EXPORT const StepData_Field& Field(const char* name) const override; + Standard_EXPORT const StepData_Field& Field(const char* const name) const override; //! Returns a Field from its name; read or write - Standard_EXPORT StepData_Field& CField(const char* name) override; + Standard_EXPORT StepData_Field& CField(const char* const name) override; //! Returns the count of simple members Standard_EXPORT int NbMembers() const; diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_Protocol.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_Protocol.cxx index b5fe0bf61d..5fe50891d8 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_Protocol.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_Protocol.cxx @@ -135,7 +135,8 @@ occ::handle StepData_Protocol::Descr(const int num) const return dsc; } -occ::handle StepData_Protocol::Descr(const char* name, const bool anylevel) const +occ::handle StepData_Protocol::Descr(const char* const name, + const bool anylevel) const { occ::handle sd; if (!thedscnam.IsEmpty()) @@ -160,8 +161,8 @@ occ::handle StepData_Protocol::Descr(const char* name, const bo return sd; } -occ::handle StepData_Protocol::ESDescr(const char* name, - const bool anylevel) const +occ::handle StepData_Protocol::ESDescr(const char* const name, + const bool anylevel) const { return occ::down_cast(Descr(name, anylevel)); } @@ -214,7 +215,8 @@ void StepData_Protocol::AddPDescr(const occ::handle& pdescr) thepdescr.Bind(pdescr->Name(), pdescr); } -occ::handle StepData_Protocol::PDescr(const char* name, const bool anylevel) const +occ::handle StepData_Protocol::PDescr(const char* const name, + const bool anylevel) const { occ::handle sd; if (!thepdescr.IsEmpty()) @@ -244,8 +246,8 @@ void StepData_Protocol::AddBasicDescr(const occ::handle& esdes thedscbas.Bind(esdescr->TypeName(), esdescr); } -occ::handle StepData_Protocol::BasicDescr(const char* name, - const bool anylevel) const +occ::handle StepData_Protocol::BasicDescr(const char* const name, + const bool anylevel) const { occ::handle sd; if (!thedscbas.IsEmpty()) diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_Protocol.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_Protocol.hxx index 07fc89d972..04064f4783 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_Protocol.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_Protocol.hxx @@ -101,12 +101,12 @@ public: //! Returns a description according to its name //! True (D) : for and its resources //! False : for only - Standard_EXPORT occ::handle Descr(const char* name, - const bool anylevel = true) const; + Standard_EXPORT occ::handle Descr(const char* const name, + const bool anylevel = true) const; //! Idem as Descr but cast to simple description - Standard_EXPORT occ::handle ESDescr(const char* name, - const bool anylevel = true) const; + Standard_EXPORT occ::handle ESDescr(const char* const name, + const bool anylevel = true) const; //! Returns a complex description according to list of names //! True (D) : for and its resources @@ -121,8 +121,8 @@ public: //! Returns a parameter description according to its name //! True (D) : for and its resources //! False : for only - Standard_EXPORT occ::handle PDescr(const char* name, - const bool anylevel = true) const; + Standard_EXPORT occ::handle PDescr(const char* const name, + const bool anylevel = true) const; //! Records an ESDescr, intended to build complex descriptions Standard_EXPORT void AddBasicDescr(const occ::handle& esdescr); @@ -130,8 +130,8 @@ public: //! Returns a basic description according to its name //! True (D) : for and its resources //! False : for only - Standard_EXPORT occ::handle BasicDescr(const char* name, - const bool anylevel = true) const; + Standard_EXPORT occ::handle BasicDescr(const char* const name, + const bool anylevel = true) const; DEFINE_STANDARD_RTTIEXT(StepData_Protocol, Interface_Protocol) diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_SelectMember.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_SelectMember.cxx index 3d2291c231..1a63cfad73 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_SelectMember.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_SelectMember.cxx @@ -36,12 +36,12 @@ const char* StepData_SelectMember::Name() const return ""; } -bool StepData_SelectMember::SetName(const char* /*bid*/) +bool StepData_SelectMember::SetName(const char* const /*bid*/) { return false; } -bool StepData_SelectMember::Matches(const char* name) const +bool StepData_SelectMember::Matches(const char* const name) const { return !strcmp(name, Name()); } @@ -133,7 +133,7 @@ const char* StepData_SelectMember::String() const return ""; } -void StepData_SelectMember::SetString(const char*) {} +void StepData_SelectMember::SetString(const char* const) {} int StepData_SelectMember::Enum() const { @@ -145,7 +145,7 @@ const char* StepData_SelectMember::EnumText() const return String(); } -void StepData_SelectMember::SetEnum(const int val, const char* text) +void StepData_SelectMember::SetEnum(const int val, const char* const text) { SetKind(KindEnum); SetInt(val); @@ -153,7 +153,7 @@ void StepData_SelectMember::SetEnum(const int val, const char* text) SetEnumText(val, text); } -void StepData_SelectMember::SetEnumText(const int /*val*/, const char* text) +void StepData_SelectMember::SetEnumText(const int /*val*/, const char* const text) { SetString(text); } diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_SelectMember.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_SelectMember.hxx index c07b76eacd..2130579666 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_SelectMember.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_SelectMember.hxx @@ -56,11 +56,11 @@ public: //! Sets the name of a SelectMember, returns True if done, False //! if no name is allowed //! Default does nothing and returns False - Standard_EXPORT virtual bool SetName(const char* name); + Standard_EXPORT virtual bool SetName(const char* const name); //! Tells if the name of a SelectMember matches a given one //! By default, compares the strings, can be redefined (optimised) - Standard_EXPORT virtual bool Matches(const char* name) const; + Standard_EXPORT virtual bool Matches(const char* const name) const; Standard_EXPORT virtual int Kind() const; @@ -97,15 +97,15 @@ public: Standard_EXPORT virtual const char* String() const; - Standard_EXPORT virtual void SetString(const char* val); + Standard_EXPORT virtual void SetString(const char* const val); Standard_EXPORT int Enum() const; Standard_EXPORT virtual const char* EnumText() const; - Standard_EXPORT void SetEnum(const int val, const char* text = ""); + Standard_EXPORT void SetEnum(const int val, const char* const text = ""); - Standard_EXPORT virtual void SetEnumText(const int val, const char* text); + Standard_EXPORT virtual void SetEnumText(const int val, const char* const text); DEFINE_STANDARD_RTTIEXT(StepData_SelectMember, Standard_Transient) }; diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_SelectNamed.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_SelectNamed.cxx index 8e9ec8c55c..ea55c09e74 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_SelectNamed.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_SelectNamed.cxx @@ -39,7 +39,7 @@ const char* StepData_SelectNamed::Name() const return thename.ToCString(); } -bool StepData_SelectNamed::SetName(const char* name) +bool StepData_SelectNamed::SetName(const char* const name) { thename.Clear(); thename.AssignCat(name); @@ -91,7 +91,7 @@ const char* StepData_SelectNamed::String() const return theval.String(); } -void StepData_SelectNamed::SetString(const char* val) +void StepData_SelectNamed::SetString(const char* const val) { theval.SetString(val); } diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_SelectNamed.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_SelectNamed.hxx index c7ab2cdf69..2ccbbd1df3 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_SelectNamed.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_SelectNamed.hxx @@ -39,7 +39,7 @@ public: Standard_EXPORT const char* Name() const override; - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; Standard_EXPORT const StepData_Field& Field() const; @@ -63,7 +63,7 @@ public: Standard_EXPORT const char* String() const override; - Standard_EXPORT void SetString(const char* val) override; + Standard_EXPORT void SetString(const char* const val) override; DEFINE_STANDARD_RTTIEXT(StepData_SelectNamed, StepData_SelectMember) diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_SelectType.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_SelectType.cxx index 234c651981..0e39e5b9f3 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_SelectType.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_SelectType.cxx @@ -134,7 +134,7 @@ void StepData_SelectType::SetInt(const int val) // ********** Types Immediats : Differents Cas *********** static occ::handle SelectVal(const occ::handle& thevalue, - const char* name, + const char* const name, const int mode) { DeclareAndCast(StepData_SelectMember, sm, thevalue); @@ -168,7 +168,7 @@ int StepData_SelectType::Integer() const return sm->Integer(); } -void StepData_SelectType::SetInteger(const int val, const char* name) +void StepData_SelectType::SetInteger(const int val, const char* const name) { occ::handle sm = SelectVal(thevalue, name, 0); sm->SetInteger(val); @@ -185,7 +185,7 @@ bool StepData_SelectType::Boolean() const return sm->Boolean(); } -void StepData_SelectType::SetBoolean(const bool val, const char* name) +void StepData_SelectType::SetBoolean(const bool val, const char* const name) { occ::handle sm = SelectVal(thevalue, name, 0); sm->SetBoolean(val); @@ -202,7 +202,7 @@ StepData_Logical StepData_SelectType::Logical() const return sm->Logical(); } -void StepData_SelectType::SetLogical(const StepData_Logical val, const char* name) +void StepData_SelectType::SetLogical(const StepData_Logical val, const char* const name) { occ::handle sm = SelectVal(thevalue, name, 0); sm->SetLogical(val); @@ -219,7 +219,7 @@ double StepData_SelectType::Real() const return sm->Real(); } -void StepData_SelectType::SetReal(const double val, const char* name) +void StepData_SelectType::SetReal(const double val, const char* const name) { occ::handle sm = SelectVal(thevalue, name, 1); sm->SetReal(val); diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_SelectType.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_SelectType.hxx index 44c4f8e2cf..d2baa67551 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_SelectType.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_SelectType.hxx @@ -136,19 +136,19 @@ public: //! Sets a new Integer value, with an optional type name //! Warning : If a SelectMember is already set, works on it : value and //! name must then be accepted by this SelectMember - Standard_EXPORT void SetInteger(const int val, const char* name = ""); + Standard_EXPORT void SetInteger(const int val, const char* const name = ""); Standard_EXPORT bool Boolean() const; - Standard_EXPORT void SetBoolean(const bool val, const char* name = ""); + Standard_EXPORT void SetBoolean(const bool val, const char* const name = ""); Standard_EXPORT StepData_Logical Logical() const; - Standard_EXPORT void SetLogical(const StepData_Logical val, const char* name = ""); + Standard_EXPORT void SetLogical(const StepData_Logical val, const char* const name = ""); Standard_EXPORT double Real() const; - Standard_EXPORT void SetReal(const double val, const char* name = ""); + Standard_EXPORT void SetReal(const double val, const char* const name = ""); Standard_EXPORT virtual ~StepData_SelectType(); diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_Simple.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_Simple.cxx index 4abd4a236b..6c0380bbdf 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_Simple.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_Simple.cxx @@ -41,12 +41,12 @@ bool StepData_Simple::IsComplex() const return false; } -bool StepData_Simple::Matches(const char* steptype) const +bool StepData_Simple::Matches(const char* const steptype) const { return ESDescr()->Matches(steptype); } -occ::handle StepData_Simple::As(const char* steptype) const +occ::handle StepData_Simple::As(const char* const steptype) const { occ::handle nulent; if (Matches(steptype)) @@ -54,13 +54,13 @@ occ::handle StepData_Simple::As(const char* steptype) const return nulent; } -bool StepData_Simple::HasField(const char* name) const +bool StepData_Simple::HasField(const char* const name) const { int num = ESDescr()->Rank(name); return (num > 0); } -const StepData_Field& StepData_Simple::Field(const char* name) const +const StepData_Field& StepData_Simple::Field(const char* const name) const { int num = ESDescr()->Rank(name); if (num == 0) @@ -68,7 +68,7 @@ const StepData_Field& StepData_Simple::Field(const char* name) const return FieldNum(num); } -StepData_Field& StepData_Simple::CField(const char* name) +StepData_Field& StepData_Simple::CField(const char* const name) { int num = ESDescr()->Rank(name); if (num == 0) diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_Simple.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_Simple.hxx index 7643a2f607..9a1f3818c3 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_Simple.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_Simple.hxx @@ -50,21 +50,21 @@ public: //! Tells if a step type is matched by //! For a Simple Entity : own type or super type //! For a Complex Entity : one of the members - Standard_EXPORT bool Matches(const char* steptype) const override; + Standard_EXPORT bool Matches(const char* const steptype) const override; //! Returns a Simple Entity which matches with a Type in : //! For a Simple Entity : me if it matches, else a null handle //! For a Complex Entity : the member which matches, else null - Standard_EXPORT occ::handle As(const char* steptype) const override; + Standard_EXPORT occ::handle As(const char* const steptype) const override; //! Tells if a Field brings a given name - Standard_EXPORT bool HasField(const char* name) const override; + Standard_EXPORT bool HasField(const char* const name) const override; //! Returns a Field from its name; read-only - Standard_EXPORT const StepData_Field& Field(const char* name) const override; + Standard_EXPORT const StepData_Field& Field(const char* const name) const override; //! Returns a Field from its name; read or write - Standard_EXPORT StepData_Field& CField(const char* name) override; + Standard_EXPORT StepData_Field& CField(const char* const name) override; //! Returns the count of fields Standard_EXPORT int NbFields() const; diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_StepReaderData.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_StepReaderData.cxx index 08d7517fdc..84255ee87f 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_StepReaderData.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_StepReaderData.cxx @@ -366,9 +366,9 @@ StepData_StepReaderData::StepData_StepReaderData(const int nbhea //================================================================================================= -void StepData_StepReaderData::SetRecord(const int num, - const char* ident, - const char* type, +void StepData_StepReaderData::SetRecord(const int num, + const char* const ident, + const char* const type, const int /* nbpar */) { int numlst; @@ -449,7 +449,7 @@ void StepData_StepReaderData::SetRecord(const int num, //================================================================================================= void StepData_StepReaderData::AddStepParam(const int num, - const char* aval, + const char* const aval, const Interface_ParamType atype, const int nument) { @@ -559,7 +559,7 @@ int StepData_StepReaderData::NextForComplex(const int num) const //================================================================================================= -bool StepData_StepReaderData::NamedForComplex(const char* name, +bool StepData_StepReaderData::NamedForComplex(const char* const name, const int num0, int& num, occ::handle& ach) const @@ -599,8 +599,8 @@ bool StepData_StepReaderData::NamedForComplex(const char* name //================================================================================================= -bool StepData_StepReaderData::NamedForComplex(const char* theName, - const char* theShortName, +bool StepData_StepReaderData::NamedForComplex(const char* const theName, + const char* const theShortName, const int num0, int& num, occ::handle& ach) const @@ -645,7 +645,7 @@ bool StepData_StepReaderData::NamedForComplex(const char* theN bool StepData_StepReaderData::CheckNbParams(const int num, const int nbreq, occ::handle& ach, - const char* mess) const + const char* const mess) const { if (NbParams(num) == nbreq) return true; @@ -664,7 +664,7 @@ bool StepData_StepReaderData::CheckNbParams(const int num, bool StepData_StepReaderData::ReadSubList(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, int& numsub, const bool optional, @@ -701,7 +701,7 @@ bool StepData_StepReaderData::ReadSubList(const int num, //================================================================================================= int StepData_StepReaderData::ReadSub(const int numsub, - const char* mess, + const char* const mess, occ::handle& ach, const occ::handle& descr, occ::handle& val) const @@ -996,7 +996,7 @@ int StepData_StepReaderData::ReadSub(const int numsub, bool StepData_StepReaderData::ReadMember(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, occ::handle& val) const { @@ -1022,7 +1022,7 @@ bool StepData_StepReaderData::ReadMember(const int num bool StepData_StepReaderData::ReadField(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, const occ::handle& descr, StepData_Field& fild) const @@ -1121,7 +1121,7 @@ bool StepData_StepReaderData::ReadList(const int num, bool StepData_StepReaderData::ReadAny(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, const occ::handle& descr, occ::handle& val) const @@ -1304,7 +1304,7 @@ bool StepData_StepReaderData::ReadAny(const int num, bool StepData_StepReaderData::ReadXY(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, double& X, double& Y) const @@ -1346,7 +1346,7 @@ bool StepData_StepReaderData::ReadXY(const int num, bool StepData_StepReaderData::ReadXYZ(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, double& X, double& Y, @@ -1395,7 +1395,7 @@ bool StepData_StepReaderData::ReadXYZ(const int num, bool StepData_StepReaderData::ReadReal(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, double& val) const { @@ -1426,7 +1426,7 @@ bool StepData_StepReaderData::ReadReal(const int num, bool StepData_StepReaderData::ReadEntity(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, const occ::handle& atype, occ::handle& ent) const @@ -1476,7 +1476,7 @@ bool StepData_StepReaderData::ReadEntity(const int num, bool StepData_StepReaderData::ReadEntity(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, StepData_SelectType& sel) const { @@ -1540,7 +1540,7 @@ bool StepData_StepReaderData::ReadEntity(const int num, bool StepData_StepReaderData::ReadInteger(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, int& val) const { @@ -1574,7 +1574,7 @@ bool StepData_StepReaderData::ReadInteger(const int num, bool StepData_StepReaderData::ReadBoolean(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, bool& flag) const { @@ -1612,7 +1612,7 @@ bool StepData_StepReaderData::ReadBoolean(const int num, bool StepData_StepReaderData::ReadLogical(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, StepData_Logical& flag) const { @@ -1651,7 +1651,7 @@ bool StepData_StepReaderData::ReadLogical(const int num, bool StepData_StepReaderData::ReadString(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, occ::handle& val) const { @@ -1692,7 +1692,7 @@ bool StepData_StepReaderData::ReadString(const int bool StepData_StepReaderData::ReadEnumParam(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, const char*& text) const { @@ -1727,7 +1727,7 @@ bool StepData_StepReaderData::ReadEnumParam(const int num, void StepData_StepReaderData::FailEnumValue(const int /* num */, const int nump, - const char* mess, + const char* const mess, occ::handle& ach) const { char txtmes[200]; @@ -1740,7 +1740,7 @@ void StepData_StepReaderData::FailEnumValue(const int /* num */, bool StepData_StepReaderData::ReadEnum(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, const StepData_EnumTool& enumtool, int& val) const @@ -1784,7 +1784,7 @@ bool StepData_StepReaderData::ReadEnum(const int num, bool StepData_StepReaderData::ReadTypedParam(const int num, const int nump, const bool mustbetyped, - const char* mess, + const char* const mess, occ::handle& ach, int& numr, int& numrp, @@ -1830,7 +1830,7 @@ bool StepData_StepReaderData::ReadTypedParam(const int num, bool StepData_StepReaderData::CheckDerived(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, const bool errstat) const { diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_StepReaderData.hxx b/src/DataExchange/TKDESTEP/StepData/StepData_StepReaderData.hxx index c0fad6963a..fefe052ad7 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_StepReaderData.hxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_StepReaderData.hxx @@ -62,15 +62,15 @@ public: const Resource_FormatType theSourceCodePage = Resource_FormatType_UTF8); //! Fills the fields of a record - Standard_EXPORT void SetRecord(const int num, - const char* ident, - const char* type, - const int nbpar); + Standard_EXPORT void SetRecord(const int num, + const char* const ident, + const char* const type, + const int nbpar); //! Fills the fields of a parameter of a record. This is a variant //! of AddParam, Adapted to STEP (optimized for specific values) Standard_EXPORT void AddStepParam(const int num, - const char* aval, + const char* const aval, const Interface_ParamType atype, const int nument = 0); @@ -121,7 +121,7 @@ public: //! and is returned as zero //! //! Returns True if alphabetic order, False else - Standard_EXPORT bool NamedForComplex(const char* name, + Standard_EXPORT bool NamedForComplex(const char* const name, const int num0, int& num, occ::handle& ach) const; @@ -141,8 +141,8 @@ public: //! and is returned as zero //! //! Returns True if alphabetic order, False else - Standard_EXPORT bool NamedForComplex(const char* theName, - const char* theShortName, + Standard_EXPORT bool NamedForComplex(const char* const theName, + const char* const theShortName, const int num0, int& num, occ::handle& ach) const; @@ -154,7 +154,7 @@ public: Standard_EXPORT bool CheckNbParams(const int num, const int nbreq, occ::handle& ach, - const char* mess = "") const; + const char* const mess = "") const; //! reads parameter of record as a sub-list (may be //! typed, see ReadTypedParameter in this case) @@ -166,7 +166,7 @@ public: //! for last parameter) Standard_EXPORT bool ReadSubList(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, int& numsub, const bool optional = false, @@ -182,7 +182,7 @@ public: //! The returned status is : negative if failed, 0 if empty. //! Else the kind to be recorded in the field Standard_EXPORT int ReadSub(const int numsub, - const char* mess, + const char* const mess, occ::handle& ach, const occ::handle& descr, occ::handle& val) const; @@ -199,7 +199,7 @@ public: //! some members as Entity, some other not) Standard_EXPORT bool ReadMember(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, occ::handle& val) const; @@ -207,7 +207,7 @@ public: template bool ReadMember(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, occ::handle& val) const { @@ -224,7 +224,7 @@ public: //! Returns True when done Standard_EXPORT bool ReadField(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, const occ::handle& descr, StepData_Field& fild) const; @@ -253,7 +253,7 @@ public: //! For a Select with a Name, must then be a SelectNamed Standard_EXPORT bool ReadAny(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, const occ::handle& descr, occ::handle& val) const; @@ -265,7 +265,7 @@ public: //! gives the name of the parameter Standard_EXPORT bool ReadXY(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, double& X, double& Y) const; @@ -275,7 +275,7 @@ public: //! ReadXY (demands a sub-list of three Reals) Standard_EXPORT bool ReadXYZ(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, double& X, double& Y, @@ -285,7 +285,7 @@ public: //! Return value and Check managed as by ReadXY (demands a Real) Standard_EXPORT bool ReadReal(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, double& val) const; @@ -298,7 +298,7 @@ public: //! is an Entity but is not Kind of required type Standard_EXPORT bool ReadEntity(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, const occ::handle& atype, occ::handle& ent) const; @@ -307,7 +307,7 @@ public: template bool ReadEntity(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, const occ::handle& atype, occ::handle& ent) const @@ -321,7 +321,7 @@ public: //! records the read Entity (see method Value from SelectType) Standard_EXPORT bool ReadEntity(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, StepData_SelectType& sel) const; @@ -329,7 +329,7 @@ public: //! Return value & Check managed as by ReadXY (demands an Integer) Standard_EXPORT bool ReadInteger(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, int& val) const; @@ -338,7 +338,7 @@ public: //! Boolean enum, i.e. text ".T." for True or ".F." for False) Standard_EXPORT bool ReadBoolean(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, bool& flag) const; @@ -347,7 +347,7 @@ public: //! Logical enum, i.e. text ".T.", ".F.", or ".U.") Standard_EXPORT bool ReadLogical(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, StepData_Logical& flag) const; @@ -356,13 +356,13 @@ public: //! Return value and Check managed as by ReadXY (demands a String) Standard_EXPORT bool ReadString(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, occ::handle& val) const; Standard_EXPORT bool ReadEnumParam(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, const char*& text) const; @@ -371,7 +371,7 @@ public: //! Just a help to centralize message definitions Standard_EXPORT void FailEnumValue(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach) const; //! Reads parameter of record as an Enumeration (text @@ -380,7 +380,7 @@ public: //! enumeration, or is not recognized by the EnumTool (with fail) Standard_EXPORT bool ReadEnum(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, const StepData_EnumTool& enumtool, int& val) const; @@ -398,7 +398,7 @@ public: Standard_EXPORT bool ReadTypedParam(const int num, const int nump, const bool mustbetyped, - const char* mess, + const char* const mess, occ::handle& ach, int& numr, int& numrp, @@ -411,7 +411,7 @@ public: //! if errstat is False (Default), Fail if errstat is True Standard_EXPORT bool CheckDerived(const int num, const int nump, - const char* mess, + const char* const mess, occ::handle& ach, const bool errstat = false) const; diff --git a/src/DataExchange/TKDESTEP/StepData/StepData_StepWriter.cxx b/src/DataExchange/TKDESTEP/StepData/StepData_StepWriter.cxx index ccc780b29c..2c23544097 100644 --- a/src/DataExchange/TKDESTEP/StepData/StepData_StepWriter.cxx +++ b/src/DataExchange/TKDESTEP/StepData/StepData_StepWriter.cxx @@ -487,7 +487,7 @@ void StepData_StepWriter::SendComment(const occ::handle& text); //! same as above but accepts a CString (ex.: "..." directly) - Standard_EXPORT void SendComment(const char* text); + Standard_EXPORT void SendComment(const char* const text); //! sets entity's StepType, opens brackets, starts param no to 0 //! params are separated by comma @@ -191,7 +191,7 @@ public: Standard_EXPORT void OpenSub(); //! open a sublist with its type then a '(' - Standard_EXPORT void OpenTypedSub(const char* subtype); + Standard_EXPORT void OpenTypedSub(const char* const subtype); //! closes a sublist by a ')' Standard_EXPORT void CloseSub(); @@ -228,7 +228,7 @@ public: Standard_EXPORT void SendString(const TCollection_AsciiString& val); //! sends a string exactly as it is given - Standard_EXPORT void SendString(const char* val); + Standard_EXPORT void SendString(const char* const val); //! sends an enum given by String (literal expression) //! adds '.' around it if not done @@ -238,7 +238,7 @@ public: //! sends an enum given by String (literal expression) //! adds '.' around it if not done - Standard_EXPORT void SendEnum(const char* val); + Standard_EXPORT void SendEnum(const char* const val); //! sends an array of real Standard_EXPORT void SendArrReal(const occ::handle>& anArr); @@ -308,7 +308,7 @@ private: Standard_EXPORT void AddString(const TCollection_AsciiString& str, const int more = 0); //! Same as above, but the string is given by CString + Length - Standard_EXPORT void AddString(const char* str, const int lnstr, const int more = 0); + Standard_EXPORT void AddString(const char* const str, const int lnstr, const int more = 0); occ::handle themodel; occ::handle>> thefile; diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_SimpleDatumReferenceModifierMember.cxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_SimpleDatumReferenceModifierMember.cxx index e1d755ffe2..921179aad1 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_SimpleDatumReferenceModifierMember.cxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_SimpleDatumReferenceModifierMember.cxx @@ -57,7 +57,7 @@ const char* StepDimTol_SimpleDatumReferenceModifierMember::EnumText() const //================================================================================================= void StepDimTol_SimpleDatumReferenceModifierMember::SetEnumText(const int /*theValue*/, - const char* theText) + const char* const theText) { int aVal = tool.Value(theText); if (aVal >= 0) diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_SimpleDatumReferenceModifierMember.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_SimpleDatumReferenceModifierMember.hxx index c1aa27131d..6ab042910a 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_SimpleDatumReferenceModifierMember.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_SimpleDatumReferenceModifierMember.hxx @@ -37,13 +37,13 @@ public: const char* Name() const override { return "SIMPLE_DATUM_REFERENCE_MODIFIER"; } - bool SetName(const char* /*theName*/) override { return true; } + bool SetName(const char* const /*theName*/) override { return true; } int Kind() const override { return 4; } Standard_EXPORT const char* EnumText() const override; - Standard_EXPORT void SetEnumText(const int theValue, const char* theText) override; + Standard_EXPORT void SetEnumText(const int theValue, const char* const theText) override; Standard_EXPORT void SetValue(const StepDimTol_SimpleDatumReferenceModifier theValue); diff --git a/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementFreedomMember.cxx b/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementFreedomMember.cxx index 381d5e2ec1..abc798c39a 100644 --- a/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementFreedomMember.cxx +++ b/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementFreedomMember.cxx @@ -55,7 +55,7 @@ const char* StepElement_CurveElementFreedomMember::Name() const //================================================================================================= -static int CompareNames(const char* name, int& /*numen*/) +static int CompareNames(const char* const name, int& /*numen*/) { int thecase = 0; if (!name || name[0] == '\0') @@ -74,7 +74,7 @@ static int CompareNames(const char* name, int& /*numen*/) //================================================================================================= -bool StepElement_CurveElementFreedomMember::SetName(const char* name) +bool StepElement_CurveElementFreedomMember::SetName(const char* const name) { int numit = 0; mycase = CompareNames(name, numit); @@ -85,7 +85,7 @@ bool StepElement_CurveElementFreedomMember::SetName(const char* name) //================================================================================================= -bool StepElement_CurveElementFreedomMember::Matches(const char* name) const +bool StepElement_CurveElementFreedomMember::Matches(const char* const name) const { int numit = 0; int thecase = CompareNames(name, numit); diff --git a/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementFreedomMember.hxx b/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementFreedomMember.hxx index 3a878b51f6..67645ed410 100644 --- a/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementFreedomMember.hxx +++ b/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementFreedomMember.hxx @@ -37,10 +37,10 @@ public: Standard_EXPORT const char* Name() const override; //! Set name - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; //! Tells if the name of a SelectMember matches a given one; - Standard_EXPORT bool Matches(const char* name) const override; + Standard_EXPORT bool Matches(const char* const name) const override; DEFINE_STANDARD_RTTIEXT(StepElement_CurveElementFreedomMember, StepData_SelectNamed) diff --git a/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementPurposeMember.cxx b/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementPurposeMember.cxx index e81da653c0..88c356bd3c 100644 --- a/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementPurposeMember.cxx +++ b/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementPurposeMember.cxx @@ -55,7 +55,7 @@ const char* StepElement_CurveElementPurposeMember::Name() const //================================================================================================= -static int CompareNames(const char* name, int& /*numen*/) +static int CompareNames(const char* const name, int& /*numen*/) { int thecase = 0; if (!name || name[0] == '\0') @@ -73,7 +73,7 @@ static int CompareNames(const char* name, int& /*numen*/) //================================================================================================= -bool StepElement_CurveElementPurposeMember::SetName(const char* name) +bool StepElement_CurveElementPurposeMember::SetName(const char* const name) { int numit = 0; mycase = CompareNames(name, numit); @@ -84,7 +84,7 @@ bool StepElement_CurveElementPurposeMember::SetName(const char* name) //================================================================================================= -bool StepElement_CurveElementPurposeMember::Matches(const char* name) const +bool StepElement_CurveElementPurposeMember::Matches(const char* const name) const { int numit = 0; int thecase = CompareNames(name, numit); diff --git a/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementPurposeMember.hxx b/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementPurposeMember.hxx index 9e910faaaa..97b796b1e8 100644 --- a/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementPurposeMember.hxx +++ b/src/DataExchange/TKDESTEP/StepElement/StepElement_CurveElementPurposeMember.hxx @@ -37,10 +37,10 @@ public: Standard_EXPORT const char* Name() const override; //! Set name - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; //! Tells if the name of a SelectMember matches a given one; - Standard_EXPORT bool Matches(const char* name) const override; + Standard_EXPORT bool Matches(const char* const name) const override; DEFINE_STANDARD_RTTIEXT(StepElement_CurveElementPurposeMember, StepData_SelectNamed) diff --git a/src/DataExchange/TKDESTEP/StepElement/StepElement_ElementAspectMember.cxx b/src/DataExchange/TKDESTEP/StepElement/StepElement_ElementAspectMember.cxx index e9e0810a63..35d9efe560 100644 --- a/src/DataExchange/TKDESTEP/StepElement/StepElement_ElementAspectMember.cxx +++ b/src/DataExchange/TKDESTEP/StepElement/StepElement_ElementAspectMember.cxx @@ -79,7 +79,7 @@ const char* StepElement_ElementAspectMember::Name() const //================================================================================================= -static int CompareNames(const char* name, int& numen) +static int CompareNames(const char* const name, int& numen) { int thecase = 0; if (!name || name[0] == '\0') @@ -115,7 +115,7 @@ static int CompareNames(const char* name, int& numen) //================================================================================================= -bool StepElement_ElementAspectMember::SetName(const char* name) +bool StepElement_ElementAspectMember::SetName(const char* const name) { int numit = 0; mycase = CompareNames(name, numit); @@ -126,7 +126,7 @@ bool StepElement_ElementAspectMember::SetName(const char* name) //================================================================================================= -bool StepElement_ElementAspectMember::Matches(const char* name) const +bool StepElement_ElementAspectMember::Matches(const char* const name) const { int numit = 0; int thecase = CompareNames(name, numit); diff --git a/src/DataExchange/TKDESTEP/StepElement/StepElement_ElementAspectMember.hxx b/src/DataExchange/TKDESTEP/StepElement/StepElement_ElementAspectMember.hxx index c0a09afe9f..e48be686b6 100644 --- a/src/DataExchange/TKDESTEP/StepElement/StepElement_ElementAspectMember.hxx +++ b/src/DataExchange/TKDESTEP/StepElement/StepElement_ElementAspectMember.hxx @@ -37,10 +37,10 @@ public: Standard_EXPORT const char* Name() const override; //! Set name - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; //! Tells if the name of a SelectMember matches a given one; - Standard_EXPORT bool Matches(const char* name) const override; + Standard_EXPORT bool Matches(const char* const name) const override; DEFINE_STANDARD_RTTIEXT(StepElement_ElementAspectMember, StepData_SelectNamed) diff --git a/src/DataExchange/TKDESTEP/StepElement/StepElement_MeasureOrUnspecifiedValueMember.cxx b/src/DataExchange/TKDESTEP/StepElement/StepElement_MeasureOrUnspecifiedValueMember.cxx index aeea3f7018..3a5183a7fb 100644 --- a/src/DataExchange/TKDESTEP/StepElement/StepElement_MeasureOrUnspecifiedValueMember.cxx +++ b/src/DataExchange/TKDESTEP/StepElement/StepElement_MeasureOrUnspecifiedValueMember.cxx @@ -55,7 +55,7 @@ const char* StepElement_MeasureOrUnspecifiedValueMember::Name() const //================================================================================================= -static int CompareNames(const char* name, int& /*numen*/) +static int CompareNames(const char* const name, int& /*numen*/) { int thecase = 0; if (!name || name[0] == '\0') @@ -73,7 +73,7 @@ static int CompareNames(const char* name, int& /*numen*/) //================================================================================================= -bool StepElement_MeasureOrUnspecifiedValueMember::SetName(const char* name) +bool StepElement_MeasureOrUnspecifiedValueMember::SetName(const char* const name) { int numit = 0; mycase = CompareNames(name, numit); @@ -84,7 +84,7 @@ bool StepElement_MeasureOrUnspecifiedValueMember::SetName(const char* name) //================================================================================================= -bool StepElement_MeasureOrUnspecifiedValueMember::Matches(const char* name) const +bool StepElement_MeasureOrUnspecifiedValueMember::Matches(const char* const name) const { int numit = 0; int thecase = CompareNames(name, numit); diff --git a/src/DataExchange/TKDESTEP/StepElement/StepElement_MeasureOrUnspecifiedValueMember.hxx b/src/DataExchange/TKDESTEP/StepElement/StepElement_MeasureOrUnspecifiedValueMember.hxx index 4b0af151b1..492d797797 100644 --- a/src/DataExchange/TKDESTEP/StepElement/StepElement_MeasureOrUnspecifiedValueMember.hxx +++ b/src/DataExchange/TKDESTEP/StepElement/StepElement_MeasureOrUnspecifiedValueMember.hxx @@ -37,10 +37,10 @@ public: Standard_EXPORT const char* Name() const override; //! Set name - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; //! Tells if the name of a SelectMember matches a given one; - Standard_EXPORT bool Matches(const char* name) const override; + Standard_EXPORT bool Matches(const char* const name) const override; DEFINE_STANDARD_RTTIEXT(StepElement_MeasureOrUnspecifiedValueMember, StepData_SelectNamed) diff --git a/src/DataExchange/TKDESTEP/StepElement/StepElement_SurfaceElementPurposeMember.cxx b/src/DataExchange/TKDESTEP/StepElement/StepElement_SurfaceElementPurposeMember.cxx index 024428004d..a36619e8a9 100644 --- a/src/DataExchange/TKDESTEP/StepElement/StepElement_SurfaceElementPurposeMember.cxx +++ b/src/DataExchange/TKDESTEP/StepElement/StepElement_SurfaceElementPurposeMember.cxx @@ -55,7 +55,7 @@ const char* StepElement_SurfaceElementPurposeMember::Name() const //================================================================================================= -static int CompareNames(const char* name, int& /*numen*/) +static int CompareNames(const char* const name, int& /*numen*/) { int thecase = 0; if (!name || name[0] == '\0') @@ -73,7 +73,7 @@ static int CompareNames(const char* name, int& /*numen*/) //================================================================================================= -bool StepElement_SurfaceElementPurposeMember::SetName(const char* name) +bool StepElement_SurfaceElementPurposeMember::SetName(const char* const name) { int numit = 0; mycase = CompareNames(name, numit); @@ -84,7 +84,7 @@ bool StepElement_SurfaceElementPurposeMember::SetName(const char* name) //================================================================================================= -bool StepElement_SurfaceElementPurposeMember::Matches(const char* name) const +bool StepElement_SurfaceElementPurposeMember::Matches(const char* const name) const { int numit = 0; int thecase = CompareNames(name, numit); diff --git a/src/DataExchange/TKDESTEP/StepElement/StepElement_SurfaceElementPurposeMember.hxx b/src/DataExchange/TKDESTEP/StepElement/StepElement_SurfaceElementPurposeMember.hxx index 3d696141ee..159d2326cc 100644 --- a/src/DataExchange/TKDESTEP/StepElement/StepElement_SurfaceElementPurposeMember.hxx +++ b/src/DataExchange/TKDESTEP/StepElement/StepElement_SurfaceElementPurposeMember.hxx @@ -37,10 +37,10 @@ public: Standard_EXPORT const char* Name() const override; //! Set name - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; //! Tells if the name of a SelectMember matches a given one; - Standard_EXPORT bool Matches(const char* name) const override; + Standard_EXPORT bool Matches(const char* const name) const override; DEFINE_STANDARD_RTTIEXT(StepElement_SurfaceElementPurposeMember, StepData_SelectNamed) diff --git a/src/DataExchange/TKDESTEP/StepElement/StepElement_VolumeElementPurposeMember.cxx b/src/DataExchange/TKDESTEP/StepElement/StepElement_VolumeElementPurposeMember.cxx index 0dfa01082a..c2a56eb76a 100644 --- a/src/DataExchange/TKDESTEP/StepElement/StepElement_VolumeElementPurposeMember.cxx +++ b/src/DataExchange/TKDESTEP/StepElement/StepElement_VolumeElementPurposeMember.cxx @@ -55,7 +55,7 @@ const char* StepElement_VolumeElementPurposeMember::Name() const //================================================================================================= -static int CompareNames(const char* name, int& /*numen*/) +static int CompareNames(const char* const name, int& /*numen*/) { int thecase = 0; if (!name || name[0] == '\0') @@ -73,7 +73,7 @@ static int CompareNames(const char* name, int& /*numen*/) //================================================================================================= -bool StepElement_VolumeElementPurposeMember::SetName(const char* name) +bool StepElement_VolumeElementPurposeMember::SetName(const char* const name) { int numit = 0; mycase = CompareNames(name, numit); @@ -84,7 +84,7 @@ bool StepElement_VolumeElementPurposeMember::SetName(const char* name) //================================================================================================= -bool StepElement_VolumeElementPurposeMember::Matches(const char* name) const +bool StepElement_VolumeElementPurposeMember::Matches(const char* const name) const { int numit = 0; int thecase = CompareNames(name, numit); diff --git a/src/DataExchange/TKDESTEP/StepElement/StepElement_VolumeElementPurposeMember.hxx b/src/DataExchange/TKDESTEP/StepElement/StepElement_VolumeElementPurposeMember.hxx index 0b7d0f1cee..24e9bcbfa5 100644 --- a/src/DataExchange/TKDESTEP/StepElement/StepElement_VolumeElementPurposeMember.hxx +++ b/src/DataExchange/TKDESTEP/StepElement/StepElement_VolumeElementPurposeMember.hxx @@ -37,10 +37,10 @@ public: Standard_EXPORT const char* Name() const override; //! Set name - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; //! Tells if the name of a SelectMember matches a given one; - Standard_EXPORT bool Matches(const char* name) const override; + Standard_EXPORT bool Matches(const char* const name) const override; DEFINE_STANDARD_RTTIEXT(StepElement_VolumeElementPurposeMember, StepData_SelectNamed) diff --git a/src/DataExchange/TKDESTEP/StepFEA/StepFEA_DegreeOfFreedomMember.cxx b/src/DataExchange/TKDESTEP/StepFEA/StepFEA_DegreeOfFreedomMember.cxx index 9959909fde..d9688ed418 100644 --- a/src/DataExchange/TKDESTEP/StepFEA/StepFEA_DegreeOfFreedomMember.cxx +++ b/src/DataExchange/TKDESTEP/StepFEA/StepFEA_DegreeOfFreedomMember.cxx @@ -55,7 +55,7 @@ const char* StepFEA_DegreeOfFreedomMember::Name() const //================================================================================================= -static int CompareNames(const char* name, int& /*numen*/) +static int CompareNames(const char* const name, int& /*numen*/) { int thecase = 0; if (!name || name[0] == '\0') @@ -107,7 +107,7 @@ static int CompareNames(const char* name, int& /*numen*/) //================================================================================================= -bool StepFEA_DegreeOfFreedomMember::SetName(const char* name) +bool StepFEA_DegreeOfFreedomMember::SetName(const char* const name) { int numit = 0; mycase = CompareNames(name, numit); @@ -118,7 +118,7 @@ bool StepFEA_DegreeOfFreedomMember::SetName(const char* name) //================================================================================================= -bool StepFEA_DegreeOfFreedomMember::Matches(const char* name) const +bool StepFEA_DegreeOfFreedomMember::Matches(const char* const name) const { int numit = 0; int thecase = CompareNames(name, numit); diff --git a/src/DataExchange/TKDESTEP/StepFEA/StepFEA_DegreeOfFreedomMember.hxx b/src/DataExchange/TKDESTEP/StepFEA/StepFEA_DegreeOfFreedomMember.hxx index ee12725c4f..57842ee797 100644 --- a/src/DataExchange/TKDESTEP/StepFEA/StepFEA_DegreeOfFreedomMember.hxx +++ b/src/DataExchange/TKDESTEP/StepFEA/StepFEA_DegreeOfFreedomMember.hxx @@ -37,10 +37,10 @@ public: Standard_EXPORT const char* Name() const override; //! Set name - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; //! Tells if the name of a SelectMember matches a given one; - Standard_EXPORT bool Matches(const char* name) const override; + Standard_EXPORT bool Matches(const char* const name) const override; DEFINE_STANDARD_RTTIEXT(StepFEA_DegreeOfFreedomMember, StepData_SelectNamed) diff --git a/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor23dMember.cxx b/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor23dMember.cxx index 0da0659842..380bcfe86c 100644 --- a/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor23dMember.cxx +++ b/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor23dMember.cxx @@ -58,7 +58,7 @@ const char* StepFEA_SymmetricTensor23dMember::Name() const //================================================================================================= -static int CompareNames(const char* name) +static int CompareNames(const char* const name) { int thecase = 0; if (!name || name[0] == '\0') @@ -74,7 +74,7 @@ static int CompareNames(const char* name) //================================================================================================= -bool StepFEA_SymmetricTensor23dMember::SetName(const char* name) +bool StepFEA_SymmetricTensor23dMember::SetName(const char* const name) { mycase = CompareNames(name); return (mycase > 0); @@ -82,7 +82,7 @@ bool StepFEA_SymmetricTensor23dMember::SetName(const char* name) //================================================================================================= -bool StepFEA_SymmetricTensor23dMember::Matches(const char* name) const +bool StepFEA_SymmetricTensor23dMember::Matches(const char* const name) const { int thecase = CompareNames(name); return (mycase == thecase); diff --git a/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor23dMember.hxx b/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor23dMember.hxx index 950783514d..e17429c1c7 100644 --- a/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor23dMember.hxx +++ b/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor23dMember.hxx @@ -38,10 +38,10 @@ public: Standard_EXPORT const char* Name() const override; //! Set name - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; //! Tells if the name of a SelectMember matches a given one; - Standard_EXPORT bool Matches(const char* name) const override; + Standard_EXPORT bool Matches(const char* const name) const override; DEFINE_STANDARD_RTTIEXT(StepFEA_SymmetricTensor23dMember, StepData_SelectArrReal) diff --git a/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor43dMember.cxx b/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor43dMember.cxx index 792a2af6d8..73c2de6488 100644 --- a/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor43dMember.cxx +++ b/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor43dMember.cxx @@ -63,7 +63,7 @@ const char* StepFEA_SymmetricTensor43dMember::Name() const //================================================================================================= -static int CompareNames(const char* name) +static int CompareNames(const char* const name) { int thecase = 0; if (!name || name[0] == '\0') @@ -85,7 +85,7 @@ static int CompareNames(const char* name) //================================================================================================= -bool StepFEA_SymmetricTensor43dMember::SetName(const char* name) +bool StepFEA_SymmetricTensor43dMember::SetName(const char* const name) { mycase = CompareNames(name); return (mycase > 0); @@ -93,7 +93,7 @@ bool StepFEA_SymmetricTensor43dMember::SetName(const char* name) //================================================================================================= -bool StepFEA_SymmetricTensor43dMember::Matches(const char* name) const +bool StepFEA_SymmetricTensor43dMember::Matches(const char* const name) const { int thecase = CompareNames(name); return (mycase == thecase); diff --git a/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor43dMember.hxx b/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor43dMember.hxx index 77c4adcb71..4cc2b81807 100644 --- a/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor43dMember.hxx +++ b/src/DataExchange/TKDESTEP/StepFEA/StepFEA_SymmetricTensor43dMember.hxx @@ -38,10 +38,10 @@ public: Standard_EXPORT const char* Name() const override; //! Set name - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; //! Tells if the name of a SelectMember matches a given one; - Standard_EXPORT bool Matches(const char* name) const override; + Standard_EXPORT bool Matches(const char* const name) const override; DEFINE_STANDARD_RTTIEXT(StepFEA_SymmetricTensor43dMember, StepData_SelectArrReal) diff --git a/src/DataExchange/TKDESTEP/StepGeom/StepGeom_TrimmingMember.cxx b/src/DataExchange/TKDESTEP/StepGeom/StepGeom_TrimmingMember.cxx index e20e3dff4f..46e93729df 100644 --- a/src/DataExchange/TKDESTEP/StepGeom/StepGeom_TrimmingMember.cxx +++ b/src/DataExchange/TKDESTEP/StepGeom/StepGeom_TrimmingMember.cxx @@ -28,7 +28,7 @@ const char* StepGeom_TrimmingMember::Name() const return "PARAMETER_VALUE"; } -bool StepGeom_TrimmingMember::SetName(const char* /*name*/) +bool StepGeom_TrimmingMember::SetName(const char* const /*name*/) { return true; } diff --git a/src/DataExchange/TKDESTEP/StepGeom/StepGeom_TrimmingMember.hxx b/src/DataExchange/TKDESTEP/StepGeom/StepGeom_TrimmingMember.hxx index d25fa3ca8a..5b1554e712 100644 --- a/src/DataExchange/TKDESTEP/StepGeom/StepGeom_TrimmingMember.hxx +++ b/src/DataExchange/TKDESTEP/StepGeom/StepGeom_TrimmingMember.hxx @@ -34,7 +34,7 @@ public: Standard_EXPORT const char* Name() const override; - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; DEFINE_STANDARD_RTTIEXT(StepGeom_TrimmingMember, StepData_SelectReal) }; diff --git a/src/DataExchange/TKDESTEP/StepSelect/StepSelect_Activator.cxx b/src/DataExchange/TKDESTEP/StepSelect/StepSelect_Activator.cxx index ee97740907..de011dcbe0 100644 --- a/src/DataExchange/TKDESTEP/StepSelect/StepSelect_Activator.cxx +++ b/src/DataExchange/TKDESTEP/StepSelect/StepSelect_Activator.cxx @@ -48,10 +48,10 @@ StepSelect_Activator::StepSelect_Activator() IFSelect_ReturnStatus StepSelect_Activator::Do(const int number, const occ::handle& pilot) { - int argc = pilot->NbWords(); - const char* arg1 = pilot->Word(1).ToCString(); - const char* arg2 = pilot->Word(2).ToCString(); - // const char* arg3 = pilot->Word(3).ToCString(); + int argc = pilot->NbWords(); + const char* const arg1 = pilot->Word(1).ToCString(); + const char* const arg2 = pilot->Word(2).ToCString(); + // const char* const arg3 = pilot->Word(3).ToCString(); switch (number) { diff --git a/src/DataExchange/TKDESTEP/StepSelect/StepSelect_FloatFormat.cxx b/src/DataExchange/TKDESTEP/StepSelect/StepSelect_FloatFormat.cxx index 55043d467f..75bd2ac42c 100644 --- a/src/DataExchange/TKDESTEP/StepSelect/StepSelect_FloatFormat.cxx +++ b/src/DataExchange/TKDESTEP/StepSelect/StepSelect_FloatFormat.cxx @@ -58,13 +58,15 @@ void StepSelect_FloatFormat::SetZeroSuppress(const bool mode) thezerosup = mode; } -void StepSelect_FloatFormat::SetFormat(const char* format) +void StepSelect_FloatFormat::SetFormat(const char* const format) { themainform.Clear(); themainform.AssignCat(format); } -void StepSelect_FloatFormat::SetFormatForRange(const char* form, const double R1, const double R2) +void StepSelect_FloatFormat::SetFormatForRange(const char* const form, + const double R1, + const double R2) { theformrange.Clear(); theformrange.AssignCat(form); diff --git a/src/DataExchange/TKDESTEP/StepSelect/StepSelect_FloatFormat.hxx b/src/DataExchange/TKDESTEP/StepSelect/StepSelect_FloatFormat.hxx index b5bc4fa932..4385757339 100644 --- a/src/DataExchange/TKDESTEP/StepSelect/StepSelect_FloatFormat.hxx +++ b/src/DataExchange/TKDESTEP/StepSelect/StepSelect_FloatFormat.hxx @@ -50,7 +50,7 @@ public: //! Sets Main Format to a new value //! Remark : SetFormat, SetZeroSuppress and SetFormatForRange are //! independent - Standard_EXPORT void SetFormat(const char* format = "%E"); + Standard_EXPORT void SetFormat(const char* const format = "%E"); //! Sets Format for Range to a new value with its range of //! application. @@ -59,9 +59,9 @@ public: //! verified, this secondary format will be ignored. //! Moreover, this secondary format is intended to be used in a //! range around 1. - Standard_EXPORT void SetFormatForRange(const char* format = "%f", - const double Rmin = 0.1, - const double Rmax = 1000.0); + Standard_EXPORT void SetFormatForRange(const char* const format = "%f", + const double Rmin = 0.1, + const double Rmax = 1000.0); //! Returns all recorded parameters : //! zerosup : ZeroSuppress status diff --git a/src/DataExchange/TKDESTEP/StepSelect/StepSelect_WorkLibrary.cxx b/src/DataExchange/TKDESTEP/StepSelect/StepSelect_WorkLibrary.cxx index 6c11340617..3adf84ae5f 100644 --- a/src/DataExchange/TKDESTEP/StepSelect/StepSelect_WorkLibrary.cxx +++ b/src/DataExchange/TKDESTEP/StepSelect/StepSelect_WorkLibrary.cxx @@ -51,7 +51,7 @@ void StepSelect_WorkLibrary::SetDumpLabel(const int mode) thelabmode = mode; } -int StepSelect_WorkLibrary::ReadFile(const char* name, +int StepSelect_WorkLibrary::ReadFile(const char* const name, occ::handle& model, const occ::handle& protocol) const { @@ -62,7 +62,7 @@ int StepSelect_WorkLibrary::ReadFile(const char* name return aStatus; } -int StepSelect_WorkLibrary::ReadStream(const char* theName, +int StepSelect_WorkLibrary::ReadStream(const char* const theName, std::istream& theIStream, occ::handle& model, const occ::handle& protocol) const diff --git a/src/DataExchange/TKDESTEP/StepSelect/StepSelect_WorkLibrary.hxx b/src/DataExchange/TKDESTEP/StepSelect/StepSelect_WorkLibrary.hxx index 9f1f222416..41b41e390a 100644 --- a/src/DataExchange/TKDESTEP/StepSelect/StepSelect_WorkLibrary.hxx +++ b/src/DataExchange/TKDESTEP/StepSelect/StepSelect_WorkLibrary.hxx @@ -47,14 +47,14 @@ public: //! Reads a STEP File and returns a STEP Model (into ), //! or lets "Null" in case of Error //! Returns 0 if OK, 1 if Read Error, -1 if File not opened - Standard_EXPORT int ReadFile(const char* name, + Standard_EXPORT int ReadFile(const char* const name, occ::handle& model, const occ::handle& protocol) const override; //! Reads a STEP File from stream and returns a STEP Model (into ), //! or lets "Null" in case of Error //! Returns 0 if OK, 1 if Read Error, -1 if File not opened - Standard_EXPORT int ReadStream(const char* theName, + Standard_EXPORT int ReadStream(const char* const theName, std::istream& theIStream, occ::handle& model, const occ::handle& protocol) const override; diff --git a/src/DataExchange/TKDESTEP/StepVisual/StepVisual_MarkerMember.cxx b/src/DataExchange/TKDESTEP/StepVisual/StepVisual_MarkerMember.cxx index dc4a59fffc..0e3fade2ef 100644 --- a/src/DataExchange/TKDESTEP/StepVisual/StepVisual_MarkerMember.cxx +++ b/src/DataExchange/TKDESTEP/StepVisual/StepVisual_MarkerMember.cxx @@ -37,7 +37,7 @@ const char* StepVisual_MarkerMember::Name() const return "MARKER_TYPE"; } -bool StepVisual_MarkerMember::SetName(const char* /*name*/) +bool StepVisual_MarkerMember::SetName(const char* const /*name*/) { return true; } @@ -47,7 +47,7 @@ const char* StepVisual_MarkerMember::EnumText() const return tool.Text(Int()).ToCString(); } -void StepVisual_MarkerMember::SetEnumText(const int /*val*/, const char* text) +void StepVisual_MarkerMember::SetEnumText(const int /*val*/, const char* const text) { int vl = tool.Value(text); if (vl >= 0) diff --git a/src/DataExchange/TKDESTEP/StepVisual/StepVisual_MarkerMember.hxx b/src/DataExchange/TKDESTEP/StepVisual/StepVisual_MarkerMember.hxx index 62c8b178dd..2cb9dc1c9f 100644 --- a/src/DataExchange/TKDESTEP/StepVisual/StepVisual_MarkerMember.hxx +++ b/src/DataExchange/TKDESTEP/StepVisual/StepVisual_MarkerMember.hxx @@ -36,11 +36,11 @@ public: Standard_EXPORT const char* Name() const override; - Standard_EXPORT bool SetName(const char* name) override; + Standard_EXPORT bool SetName(const char* const name) override; Standard_EXPORT const char* EnumText() const override; - Standard_EXPORT void SetEnumText(const int val, const char* text) override; + Standard_EXPORT virtual void SetEnumText(const int val, const char* const text) override; Standard_EXPORT void SetValue(const StepVisual_MarkerType val); diff --git a/src/DataExchange/TKDESTEP/StepVisual/StepVisual_NullStyleMember.cxx b/src/DataExchange/TKDESTEP/StepVisual/StepVisual_NullStyleMember.cxx index ddf2df785d..b73695b59b 100644 --- a/src/DataExchange/TKDESTEP/StepVisual/StepVisual_NullStyleMember.cxx +++ b/src/DataExchange/TKDESTEP/StepVisual/StepVisual_NullStyleMember.cxx @@ -34,7 +34,7 @@ const char* StepVisual_NullStyleMember::EnumText() const //================================================================================================= -void StepVisual_NullStyleMember::SetEnumText(const int /*theValue*/, const char* theText) +void StepVisual_NullStyleMember::SetEnumText(const int /*theValue*/, const char* const theText) { int aVal = tool.Value(theText); if (aVal >= 0) diff --git a/src/DataExchange/TKDESTEP/StepVisual/StepVisual_NullStyleMember.hxx b/src/DataExchange/TKDESTEP/StepVisual/StepVisual_NullStyleMember.hxx index 63e579e013..f7d9bfc455 100644 --- a/src/DataExchange/TKDESTEP/StepVisual/StepVisual_NullStyleMember.hxx +++ b/src/DataExchange/TKDESTEP/StepVisual/StepVisual_NullStyleMember.hxx @@ -37,13 +37,13 @@ public: const char* Name() const override { return "NULL_STYLE"; } - bool SetName(const char* /*theName*/) override { return true; } + bool SetName(const char* const /*theName*/) override { return true; } int Kind() const override { return 4; } Standard_EXPORT const char* EnumText() const override; - Standard_EXPORT void SetEnumText(const int theValue, const char* theText) override; + Standard_EXPORT void SetEnumText(const int theValue, const char* const theText) override; Standard_EXPORT void SetValue(const StepVisual_NullStyle theValue); diff --git a/src/DataExchange/TKDESTL/RWStl/RWStl.cxx b/src/DataExchange/TKDESTL/RWStl/RWStl.cxx index 295e882356..75d9ffd549 100644 --- a/src/DataExchange/TKDESTL/RWStl/RWStl.cxx +++ b/src/DataExchange/TKDESTL/RWStl/RWStl.cxx @@ -144,7 +144,7 @@ private: //================================================================================================= -occ::handle RWStl::ReadFile(const char* theFile, +occ::handle RWStl::ReadFile(const char* const theFile, const double theMergeAngle, const Message_ProgressRange& theProgress) { @@ -158,7 +158,7 @@ occ::handle RWStl::ReadFile(const char* the //================================================================================================= -void RWStl::ReadFile(const char* theFile, +void RWStl::ReadFile(const char* const theFile, const double theMergeAngle, NCollection_Sequence>& theTriangList, const Message_ProgressRange& theProgress) diff --git a/src/DataExchange/TKDESTL/RWStl/RWStl.hxx b/src/DataExchange/TKDESTL/RWStl/RWStl.hxx index 5b3cbd3c83..f91202f9cf 100644 --- a/src/DataExchange/TKDESTL/RWStl/RWStl.hxx +++ b/src/DataExchange/TKDESTL/RWStl/RWStl.hxx @@ -63,7 +63,7 @@ public: //! Read specified STL file and returns its content as triangulation. //! In case of error, returns Null handle. static occ::handle ReadFile( - const char* theFile, + const char* const theFile, const Message_ProgressRange& theProgress = Message_ProgressRange()) { return ReadFile(theFile, M_PI / 2.0, theProgress); @@ -76,7 +76,7 @@ public: //! @param[in] theProgress progress indicator //! @return result triangulation or NULL in case of error Standard_EXPORT static occ::handle ReadFile( - const char* theFile, + const char* const theFile, const double theMergeAngle, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -87,7 +87,7 @@ public: //! @param[out] theTriangList triangulation list for multi-domain case //! @param[in] theProgress progress indicator Standard_EXPORT static void ReadFile( - const char* theFile, + const char* const theFile, const double theMergeAngle, NCollection_Sequence>& theTriangList, const Message_ProgressRange& theProgress = Message_ProgressRange()); diff --git a/src/DataExchange/TKDESTL/StlAPI/StlAPI.cxx b/src/DataExchange/TKDESTL/StlAPI/StlAPI.cxx index 3529a6dfba..9f53d8ddbc 100644 --- a/src/DataExchange/TKDESTL/StlAPI/StlAPI.cxx +++ b/src/DataExchange/TKDESTL/StlAPI/StlAPI.cxx @@ -19,7 +19,7 @@ //================================================================================================= -bool StlAPI::Write(const TopoDS_Shape& theShape, const char* theFile, const bool theAsciiMode) +bool StlAPI::Write(const TopoDS_Shape& theShape, const char* const theFile, const bool theAsciiMode) { StlAPI_Writer aWriter; aWriter.ASCIIMode() = theAsciiMode; @@ -28,7 +28,7 @@ bool StlAPI::Write(const TopoDS_Shape& theShape, const char* theFile, const bool //================================================================================================= -bool StlAPI::Read(TopoDS_Shape& theShape, const char* theFile) +bool StlAPI::Read(TopoDS_Shape& theShape, const char* const theFile) { StlAPI_Reader aReader; return aReader.Read(theShape, theFile); diff --git a/src/DataExchange/TKDESTL/StlAPI/StlAPI.hxx b/src/DataExchange/TKDESTL/StlAPI/StlAPI.hxx index 9c2e3e81e3..6dcab138db 100644 --- a/src/DataExchange/TKDESTL/StlAPI/StlAPI.hxx +++ b/src/DataExchange/TKDESTL/StlAPI/StlAPI.hxx @@ -33,7 +33,7 @@ public: //! File is written in binary if aAsciiMode is False otherwise it is written in Ascii (by //! default). Standard_EXPORT static bool Write(const TopoDS_Shape& theShape, - const char* theFile, + const char* const theFile, const bool theAsciiMode = true); //! Legacy interface. @@ -41,7 +41,7 @@ public: //! This approach is very inefficient, especially for large files. //! Consider reading STL file to Poly_Triangulation object instead (see class RWStl). Standard_DEPRECATED("This method is very inefficient; see RWStl class for better alternative") - Standard_EXPORT static bool Read(TopoDS_Shape& theShape, const char* aFile); + Standard_EXPORT static bool Read(TopoDS_Shape& theShape, const char* const aFile); }; #endif // _StlAPI_HeaderFile diff --git a/src/DataExchange/TKDESTL/StlAPI/StlAPI_Reader.cxx b/src/DataExchange/TKDESTL/StlAPI/StlAPI_Reader.cxx index a4052e5b87..cd1a48ce23 100644 --- a/src/DataExchange/TKDESTL/StlAPI/StlAPI_Reader.cxx +++ b/src/DataExchange/TKDESTL/StlAPI/StlAPI_Reader.cxx @@ -19,7 +19,7 @@ //================================================================================================= -bool StlAPI_Reader::Read(TopoDS_Shape& theShape, const char* theFileName) +bool StlAPI_Reader::Read(TopoDS_Shape& theShape, const char* const theFileName) { occ::handle aMesh = RWStl::ReadFile(theFileName); if (aMesh.IsNull()) diff --git a/src/DataExchange/TKDESTL/StlAPI/StlAPI_Reader.hxx b/src/DataExchange/TKDESTL/StlAPI/StlAPI_Reader.hxx index dde7642523..59df2b137f 100644 --- a/src/DataExchange/TKDESTL/StlAPI/StlAPI_Reader.hxx +++ b/src/DataExchange/TKDESTL/StlAPI/StlAPI_Reader.hxx @@ -30,7 +30,7 @@ class StlAPI_Reader public: //! Reads STL file to the TopoDS_Shape (each triangle is converted to the face). //! @return True if reading is successful - Standard_EXPORT bool Read(TopoDS_Shape& theShape, const char* theFileName); + Standard_EXPORT bool Read(TopoDS_Shape& theShape, const char* const theFileName); //! Reads STL data from stream to the TopoDS_Shape (each triangle is converted to the face). //! @param theShape result shape diff --git a/src/DataExchange/TKDESTL/StlAPI/StlAPI_Writer.cxx b/src/DataExchange/TKDESTL/StlAPI/StlAPI_Writer.cxx index 282e47e8b0..43dfa5060b 100644 --- a/src/DataExchange/TKDESTL/StlAPI/StlAPI_Writer.cxx +++ b/src/DataExchange/TKDESTL/StlAPI/StlAPI_Writer.cxx @@ -34,7 +34,7 @@ StlAPI_Writer::StlAPI_Writer() //================================================================================================= bool StlAPI_Writer::Write(const TopoDS_Shape& theShape, - const char* theFileName, + const char* const theFileName, const Message_ProgressRange& theProgress) { std::ofstream aStream(theFileName, myASCIIMode ? std::ios::out : std::ios::binary); diff --git a/src/DataExchange/TKDESTL/StlAPI/StlAPI_Writer.hxx b/src/DataExchange/TKDESTL/StlAPI/StlAPI_Writer.hxx index 8122bcf975..364b49d723 100644 --- a/src/DataExchange/TKDESTL/StlAPI/StlAPI_Writer.hxx +++ b/src/DataExchange/TKDESTL/StlAPI/StlAPI_Writer.hxx @@ -41,7 +41,7 @@ public: //! Converts a given shape to STL format and writes it to file with a given filename. //! \return the error state. Standard_EXPORT bool Write(const TopoDS_Shape& theShape, - const char* theFileName, + const char* const theFileName, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Converts a given shape to STL format and writes it to the specified stream. diff --git a/src/DataExchange/TKDEVRML/Vrml/Vrml.cxx b/src/DataExchange/TKDEVRML/Vrml/Vrml.cxx index 3c4fe4fe2e..93dd163e0e 100644 --- a/src/DataExchange/TKDEVRML/Vrml/Vrml.cxx +++ b/src/DataExchange/TKDEVRML/Vrml/Vrml.cxx @@ -24,7 +24,7 @@ Standard_OStream& Vrml::VrmlHeaderWriter(Standard_OStream& anOStream) return anOStream; } -Standard_OStream& Vrml::CommentWriter(const char* aComment, Standard_OStream& anOStream) +Standard_OStream& Vrml::CommentWriter(const char* const aComment, Standard_OStream& anOStream) { anOStream << "# " << aComment << "\n"; return anOStream; diff --git a/src/DataExchange/TKDEVRML/Vrml/Vrml.hxx b/src/DataExchange/TKDEVRML/Vrml/Vrml.hxx index 9816644751..6cd556ddae 100644 --- a/src/DataExchange/TKDEVRML/Vrml/Vrml.hxx +++ b/src/DataExchange/TKDEVRML/Vrml/Vrml.hxx @@ -42,7 +42,7 @@ public: //! Writes one line of commentary in anOStream (VRML file). Standard_EXPORT static Standard_OStream& VrmlHeaderWriter(Standard_OStream& anOStream); - Standard_EXPORT static Standard_OStream& CommentWriter(const char* aComment, + Standard_EXPORT static Standard_OStream& CommentWriter(const char* const aComment, Standard_OStream& anOStream); }; diff --git a/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI.cxx b/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI.cxx index da52dfd2a8..fe2e8be326 100644 --- a/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI.cxx +++ b/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI.cxx @@ -18,7 +18,7 @@ #include #include -bool VrmlAPI::Write(const TopoDS_Shape& aShape, const char* aFileName, const int aVersion) +bool VrmlAPI::Write(const TopoDS_Shape& aShape, const char* const aFileName, const int aVersion) { VrmlAPI_Writer writer; return writer.Write(aShape, aFileName, aVersion); diff --git a/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI.hxx b/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI.hxx index 67b20b8e97..d9c61b31f5 100644 --- a/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI.hxx +++ b/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI.hxx @@ -33,7 +33,7 @@ public: //! Converts the shape aShape to VRML format of the passed version and writes it //! to the file identified by aFileName using default parameters. Standard_EXPORT static bool Write(const TopoDS_Shape& aShape, - const char* aFileName, + const char* const aFileName, const int aVersion = 2); }; diff --git a/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI_Writer.cxx b/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI_Writer.cxx index 50a29d5363..bfa4a8fd11 100644 --- a/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI_Writer.cxx +++ b/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI_Writer.cxx @@ -254,7 +254,9 @@ occ::handle VrmlAPI_Writer::GetUnfreeBoundsMaterial() const return myUnfreeBoundsMaterial; } -bool VrmlAPI_Writer::Write(const TopoDS_Shape& aShape, const char* aFile, const int aVersion) const +bool VrmlAPI_Writer::Write(const TopoDS_Shape& aShape, + const char* const aFile, + const int aVersion) const { const occ::handle& aFileSystem = OSD_FileSystem::DefaultFileSystem(); std::shared_ptr anOutStream = @@ -268,7 +270,7 @@ bool VrmlAPI_Writer::Write(const TopoDS_Shape& aShape, const char* aFile, const } bool VrmlAPI_Writer::WriteDoc(const occ::handle& theDoc, - const char* theFile, + const char* const theFile, const double theScale) const { const occ::handle& aFileSystem = OSD_FileSystem::DefaultFileSystem(); diff --git a/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI_Writer.hxx b/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI_Writer.hxx index f49539aa84..8bcfc885b8 100644 --- a/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI_Writer.hxx +++ b/src/DataExchange/TKDEVRML/VrmlAPI/VrmlAPI_Writer.hxx @@ -113,13 +113,13 @@ public: //! Converts the shape aShape to //! VRML format of the passed version and writes it to the file identified by aFile. Standard_EXPORT bool Write(const TopoDS_Shape& aShape, - const char* aFile, + const char* const aFile, const int aVersion = 2) const; //! Converts the document to VRML format of the passed version //! and writes it to the file identified by aFile. Standard_EXPORT bool WriteDoc(const occ::handle& theDoc, - const char* theFile, + const char* const theFile, const double theScale) const; //! Converts the shape aShape to diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect.cxx index d020ff17df..9b7fc34e36 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect.cxx @@ -17,13 +17,13 @@ // Convenience methods, avoiding having to know SessionFile, which is a // Tool not intended for export (in particular, not a Handle) -bool IFSelect::SaveSession(const occ::handle& WS, const char* file) +bool IFSelect::SaveSession(const occ::handle& WS, const char* const file) { IFSelect_SessionFile sesfile(WS, file); return sesfile.IsDone(); } -bool IFSelect::RestoreSession(const occ::handle& WS, const char* file) +bool IFSelect::RestoreSession(const occ::handle& WS, const char* const file) { IFSelect_SessionFile sesfile(WS); return (sesfile.Read(file) == 0); diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect.hxx index eac8a71af8..6befbad70d 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect.hxx @@ -45,14 +45,14 @@ public: //! case of Error on Writing. gives the name of the File //! to be produced (this avoids to export the class SessionFile). Standard_EXPORT static bool SaveSession(const occ::handle& WS, - const char* file); + const char* const file); //! Restore the state of a WorkSession from IFSelect, by using a //! SessionFile from IFSelect. Returns True if Done, False in //! case of Error on Writing. gives the name of the File //! to be used (this avoids to export the class SessionFile). Standard_EXPORT static bool RestoreSession(const occ::handle& WS, - const char* file); + const char* const file); }; #endif // _IFSelect_HeaderFile diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Act.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Act.cxx index c451aa6560..ba27b3cc1a 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Act.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Act.cxx @@ -20,7 +20,9 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_Act, IFSelect_Activator) static TCollection_AsciiString thedefgr, thedefil; -IFSelect_Act::IFSelect_Act(const char* name, const char* help, const IFSelect_ActFunc func) +IFSelect_Act::IFSelect_Act(const char* const name, + const char* const help, + const IFSelect_ActFunc func) : thename(name), thehelp(help), thefunc(func) @@ -39,7 +41,7 @@ const char* IFSelect_Act::Help(const int) const return thehelp.ToCString(); } -void IFSelect_Act::SetGroup(const char* group, const char* file) +void IFSelect_Act::SetGroup(const char* const group, const char* const file) { thedefgr.Clear(); if (group[0] != '\0') @@ -49,7 +51,9 @@ void IFSelect_Act::SetGroup(const char* group, const char* file) thedefil.AssignCat(file); } -void IFSelect_Act::AddFunc(const char* name, const char* help, const IFSelect_ActFunc func) +void IFSelect_Act::AddFunc(const char* const name, + const char* const help, + const IFSelect_ActFunc func) { occ::handle act = new IFSelect_Act(name, help, func); if (thedefgr.Length() > 0) @@ -57,7 +61,9 @@ void IFSelect_Act::AddFunc(const char* name, const char* help, const IFSelect_Ac act->Add(1, name); } -void IFSelect_Act::AddFSet(const char* name, const char* help, const IFSelect_ActFunc func) +void IFSelect_Act::AddFSet(const char* const name, + const char* const help, + const IFSelect_ActFunc func) { occ::handle act = new IFSelect_Act(name, help, func); if (thedefgr.Length() > 0) diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Act.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Act.hxx index 15c00acf46..51e5f9464b 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Act.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Act.hxx @@ -30,7 +30,7 @@ class IFSelect_SessionPilot; //! //! Define a function as //! static IFSelect_RetStatus myfunc -//! (const char* name, +//! (const char* const name, //! const occ::handle& pilot) //! { ... } //! When ran, it receives the exact name (string) of the called @@ -50,7 +50,9 @@ class IFSelect_Act : public IFSelect_Activator public: //! Creates an Act with a name, help and a function //! mode (Add or AddSet) is given when recording - Standard_EXPORT IFSelect_Act(const char* name, const char* help, const IFSelect_ActFunc func); + Standard_EXPORT IFSelect_Act(const char* const name, + const char* const help, + const IFSelect_ActFunc func); //! Execution of Command Line. remark that is senseless //! because each Act brings one and only one function @@ -63,18 +65,18 @@ public: //! Changes the default group name for the following Acts //! group empty means to come back to default from Activator //! Also a file name can be precised (to query by getsource) - Standard_EXPORT static void SetGroup(const char* group, const char* file = ""); + Standard_EXPORT static void SetGroup(const char* const group, const char* const file = ""); //! Adds a function with its name and help : creates an Act then //! records it as normal function - Standard_EXPORT static void AddFunc(const char* name, - const char* help, + Standard_EXPORT static void AddFunc(const char* const name, + const char* const help, const IFSelect_ActFunc func); //! Adds a function with its name and help : creates an Act then //! records it as function for XSET (i.e. to create control item) - Standard_EXPORT static void AddFSet(const char* name, - const char* help, + Standard_EXPORT static void AddFSet(const char* const name, + const char* const help, const IFSelect_ActFunc func); DEFINE_STANDARD_RTTIEXT(IFSelect_Act, IFSelect_Activator) diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Activator.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Activator.cxx index 393e844d98..d240cf21d3 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Activator.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Activator.cxx @@ -29,7 +29,7 @@ static NCollection_Sequence> theacts; void IFSelect_Activator::Adding(const occ::handle& actor, const int number, - const char* command, + const char* const command, const int mode) { #ifdef OCCT_DEBUG @@ -48,22 +48,22 @@ void IFSelect_Activator::Adding(const occ::handle& actor, themodes.Append(mode); } -void IFSelect_Activator::Add(const int number, const char* command) const +void IFSelect_Activator::Add(const int number, const char* const command) const { Adding(this, number, command, 0); } -void IFSelect_Activator::AddSet(const int number, const char* command) const +void IFSelect_Activator::AddSet(const int number, const char* const command) const { Adding(this, number, command, 1); } -void IFSelect_Activator::Remove(const char* command) +void IFSelect_Activator::Remove(const char* const command) { thedico.UnBind(command); } -bool IFSelect_Activator::Select(const char* command, +bool IFSelect_Activator::Select(const char* const command, int& number, occ::handle& actor) { @@ -75,7 +75,7 @@ bool IFSelect_Activator::Select(const char* command, return true; } -int IFSelect_Activator::Mode(const char* command) +int IFSelect_Activator::Mode(const char* const command) { int num; if (!thedico.Find(command, num)) @@ -84,8 +84,8 @@ int IFSelect_Activator::Mode(const char* command) } occ::handle> IFSelect_Activator::Commands( - const int mode, - const char* command) + const int mode, + const char* const command) { int num; NCollection_DataMap::Iterator iter(thedico); @@ -118,7 +118,7 @@ IFSelect_Activator::IFSelect_Activator() { } -void IFSelect_Activator::SetForGroup(const char* group, const char* file) +void IFSelect_Activator::SetForGroup(const char* const group, const char* const file) { thegroup.Clear(); thegroup.AssignCat(group); diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Activator.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Activator.hxx index 7721560872..e5d567d44a 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Activator.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Activator.hxx @@ -60,28 +60,28 @@ public: //! 0: default mode; 1 : for xset Standard_EXPORT static void Adding(const occ::handle& actor, const int number, - const char* command, + const char* const command, const int mode); //! Allows a self-definition by an Activator of the Commands it //! processes, call the class method Adding (mode 0) - Standard_EXPORT void Add(const int number, const char* command) const; + Standard_EXPORT void Add(const int number, const char* const command) const; //! Same as Add but specifies that this command is candidate for //! xset (creation of items, xset : named items; mode 1) - Standard_EXPORT void AddSet(const int number, const char* command) const; + Standard_EXPORT void AddSet(const int number, const char* const command) const; //! Removes a Command, if it is recorded (else, does nothing) - Standard_EXPORT static void Remove(const char* command); + Standard_EXPORT static void Remove(const char* const command); //! Selects, for a Command given by its title, an actor with its //! command number. Returns True if found, False else - Standard_EXPORT static bool Select(const char* command, + Standard_EXPORT static bool Select(const char* const command, int& number, occ::handle& actor); //! Returns mode recorded for a command. -1 if not found - Standard_EXPORT static int Mode(const char* command); + Standard_EXPORT static int Mode(const char* const command); //! Returns, for a root of command title, the list of possible //! commands. @@ -89,8 +89,8 @@ public: //! -1 + command : about a Group , >= 0 see Adding //! By default, it returns the whole list of known commands. Standard_EXPORT static occ::handle> Commands( - const int mode = -1, - const char* command = ""); + const int mode = -1, + const char* const command = ""); //! Tries to execute a Command Line. is the number of the //! command for this Activator. It Must forecast to record the @@ -113,7 +113,7 @@ public: //! Group and SetGroup define a "Group of commands" which //! correspond to an Activator. Default is "XSTEP" //! Also a file may be attached - Standard_EXPORT void SetForGroup(const char* group, const char* file = ""); + Standard_EXPORT void SetForGroup(const char* const group, const char* const file = ""); DEFINE_STANDARD_RTTIEXT(IFSelect_Activator, Standard_Transient) diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextModif.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextModif.cxx index e1ebf956f6..0618948bce 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextModif.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextModif.cxx @@ -31,7 +31,7 @@ IFSelect_ContextModif::IFSelect_ContextModif(const Interface_Graph& graph, const Interface_CopyTool& TC, - const char* filename) + const char* const filename) : thegraf(graph, false), thefile(filename), thelist(graph.Size(), ' ') @@ -50,7 +50,8 @@ IFSelect_ContextModif::IFSelect_ContextModif(const Interface_Graph& graph, //================================================================================================= -IFSelect_ContextModif::IFSelect_ContextModif(const Interface_Graph& graph, const char* filename) +IFSelect_ContextModif::IFSelect_ContextModif(const Interface_Graph& graph, + const char* const filename) : thegraf(graph, false), thefile(filename), thelist(graph.Size(), ' ') @@ -315,7 +316,7 @@ void IFSelect_ContextModif::TraceModifier(const occ::handle& check) //================================================================================================= void IFSelect_ContextModif::AddWarning(const occ::handle& start, - const char* mess, - const char* orig) + const char* const mess, + const char* const orig) { thechek.CCheck(thegraf.EntityNumber(start))->AddWarning(mess, orig); } @@ -355,8 +356,8 @@ void IFSelect_ContextModif::AddWarning(const occ::handle& st //================================================================================================= void IFSelect_ContextModif::AddFail(const occ::handle& start, - const char* mess, - const char* orig) + const char* const mess, + const char* const orig) { thechek.CCheck(thegraf.EntityNumber(start))->AddFail(mess, orig); } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextModif.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextModif.hxx index 5b47987c86..e8722f95ab 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextModif.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextModif.hxx @@ -64,7 +64,7 @@ public: //! transferred entities (no filter active) Standard_EXPORT IFSelect_ContextModif(const Interface_Graph& graph, const Interface_CopyTool& TC, - const char* filename = ""); + const char* const filename = ""); //! Prepares a ContextModif with these information : //! - the graph established from original model (target passed @@ -75,7 +75,8 @@ public: //! //! Such a ContextModif is considered to be applied on all //! transferred entities (no filter active) - Standard_EXPORT IFSelect_ContextModif(const Interface_Graph& graph, const char* filename = ""); + Standard_EXPORT IFSelect_ContextModif(const Interface_Graph& graph, + const char* const filename = ""); //! This method requires ContextModif to be applied with a filter. //! If a ModelModifier is defined with a Selection criterium, @@ -170,7 +171,7 @@ public: //! ValueOriginal and ValueResult) for default trace level >= 2. //! To be called on each individual entity really modified //! is an optional additional message - Standard_EXPORT void Trace(const char* mess = ""); + Standard_EXPORT void Trace(const char* const mess = ""); //! Adds a Check to the CheckList. If it is empty, nothing is done //! If it concerns an Entity from the Original Model (by SetEntity) @@ -182,15 +183,15 @@ public: //! If is not an Entity from the original model (e.g. the //! model itself) this message is added to Global Check. Standard_EXPORT void AddWarning(const occ::handle& start, - const char* mess, - const char* orig = ""); + const char* const mess, + const char* const orig = ""); //! Adds a Fail Message for an Entity from the original Model //! If is not an Entity from the original model (e.g. the //! model itself) this message is added to Global Check. Standard_EXPORT void AddFail(const occ::handle& start, - const char* mess, - const char* orig = ""); + const char* const mess, + const char* const orig = ""); //! Returns a Check given an Entity number (in the original Model) //! by default a Global Check. Creates it the first time. diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextWrite.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextWrite.cxx index a75f9004c3..4ac00ca4a7 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextWrite.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextWrite.cxx @@ -27,7 +27,7 @@ IFSelect_ContextWrite::IFSelect_ContextWrite(const occ::handle& model, const occ::handle& proto, const occ::handle& applieds, - const char* filename) + const char* const filename) : themodel(model), theproto(proto), thefile(filename), @@ -43,7 +43,7 @@ IFSelect_ContextWrite::IFSelect_ContextWrite(const occ::handle& hgraph, const occ::handle& proto, const occ::handle& applieds, - const char* filename) + const char* const filename) : themodel(hgraph->Graph().Model()), theproto(proto), thefile(filename), @@ -186,8 +186,8 @@ void IFSelect_ContextWrite::AddCheck(const occ::handle& check) //================================================================================================= void IFSelect_ContextWrite::AddWarning(const occ::handle& start, - const char* mess, - const char* orig) + const char* const mess, + const char* const orig) { thecheck.CCheck(themodel->Number(start))->AddWarning(mess, orig); } @@ -195,8 +195,8 @@ void IFSelect_ContextWrite::AddWarning(const occ::handle& st //================================================================================================= void IFSelect_ContextWrite::AddFail(const occ::handle& start, - const char* mess, - const char* orig) + const char* const mess, + const char* const orig) { thecheck.CCheck(themodel->Number(start))->AddFail(mess, orig); } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextWrite.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextWrite.hxx index 5e6138bf7b..652d47250e 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextWrite.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ContextWrite.hxx @@ -58,13 +58,13 @@ public: Standard_EXPORT IFSelect_ContextWrite(const occ::handle& model, const occ::handle& proto, const occ::handle& applieds, - const char* filename); + const char* const filename); //! Same as above but with an already computed Graph Standard_EXPORT IFSelect_ContextWrite(const occ::handle& hgraph, const occ::handle& proto, const occ::handle& applieds, - const char* filename); + const char* const filename); //! Returns the Model Standard_EXPORT occ::handle Model() const; @@ -128,15 +128,15 @@ public: //! If is not an Entity from the model (e.g. the //! model itself) this message is added to Global Check. Standard_EXPORT void AddWarning(const occ::handle& start, - const char* mess, - const char* orig = ""); + const char* const mess, + const char* const orig = ""); //! Adds a Fail Message for an Entity from the Model //! If is not an Entity from the model (e.g. the //! model itself) this message is added to Global Check. Standard_EXPORT void AddFail(const occ::handle& start, - const char* mess, - const char* orig = ""); + const char* const mess, + const char* const orig = ""); //! Returns a Check given an Entity number (in the Model) //! by default a Global Check. Creates it the first time. diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_EditForm.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_EditForm.cxx index 80c602f209..cbeab9809d 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_EditForm.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_EditForm.cxx @@ -28,7 +28,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_EditForm, Standard_Transient) IFSelect_EditForm::IFSelect_EditForm(const occ::handle& editor, const bool readonly, const bool undoable, - const char* label) + const char* const label) : thecomplete(true), theloaded(false), thekeepst(false), @@ -46,7 +46,7 @@ IFSelect_EditForm::IFSelect_EditForm(const occ::handle& editor, const NCollection_Sequence& nums, const bool readonly, const bool undoable, - const char* label) + const char* const label) : thecomplete(false), theloaded(false), thekeepst(false), @@ -151,7 +151,7 @@ int IFSelect_EditForm::RankFromNumber(const int num) const return 0; } -int IFSelect_EditForm::NameNumber(const char* name) const +int IFSelect_EditForm::NameNumber(const char* const name) const { int res = theeditor->NameNumber(name); if (thecomplete || res == 0) @@ -166,7 +166,7 @@ int IFSelect_EditForm::NameNumber(const char* name) const return -res; } -int IFSelect_EditForm::NameRank(const char* name) const +int IFSelect_EditForm::NameRank(const char* const name) const { int res = theeditor->NameNumber(name); if (thecomplete || res == 0) diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_EditForm.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_EditForm.hxx index 3c81847edb..099f7e2c29 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_EditForm.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_EditForm.hxx @@ -50,7 +50,7 @@ public: Standard_EXPORT IFSelect_EditForm(const occ::handle& editor, const bool readonly, const bool undoable, - const char* label = ""); + const char* const label = ""); //! Creates an extracted EditForm from an Editor, limited to //! the values identified in @@ -59,7 +59,7 @@ public: const NCollection_Sequence& nums, const bool readonly, const bool undoable, - const char* label = ""); + const char* const label = ""); //! Returns and may change the keep status on modif //! It starts as False @@ -120,12 +120,12 @@ public: //! of EditForm //! If it is not complete, for a recorded (in the Editor) but //! non-loaded name, returns negative value (- number) - Standard_EXPORT int NameNumber(const char* name) const; + Standard_EXPORT int NameNumber(const char* const name) const; //! Returns the Rank of Value in the EditForm for a given Name //! i.e. if it is not complete, for a recorded (in the Editor) but //! non-loaded name, returns 0 - Standard_EXPORT int NameRank(const char* name) const; + Standard_EXPORT int NameRank(const char* const name) const; //! For a read-write undoable EditForm, loads original values //! from defaults stored in the Editor diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Editor.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Editor.cxx index b496d0aa43..783b8ed17a 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Editor.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Editor.cxx @@ -48,7 +48,7 @@ void IFSelect_Editor::SetNbValues(const int nbval) void IFSelect_Editor::SetValue(const int num, const occ::handle& typval, - const char* shortname, + const char* const shortname, const IFSelect_EditValue editmode) { if (num < 1 || num > thenbval) @@ -232,7 +232,7 @@ int IFSelect_Editor::MaxNameLength(const int what) const return 0; } -int IFSelect_Editor::NameNumber(const char* name) const +int IFSelect_Editor::NameNumber(const char* const name) const { int res; if (thenames.Find(name, res)) diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Editor.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Editor.hxx index c4b5d61cb9..aebdf4826e 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Editor.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Editor.hxx @@ -49,7 +49,7 @@ public: //! Edit Mode Standard_EXPORT void SetValue(const int num, const occ::handle& typval, - const char* shortname = "", + const char* const shortname = "", const IFSelect_EditValue accessmode = IFSelect_Editable); //! Sets a parameter to be a List @@ -81,7 +81,7 @@ public: //! Returns the number (ident) of a Value, from its name, short or //! complete. If not found, returns 0 - Standard_EXPORT int NameNumber(const char* name) const; + Standard_EXPORT int NameNumber(const char* const name) const; Standard_EXPORT void PrintNames(Standard_OStream& S) const; diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Functions.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Functions.cxx index 18383bdac7..c834cae7d1 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Functions.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Functions.cxx @@ -72,7 +72,7 @@ #include // Decomposition of a file name in its parts : prefix, root, suffix -static void SplitFileName(const char* filename, +static void SplitFileName(const char* const filename, TCollection_AsciiString& prefix, TCollection_AsciiString& fileroot, TCollection_AsciiString& suffix) @@ -132,7 +132,7 @@ static IFSelect_ReturnStatus fun3(const occ::handle& pilo { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** XRead / Load **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -186,7 +186,7 @@ static IFSelect_ReturnStatus fun4(const occ::handle& pilo { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Write All **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -201,8 +201,8 @@ static IFSelect_ReturnStatus fun5(const occ::handle& pilo { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - // const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + // const char* const arg2 = pilot->Arg(2); // **** Write Selected **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -228,7 +228,7 @@ static IFSelect_ReturnStatus fun6(const occ::handle& pilo { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Write Entite(s) **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -270,7 +270,7 @@ static IFSelect_ReturnStatus fun7(const occ::handle& pilo { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Entity Label **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -299,7 +299,7 @@ static IFSelect_ReturnStatus fun8(const occ::handle& pilo { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Entity Number **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -349,8 +349,8 @@ static IFSelect_ReturnStatus funcount(const occ::handle& { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg0 = pilot->Arg(0); - const char* arg1 = pilot->Arg(1); + const char* const arg0 = pilot->Arg(0); + const char* const arg1 = pilot->Arg(1); bool listmode = (arg0[0] == 'l'); // **** List Counter **** @@ -438,7 +438,7 @@ static IFSelect_ReturnStatus funsigntype(const occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Sign Type **** occ::handle signtype = WS->SignType(); Message_Messenger::StreamBuffer sout = Message::SendInfo(); @@ -488,7 +488,7 @@ static IFSelect_ReturnStatus funsigntype(const occ::handle& pilot) { occ::handle WS = pilot->Session(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Sign Case **** occ::handle signcase = GetCasted(IFSelect_Signature, WS->NamedItem(arg1)); Message_Messenger::StreamBuffer sout = Message::SendInfo(); @@ -527,7 +527,7 @@ static IFSelect_ReturnStatus fun10(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Entity Status **** int i, nb; Message_Messenger::StreamBuffer sout = Message::SendInfo(); @@ -555,7 +555,7 @@ static IFSelect_ReturnStatus fun11(const occ::handle& pil { occ::handle WS = pilot->Session(); // int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** DumpModel (Data) **** int niv = 0; // char arg10 = arg1[0]; @@ -638,9 +638,9 @@ static IFSelect_ReturnStatus fundumpent(const occ::handle return IFSelect_RetError; } - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); - int num = pilot->Number(arg1); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); + int num = pilot->Number(arg1); if (num == 0) return IFSelect_RetError; level = levdef; @@ -670,8 +670,8 @@ static IFSelect_ReturnStatus funsign(const occ::handle& p { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { @@ -696,8 +696,8 @@ static IFSelect_ReturnStatus funqp(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) { @@ -739,7 +739,7 @@ static IFSelect_ReturnStatus fun14(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** NewInt **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 1) @@ -757,8 +757,8 @@ static IFSelect_ReturnStatus fun15(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** SetInt **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -777,7 +777,7 @@ static IFSelect_ReturnStatus fun16(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** NewText **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 1) @@ -795,8 +795,8 @@ static IFSelect_ReturnStatus fun17(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** SetText **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -814,7 +814,7 @@ static IFSelect_ReturnStatus fun19(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** DumpSel **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -848,7 +848,7 @@ static IFSelect_ReturnStatus fun20(const occ::handle& pil occ::handle pnt; if (mode == 'm') { - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); occ::handle item = WS->NamedItem(arg1); pnt = GetCasted(IFSelect_SelectPointed, item); if (!pnt.IsNull()) @@ -958,7 +958,7 @@ static IFSelect_ReturnStatus fun22(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** ClearData **** int mode = -1; if (argc >= 2) @@ -1033,7 +1033,7 @@ static IFSelect_ReturnStatus fun25(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Save (Dump) **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1051,7 +1051,7 @@ static IFSelect_ReturnStatus fun26(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Restore (Dump) **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1074,9 +1074,9 @@ static IFSelect_ReturnStatus fun27(const occ::handle& pil { int argc = pilot->NbWords(); occ::handle WS = pilot->Session(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); const char* arg2 = pilot->Arg(2); - const char* anEmptyStr = ""; + const char* const anEmptyStr = ""; if (arg2 && strlen(arg2) == 2 && arg2[0] == '"' && arg2[1] == '"') { arg2 = anEmptyStr; @@ -1187,7 +1187,7 @@ static IFSelect_ReturnStatus fun30(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** FilePrefix **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1207,7 +1207,7 @@ static IFSelect_ReturnStatus fun31(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** FileExtension **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1227,8 +1227,8 @@ static IFSelect_ReturnStatus fun32(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** FileRoot **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1255,7 +1255,7 @@ static IFSelect_ReturnStatus fun33(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Default File Root **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1344,7 +1344,7 @@ static IFSelect_ReturnStatus fun37(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Remaining Data **** char mode = '?'; IFSelect_RemainMode numod = IFSelect_RemainDisplay; @@ -1378,8 +1378,8 @@ static IFSelect_ReturnStatus fun38(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** SetModelContent **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -1430,7 +1430,7 @@ static IFSelect_ReturnStatus fun41(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Modifier **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1476,8 +1476,8 @@ static IFSelect_ReturnStatus fun42(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** ModifSel **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1511,8 +1511,8 @@ static IFSelect_ReturnStatus fun43(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** SetAppliedModifier **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1549,7 +1549,7 @@ static IFSelect_ReturnStatus fun44(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** ResetApplied (modifier) **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1572,9 +1572,9 @@ static IFSelect_ReturnStatus fun45(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); - const char* arg3 = pilot->Arg(3); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); + const char* const arg3 = pilot->Arg(3); // **** ModifMove **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 4) @@ -1608,8 +1608,8 @@ static IFSelect_ReturnStatus fun51(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** DispSel **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -1654,7 +1654,7 @@ static IFSelect_ReturnStatus fun_dispcount(const occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** DispCount **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1677,7 +1677,7 @@ static IFSelect_ReturnStatus fun_dispfiles(const occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** DispFiles **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1700,7 +1700,7 @@ static IFSelect_ReturnStatus fun_dispsign(const occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** DispFiles **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1723,7 +1723,7 @@ static IFSelect_ReturnStatus fun56(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Dispatch **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1756,7 +1756,7 @@ static IFSelect_ReturnStatus fun57(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Remove **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -1773,7 +1773,7 @@ static IFSelect_ReturnStatus fun58(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** EvalDisp **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -1816,7 +1816,7 @@ static IFSelect_ReturnStatus fun_evaladisp(const occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** EvalADisp [GiveList] **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -1880,7 +1880,7 @@ static IFSelect_ReturnStatus fun_writedisp(const occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** EvalADisp [GiveList] **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -1952,7 +1952,7 @@ static IFSelect_ReturnStatus fun59(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** EvalComplete **** int mode = 0; Message_Messenger::StreamBuffer sout = Message::SendInfo(); @@ -1983,7 +1983,7 @@ static IFSelect_ReturnStatus fun61(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** RunTransformer **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -2052,7 +2052,7 @@ static IFSelect_ReturnStatus fun6465(const occ::handle& p { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** Run Modifier avec Standard Copy **** // **** Run Modifier avec OnTheSpot **** bool runcopy = (pilot->Arg(0)[3] == 'c'); @@ -2146,7 +2146,7 @@ static IFSelect_ReturnStatus fun70(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** SelToggle **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -2171,8 +2171,8 @@ static IFSelect_ReturnStatus fun71(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** SelInput **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -2206,8 +2206,8 @@ static IFSelect_ReturnStatus fun73(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** SelRange **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc >= 2 && arg1[0] == '?') @@ -2283,8 +2283,8 @@ static IFSelect_ReturnStatus fun76(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** SelDiff **** occ::handle sel = new IFSelect_SelectDiff; if (sel.IsNull()) @@ -2307,8 +2307,8 @@ static IFSelect_ReturnStatus fun77(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** SelControlMain **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -2328,8 +2328,8 @@ static IFSelect_ReturnStatus fun78(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** SelControlSecond **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -2356,8 +2356,8 @@ static IFSelect_ReturnStatus fun80(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** SelCombAdd **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -2377,8 +2377,8 @@ static IFSelect_ReturnStatus fun81(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); // **** SelCombRem **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 3) @@ -2398,7 +2398,7 @@ static IFSelect_ReturnStatus fun82(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** SelEntNumber **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -2428,8 +2428,8 @@ static IFSelect_ReturnStatus fun84(const occ::handle& pil static IFSelect_ReturnStatus fun85(const occ::handle& pilot) { - int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + int argc = pilot->NbWords(); + const char* const arg1 = pilot->Arg(1); // **** SelTextType Exact **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -2460,8 +2460,8 @@ static IFSelect_ReturnStatus fun88(const occ::handle& pil static IFSelect_ReturnStatus fun89(const occ::handle& pilot) { - int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + int argc = pilot->NbWords(); + const char* const arg1 = pilot->Arg(1); // **** SelTextType Contain ** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -2493,7 +2493,7 @@ static IFSelect_ReturnStatus fun91(const occ::handle& pil { occ::handle WS = pilot->Session(); int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); // **** SetPointed (edit) / SetList (edit) **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); if (argc < 2) @@ -2594,8 +2594,8 @@ static IFSelect_ReturnStatus fun92(const occ::handle& pil static IFSelect_ReturnStatus fun93(const occ::handle& pilot) { int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); occ::handle WS = pilot->Session(); // **** SelSignature **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); @@ -2631,7 +2631,7 @@ static IFSelect_ReturnStatus fun93(const occ::handle& pil static IFSelect_ReturnStatus fun94(const occ::handle& pilot) { int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); occ::handle WS = pilot->Session(); // **** SignCounter **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); @@ -2653,7 +2653,7 @@ static IFSelect_ReturnStatus fun94(const occ::handle& pil static IFSelect_ReturnStatus funbselected(const occ::handle& pilot) { int argc = pilot->NbWords(); - const char* arg1 = pilot->Arg(1); + const char* const arg1 = pilot->Arg(1); occ::handle WS = pilot->Session(); // **** NbSelected = GraphCounter **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); @@ -2686,8 +2686,8 @@ static IFSelect_ReturnStatus fun_editlist(const occ::handleArg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); occ::handle WS = pilot->Session(); // EditForm @@ -2748,8 +2748,8 @@ static IFSelect_ReturnStatus fun_editvalue(const occ::handleArg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); occ::handle WS = pilot->Session(); DeclareAndCast(IFSelect_EditForm, edf, WS->NamedItem(arg1)); if (edf.IsNull()) @@ -2802,7 +2802,7 @@ static IFSelect_ReturnStatus fun_editvalue(const occ::handleArg(numarg); + const char* const argval = pilot->Arg(numarg); if (islist) { if (argval[0] == '?') @@ -2879,8 +2879,8 @@ static IFSelect_ReturnStatus fun_editclear(const occ::handleArg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); occ::handle WS = pilot->Session(); DeclareAndCast(IFSelect_EditForm, edf, WS->NamedItem(arg1)); if (edf.IsNull()) @@ -2922,8 +2922,8 @@ static IFSelect_ReturnStatus fun_editapply(const occ::handleArg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); occ::handle WS = pilot->Session(); DeclareAndCast(IFSelect_EditForm, edf, WS->NamedItem(arg1)); if (edf.IsNull()) @@ -2977,8 +2977,8 @@ static IFSelect_ReturnStatus fun_editload(const occ::handleArg(1); - const char* arg2 = pilot->Arg(2); + const char* const arg1 = pilot->Arg(1); + const char* const arg2 = pilot->Arg(2); occ::handle WS = pilot->Session(); DeclareAndCast(IFSelect_EditForm, edf, WS->NamedItem(arg1)); if (edf.IsNull()) @@ -3020,7 +3020,7 @@ static IFSelect_ReturnStatus fun_editload(const occ::handle IFSelect_Functions::GiveEntity( const occ::handle& WS, - const char* name) + const char* const name) { occ::handle ent; // demarre a Null int num = GiveEntityNumber(WS, name); @@ -3030,7 +3030,7 @@ occ::handle IFSelect_Functions::GiveEntity( } int IFSelect_Functions::GiveEntityNumber(const occ::handle& WS, - const char* name) + const char* const name) { int num = 0; if (!name || name[0] == '\0') @@ -3052,8 +3052,8 @@ int IFSelect_Functions::GiveEntityNumber(const occ::handle occ::handle>> IFSelect_Functions::GiveList( const occ::handle& WS, - const char* first, - const char* second) + const char* const first, + const char* const second) { return WS->GiveList(first, second); } @@ -3067,7 +3067,7 @@ occ::handle>> IFSelect_Fun occ::handle IFSelect_Functions::GiveDispatch( const occ::handle& WS, - const char* name, + const char* const name, const bool mode) { DeclareAndCast(IFSelect_Dispatch, disp, WS->NamedItem(name)); diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Functions.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Functions.hxx index 57131d4fa2..3b457bbcf5 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Functions.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Functions.hxx @@ -47,12 +47,12 @@ public: //! If doesn't match en entity, a Null Handle is returned Standard_EXPORT static occ::handle GiveEntity( const occ::handle& WS, - const char* name = ""); + const char* const name = ""); //! Same as GetEntity, but returns the number in the model of the //! entity. Returns 0 for null handle Standard_EXPORT static int GiveEntityNumber(const occ::handle& WS, - const char* name = ""); + const char* const name = ""); //! Computes a List of entities from a WorkSession and two idents, //! first and second, as follows : @@ -65,8 +65,8 @@ public: //! If is erroneous, it is ignored Standard_EXPORT static occ::handle>> GiveList(const occ::handle& WS, - const char* first = "", - const char* second = ""); + const char* const first = "", + const char* const second = ""); //! Evaluates and returns a Dispatch, from data of a WorkSession //! if is False, searches for exact name of Dispatch in WS @@ -77,7 +77,7 @@ public: //! Returns Null Handle if not found not well evaluated Standard_EXPORT static occ::handle GiveDispatch( const occ::handle& WS, - const char* name, + const char* const name, const bool mode = true); //! Defines and loads all basic functions (as ActFunc) diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_IntParam.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_IntParam.cxx index 742bc2b006..e234e3418e 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_IntParam.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_IntParam.cxx @@ -22,7 +22,7 @@ IFSelect_IntParam::IFSelect_IntParam() theval = 0; } -void IFSelect_IntParam::SetStaticName(const char* statname) +void IFSelect_IntParam::SetStaticName(const char* const statname) { thestn.Clear(); thestn.AssignCat(statname); diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_IntParam.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_IntParam.hxx index b63deb121f..3cd05312a9 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_IntParam.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_IntParam.hxx @@ -53,7 +53,7 @@ public: //! Else, it is ignored //! //! If is empty, disconnects the IntParam from Static - Standard_EXPORT void SetStaticName(const char* statname); + Standard_EXPORT void SetStaticName(const char* const statname); //! Returns the name of static parameter to which this IntParam //! is bound, empty if none diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelCopier.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelCopier.cxx index 9ae42c1c06..498ef1720f 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelCopier.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelCopier.cxx @@ -286,7 +286,7 @@ Interface_CheckIterator IFSelect_ModelCopier::Sending( // .... SendAll : Data to transfer in G, no split, file sending Interface_CheckIterator IFSelect_ModelCopier::SendAll( - const char* filename, + const char* const filename, const Interface_Graph& G, const occ::handle& WL, const occ::handle& protocol) @@ -336,7 +336,7 @@ Interface_CheckIterator IFSelect_ModelCopier::SendAll( // no split, file sending Interface_CheckIterator IFSelect_ModelCopier::SendSelected( - const char* filename, + const char* const filename, const Interface_Graph& G, const occ::handle& WL, const occ::handle& protocol, @@ -622,7 +622,7 @@ void IFSelect_ModelCopier::BeginSentFiles(const occ::handle& sho->SetLastRun(lastrun); // we are only interested in the numbers } -void IFSelect_ModelCopier::AddSentFile(const char* filename) +void IFSelect_ModelCopier::AddSentFile(const char* const filename) { if (!thesentfiles.IsNull()) thesentfiles->Append(new TCollection_HAsciiString(filename)); diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelCopier.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelCopier.hxx index 1261d0b6ad..6cd8ad760f 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelCopier.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ModelCopier.hxx @@ -146,7 +146,7 @@ public: //! remaining data, already sent files, etc. Applies the Model and //! File Modifiers. //! Returns True if well done, False else - Standard_EXPORT Interface_CheckIterator SendAll(const char* filename, + Standard_EXPORT Interface_CheckIterator SendAll(const char* const filename, const Interface_Graph& G, const occ::handle& WL, const occ::handle& protocol); @@ -156,7 +156,7 @@ public: //! Remaining data are managed and can be later be worked on. //! Returns True if well done, False else Standard_EXPORT Interface_CheckIterator - SendSelected(const char* filename, + SendSelected(const char* const filename, const Interface_Graph& G, const occ::handle& WL, const occ::handle& protocol, @@ -211,7 +211,7 @@ public: //! Adds the name of a just sent file, if BeginSentFiles //! has commanded recording; else does nothing //! It is called by methods SendCopied Sending - Standard_EXPORT void AddSentFile(const char* filename); + Standard_EXPORT void AddSentFile(const char* const filename); //! Returns the list of recorded names of sent files. Can be empty //! (if no file has been sent). Returns a Null Handle if diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_PacketList.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_PacketList.cxx index 4f47938f58..1fa82ce22c 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_PacketList.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_PacketList.cxx @@ -39,7 +39,7 @@ IFSelect_PacketList::IFSelect_PacketList(const occ::handle& val, - const char* shortname) + const char* const shortname) { SetNbValues(NbValues() + 1); SetValue(NbValues(), val, shortname); } -void IFSelect_ParamEditor::AddConstantText(const char* val, - const char* shortname, - const char* longname) +void IFSelect_ParamEditor::AddConstantText(const char* const val, + const char* const shortname, + const char* const longname) { occ::handle tv = new Interface_TypedValue(longname[0] == '\0' ? shortname : longname); @@ -92,7 +92,7 @@ bool IFSelect_ParamEditor::Apply(const occ::handle& form, occ::handle IFSelect_ParamEditor::StaticEditor( const occ::handle>>& list, - const char* label) + const char* const label) { occ::handle editor; if (list.IsNull()) diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ParamEditor.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ParamEditor.hxx index 0f318e24bf..33c986bcd0 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_ParamEditor.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_ParamEditor.hxx @@ -47,18 +47,18 @@ public: //! Creates a ParamEditor, empty, with a maximum count of params //! (default is 100) //! And a label, by default it will be "Param Editor" - Standard_EXPORT IFSelect_ParamEditor(const int nbmax = 100, const char* label = ""); + Standard_EXPORT IFSelect_ParamEditor(const int nbmax = 100, const char* const label = ""); //! Adds a TypedValue //! By default, its short name equates its complete name, it can be made explicit Standard_EXPORT void AddValue(const occ::handle& val, - const char* shortname = ""); + const char* const shortname = ""); //! Adds a Constant Text, it will be Read Only //! By default, its long name equates its shortname - Standard_EXPORT void AddConstantText(const char* val, - const char* shortname, - const char* completename = ""); + Standard_EXPORT void AddConstantText(const char* const val, + const char* const shortname, + const char* const completename = ""); Standard_EXPORT TCollection_AsciiString Label() const override; @@ -81,7 +81,7 @@ public: //! Null Handle if is null or empty Standard_EXPORT static occ::handle StaticEditor( const occ::handle>>& list, - const char* label = ""); + const char* const label = ""); DEFINE_STANDARD_RTTIEXT(IFSelect_ParamEditor, IFSelect_Editor) diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectFlag.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectFlag.cxx index f9d28e579e..b3c01b4992 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectFlag.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectFlag.cxx @@ -21,7 +21,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectFlag, IFSelect_SelectExtract) -IFSelect_SelectFlag::IFSelect_SelectFlag(const char* flagname) +IFSelect_SelectFlag::IFSelect_SelectFlag(const char* const flagname) : thename(flagname) { } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectFlag.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectFlag.hxx index 5792ebe85a..9a3bd347d9 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectFlag.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectFlag.hxx @@ -38,7 +38,7 @@ class IFSelect_SelectFlag : public IFSelect_SelectExtract public: //! Creates a Select Flag, to query a flag designated by its name - Standard_EXPORT IFSelect_SelectFlag(const char* flagname); + Standard_EXPORT IFSelect_SelectFlag(const char* const flagname); //! Returns the name of the flag Standard_EXPORT const char* FlagName() const; diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignature.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignature.cxx index f415bf17b7..3d77cbee38 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignature.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignature.cxx @@ -99,7 +99,7 @@ IFSelect_SelectSignature::IFSelect_SelectSignature(const occ::handle& matcher, - const char* signtext, + const char* const signtext, const bool exact) : thematcher(matcher), thesigntext(signtext), @@ -110,8 +110,8 @@ IFSelect_SelectSignature::IFSelect_SelectSignature(const occ::handle& counter, - const char* signtext, - const bool exact) + const char* const signtext, + const bool exact) : thecounter(counter), thesigntext(signtext), theexact(exact ? -1 : 0) diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignature.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignature.hxx index 5d93b6135b..e14be47a4d 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignature.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignature.hxx @@ -53,7 +53,7 @@ public: //! if False requires to be contained in the Signature //! of the entity (default is "exact") Standard_EXPORT IFSelect_SelectSignature(const occ::handle& matcher, - const char* signtext, + const char* const signtext, const bool exact = true); //! As above with an AsciiString @@ -66,7 +66,7 @@ public: //! Value (by SignOnly Mode) //! Matching is the default provided by the class Signature Standard_EXPORT IFSelect_SelectSignature(const occ::handle& matcher, - const char* signtext, + const char* const signtext, const bool exact = true); //! Returns the used Signature, then it is possible to access it, diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedShared.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedShared.cxx index 985127671d..d2826355b5 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedShared.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedShared.cxx @@ -23,7 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectSignedShared, IFSelect_SelectExplore) IFSelect_SelectSignedShared::IFSelect_SelectSignedShared( const occ::handle& matcher, - const char* signtext, + const char* const signtext, const bool exact, const int level) : IFSelect_SelectExplore(level), diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedShared.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedShared.hxx index 79bc1f2503..33574bf097 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedShared.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedShared.hxx @@ -38,7 +38,7 @@ public: //! Creates a SelectSignedShared, defaulted for any level //! with a given Signature and text to match Standard_EXPORT IFSelect_SelectSignedShared(const occ::handle& matcher, - const char* signtext, + const char* const signtext, const bool exact = true, const int level = 0); diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedSharing.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedSharing.cxx index 32f1dfe569..efd380ef79 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedSharing.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedSharing.cxx @@ -23,7 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectSignedSharing, IFSelect_SelectExplore) IFSelect_SelectSignedSharing::IFSelect_SelectSignedSharing( const occ::handle& matcher, - const char* signtext, + const char* const signtext, const bool exact, const int level) : IFSelect_SelectExplore(level), diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedSharing.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedSharing.hxx index 7cdd3c96f7..37694fc870 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedSharing.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSignedSharing.hxx @@ -38,7 +38,7 @@ public: //! Creates a SelectSignedSharing, defaulted for any level //! with a given Signature and text to match Standard_EXPORT IFSelect_SelectSignedSharing(const occ::handle& matcher, - const char* signtext, + const char* const signtext, const bool exact = true, const int level = 0); diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSuite.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSuite.cxx index 723531fd45..84a6ff908a 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSuite.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSuite.cxx @@ -60,7 +60,7 @@ occ::handle IFSelect_SelectSuite::Item(const int num) con return occ::down_cast(thesel.Value(num)); } -void IFSelect_SelectSuite::SetLabel(const char* lab) +void IFSelect_SelectSuite::SetLabel(const char* const lab) { thelab.Clear(); thelab.AssignCat(lab); diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSuite.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSuite.hxx index d4a1c84c7c..57726bf38c 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSuite.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SelectSuite.hxx @@ -73,7 +73,7 @@ public: Standard_EXPORT occ::handle Item(const int num) const; //! Sets a value for the Label - Standard_EXPORT void SetLabel(const char* lab); + Standard_EXPORT void SetLabel(const char* const lab); //! Returns the list of selected entities //! To do this, once InputResult has been taken (if Input or diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionFile.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionFile.cxx index d365bb5a63..f2a4ef9aeb 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionFile.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionFile.cxx @@ -53,7 +53,7 @@ IFSelect_SessionFile::IFSelect_SessionFile(const occ::handle& WS, - const char* filename) + const char* const filename) { ClearLines(); themode = true; @@ -86,7 +86,7 @@ const TCollection_AsciiString& IFSelect_SessionFile::Line(const int num) const return thelist.Value(num); } -void IFSelect_SessionFile::AddLine(const char* line) +void IFSelect_SessionFile::AddLine(const char* const line) { thelist.Append(TCollection_AsciiString(line)); } @@ -97,7 +97,7 @@ void IFSelect_SessionFile::RemoveLastLine() thelist.Remove(thelist.Length()); } -bool IFSelect_SessionFile::WriteFile(const char* filename) +bool IFSelect_SessionFile::WriteFile(const char* const filename) { FILE* lefic = OSD_OpenFile(filename, "w"); int nbl = thelist.Length(); @@ -108,7 +108,7 @@ bool IFSelect_SessionFile::WriteFile(const char* filename) return true; } -bool IFSelect_SessionFile::ReadFile(const char* filename) +bool IFSelect_SessionFile::ReadFile(const char* const filename) { char ligne[201]; FILE* lefic = OSD_OpenFile(filename, "r"); @@ -142,7 +142,7 @@ bool IFSelect_SessionFile::ReadFile(const char* filename) return header; } -bool IFSelect_SessionFile::RecognizeFile(const char* headerline) +bool IFSelect_SessionFile::RecognizeFile(const char* const headerline) { Message_Messenger::StreamBuffer sout = Message::SendInfo(); @@ -163,7 +163,7 @@ bool IFSelect_SessionFile::RecognizeFile(const char* headerline) return true; } -int IFSelect_SessionFile::Write(const char* filename) +int IFSelect_SessionFile::Write(const char* const filename) { thenewnum = 0; int stat = WriteSession(); @@ -175,7 +175,7 @@ int IFSelect_SessionFile::Write(const char* filename) return (WriteFile(filename) ? 0 : -1); } -int IFSelect_SessionFile::Read(const char* filename) +int IFSelect_SessionFile::Read(const char* const filename) { if (!ReadFile(filename)) return -1; @@ -439,7 +439,7 @@ int IFSelect_SessionFile::WriteEnd() return 0; } -void IFSelect_SessionFile::WriteLine(const char* line, const char follow) +void IFSelect_SessionFile::WriteLine(const char* const line, const char follow) { if (line[0] != '\0') thebuff.AssignCat(line); @@ -877,7 +877,7 @@ bool IFSelect_SessionFile::ReadLine() return true; } -void IFSelect_SessionFile::SplitLine(const char* line) +void IFSelect_SessionFile::SplitLine(const char* const line) { char mot[80]; theline.Clear(); @@ -1020,7 +1020,7 @@ void IFSelect_SessionFile::SendItem(const occ::handle& par) WriteLine(laligne); } -void IFSelect_SessionFile::SendText(const char* text) +void IFSelect_SessionFile::SendText(const char* const text) { char laligne[100]; //// if (theownflag) Sprintf(laligne," :%s",text); diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionFile.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionFile.hxx index 599c6f2b5c..aca68074bb 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionFile.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionFile.hxx @@ -79,7 +79,7 @@ public: //! Then, IsDone acknowledges on the result of the Operation. //! But such a SessionFile may not Read a File to a WorkSession. Standard_EXPORT IFSelect_SessionFile(const occ::handle& WS, - const char* filename); + const char* const filename); //! Clears the lines recorded whatever for writing or for reading Standard_EXPORT void ClearLines(); @@ -91,7 +91,7 @@ public: Standard_EXPORT const TCollection_AsciiString& Line(const int num) const; //! Adds a line to the list of recorded lines - Standard_EXPORT void AddLine(const char* line); + Standard_EXPORT void AddLine(const char* const line); //! Removes the last line. Can be called recursively. //! Does nothing if the list is empty @@ -101,29 +101,29 @@ public: //! the list of lines. //! Returns False (with no clearing) if the file could not be //! created - Standard_EXPORT bool WriteFile(const char* name); + Standard_EXPORT bool WriteFile(const char* const name); //! Reads the recorded lines from a file named , after //! having cleared the list (stops if RecognizeFile fails) //! Returns False (with no clearing) if the file could not be read - Standard_EXPORT bool ReadFile(const char* name); + Standard_EXPORT bool ReadFile(const char* const name); //! Recognizes the header line. returns True if OK, False else - Standard_EXPORT bool RecognizeFile(const char* headerline); + Standard_EXPORT bool RecognizeFile(const char* const headerline); //! Performs a Write Operation from a WorkSession to a File //! i.e. calls WriteSession then WriteEnd, and WriteFile //! Returned Value is : 0 for OK, -1 File could not be created, //! >0 Error during Write (see WriteSession) //! IsDone can be called too (will return True for OK) - Standard_EXPORT int Write(const char* filename); + Standard_EXPORT int Write(const char* const filename); //! Performs a Read Operation from a file to a WorkSession //! i.e. calls ReadFile, then ReadSession and ReadEnd //! Returned Value is : 0 for OK, -1 File could not be opened, //! >0 Error during Read (see WriteSession) //! IsDone can be called too (will return True for OK) - Standard_EXPORT int Read(const char* filename); + Standard_EXPORT int Read(const char* const filename); //! Prepares the Write operation from a WorkSession (IFSelect) to //! a File, i.e. fills the list of lines (the file itself remains @@ -142,7 +142,7 @@ public: //! Writes a line to the File. If is given, it is added //! at the following of the line. '\n' must be added for the end. - Standard_EXPORT void WriteLine(const char* line, const char follow = 0); + Standard_EXPORT void WriteLine(const char* const line, const char follow = 0); //! Writes the Parameters own to each type of Item. Uses the //! Library of SessionDumpers @@ -170,7 +170,7 @@ public: //! Internal routine which processes a line into words //! and prepares its exploration - Standard_EXPORT void SplitLine(const char* line); + Standard_EXPORT void SplitLine(const char* const line); //! Tries to Read an Item, by calling the Library of Dumpers //! Sets the list of parameters of the line to be read from the @@ -223,7 +223,7 @@ public: //! During a Write action, commands to send a Text without //! interpretation. It will be sent as well - Standard_EXPORT void SendText(const char* text); + Standard_EXPORT void SendText(const char* const text); //! Sets the rank of Last General Parameter to a new value. It is //! followed by the Fist Own Parameter of the item. diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionPilot.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionPilot.cxx index 8c5485b16c..47776ce96c 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionPilot.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionPilot.cxx @@ -41,7 +41,7 @@ static int THE_IFSelect_SessionPilot_initactor = 0; // Max Nb of words : cf thewords and method SetCommandLine -IFSelect_SessionPilot::IFSelect_SessionPilot(const char* prompt) +IFSelect_SessionPilot::IFSelect_SessionPilot(const char* const prompt) : theprompt(prompt), thewords(0, MAXWORDS - 1), thewordeb(0, MAXWORDS - 1) @@ -289,7 +289,7 @@ void IFSelect_SessionPilot::Clear() // ####################################################################### // ######## EXECUTION CONTROL -IFSelect_ReturnStatus IFSelect_SessionPilot::ReadScript(const char* file) +IFSelect_ReturnStatus IFSelect_SessionPilot::ReadScript(const char* const file) { FILE* fic; int lefic = 0; @@ -430,7 +430,7 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::ExecuteCounter( return IFSelect_RetVoid; } -int IFSelect_SessionPilot::Number(const char* val) const +int IFSelect_SessionPilot::Number(const char* const val) const { int num = thesession->NumberFromLabel(val); if (num < 0) @@ -450,7 +450,7 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const int // Own Commands : x, exit, undo, redo, ?, help IFSelect_ReturnStatus stat = IFSelect_RetVoid; int argc = NbWords(); - const char* arg1 = Word(1).ToCString(); + const char* const arg1 = Word(1).ToCString(); int modhelp = -1; switch (number) { diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionPilot.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionPilot.hxx index c64259b8ab..becc27a12c 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionPilot.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SessionPilot.hxx @@ -69,7 +69,7 @@ public: //! Creates an empty SessionPilot, with a prompt which will be //! displayed on querying commands. If not precised (""), this //! prompt is set to "Test-XSTEP>" - Standard_EXPORT IFSelect_SessionPilot(const char* prompt = ""); + Standard_EXPORT IFSelect_SessionPilot(const char* const prompt = ""); //! Returns the WorkSession which is worked on Standard_EXPORT occ::handle Session() const; @@ -146,7 +146,7 @@ public: //! either by command x or exit, or by reaching end of file //! Return Value follows the rules of Do : RetEnd for normal end, //! RetFail if script could not be opened - Standard_EXPORT IFSelect_ReturnStatus ReadScript(const char* file = ""); + Standard_EXPORT IFSelect_ReturnStatus ReadScript(const char* const file = ""); //! Executes the Command, itself (for built-in commands, which //! have priority) or by using the list of Activators. @@ -183,7 +183,7 @@ public: //! if it gives an integer, returns its value //! else, considers it as ENtityLabel (preferably case sensitive) //! in case of failure, returns 0 - Standard_EXPORT int Number(const char* val) const; + Standard_EXPORT int Number(const char* const val) const; //! Processes specific commands, which are : //! x or exit for end of session diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignMultiple.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignMultiple.cxx index 9e19e06e2a..b2b4b21a29 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignMultiple.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignMultiple.cxx @@ -21,7 +21,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SignMultiple, IFSelect_Signature) static TCollection_AsciiString theval; // temporary to build Value -IFSelect_SignMultiple::IFSelect_SignMultiple(const char* name) +IFSelect_SignMultiple::IFSelect_SignMultiple(const char* const name) : IFSelect_Signature(name) { } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignMultiple.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignMultiple.hxx index ae44ec92e6..84c56a8765 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignMultiple.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignMultiple.hxx @@ -38,7 +38,7 @@ class IFSelect_SignMultiple : public IFSelect_Signature public: //! Creates an empty SignMultiple with a Name //! This name should take expected tabulations into account - Standard_EXPORT IFSelect_SignMultiple(const char* name); + Standard_EXPORT IFSelect_SignMultiple(const char* const name); //! Adds a Signature. Width, if given, gives the tabulation //! If is True, it is a forced tabulation (overlength is diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Signature.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Signature.cxx index 035ecb340c..1f1d4561b3 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Signature.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Signature.cxx @@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_Signature, Interface_SignType) // static const char* nulsign = ""; static char intval[20]; -IFSelect_Signature::IFSelect_Signature(const char* name) +IFSelect_Signature::IFSelect_Signature(const char* const name) : thename(name) { thecasi[0] = thecasi[1] = thecasi[2] = 0; @@ -67,7 +67,7 @@ bool IFSelect_Signature::IsIntCase(bool& hasmin, int& valmin, bool& hasmax, int& return true; } -void IFSelect_Signature::AddCase(const char* acase) +void IFSelect_Signature::AddCase(const char* const acase) { if (thecasl.IsNull()) thecasl = new NCollection_HSequence(); @@ -101,7 +101,7 @@ bool IFSelect_Signature::Matches(const occ::handle& en return IFSelect_Signature::MatchValue(Value(ent, model), text, exact); } -bool IFSelect_Signature::MatchValue(const char* val, +bool IFSelect_Signature::MatchValue(const char* const val, const TCollection_AsciiString& text, const bool exact) { diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Signature.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Signature.hxx index f93e1e6948..3b3d90aad1 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_Signature.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_Signature.hxx @@ -55,7 +55,7 @@ public: //! Value is known when starting //! For instance, for CDL types, rather do not fill this, //! but for a specific enumeration (such as a status), can be used - Standard_EXPORT void AddCase(const char* acase); + Standard_EXPORT void AddCase(const char* const acase); //! Returns the predefined list of possible cases, filled by AddCase //! Null Handle if no predefined list (hence, to be counted) @@ -87,7 +87,7 @@ public: //! Default procedure to tell if a value matches a text //! with a criterium . = True requires equality, //! else only contained (no reg-exp) - Standard_EXPORT static bool MatchValue(const char* val, + Standard_EXPORT static bool MatchValue(const char* const val, const TCollection_AsciiString& text, const bool exact); @@ -101,7 +101,7 @@ public: protected: //! Initializes a Signature with its name - Standard_EXPORT IFSelect_Signature(const char* name); + Standard_EXPORT IFSelect_Signature(const char* const name); TCollection_AsciiString thename; diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignatureList.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignatureList.cxx index 70efdcbf87..91fa2688f5 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignatureList.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignatureList.cxx @@ -49,7 +49,7 @@ void IFSelect_SignatureList::Clear() thediclist.Clear(); } -void IFSelect_SignatureList::Add(const occ::handle& ent, const char* sign) +void IFSelect_SignatureList::Add(const occ::handle& ent, const char* const sign) { if (thesignonly) { @@ -90,7 +90,7 @@ const char* IFSelect_SignatureList::LastValue() const } void IFSelect_SignatureList::Init( - const char* name, + const char* const name, const NCollection_IndexedDataMap& theCount, const NCollection_IndexedDataMap>& list, const int nbnuls) @@ -105,7 +105,7 @@ void IFSelect_SignatureList::Init( } occ::handle>> IFSelect_SignatureList:: - List(const char* root) const + List(const char* const root) const { occ::handle>> list = new NCollection_HSequence>(); @@ -131,7 +131,7 @@ int IFSelect_SignatureList::NbNulls() const return thenbnuls; } -int IFSelect_SignatureList::NbTimes(const char* sign) const +int IFSelect_SignatureList::NbTimes(const char* const sign) const { int nb = 0; thedicount.FindFromKey(sign, nb); @@ -139,7 +139,7 @@ int IFSelect_SignatureList::NbTimes(const char* sign) const } occ::handle>> IFSelect_SignatureList:: - Entities(const char* sign) const + Entities(const char* const sign) const { occ::handle>> list; occ::handle aTList; @@ -152,7 +152,7 @@ occ::handle>> IFSelect_Sig return list; } -void IFSelect_SignatureList::SetName(const char* name) +void IFSelect_SignatureList::SetName(const char* const name) { thename = new TCollection_HAsciiString(name); } diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignatureList.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignatureList.hxx index a6c616e217..108fbaf5ea 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignatureList.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_SignatureList.hxx @@ -66,14 +66,14 @@ public: //! //! If SignOnly Mode is set, this work is replaced by just //! setting LastValue - Standard_EXPORT void Add(const occ::handle& ent, const char* sign); + Standard_EXPORT void Add(const occ::handle& ent, const char* const sign); //! Returns the last value recorded by Add (only if SignMode set) //! Cleared by Clear or Init Standard_EXPORT const char* LastValue() const; //! Acknowledges the list in once. Name identifies the Signature - Standard_EXPORT void Init(const char* name, + Standard_EXPORT void Init(const char* const name, const NCollection_IndexedDataMap& count, const NCollection_IndexedDataMap>& list, @@ -85,7 +85,7 @@ public: //! If is given non empty, for the signatures which //! begin by Standard_EXPORT occ::handle>> List( - const char* root = "") const; + const char* const root = "") const; //! Returns True if the list of Entities is acknowledged, else //! the method Entities will always return a Null Handle @@ -96,16 +96,16 @@ public: //! Returns the number of times a signature was counted, //! 0 if it has not been recorded at all - Standard_EXPORT int NbTimes(const char* sign) const; + Standard_EXPORT int NbTimes(const char* const sign) const; //! Returns the list of entities attached to a signature //! It is empty if has not been recorded //! It is a Null Handle if the list of entities is not known Standard_EXPORT occ::handle>> Entities( - const char* sign) const; + const char* const sign) const; //! Defines a name for a SignatureList (used to print it) - Standard_EXPORT void SetName(const char* name); + Standard_EXPORT void SetName(const char* const name); //! Returns the recorded Name. //! Remark : default is "..." (no SetName called) diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkLibrary.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkLibrary.cxx index 70ee3cfcaf..c866ae13f2 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkLibrary.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkLibrary.cxx @@ -73,7 +73,7 @@ void IFSelect_WorkLibrary::DumpLevels(int& def, int& max) const max = thelevhlp->Upper(); } -void IFSelect_WorkLibrary::SetDumpHelp(const int level, const char* help) +void IFSelect_WorkLibrary::SetDumpHelp(const int level, const char* const help) { if (thelevhlp.IsNull()) return; @@ -95,7 +95,7 @@ const char* IFSelect_WorkLibrary::DumpHelp(const int level) const return str->ToCString(); } -int IFSelect_WorkLibrary::ReadStream(const char* /*name*/, +int IFSelect_WorkLibrary::ReadStream(const char* const /*name*/, std::istream& /*istream*/, occ::handle& /*model*/, const occ::handle& /*protocol*/) const diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkLibrary.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkLibrary.hxx index 1bc7f3688a..e99c6742e4 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkLibrary.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkLibrary.hxx @@ -53,7 +53,7 @@ public: //! Simply, 0 is for "Execution OK" //! The Protocol can be used to work (e.g. create the Model, read //! and recognize the Entities) - Standard_EXPORT virtual int ReadFile(const char* name, + Standard_EXPORT virtual int ReadFile(const char* const name, occ::handle& model, const occ::handle& protocol) const = 0; @@ -63,7 +63,7 @@ public: //! Return value is a status: 0 - OK, 1 - read failure, -1 - stream failure. //! //! Default implementation returns 1 (error). - Standard_EXPORT virtual int ReadStream(const char* theName, + Standard_EXPORT virtual int ReadStream(const char* const theName, std::istream& theIStream, occ::handle& model, const occ::handle& protocol) const; @@ -128,7 +128,7 @@ public: Standard_EXPORT void DumpLevels(int& def, int& max) const; //! Records a short line of help for a level (0 - max) - Standard_EXPORT void SetDumpHelp(const int level, const char* help); + Standard_EXPORT void SetDumpHelp(const int level, const char* const help); //! Returns the help line recorded for , or an empty string Standard_EXPORT const char* DumpHelp(const int level) const; diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkSession.cxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkSession.cxx index 1adaefbc26..d7d13da4dc 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkSession.cxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkSession.cxx @@ -159,7 +159,7 @@ void IFSelect_WorkSession::SetModel(const occ::handle& //================================================================================================= -IFSelect_ReturnStatus IFSelect_WorkSession::ReadFile(const char* filename) +IFSelect_ReturnStatus IFSelect_WorkSession::ReadFile(const char* const filename) { if (thelibrary.IsNull()) return IFSelect_RetVoid; @@ -197,8 +197,8 @@ IFSelect_ReturnStatus IFSelect_WorkSession::ReadFile(const char* filename) //================================================================================================= -IFSelect_ReturnStatus IFSelect_WorkSession::ReadStream(const char* theName, - std::istream& theIStream) +IFSelect_ReturnStatus IFSelect_WorkSession::ReadStream(const char* const theName, + std::istream& theIStream) { if (thelibrary.IsNull()) return IFSelect_RetVoid; @@ -262,7 +262,7 @@ int IFSelect_WorkSession::StartingNumber(const occ::handle& //================================================================================================= -int IFSelect_WorkSession::NumberFromLabel(const char* val, const int afternum) const +int IFSelect_WorkSession::NumberFromLabel(const char* const val, const int afternum) const { int i, cnt = 0, num = atoi(val); if (num > 0 || myModel.IsNull()) @@ -632,7 +632,7 @@ int IFSelect_WorkSession::ItemIdent(const occ::handle& item) //================================================================================================= -occ::handle IFSelect_WorkSession::NamedItem(const char* name) const +occ::handle IFSelect_WorkSession::NamedItem(const char* const name) const { occ::handle res; if (name[0] == '\0') @@ -660,7 +660,7 @@ occ::handle IFSelect_WorkSession::NamedItem( //================================================================================================= -int IFSelect_WorkSession::NameIdent(const char* name) const +int IFSelect_WorkSession::NameIdent(const char* const name) const { occ::handle res; if (name[0] == '\0') @@ -729,7 +729,7 @@ int IFSelect_WorkSession::AddItem(const occ::handle& item, c //================================================================================================= -int IFSelect_WorkSession::AddNamedItem(const char* name, +int IFSelect_WorkSession::AddNamedItem(const char* const name, const occ::handle& item, const bool active) { @@ -797,7 +797,7 @@ bool IFSelect_WorkSession::SetActive(const occ::handle& item //================================================================================================= -bool IFSelect_WorkSession::RemoveNamedItem(const char* name) +bool IFSelect_WorkSession::RemoveNamedItem(const char* const name) { occ::handle item = NamedItem(name); if (item.IsNull()) @@ -809,7 +809,7 @@ bool IFSelect_WorkSession::RemoveNamedItem(const char* name) //================================================================================================= -bool IFSelect_WorkSession::RemoveName(const char* name) +bool IFSelect_WorkSession::RemoveName(const char* const name) { occ::handle item = NamedItem(name); if (item.IsNull()) @@ -977,7 +977,7 @@ occ::handle>> IFSele //================================================================================================= occ::handle>> IFSelect_WorkSession:: - ItemNamesForLabel(const char* label) const + ItemNamesForLabel(const char* const label) const { occ::handle>> list = new NCollection_HSequence>(); @@ -1006,7 +1006,9 @@ occ::handle>> IFSele //================================================================================================= -int IFSelect_WorkSession::NextIdentForLabel(const char* label, const int id, const int mode) const +int IFSelect_WorkSession::NextIdentForLabel(const char* const label, + const int id, + const int mode) const { int nb = MaxIdent(); for (int i = id + 1; i <= nb; i++) @@ -1040,8 +1042,8 @@ int IFSelect_WorkSession::NextIdentForLabel(const char* label, const int id, con //================================================================================================= -occ::handle IFSelect_WorkSession::NewParamFromStatic(const char* statname, - const char* name) +occ::handle IFSelect_WorkSession::NewParamFromStatic(const char* const statname, + const char* const name) { occ::handle param; occ::handle stat = Interface_Static::Static(statname); @@ -1083,7 +1085,7 @@ int IFSelect_WorkSession::IntValue(const occ::handle& par) co //================================================================================================= -occ::handle IFSelect_WorkSession::NewIntParam(const char* name) +occ::handle IFSelect_WorkSession::NewIntParam(const char* const name) { occ::handle intpar = new IFSelect_IntParam; if (AddNamedItem(name, intpar) == 0) @@ -1119,7 +1121,7 @@ TCollection_AsciiString IFSelect_WorkSession::TextValue( return TCollection_AsciiString(); } -occ::handle IFSelect_WorkSession::NewTextParam(const char* name) +occ::handle IFSelect_WorkSession::NewTextParam(const char* const name) { occ::handle textpar = new TCollection_HAsciiString(""); if (AddNamedItem(name, textpar) == 0) @@ -1130,7 +1132,7 @@ occ::handle IFSelect_WorkSession::NewTextParam(const c //================================================================================================= bool IFSelect_WorkSession::SetTextValue(const occ::handle& par, - const char* val) + const char* const val) { if (ItemIdent(par) == 0) return false; @@ -1655,8 +1657,8 @@ int IFSelect_WorkSession::RunModifierSelected(const occ::handle IFSelect_WorkSession::NewTransformStandard(const bool copy, - const char* name) +occ::handle IFSelect_WorkSession::NewTransformStandard(const bool copy, + const char* const name) { occ::handle stf = new IFSelect_TransformStandard; stf->SetCopyOption(copy); @@ -1754,21 +1756,21 @@ occ::handle IFSelect_WorkSession::FileRoot( //================================================================================================= -void IFSelect_WorkSession::SetFilePrefix(const char* name) +void IFSelect_WorkSession::SetFilePrefix(const char* const name) { theshareout->SetPrefix(new TCollection_HAsciiString(name)); } //================================================================================================= -void IFSelect_WorkSession::SetFileExtension(const char* name) +void IFSelect_WorkSession::SetFileExtension(const char* const name) { theshareout->SetExtension(new TCollection_HAsciiString(name)); } //================================================================================================= -bool IFSelect_WorkSession::SetDefaultFileRoot(const char* name) +bool IFSelect_WorkSession::SetDefaultFileRoot(const char* const name) { occ::handle defrt; if (name[0] != '\0') @@ -1779,7 +1781,7 @@ bool IFSelect_WorkSession::SetDefaultFileRoot(const char* name) //================================================================================================= bool IFSelect_WorkSession::SetFileRoot(const occ::handle& disp, - const char* namefile) + const char* const namefile) { int id = ItemIdent(disp); if (id == 0) @@ -1803,7 +1805,7 @@ bool IFSelect_WorkSession::SetFileRoot(const occ::handle& dis //================================================================================================= -const char* IFSelect_WorkSession::GiveFileRoot(const char* file) const +const char* IFSelect_WorkSession::GiveFileRoot(const char* const file) const { OSD_Path path(file); if (!OSD_Path::IsValid(TCollection_AsciiString(file))) @@ -1814,7 +1816,7 @@ const char* IFSelect_WorkSession::GiveFileRoot(const char* file) const //================================================================================================= -const char* IFSelect_WorkSession::GiveFileComplete(const char* file) const +const char* IFSelect_WorkSession::GiveFileComplete(const char* const file) const { // add if needed: Prefix; Extension bufstr.Clear(); @@ -2191,7 +2193,8 @@ bool IFSelect_WorkSession::SetRemaining(const IFSelect_RemainMode mode) //================================================================================================= -IFSelect_ReturnStatus IFSelect_WorkSession::SendAll(const char* filename, const bool computegraph) +IFSelect_ReturnStatus IFSelect_WorkSession::SendAll(const char* const filename, + const bool computegraph) { ////... Interface_CheckIterator checks; @@ -2242,7 +2245,7 @@ IFSelect_ReturnStatus IFSelect_WorkSession::SendAll(const char* filename, const //================================================================================================= -IFSelect_ReturnStatus IFSelect_WorkSession::SendSelected(const char* filename, +IFSelect_ReturnStatus IFSelect_WorkSession::SendSelected(const char* const filename, const occ::handle& sel, const bool computegraph) { @@ -2293,7 +2296,7 @@ IFSelect_ReturnStatus IFSelect_WorkSession::SendSelected(const char* filename, //================================================================================================= -IFSelect_ReturnStatus IFSelect_WorkSession::WriteFile(const char* filename) +IFSelect_ReturnStatus IFSelect_WorkSession::WriteFile(const char* const filename) { if (WorkLibrary().IsNull()) return IFSelect_RetVoid; @@ -2305,7 +2308,7 @@ IFSelect_ReturnStatus IFSelect_WorkSession::WriteFile(const char* filename) //================================================================================================= -IFSelect_ReturnStatus IFSelect_WorkSession::WriteFile(const char* filename, +IFSelect_ReturnStatus IFSelect_WorkSession::WriteFile(const char* const filename, const occ::handle& sel) { if (WorkLibrary().IsNull() || sel.IsNull()) @@ -2468,7 +2471,7 @@ bool IFSelect_WorkSession::CombineRemove(const occ::handle& occ::handle IFSelect_WorkSession::NewSelectPointed( const occ::handle>>& list, - const char* name) + const char* const name) { occ::handle sel = new IFSelect_SelectPointed; if (!list.IsNull()) @@ -2908,7 +2911,7 @@ void IFSelect_WorkSession::DumpShare() const //================================================================================================= -void IFSelect_WorkSession::ListItems(const char* lab) const +void IFSelect_WorkSession::ListItems(const char* const lab) const { Message_Messenger::StreamBuffer sout = Message::SendInfo(); sout << " ********** Items in Session **********" << std::endl; @@ -2998,7 +3001,7 @@ void IFSelect_WorkSession::DumpSelection(const occ::handle& //================================================================================================= -occ::handle IFSelect_WorkSession::GiveSelection(const char* selname) const +occ::handle IFSelect_WorkSession::GiveSelection(const char* const selname) const { char nomsel[500]; int np = -1, nf = -1, nivp = 0; @@ -3110,8 +3113,8 @@ occ::handle>> IFSelect_Wor //================================================================================================= occ::handle>> IFSelect_WorkSession::GiveList( - const char* first, - const char* second) const + const char* const first, + const char* const second) const { occ::handle>> list; if (!first || first[0] == '\0') @@ -3133,7 +3136,7 @@ occ::handle>> IFSelect_Wor //================================================================================================= occ::handle>> IFSelect_WorkSession:: - GiveListFromList(const char* selname, const occ::handle& ent) const + GiveListFromList(const char* const selname, const occ::handle& ent) const { occ::handle>> list; int num; diff --git a/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkSession.hxx b/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkSession.hxx index b3ae12c803..e068f37e09 100644 --- a/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkSession.hxx +++ b/src/DataExchange/TKXSBase/IFSelect/IFSelect_WorkSession.hxx @@ -135,7 +135,7 @@ public: //! Stores the filename used for read for setting the model //! It is cleared by SetModel and ClearData(1) - void SetLoadedFile(const char* theFileName) { theloaded = theFileName; } + void SetLoadedFile(const char* const theFileName) { theloaded = theFileName; } //! Returns the filename used to load current model //! empty if unknown @@ -145,13 +145,14 @@ public: //! Returns a integer status which can be : //! RetDone if OK, RetVoid if no Protocol not defined, //! RetError for file not found, RetFail if fail during read - Standard_EXPORT IFSelect_ReturnStatus ReadFile(const char* filename); + Standard_EXPORT IFSelect_ReturnStatus ReadFile(const char* const filename); //! Reads a file from stream with the WorkLibrary (sets Model and LoadedFile) //! Returns a integer status which can be : //! RetDone if OK, RetVoid if no Protocol not defined, //! RetError for file not found, RetFail if fail during read - Standard_EXPORT IFSelect_ReturnStatus ReadStream(const char* theName, std::istream& theIStream); + Standard_EXPORT IFSelect_ReturnStatus ReadStream(const char* const theName, + std::istream& theIStream); //! Returns the count of Entities stored in the Model, or 0 Standard_EXPORT int NbStartingEntities() const; @@ -173,7 +174,7 @@ public: //! Returns 0 if not found, < 0 if more than one found (first //! found in negative). //! If just gives an integer value, returns it - Standard_EXPORT int NumberFromLabel(const char* val, const int afternum = 0) const; + Standard_EXPORT int NumberFromLabel(const char* const val, const int afternum = 0) const; //! Returns the label for , as the Model does //! If is not in the Model or if no Model is loaded, a Null @@ -290,7 +291,7 @@ public: //! Returns the Item which corresponds to a Variable, given its //! Name (whatever the type of this Item). //! Returns a Null Handle if this Name is not recorded - Standard_EXPORT occ::handle NamedItem(const char* name) const; + Standard_EXPORT occ::handle NamedItem(const char* const name) const; //! Same as above, but is given through a Handle //! Especially useful with methods SelectionNames, etc... @@ -298,7 +299,7 @@ public: const occ::handle& name) const; //! Returns the Ident attached to a Name, 0 if name not recorded - Standard_EXPORT int NameIdent(const char* name) const; + Standard_EXPORT int NameIdent(const char* const name) const; //! Returns True if an Item of the WorkSession has an attached Name Standard_EXPORT bool HasName(const occ::handle& item) const; @@ -324,7 +325,7 @@ public: //! If is already known but with no attached Name, this //! method tries to attached a Name to it //! if True commands call to SetActive (see below) - Standard_EXPORT int AddNamedItem(const char* name, + Standard_EXPORT int AddNamedItem(const char* const name, const occ::handle& item, const bool active = true); @@ -338,11 +339,11 @@ public: //! Removes an Item from the Session, given its Name //! Returns True if Done, False else (Name not recorded) //! (Applies only on Item which are Named) - Standard_EXPORT bool RemoveNamedItem(const char* name); + Standard_EXPORT bool RemoveNamedItem(const char* const name); //! Removes a Name without removing the Item //! Returns True if Done, False else (Name not recorded) - Standard_EXPORT bool RemoveName(const char* name); + Standard_EXPORT bool RemoveName(const char* const name); //! Removes an Item given its Ident. Returns False if is //! attached to no Item in the WorkSession. For a Named Item, @@ -381,7 +382,7 @@ public: //! Search mode is fixed to "contained" //! If