-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
mapIdToId.clear();
}
// register object in the internal map and return its id
- int addObject( string theIOR )
+ int addObject( std::string theIOR )
{
int nextId = getNextId();
mapIdToIOR[ nextId ] = theIOR;
return nextId;
}
// find the object id in the internal map by the IOR
- int findId( string theIOR )
+ int findId( std::string theIOR )
{
- map<int, string>::iterator imap;
+ std::map<int, std::string>::iterator imap;
for ( imap = mapIdToIOR.begin(); imap != mapIdToIOR.end(); ++imap ) {
if ( imap->second == theIOR )
return imap->first;
return 0;
}
// get object's IOR by id
- string getIORbyId( const int theId )
+ std::string getIORbyId( const int theId )
{
if ( mapIdToIOR.find( theId ) != mapIdToIOR.end() )
return mapIdToIOR[ theId ];
- return string( "" );
+ return std::string( "" );
}
// get object's IOR by old id
- string getIORbyOldId( const int theOldId )
+ std::string getIORbyOldId( const int theOldId )
{
if ( mapIdToId.find( theOldId ) != mapIdToId.end() )
return getIORbyId( mapIdToId[ theOldId ] );
- return string( "" );
+ return std::string( "" );
}
// maps old object id to the new one (used when restoring data)
void mapOldToNew( const int oldId, const int newId ) {
}
// get old id by a new one
int getOldId( const int newId ) {
- map<int, int>::iterator imap;
+ std::map<int, int>::iterator imap;
for ( imap = mapIdToId.begin(); imap != mapIdToId.end(); ++imap ) {
if ( imap->second == newId )
return imap->first;
return id;
}
- map<int, string> mapIdToIOR; // persistent-to-transient map
- map<int, int> mapIdToId; // used to translate object from persistent to transient form
+ std::map<int, std::string> mapIdToIOR; // persistent-to-transient map
+ std::map<int, int> mapIdToId; // to translate object from persistent to transient form
};
// ===========================================================
void CleanPythonTrace (int theStudyID);
- // SIMAN-related functions (check out/check in) : import data to study
- virtual Engines::ListOfIdentifiers* importData(CORBA::Long studyId,
- Engines::DataContainer_ptr data,
- const Engines::ListOfOptions& options);
- // SIMAN-related functions (check out/check in) : get modified data
- virtual Engines::ListOfData* getModifiedData(CORBA::Long studyId);
-
// *****************************************
// Internal methods
// *****************************************
typename TInterface::_var_type GetObjectByOldId( const int oldID )
{
if ( StudyContext* myStudyContext = GetCurrentStudyContext() ) {
- string ior = myStudyContext->getIORbyOldId( oldID );
+ std::string ior = myStudyContext->getIORbyOldId( oldID );
if ( !ior.empty() )
return TInterface::_narrow(GetORB()->string_to_object( ior.c_str() ));
}
CORBA::Boolean toCheckAll);
SMESH::long_array* GetInsideSphere( SMESH::SMESH_IDSource_ptr meshPart,
- SMESH::ElementType theElemType,
- CORBA::Double theX,
- CORBA::Double theY,
- CORBA::Double theZ,
- CORBA::Double theR);
+ SMESH::ElementType theElemType,
+ CORBA::Double theX,
+ CORBA::Double theY,
+ CORBA::Double theZ,
+ CORBA::Double theR);
SMESH::long_array* GetInsideBox( SMESH::SMESH_IDSource_ptr meshPart,
- SMESH::ElementType theElemType,
- CORBA::Double theX1,
- CORBA::Double theY1,
- CORBA::Double theZ1,
- CORBA::Double theX2,
- CORBA::Double theY2,
- CORBA::Double theZ2);
+ SMESH::ElementType theElemType,
+ CORBA::Double theX1,
+ CORBA::Double theY1,
+ CORBA::Double theZ1,
+ CORBA::Double theX2,
+ CORBA::Double theY2,
+ CORBA::Double theZ2);
SMESH::long_array* GetInsideCylinder( SMESH::SMESH_IDSource_ptr meshPart,
- SMESH::ElementType theElemType,
- CORBA::Double theX,
- CORBA::Double theY,
- CORBA::Double theZ,
- CORBA::Double theDX,
- CORBA::Double theDY,
- CORBA::Double theDZ,
- CORBA::Double theH,
- CORBA::Double theR );
+ SMESH::ElementType theElemType,
+ CORBA::Double theX,
+ CORBA::Double theY,
+ CORBA::Double theZ,
+ CORBA::Double theDX,
+ CORBA::Double theDY,
+ CORBA::Double theDZ,
+ CORBA::Double theH,
+ CORBA::Double theR );
SMESH::long_array* GetInside( SMESH::SMESH_IDSource_ptr meshPart,
- SMESH::ElementType theElemType,
- GEOM::GEOM_Object_ptr theGeom,
- CORBA::Double theTolerance );
+ SMESH::ElementType theElemType,
+ GEOM::GEOM_Object_ptr theGeom,
+ CORBA::Double theTolerance );
private:
// Get hypothesis creator
bool theStudyIsBeingClosed=false);
std::vector<long> _GetInside(SMESH::SMESH_IDSource_ptr meshPart,
- SMESH::ElementType theElemType,
- TopoDS_Shape& aShape,
- double* theTolerance = NULL);
+ SMESH::ElementType theElemType,
+ TopoDS_Shape& aShape,
+ double* theTolerance = NULL);
private:
static GEOM::GEOM_Gen_var myGeomGen;
::SMESH_Gen myGen; // SMESH_Gen local implementation
// hypotheses managing
- map<string, GenericHypothesisCreator_i*> myHypCreatorMap;
+ std::map<std::string, GenericHypothesisCreator_i*> myHypCreatorMap;
+
+ std::map<int, StudyContext*> myStudyContextMap; // Map of study context objects
- map<int, StudyContext*> myStudyContextMap; // Map of study context objects
+ GEOM_Client* myShapeReader; // Shape reader
+ SALOMEDS::Study_var myCurrentStudy; // Current study
+ CORBA::Boolean myIsEmbeddedMode; // Current mode
- GEOM_Client* myShapeReader; // Shape reader
- SALOMEDS::Study_var myCurrentStudy; // Current study
- CORBA::Boolean myIsEmbeddedMode; // Current mode
+ // Default color of groups
+ std::string myDefaultGroupColor;
// To load full mesh data from study at hyp modification or not
bool myToForgetMeshDataOnHypModif;
std::vector< int > myLastParamIndex;
std::vector< std::string > myLastParameters;
std::string myLastObj;
- int myImportedStudyId; // SIMAN: identifier of the imported in importData study to keep no-modifiection flag for getModifiedData method
- int myImportedStudyChanged; // SIMAN: flag that indicates that the imported study has been changed (by creation of the additional mesh)
};