]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESH_I/SMESH_2smeshpy.hxx
Salome HOME
0051567: TC6.6.0: Qadrangle_2D fail
[modules/smesh.git] / src / SMESH_I / SMESH_2smeshpy.hxx
index 1ad25475143bd65f914f6482ad87f0948b71d367..feb720f5f913d5c8d5d3a633ef4503c74827538d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  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
@@ -37,6 +37,7 @@
 #include <list>
 #include <map>
 #include <vector>
+#include <set>
 
 #include <SALOMEconfig.h>
 #include CORBA_CLIENT_HEADER(SALOMEDS)
@@ -123,7 +124,7 @@ public:
   _AString GetIndentation();
   const _AString & GetResultValue();
   const int GetNbResultValues();
-  const _AString & GetResultValue(int res);
+  _AString GetResultValue(int res);
   const _AString & GetObject();
   const _AString & GetMethod();
   const _AString & GetArg( int index );
@@ -230,6 +231,7 @@ public:
   void SetCommandBefore( Handle(_pyCommand) theCmd, Handle(_pyCommand) theBeforeCmd );
   Handle(_pyCommand)& GetLastCommand();
   std::list< Handle(_pyCommand) >& GetCommands() { return myCommands; }
+  void PlaceSubmeshAfterItsCreation( Handle(_pyCommand) theCmdUsingSubmesh ) const;
 
   _pyID GenerateNewID( const _pyID& theID );
   void AddObject( Handle(_pyObject)& theObj );
@@ -294,7 +296,7 @@ private:
 class _pyMesh: public _pyObject
 {
   std::list< Handle(_pyHypothesis) > myHypos;
-  std::list< Handle(_pyCommand) >    myAddHypCmds;
+  std::list< Handle(_pyCommand) >    myAddHypCmds, myNotConvertedAddHypCmds;
   std::list< Handle(_pySubMesh) >    mySubmeshes;
   std::list< Handle(_pyGroup) >      myGroups;
   std::list< Handle(_pyMeshEditor)>  myEditors;
@@ -359,7 +361,7 @@ protected:
   _pyID   myGeom,   myMesh;
   struct CreationMethod {
     _AString              myMethod; // method of algo or mesh creating a hyp
-    // myArgNb(i)-th arg of myArgMethods(i) of hyp becomes an i-th arg of myAlgoMethod
+    // myArgNb(i)-th arg of myArgMethods(i) of hyp becomes an i-th arg of myMethod
     std::vector<_AString> myArgMethods;
     std::vector<int>      myArgNb; // arg nb countered from 1
     std::vector<_AString> myArgs; // creation arguments
@@ -368,6 +370,7 @@ protected:
   // a hypothesis can be created by different algos by different methods
   typedef std::map<_AString, CreationMethod > TType2CrMethod;
   TType2CrMethod                myAlgoType2CreationMethod;
+  std::set< _AString >          myAccumulativeMethods;
   CreationMethod*               myCurCrMethod; // used for adding to myAlgoType2CreationMethod
   std::list<Handle(_pyCommand)> myArgCommands;
   std::list<Handle(_pyCommand)> myUnusedCommands;
@@ -388,6 +391,8 @@ public:
   void AddArgMethod(const _AString& method, const int argNb = 1)
   { myCurCrMethod->myArgMethods.push_back( method );
     myCurCrMethod->myArgNb.push_back( argNb ); }
+  void AddAccumulativeMethod( const _AString& method)
+  { myAccumulativeMethods.insert( method ); }
   //const TColStd_SequenceOfAsciiString& GetArgs() const { return myArgs; }
   const std::list<Handle(_pyCommand)>& GetArgCommands() const { return myArgCommands; }
   void ClearAllCommands();
@@ -546,6 +551,7 @@ public:
   virtual Handle(_pyMesh) GetMesh() { return myMesh; }
   virtual void Free() { myCreator.Nullify(); myMesh.Nullify(); }
   void SetCreator( const Handle(_pyObject)& theCreator ) { myCreator = theCreator; }
+  static bool CanBeArgOfMethod(const _AString& theMethodName);
 
   DEFINE_STANDARD_RTTI (_pySubMesh)
 };
@@ -579,11 +585,13 @@ DEFINE_STANDARD_HANDLE (_pyFilter, _pyObject);
 class _pyGroup:  public _pySubMesh
 {
   Handle(_pyFilter) myFilter;
+  bool              myCanClearCreationCmd;
 public:
   _pyGroup(const Handle(_pyCommand)& theCreationCmd, const _pyID & id=_pyID());
   virtual void Process( const Handle(_pyCommand)& theCommand);
-  virtual void Flush() {}
+  virtual void Flush();
   virtual void Free() { myFilter.Nullify(); }
+  void RemovedWithContents();
 
   DEFINE_STANDARD_RTTI (_pyGroup)
 };