#include <TCollection_AsciiString.hxx>
#include <Resource_DataMapOfAsciiStringAsciiString.hxx>
#include <TColStd_HSequenceOfAsciiString.hxx>
#include <TCollection_AsciiString.hxx>
#include <Resource_DataMapOfAsciiStringAsciiString.hxx>
#include <TColStd_HSequenceOfAsciiString.hxx>
// register object in the internal map and return its id
int addObject( std::string theIOR )
{
int nextId = getNextId();
// register object in the internal map and return its id
int addObject( std::string theIOR )
{
int nextId = getNextId();
- if ( mapIdToIOR.find( theId ) != mapIdToIOR.end() )
- return mapIdToIOR[ theId ];
- return std::string( "" );
+ if ( mapIdToIOR.IsBound( theId ) )
+ return mapIdToIOR( theId );
+ return std::string();
- if ( mapIdToId.find( theOldId ) != mapIdToId.end() )
- return getIORbyId( mapIdToId[ theOldId ] );
- return std::string( "" );
+ if ( mapIdToId.IsBound( theOldId ) )
+ return getIORbyId( mapIdToId( theOldId ));
+ return std::string();
}
// maps old object id to the new one (used when restoring data)
void mapOldToNew( const int oldId, const int newId ) {
}
// maps old object id to the new one (used when restoring data)
void mapOldToNew( const int oldId, const int newId ) {
- std::map<int, std::string> mapIdToIOR; // persistent-to-transient map
- std::map<int, int> mapIdToId; // to translate object from persistent to transient form
+ TInt2StringMap mapIdToIOR; // persistent-to-transient map
+ TInt2IntMap mapIdToId; // to translate object from persistent to transient form
static SALOMEDS::SObject_ptr ObjectToSObject(CORBA::Object_ptr theObject);
// Get the SALOMEDS::Study from naming service
static SALOMEDS::Study_ptr getStudyServant();
static SALOMEDS::SObject_ptr ObjectToSObject(CORBA::Object_ptr theObject);
// Get the SALOMEDS::Study from naming service
static SALOMEDS::Study_ptr getStudyServant();
SMESH::algo_error_array* GetAlgoState( SMESH::SMESH_Mesh_ptr theMesh,
GEOM::GEOM_Object_ptr theSubObject )
throw ( SALOME::SALOME_Exception );
SMESH::algo_error_array* GetAlgoState( SMESH::SMESH_Mesh_ptr theMesh,
GEOM::GEOM_Object_ptr theSubObject )
throw ( SALOME::SALOME_Exception );
- CORBA::Boolean GetMEDVersion(const char* theFileName,
- SMESH::MED_VERSION& theVersion);
+ char* GetMEDVersion(const char* theFileName);
+
+ // Check compatibility of file with MED format being used.
+ CORBA::Boolean CheckCompatibility(const char* theFileName);
// Get names of meshes defined in file with the specified name
SMESH::string_array* GetMeshNames(const char* theFileName);
// Get names of meshes defined in file with the specified name
SMESH::string_array* GetMeshNames(const char* theFileName);