mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-07 05:08:13 +08:00
Coding - Revert type definitions for Standard_CString replacements (#1021)
Fix the replacement issue when Standard_CString was replaced to const char* even when it was const. Now "const Standard_CString" is replaced with "const char* const". Only places which were before const Standard_CString is replaced.
This commit is contained in:
@@ -40,7 +40,8 @@ Type Transformations:
|
||||
Special handling:
|
||||
- Function-style casts like Standard_CString(x) -> static_cast<const char*>(x)
|
||||
- Multi-token type casts like Standard_Utf8UChar(x) -> static_cast<unsigned char>(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] <src_directory>
|
||||
@@ -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<const char16_t*>(', 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():
|
||||
|
||||
@@ -20,7 +20,7 @@ IMPLEMENT_STANDARD_RTTIEXT(BinMDF_ADriver, Standard_Transient)
|
||||
//=================================================================================================
|
||||
|
||||
BinMDF_ADriver::BinMDF_ADriver(const occ::handle<Message_Messenger>& theMsgDriver,
|
||||
const char* theName)
|
||||
const char* const theName)
|
||||
: myMessageDriver(theMsgDriver)
|
||||
{
|
||||
if (theName)
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
protected:
|
||||
Standard_EXPORT BinMDF_ADriver(const occ::handle<Message_Messenger>& theMsgDriver,
|
||||
const char* theName = nullptr);
|
||||
const char* const theName = nullptr);
|
||||
|
||||
TCollection_AsciiString myTypeName;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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<TNaming_NamedShape>& NS, const char* filename)
|
||||
static void LWriteNSOnLabel(const occ::handle<TNaming_NamedShape>& NS, const char* const filename)
|
||||
{
|
||||
if (!NS.IsNull() && !NS->IsEmpty())
|
||||
{
|
||||
|
||||
@@ -96,7 +96,7 @@ void PrintEntries(const NCollection_Map<TDF_Label>& 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<TopoDS_Shape, TopTools_ShapeMapHasher>& MS,
|
||||
const char* filename)
|
||||
const char* const filename)
|
||||
{
|
||||
if (!MS.IsEmpty())
|
||||
{
|
||||
@@ -134,7 +134,8 @@ static void DbgTools_Write(const NCollection_IndexedMap<TopoDS_Shape, TopTools_S
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
static void DbgTools_WriteNSOnLabel(const occ::handle<TNaming_NamedShape>& NS, const char* filename)
|
||||
static void DbgTools_WriteNSOnLabel(const occ::handle<TNaming_NamedShape>& NS,
|
||||
const char* const filename)
|
||||
{
|
||||
if (!NS.IsNull() && !NS->IsEmpty())
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <TDF_Tool.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
|
||||
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)
|
||||
|
||||
@@ -61,7 +61,7 @@ void PrintEntry(const TDF_Label& label, const bool allLevels)
|
||||
|
||||
#include <BRepTools.hxx>
|
||||
|
||||
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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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<CDF_MetaDataDriver> MetaDataDriver() const;
|
||||
|
||||
@@ -78,7 +78,7 @@ occ::handle<TCollection_HExtendedString> 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<TCollection_HExtendedString> 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);
|
||||
}
|
||||
|
||||
@@ -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<TCollection_HExtendedString> 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<TCollection_HExtendedString> 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();
|
||||
|
||||
@@ -58,7 +58,7 @@ occ::handle<Message_Messenger> CDM_Application::MessageDriver()
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void CDM_Application::Write(const char16_t* aString)
|
||||
void CDM_Application::Write(const char16_t* const aString)
|
||||
{
|
||||
MessageDriver()->Send(aString);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <TCollection_ExtendedString.hxx>
|
||||
#include <UTL.hxx>
|
||||
|
||||
TCollection_ExtendedString UTL::xgetenv(const char* aCString)
|
||||
TCollection_ExtendedString UTL::xgetenv(const char* const aCString)
|
||||
{
|
||||
TCollection_ExtendedString x;
|
||||
OSD_Environment theEnv(aCString);
|
||||
|
||||
@@ -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<Storage_BaseDriver>& aFile,
|
||||
const TCollection_ExtendedString& aName,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -461,7 +461,7 @@ void TDF_Tool::Label(const occ::handle<TDF_Data>& aDF,
|
||||
//=======================================================================
|
||||
|
||||
void TDF_Tool::Label(const occ::handle<TDF_Data>& aDF,
|
||||
const char* anEntry,
|
||||
const char* const anEntry,
|
||||
TDF_Label& aLabel,
|
||||
const bool create)
|
||||
{
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
//! the label if it does not exist and if <create> is
|
||||
//! true.
|
||||
Standard_EXPORT static void Label(const occ::handle<TDF_Data>& aDF,
|
||||
const char* anEntry,
|
||||
const char* const anEntry,
|
||||
TDF_Label& aLabel,
|
||||
const bool create = false);
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ int& TObj_Assistant::getVersion()
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<TObj_Model> TObj_Assistant::FindModel(const char* theName)
|
||||
occ::handle<TObj_Model> TObj_Assistant::FindModel(const char* const theName)
|
||||
{
|
||||
TCollection_ExtendedString aName(theName, true);
|
||||
int i = getModels().Length();
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
*/
|
||||
|
||||
//! Finds model by name
|
||||
static Standard_EXPORT occ::handle<TObj_Model> FindModel(const char* theName);
|
||||
static Standard_EXPORT occ::handle<TObj_Model> FindModel(const char* const theName);
|
||||
|
||||
//! Binds model to the map
|
||||
static Standard_EXPORT void BindModel(const occ::handle<TObj_Model>& theModel);
|
||||
|
||||
@@ -198,7 +198,7 @@ occ::handle<TObj_ObjectIterator> 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<TCollection_HAsciiString>& theName)
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
bool TObj_Object::SetName(const char* theName) const
|
||||
bool TObj_Object::SetName(const char* const theName) const
|
||||
{
|
||||
occ::handle<TCollection_HAsciiString> aName = new TCollection_HAsciiString(theName);
|
||||
return SetName(aName);
|
||||
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
Standard_EXPORT bool SetName(const occ::handle<TCollection_HAsciiString>& 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
|
||||
|
||||
@@ -34,7 +34,7 @@ NCollection_DataMap<TCollection_AsciiString, void*>& 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_Object> TObj_Persistence::CreateNewObject(const char* theType,
|
||||
const TDF_Label& theLabel)
|
||||
occ::handle<TObj_Object> TObj_Persistence::CreateNewObject(const char* const theType,
|
||||
const TDF_Label& theLabel)
|
||||
{
|
||||
if (getMapOfTypes().IsBound(theType))
|
||||
{
|
||||
|
||||
@@ -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<TObj_Object> CreateNewObject(const char* theType,
|
||||
const TDF_Label& theLabel);
|
||||
static Standard_EXPORT occ::handle<TObj_Object> 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();
|
||||
|
||||
@@ -26,8 +26,8 @@ IMPLEMENT_STANDARD_RTTIEXT(XmlMDF_ADriver, Standard_Transient)
|
||||
//=================================================================================================
|
||||
|
||||
XmlMDF_ADriver::XmlMDF_ADriver(const occ::handle<Message_Messenger>& 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<Standard_Type> 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;
|
||||
|
||||
@@ -72,8 +72,8 @@ public:
|
||||
|
||||
protected:
|
||||
Standard_EXPORT XmlMDF_ADriver(const occ::handle<Message_Messenger>& theMessageDriver,
|
||||
const char* theNamespace,
|
||||
const char* theName = nullptr);
|
||||
const char* const theNamespace,
|
||||
const char* const theName = nullptr);
|
||||
|
||||
TCollection_AsciiString myTypeName;
|
||||
TCollection_AsciiString myNamespace;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Source files for DEBRepCascade package
|
||||
set(OCCT_DEBRepCascade_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
set(OCCT_DEBRepCascade_FILES
|
||||
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
# Source files for DEXCAFCascade package
|
||||
set(OCCT_DEXCAFCascade_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
set(OCCT_DEXCAFCascade_FILES
|
||||
|
||||
)
|
||||
@@ -1,5 +1,7 @@
|
||||
# Auto-generated list of packages for TKDECascade toolkit
|
||||
set(OCCT_TKDECascade_LIST_OF_PACKAGES
|
||||
DEBRepCascade
|
||||
DEXCAFCascade
|
||||
DEBREP
|
||||
DEXCAF
|
||||
)
|
||||
|
||||
@@ -192,7 +192,7 @@ occ::handle<IGESData_IGESEntity> 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<TransferBRep_ShapeMapper> 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<TransferBRep_ShapeMapper> 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<Standard_Transient>& start, const char* amess)
|
||||
void BRepToIGES_BREntity::AddFail(const occ::handle<Standard_Transient>& start,
|
||||
const char* const amess)
|
||||
{
|
||||
occ::handle<Transfer_TransientMapper> Mapper = new Transfer_TransientMapper(start);
|
||||
TheMap->AddFail(Mapper, amess);
|
||||
@@ -217,7 +218,7 @@ void BRepToIGES_BREntity::AddFail(const occ::handle<Standard_Transient>& start,
|
||||
//=================================================================================================
|
||||
|
||||
void BRepToIGES_BREntity::AddWarning(const occ::handle<Standard_Transient>& start,
|
||||
const char* amess)
|
||||
const char* const amess)
|
||||
{
|
||||
occ::handle<Transfer_TransientMapper> Mapper = new Transfer_TransientMapper(start);
|
||||
TheMap->AddWarning(Mapper, amess);
|
||||
|
||||
@@ -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<Standard_Transient>& start, const char* amess);
|
||||
Standard_EXPORT void AddFail(const occ::handle<Standard_Transient>& start,
|
||||
const char* const amess);
|
||||
|
||||
//! Records a new Warning message
|
||||
Standard_EXPORT void AddWarning(const occ::handle<Standard_Transient>& start, const char* amess);
|
||||
Standard_EXPORT void AddWarning(const occ::handle<Standard_Transient>& start,
|
||||
const char* const amess);
|
||||
|
||||
//! Returns True if start was already treated and has a result in "TheMap"
|
||||
//! else returns False.
|
||||
|
||||
@@ -374,7 +374,7 @@ bool IGESCAFControl_Reader::Transfer(const occ::handle<TDocStd_Document>& doc,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
bool IGESCAFControl_Reader::Perform(const char* filename,
|
||||
bool IGESCAFControl_Reader::Perform(const char* const filename,
|
||||
const occ::handle<TDocStd_Document>& doc,
|
||||
const Message_ProgressRange& theProgress)
|
||||
{
|
||||
|
||||
@@ -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<TDocStd_Document>& theDoc,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ IGESCAFControl_Writer::IGESCAFControl_Writer(const occ::handle<XSControl_WorkSes
|
||||
//=================================================================================================
|
||||
|
||||
IGESCAFControl_Writer::IGESCAFControl_Writer(const occ::handle<XSControl_WorkSession>& WS,
|
||||
const char* theUnit)
|
||||
const char* const theUnit)
|
||||
: IGESControl_Writer(theUnit)
|
||||
{
|
||||
|
||||
@@ -209,7 +209,7 @@ bool IGESCAFControl_Writer::Transfer(const NCollection_Sequence<TDF_Label>& labe
|
||||
//=================================================================================================
|
||||
|
||||
bool IGESCAFControl_Writer::Perform(const occ::handle<TDocStd_Document>& doc,
|
||||
const char* filename,
|
||||
const char* const filename,
|
||||
const Message_ProgressRange& theProgress)
|
||||
{
|
||||
if (!Transfer(doc, theProgress))
|
||||
|
||||
@@ -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<XSControl_WorkSession>& 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<TDocStd_Document>& doc,
|
||||
const char* filename,
|
||||
const char* const filename,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Set ColorMode for indicate write Colors or not.
|
||||
|
||||
@@ -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<OSD_FileSystem>& aFileSystem = OSD_FileSystem::DefaultFileSystem();
|
||||
std::shared_ptr<std::ostream> aStream =
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
//! Returns True if done, False if <name> is incorrect
|
||||
//! Remark : if <flag> has been set to 3 (user defined), <name>
|
||||
//! 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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
const occ::handle<TCollection_HAsciiString>& 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)
|
||||
|
||||
@@ -272,25 +272,20 @@ occ::handle<IGESData_ColorEntity> 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;
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -35,7 +35,7 @@ static const char* voidline = "";
|
||||
// Internal routine used for VerifyCheck
|
||||
void IGESData_VerifyDate(const occ::handle<TCollection_HAsciiString>& str,
|
||||
occ::handle<Interface_Check>& 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<Interface_Check>& ach) const
|
||||
|
||||
void IGESData_VerifyDate(const occ::handle<TCollection_HAsciiString>& str,
|
||||
occ::handle<Interface_Check>& ach,
|
||||
const char* mess)
|
||||
const char* const mess)
|
||||
{
|
||||
// MGE 23/07/98
|
||||
// =====================================
|
||||
|
||||
@@ -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<IGESData_IGESEntity> Entity(const int num) const;
|
||||
|
||||
@@ -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<NCollection_HSequence<occ::handle<TCollection_HAsciiString>>> 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,
|
||||
|
||||
@@ -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<NCollection_HSequence<occ::handle<TCollection_HAsciiString>>>
|
||||
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 <num>
|
||||
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;
|
||||
|
||||
@@ -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<TCollection_HAsciiString>&
|
||||
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<NCollection_HSequence<occ::handle<TCollection_HAsciiString>>> 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++)
|
||||
|
||||
@@ -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).
|
||||
//! <more>, if precised, requires that <more> 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
|
||||
|
||||
@@ -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<TCollection_HAsciiString>& val)
|
||||
{
|
||||
if (!PrepareRead(PC, mess, false))
|
||||
@@ -684,7 +692,7 @@ bool IGESData_ParamReader::ReadEntity(const occ::handle<IGESData_IGESReaderData>
|
||||
|
||||
bool IGESData_ParamReader::ReadEntity(const occ::handle<IGESData_IGESReaderData>& IR,
|
||||
const IGESData_ParamCursor& PC,
|
||||
const char* mess,
|
||||
const char* const mess,
|
||||
occ::handle<IGESData_IGESEntity>& val,
|
||||
const bool canbenul)
|
||||
{
|
||||
@@ -759,7 +767,7 @@ bool IGESData_ParamReader::ReadEntity(const occ::handle<IGESData_IGESReaderData>
|
||||
|
||||
bool IGESData_ParamReader::ReadEntity(const occ::handle<IGESData_IGESReaderData>& IR,
|
||||
const IGESData_ParamCursor& PC,
|
||||
const char* mess,
|
||||
const char* const mess,
|
||||
const occ::handle<Standard_Type>& type,
|
||||
occ::handle<IGESData_IGESEntity>& 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<NCollection_HArray1<int>>& 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<NCollection_HArray1<double>>& 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<NCollection_HArray1<occ::handle<TCollection_HAsciiString>>>& val,
|
||||
const int index)
|
||||
{
|
||||
@@ -1081,7 +1089,7 @@ bool IGESData_ParamReader::ReadEnts(
|
||||
bool IGESData_ParamReader::ReadEnts(
|
||||
const occ::handle<IGESData_IGESReaderData>& IR,
|
||||
const IGESData_ParamCursor& PC,
|
||||
const char* mess,
|
||||
const char* const mess,
|
||||
occ::handle<NCollection_HArray1<occ::handle<IGESData_IGESEntity>>>& val,
|
||||
const int index)
|
||||
{
|
||||
@@ -1198,7 +1206,7 @@ bool IGESData_ParamReader::ReadEntList(const occ::handle<IGESData_IGESReaderData
|
||||
|
||||
bool IGESData_ParamReader::ReadEntList(const occ::handle<IGESData_IGESReaderData>& 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<TCollection_HAsciiString>& afail,
|
||||
const occ::handle<TCollection_HAsciiString>& 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<TCollection_HAsciiString> af = new TCollection_HAsciiString(afail);
|
||||
occ::handle<TCollection_HAsciiString> 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<TCollection_HAsciiString>& aw,
|
||||
const occ::handle<TCollection_HAsciiString>& 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<TCollection_HAsciiString> aw = new TCollection_HAsciiString(awarn);
|
||||
occ::handle<TCollection_HAsciiString> 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<TCollection_HAsciiString>&
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
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::handle<TCollection_HAsciiString
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
void IGESData_ParamReader::Mend(const char* pref)
|
||||
void IGESData_ParamReader::Mend(const char* const pref)
|
||||
{
|
||||
thecheck->Mend(pref);
|
||||
thelast = true;
|
||||
|
||||
@@ -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<TCollection_HAsciiString>& val);
|
||||
|
||||
Standard_EXPORT bool ReadEntity(const occ::handle<IGESData_IGESReaderData>& IR,
|
||||
@@ -237,7 +241,7 @@ public:
|
||||
//! Check with a Fail (using mess) and returns False
|
||||
Standard_EXPORT bool ReadEntity(const occ::handle<IGESData_IGESReaderData>& IR,
|
||||
const IGESData_ParamCursor& PC,
|
||||
const char* mess,
|
||||
const char* const mess,
|
||||
occ::handle<IGESData_IGESEntity>& val,
|
||||
const bool canbenul = false);
|
||||
|
||||
@@ -270,7 +274,7 @@ public:
|
||||
//! (in such a case, returns False and givel <val> = Null)
|
||||
Standard_EXPORT bool ReadEntity(const occ::handle<IGESData_IGESReaderData>& IR,
|
||||
const IGESData_ParamCursor& PC,
|
||||
const char* mess,
|
||||
const char* const mess,
|
||||
const occ::handle<Standard_Type>& type,
|
||||
occ::handle<IGESData_IGESEntity>& val,
|
||||
const bool canbenul = false);
|
||||
@@ -279,7 +283,7 @@ public:
|
||||
template <class T>
|
||||
bool ReadEntity(const occ::handle<IGESData_IGESReaderData>& IR,
|
||||
const IGESData_ParamCursor& PC,
|
||||
const char* mess,
|
||||
const char* const mess,
|
||||
const occ::handle<Standard_Type>& type,
|
||||
occ::handle<T>& 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<NCollection_HArray1<int>>& 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<NCollection_HArray1<double>>& 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<NCollection_HArray1<occ::handle<TCollection_HAsciiString>>>& val,
|
||||
const int index = 1);
|
||||
|
||||
@@ -358,7 +362,7 @@ public:
|
||||
Standard_EXPORT bool ReadEnts(
|
||||
const occ::handle<IGESData_IGESReaderData>& IR,
|
||||
const IGESData_ParamCursor& PC,
|
||||
const char* mess,
|
||||
const char* const mess,
|
||||
occ::handle<NCollection_HArray1<occ::handle<IGESData_IGESEntity>>>& 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<IGESData_IGESReaderData>& 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<TCollection_HAsciiString>& af,
|
||||
const occ::handle<TCollection_HAsciiString>& 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<TCollection_HAsciiString>& aw,
|
||||
const occ::handle<TCollection_HAsciiString>& 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
|
||||
//! <af> 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<TCollection_HAsciiString>& af,
|
||||
const occ::handle<TCollection_HAsciiString>& bf);
|
||||
|
||||
//! Same as above but with CString
|
||||
//! <bf> empty means = <af>
|
||||
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
|
||||
//! <aw> 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<TCollection_HAsciiString>& aw,
|
||||
const occ::handle<TCollection_HAsciiString>& bw);
|
||||
|
||||
//! Same as above but with CString
|
||||
//! <bw> empty means = <aw>
|
||||
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<Interface_ParamList> theparams;
|
||||
occ::handle<Interface_Check> thecheck;
|
||||
|
||||
@@ -107,10 +107,10 @@ IGESSelect_Activator::IGESSelect_Activator()
|
||||
IFSelect_ReturnStatus IGESSelect_Activator::Do(const int number,
|
||||
const occ::handle<IFSelect_SessionPilot>& 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<IFSelect_WorkSession> WS = pilot->Session();
|
||||
|
||||
switch (number)
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_EditDirPart, IFSelect_Editor)
|
||||
|
||||
static occ::handle<Interface_TypedValue> NewDefType(const char* name)
|
||||
static occ::handle<Interface_TypedValue> NewDefType(const char* const name)
|
||||
{
|
||||
occ::handle<Interface_TypedValue> deftype = new Interface_TypedValue(name, Interface_ParamEnum);
|
||||
deftype->StartEnum(0);
|
||||
@@ -42,7 +42,7 @@ static occ::handle<Interface_TypedValue> NewDefType(const char* name)
|
||||
return deftype;
|
||||
}
|
||||
|
||||
static occ::handle<Interface_TypedValue> NewDefList(const char* name)
|
||||
static occ::handle<Interface_TypedValue> NewDefList(const char* const name)
|
||||
{
|
||||
occ::handle<Interface_TypedValue> deftype = new Interface_TypedValue(name, Interface_ParamEnum);
|
||||
deftype->StartEnum(0);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<Interface_InterfaceModel>& model,
|
||||
const occ::handle<Interface_Protocol>& protocol) const
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
//! Reads a IGES File and returns a IGES Model (into <mod>),
|
||||
//! or lets <mod> "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<Interface_InterfaceModel>& model,
|
||||
const occ::handle<Interface_Protocol>& protocol) const override;
|
||||
|
||||
|
||||
@@ -1010,8 +1010,8 @@ occ::handle<Geom_Curve> 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<Geom_Curve> 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);
|
||||
|
||||
@@ -912,8 +912,8 @@ occ::handle<Geom_BSplineSurface> 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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<TCollection_HAsciiString> 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<TCollection_HAsciiString> 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<TCollection_HAsciiString> 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<TCollection_HAsciiString> 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<TCollection_HAsciiString> 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<TCollection_HAsciiString> 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<TCollection_HAsciiString> 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<TCollection_HAsciiString> 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<TCollection_HAsciiString> 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<TCollection_HAsciiString> 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<TCollection_HAsciiString> 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<TCollection_HAsciiString> label = GetModel()->StringLabel(pi);
|
||||
msg1156.Arg(typeName);
|
||||
msg1156.Arg(label);
|
||||
@@ -1677,7 +1677,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferPlaneParts(const occ::handle<IGESGe
|
||||
break;
|
||||
default: {
|
||||
Message_Msg msg1156("IGES_1156");
|
||||
const char* typeName("Bounding curve");
|
||||
const char* const typeName("Bounding curve");
|
||||
occ::handle<TCollection_HAsciiString> label = GetModel()->StringLabel(crv);
|
||||
msg1156.Arg(typeName);
|
||||
msg1156.Arg(label);
|
||||
@@ -1725,7 +1725,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferPlaneParts(const occ::handle<IGESGe
|
||||
else
|
||||
{
|
||||
Message_Msg msg1156("IGES_1156");
|
||||
const char* typeName("Bounding curve");
|
||||
const char* const typeName("Bounding curve");
|
||||
occ::handle<TCollection_HAsciiString> label = GetModel()->StringLabel(crv);
|
||||
msg1156.Arg(typeName);
|
||||
msg1156.Arg(label);
|
||||
@@ -1784,7 +1784,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::ParamSurface(const occ::handle<IGESData_IGE
|
||||
if (nbfaces != 1)
|
||||
{
|
||||
Message_Msg msg1156("IGES_1156");
|
||||
const char* typeName("basis surface");
|
||||
const char* const typeName("basis surface");
|
||||
occ::handle<TCollection_HAsciiString> label = GetModel()->StringLabel(st);
|
||||
msg1156.Arg(typeName);
|
||||
msg1156.Arg(label);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
occ::handle<Poly_Triangulation> RWObj::ReadFile(const char* theFile,
|
||||
occ::handle<Poly_Triangulation> RWObj::ReadFile(const char* const theFile,
|
||||
const Message_ProgressRange& theProgress)
|
||||
{
|
||||
RWObj_TriangulationReader aReader;
|
||||
|
||||
@@ -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<Poly_Triangulation> ReadFile(
|
||||
const char* theFile,
|
||||
const char* const theFile,
|
||||
const Message_ProgressRange& aProgress = Message_ProgressRange());
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
#include <StepGeom_Direction.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
static occ::handle<StepGeom_Axis2Placement3d> MakeAxis2Placement3d(const gp_Pnt& O,
|
||||
const gp_Dir& D,
|
||||
const gp_Dir& X,
|
||||
const char* nom,
|
||||
double aFactor)
|
||||
static occ::handle<StepGeom_Axis2Placement3d> MakeAxis2Placement3d(const gp_Pnt& O,
|
||||
const gp_Dir& D,
|
||||
const gp_Dir& X,
|
||||
const char* const nom,
|
||||
double aFactor)
|
||||
{
|
||||
occ::handle<StepGeom_Axis2Placement3d> Axe;
|
||||
occ::handle<StepGeom_CartesianPoint> P;
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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<TDocStd_Document>& doc,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
bool STEPCAFControl_Reader::Perform(const char* filename,
|
||||
bool STEPCAFControl_Reader::Perform(const char* const filename,
|
||||
const occ::handle<TDocStd_Document>& 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<TDocStd_Document>& doc,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const Message_ProgressRange& theProgress)
|
||||
@@ -453,7 +453,7 @@ const NCollection_DataMap<TCollection_AsciiString, occ::handle<STEPCAFControl_Ex
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
bool STEPCAFControl_Reader::ExternFile(const char* name,
|
||||
bool STEPCAFControl_Reader::ExternFile(const char* const name,
|
||||
occ::handle<STEPCAFControl_ExternFile>& 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_ExternFile> STEPCAFControl_Reader::ReadExternFile(
|
||||
const char* file,
|
||||
const char* fullname,
|
||||
const char* const file,
|
||||
const char* const fullname,
|
||||
const occ::handle<TDocStd_Document>& doc,
|
||||
const Message_ProgressRange& theProgress)
|
||||
{
|
||||
|
||||
@@ -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<TDocStd_Document>& 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<TDocStd_Document>& 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<STEPCAFControl_ExternFile>& 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<STEPCAFControl_ExternFile> ReadExternFile(
|
||||
const char* file,
|
||||
const char* fullpath,
|
||||
const char* const file,
|
||||
const char* const fullpath,
|
||||
const occ::handle<TDocStd_Document>& doc,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@ void STEPCAFControl_Writer::Init(const occ::handle<XSControl_WorkSession>& 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<TDocStd_Document>& theDoc,
|
||||
const STEPControl_StepModelType theMode,
|
||||
const char* theMulti,
|
||||
const char* const theMulti,
|
||||
const Message_ProgressRange& theProgress)
|
||||
{
|
||||
const occ::handle<StepData_StepModel> aModel =
|
||||
@@ -400,7 +400,7 @@ bool STEPCAFControl_Writer::Transfer(const occ::handle<TDocStd_Document>& theDoc
|
||||
bool STEPCAFControl_Writer::Transfer(const occ::handle<TDocStd_Document>& theDoc,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const STEPControl_StepModelType theMode,
|
||||
const char* theMulti,
|
||||
const char* const theMulti,
|
||||
const Message_ProgressRange& theProgress)
|
||||
{
|
||||
occ::handle<XCAFDoc_ShapeTool> aShTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main());
|
||||
@@ -421,7 +421,7 @@ bool STEPCAFControl_Writer::Transfer(const occ::handle<TDocStd_Document>& 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<StepData_StepModel> 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<TDF_Label>& theLabels,
|
||||
const STEPControl_StepModelType theMode,
|
||||
const char* theIsMulti,
|
||||
const char* const theIsMulti,
|
||||
const Message_ProgressRange& theProgress)
|
||||
{
|
||||
const occ::handle<StepData_StepModel> aModel =
|
||||
@@ -470,7 +470,7 @@ bool STEPCAFControl_Writer::Transfer(const NCollection_Sequence<TDF_Label>& theL
|
||||
bool STEPCAFControl_Writer::Transfer(const NCollection_Sequence<TDF_Label>& 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<TDF_Label>& theL
|
||||
//=================================================================================================
|
||||
|
||||
bool STEPCAFControl_Writer::Perform(const occ::handle<TDocStd_Document>& 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<TDocStd_Document>& theDoc,
|
||||
//=================================================================================================
|
||||
|
||||
bool STEPCAFControl_Writer::Perform(const occ::handle<TDocStd_Document>& 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<STEPCAFControl_ExternFile>& 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<TDF_Label>& 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<TDF_Label>& 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<XSControl_WorkSession>& theWS,
|
||||
const NCollection_DataMap<TDF_Label, TopoDS_Shape>& 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<XSControl_WorkSession>&
|
||||
|
||||
bool STEPCAFControl_Writer::writeValProps(const occ::handle<XSControl_WorkSession>& theWS,
|
||||
const NCollection_Sequence<TDF_Label>& theLabels,
|
||||
const char* theIsMulti) const
|
||||
const char* const theIsMulti) const
|
||||
{
|
||||
if (theLabels.IsEmpty())
|
||||
return false;
|
||||
@@ -2745,7 +2745,7 @@ static occ::handle<StepRepr_ReprItemAndMeasureWithUnit> CreateDimValue(
|
||||
const double theValue,
|
||||
const StepBasic_Unit& theUnit,
|
||||
const occ::handle<TCollection_HAsciiString>& theName,
|
||||
const char* theMeasureName,
|
||||
const char* const theMeasureName,
|
||||
const bool theIsAngle,
|
||||
const bool theIsQualified = false,
|
||||
const occ::handle<StepShape_QualifiedRepresentationItem>& theQRI = nullptr)
|
||||
|
||||
@@ -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<TDocStd_Document>& 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<TDocStd_Document>& 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<TDF_Label>& 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<TDF_Label>& 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<TDocStd_Document>& 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<TDocStd_Document>& 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<TDocStd_Document>& 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<STEPCAFControl_ExternFile>& theExtFile) const;
|
||||
|
||||
//! Returns basic reader for root file
|
||||
@@ -288,7 +288,7 @@ protected:
|
||||
bool transfer(STEPControl_Writer& theWriter,
|
||||
const NCollection_Sequence<TDF_Label>& 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<TDF_Label>& 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<XSControl_WorkSession>& theWS,
|
||||
const NCollection_Sequence<TDF_Label>& theLabels,
|
||||
const char* theIsMulti) const;
|
||||
const char* const theIsMulti) const;
|
||||
|
||||
//! Write layers assigned to specified labels, to STEP model
|
||||
bool writeLayers(const occ::handle<XSControl_WorkSession>& theWS,
|
||||
|
||||
@@ -521,9 +521,9 @@ occ::handle<TCollection_HAsciiString> STEPConstruct_ExternRefs::Format(const int
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
int STEPConstruct_ExternRefs::AddExternRef(const char* filename,
|
||||
int STEPConstruct_ExternRefs::AddExternRef(const char* const filename,
|
||||
const occ::handle<StepBasic_ProductDefinition>& PD,
|
||||
const char* format)
|
||||
const char* const format)
|
||||
{
|
||||
occ::handle<TCollection_HAsciiString> EmptyString = new TCollection_HAsciiString("");
|
||||
occ::handle<TCollection_HAsciiString> fmt = new TCollection_HAsciiString(format);
|
||||
@@ -841,7 +841,7 @@ bool STEPConstruct_ExternRefs::addAP214ExterRef(
|
||||
const occ::handle<StepAP214_AppliedDocumentReference>& ADR,
|
||||
const occ::handle<StepBasic_ProductDefinition>& PD,
|
||||
const occ::handle<StepBasic_DocumentFile>& DF,
|
||||
const char* filename)
|
||||
const char* const filename)
|
||||
{
|
||||
occ::handle<NCollection_HArray1<StepAP214_DocumentReferenceItem>> DRIs =
|
||||
new NCollection_HArray1<StepAP214_DocumentReferenceItem>(1, 1);
|
||||
|
||||
@@ -92,9 +92,9 @@ public:
|
||||
//! <format> 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<StepBasic_ProductDefinition>& 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<StepAP214_AppliedDocumentReference>& ADR,
|
||||
const occ::handle<StepBasic_ProductDefinition>& PD,
|
||||
const occ::handle<StepBasic_DocumentFile>& DF,
|
||||
const char* filename);
|
||||
const char* const filename);
|
||||
|
||||
private:
|
||||
NCollection_Sequence<occ::handle<Standard_Transient>> myAEIAs;
|
||||
|
||||
@@ -354,7 +354,7 @@ bool STEPConstruct_ValidationProps::AddProp(
|
||||
const StepRepr_CharacterizedDefinition& target,
|
||||
const occ::handle<StepRepr_RepresentationContext>& Context,
|
||||
const occ::handle<StepRepr_RepresentationItem>& 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<TCollection_HAsciiString> PropDefName =
|
||||
@@ -397,7 +397,7 @@ bool STEPConstruct_ValidationProps::AddProp(
|
||||
|
||||
bool STEPConstruct_ValidationProps::AddProp(const TopoDS_Shape& Shape,
|
||||
const occ::handle<StepRepr_RepresentationItem>& Prop,
|
||||
const char* Descr,
|
||||
const char* const Descr,
|
||||
const bool instance)
|
||||
{
|
||||
StepRepr_CharacterizedDefinition target;
|
||||
|
||||
@@ -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<StepRepr_RepresentationItem>& 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<StepRepr_RepresentationContext>& Context,
|
||||
const occ::handle<StepRepr_RepresentationItem>& 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
|
||||
|
||||
@@ -93,7 +93,7 @@ occ::handle<StepData_StepModel> STEPControl_Reader::StepModel() const
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
IFSelect_ReturnStatus STEPControl_Reader::ReadFile(const char* filename)
|
||||
IFSelect_ReturnStatus STEPControl_Reader::ReadFile(const char* const filename)
|
||||
{
|
||||
occ::handle<IFSelect_WorkLibrary> aLibrary = WS()->WorkLibrary();
|
||||
occ::handle<Interface_Protocol> 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<IFSelect_WorkLibrary> 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<IFSelect_WorkLibrary> aLibrary = WS()->WorkLibrary();
|
||||
occ::handle<Interface_Protocol> 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)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user