-formatlist:SALOME_GEOM
-
+formatlist:SALOME_GEOM|BinOcaf
+!
+! SALOME_GEOM format
+!
SALOME_GEOM.Description: GEOM Document Version 1.0
SALOME_GEOM.FileExtension: sgd
SALOME_GEOM.StoragePlugin: ad696000-5b34-11d1-b5ba-00a0c9064368
SALOME_GEOMSchema: ad696002-5b34-11d1-b5ba-00a0c9064368
SALOME_GEOM.AttributeStoragePlugin: 47b0b826-d931-11d1-b5da-00a0c9064368
SALOME_GEOM.AttributeRetrievalPlugin: 47b0b827-d931-11d1-b5da-00a0c9064368
-
+!
+! BinOcaf format
+!
+BinOcaf.Description: Bin Ocaf Document Version 1.0
+BinOcaf.FileExtension: cbf
+BinOcaf.StoragePlugin: 03a56835-8269-11d5-aab2-0050044b1af1
+BinOcaf.RetrievalPlugin: 03a56836-8269-11d5-aab2-0050044b1af1
ad696000-5b34-11d1-b5ba-00a0c9064368.Location: @CAS_STDPLUGIN@
ad696001-5b34-11d1-b5ba-00a0c9064368.Location: @CAS_STDPLUGIN@
ad696002-5b34-11d1-b5ba-00a0c9064368.Location: @CAS_STDPLUGIN@
+!
+! BinOcaf Document Plugin
+!
+03a56835-8269-11d5-aab2-0050044b1af1.Location: @CAS_BINPLUGIN@
+03a56836-8269-11d5-aab2-0050044b1af1.Location: @CAS_BINPLUGIN@
if (isMultiFile)
aNameWithExt = TCollection_AsciiString((char*)(SALOMEDS_Tool::GetNameFromPath
(theComponent->GetStudy()->URL())).c_str());
+#if OCC_VERSION_LARGE > 0x06090000
+ aNameWithExt += TCollection_AsciiString("_GEOM.cbf");
+#else
aNameWithExt += TCollection_AsciiString("_GEOM.sgd");
+#endif
aSeq[0] = CORBA::string_dup(aNameWithExt.ToCString());
// Build a full file name of temporary file
TCollection_AsciiString aFullName = TCollection_AsciiString((char*)aTmpDir.c_str()) + aNameWithExt;
// Prepare a file name to open
TCollection_AsciiString aNameWithExt("");
SALOMEDS::Study_var study = theComponent->GetStudy();
+
+#if OCC_VERSION_LARGE > 0x06090000
+ // Get the file name.
+ int i;
+ int aLength = aSeq->length();
+ const char *aGeomSgd = "_GEOM.sgd";
+ const char *aGeomcbf = "_GEOM.cbf";
+
+ for(i = 0; i < aLength; i++) {
+ std::string aName(aSeq[i]);
+
+ if (aName.rfind(aGeomSgd) != std::string::npos ||
+ aName.rfind(aGeomcbf) != std::string::npos) {
+ aNameWithExt = aName.c_str();
+ break;
+ }
+ }
+#else
if (isMultiFile) {
CORBA::String_var url = study->URL();
aNameWithExt = (char*)SALOMEDS_Tool::GetNameFromPath(url.in()).c_str();
}
+
aNameWithExt += "_GEOM.sgd";
+#endif
+
TCollection_AsciiString aFullName = (TCollection_AsciiString((char*)aTmpDir.c_str()) + aNameWithExt);
// Open document