27 #ifndef SMESH_smesh_HeaderFile
28 #define SMESH_smesh_HeaderFile
30 #include <Standard_DefineHandle.hxx>
31 #include <Standard_Type.hxx>
32 #include <Standard_Transient.hxx>
33 #include <TCollection_AsciiString.hxx>
34 #include <TColStd_SequenceOfAsciiString.hxx>
35 #include <TColStd_SequenceOfInteger.hxx>
36 #include <Resource_DataMapOfAsciiStringAsciiString.hxx>
43 #include <Basics_OCCTVersion.hxx>
45 #include <SALOMEconfig.h>
46 #include CORBA_CLIENT_HEADER(SALOMEDS)
48 #define USE_STRING_FAMILY
90 typedef TCollection_AsciiString
_pyID;
112 void SetBegPos(
int thePartIndex,
int thePosition );
151 const bool theForward,
const bool dotIsWord =
false);
155 {
return ( isalnum( c ) || c ==
'_' || c ==
':' ); }
197 virtual void Flush() = 0;
219 myMesh( mesh ), myLastComputeCmd( computeCmd )
221 if ( !myLastComputeCmd.IsNull())
239 int isIn(
const char* str );
241 bool Add(
const char* str );
243 void Print(
int level = 0 );
255 _pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
256 Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
257 std::set< TCollection_AsciiString >& theRemovedObjIDs,
258 SALOMEDS::Study_ptr& theStudy,
259 const bool theToKeepAllCommands);
286 #ifdef USE_STRING_FAMILY
298 virtual void Flush();
307 const
bool theIsAfter );
316 #ifdef USE_STRING_FAMILY
342 #define _pyMesh_ACCESS_METHOD "GetMesh()"
357 const _pyID&
GetGeom() {
return GetCreationCmd()->GetArg(1); }
362 virtual void Flush();
366 virtual void Free() { myChildMeshes.clear(); }
370 void addFatherMesh(
const _pyID& meshID );
375 OCCT_DEFINE_STANDARD_RTTIEXT(
_pyMesh,_pyObject)
377 #undef _pyMesh_ACCESS_METHOD
395 OCCT_DEFINE_STANDARD_RTTIEXT(
_pyMesh,_pyObject)
416 void setCreationArg(
const int argNb,
const _AString& arg );
435 void SetConvMethodAndType(
const _AString& creationMethod,
const _AString& type)
436 { myCurCrMethod = &myAlgoType2CreationMethod[ type ];
437 myCurCrMethod->myMethod = creationMethod; }
438 void AddArgMethod(
const _AString& method,
const int argNb = 1)
439 { myCurCrMethod->myArgMethods.push_back( method );
440 myCurCrMethod->myArgNb.push_back( argNb ); }
441 void AddAccumulativeMethod(
const _AString& method)
442 { myAccumulativeMethods.insert( method ); }
444 const std::list<Handle(_pyCommand)>&
GetArgCommands()
const {
return myArgCommands; }
445 void ClearAllCommands();
446 virtual bool IsAlgo()
const {
return myIsAlgo; }
447 bool IsValid()
const {
return !myAlgoType2CreationMethod.empty(); }
449 const _pyID &
GetGeom()
const {
return myGeom; }
450 void SetMesh(
const _pyID& theMeshId) {
if ( myMesh.IsEmpty() ) myMesh = theMeshId; }
451 const _pyID &
GetMesh()
const {
return myMesh; }
452 const _AString& GetAlgoType()
const
453 {
return myAlgoType2CreationMethod.begin()->first; }
454 const _AString& GetAlgoCreationMethod()
const
455 {
return myAlgoType2CreationMethod.begin()->second.myMethod; }
456 bool CanBeCreatedBy(
const _AString& algoType )
const
457 {
return myAlgoType2CreationMethod.find( algoType ) != myAlgoType2CreationMethod.end(); }
458 const _AString& GetCreationMethod(
const _AString& algoType)
459 {
return ( myCurCrMethod = & myAlgoType2CreationMethod[ algoType ])->myMethod; }
462 virtual
bool IsWrappable(const _pyID& theMesh) const;
464 const _pyID& theMesh);
466 virtual
void Flush();
467 virtual
void Free() { myReferredObjs.clear(); }
469 const _pyID& theMesh );
472 virtual bool GetReferredMeshesAndGeom( std::list<
Handle(
_pyMesh) >& meshes );
492 const _pyID& theMesh);
494 virtual bool IsWrappable(
const _pyID& theMesh) {
return !myIsWrapped; }
509 virtual void Flush();
526 _pyHypothesis(theCreationCmd), myAlgoMethod((char*)algoMethod) {}
528 virtual void Flush();
530 const _pyID& theMesh);
531 virtual void Free() { my1dHyp.Nullify(); }
547 const _pyID& theMesh);
564 const _pyID& theMesh);
580 virtual void Flush();
595 Handle(_pyObject) myCreator;
600 virtual void Flush();
602 virtual void Free() { myCreator.Nullify(); myMesh.Nullify(); }
604 static bool CanBeArgOfMethod(
const _AString& theMethodName);
606 OCCT_DEFINE_STANDARD_RTTIEXT(
_pySubMesh,_pyObject)
621 virtual void Flush();
626 OCCT_DEFINE_STANDARD_RTTIEXT(
_pyFilter,_pyObject)
642 virtual void Flush();
643 virtual void Free() { myFilter.Nullify(); }
645 void RemovedWithContents();