本文整理汇总了C++中TCollection_AsciiString::IsEqual方法的典型用法代码示例。如果您正苦于以下问题:C++ TCollection_AsciiString::IsEqual方法的具体用法?C++ TCollection_AsciiString::IsEqual怎么用?C++ TCollection_AsciiString::IsEqual使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCollection_AsciiString
的用法示例。
在下文中一共展示了TCollection_AsciiString::IsEqual方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Export
STLEXPORT_EXPORT
int Export(const TopoDS_Shape& theShape,
const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theFormatName)
{
MESSAGE("Export STL into file " << theFileName.ToCString());
try
{
StlAPI_Writer aWriter;
bool aIsASCIIMode;
aIsASCIIMode = (theFormatName.IsEqual("STL_ASCII")) ? true : false;
aWriter.ASCIIMode() = aIsASCIIMode;
aWriter.Write(theShape, theFileName.ToCString()) ;
return 1;
}
catch(Standard_Failure)
{
//THROW_SALOME_CORBA_EXCEPTION("Exception catched in STLExport", SALOME::BAD_PARAM);
}
return 0;
}
示例2: main
// MAIN
//////////////////////
int main(int argc, char *argv[]) {
// define messenger system
McCadMessenger_Singleton *msgr = McCadMessenger_Singleton::Instance();
McCadMessenger_ObserverInterface* stdCoutObserver = new McCadMessenger_StdOut;
msgr->Register(stdCoutObserver);
// define plugin path
char* pLibPath = getenv("MCCAD_LIBDIR");
OSD_Path pluginPath("empty");
if (pLibPath == NULL) {
cout << "MCCAD_LIBDIR is not defined!!! " << endl;
return 1;
}
else
pluginPath = OSD_Path(pLibPath);
// load plugins
McCadEXPlug_PluginManager* pluginManager = McCadEXPlug_PluginManager::Instance();
pluginManager->LoadSharedLibrary(pluginPath);
// handle input parameters
TCollection_AsciiString Prog = argv[0];
if(argc > 4 ) {
string arg3(argv[3]), arg4(argv[4]);
if(arg3 == ">" || arg3 == ">>") {
argc = 3;
}
else if(arg4 == ">" || arg4 == ">>") {
argc = 4;
}
else {
printUsage(Prog);
exit(0);
}
}
bool openFile = false;
// handle input
TCollection_AsciiString inName;
if(argc > 1)
//if (1)
{
TCollection_AsciiString inParameter;
inParameter = argv[1];
if(argc > 2)
inName = argv[2];
TCollection_AsciiString outputName;
TCollection_AsciiString strMatName = "";
if (argc > 3)
strMatName = argv[3];
if(inParameter.IsEqual("-h") || inParameter.IsEqual("--help")) {
printUsage();
exit(0);
}
/* test code */
//inParameter = "-m";
TCollection_AsciiString config_file = "McCadConfig.txt";
//inName = "convertedTest.stp";
//strMatName = "material.xml";
/* test code */
// Expander
if(inParameter.IsEqual("-e") || inParameter.IsEqual("--explode")) {
cout << "\nMcCad_Exploder\n====================\n\n";
Handle_TopTools_HSequenceOfShape inputShapes = readFile( inName );
McCadIOHelper_Expander expander(inputShapes);
Handle_TopTools_HSequenceOfShape expandedFiles = expander.GetExplodedShapes();
if(expandedFiles->Length() < 2){
TCollection_AsciiString message("Failed to expand file : ");
message.AssignCat(inName);
msgr->Message(message.ToCString());
exit(0);
}
TCollection_AsciiString tmpName(inName);
TCollection_AsciiString fileFilter = tmpName.Split( tmpName.SearchFromEnd(".") -1 );
for(int i=1; i<=expandedFiles->Length(); i++){
TCollection_AsciiString outName(tmpName);
outName.Prepend("ExOut");
outName.AssignCat("_");
outName.AssignCat(i);
outName.AssignCat(fileFilter);
Handle_TopTools_HSequenceOfShape singleShape = new TopTools_HSequenceOfShape;
singleShape->Append(expandedFiles->Value(i));
writeFile(outName, singleShape);
}
}
// Convertor
else if(inParameter.IsEqual("-d") || inParameter.IsEqual("--decompose")) {
cout << "\nMcCad_Decomposer\n====================\n\n";
// read file
Handle_TopTools_HSequenceOfShape inputShapes = readFile( inName );
// decompose geometry
McCadConvertTools_Convertor convertor(inputShapes);
convertor.Convert();
//.........这里部分代码省略.........