Version: 9.12.0
SMESH_2smeshpy.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 
23 // File : SMESH_smesh.hxx
24 // Created : Fri Nov 18 12:05:18 2005
25 // Author : Edward AGAPOV (eap)
26 //
27 #ifndef SMESH_smesh_HeaderFile
28 #define SMESH_smesh_HeaderFile
29 
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>
37 
38 #include <list>
39 #include <map>
40 #include <vector>
41 #include <set>
42 
43 #include <SALOMEconfig.h>
44 #include CORBA_CLIENT_HEADER(SALOMEDS)
45 
46 #define USE_STRING_FAMILY
47 
48 // ===========================================================================================
60 // ===========================================================================================
61 
62 // ===========================================================================================
63 // =====================
64 // INTERNAL STUFF
65 // =====================
66 // ===========================================================================================
67 
68 class _pyCommand;
69 class _pyObject;
70 class _pyGen;
71 class _pyMesh;
72 class _pySubMesh;
73 class _pyHypothesis;
74 class _pyAlgorithm;
76 
77 DEFINE_STANDARD_HANDLE (_pyCommand ,Standard_Transient)
78 DEFINE_STANDARD_HANDLE (_pyObject ,Standard_Transient)
79 DEFINE_STANDARD_HANDLE (_pyHypothesisReader,Standard_Transient)
80 DEFINE_STANDARD_HANDLE (_pyGen ,_pyObject)
81 DEFINE_STANDARD_HANDLE (_pyMesh ,_pyObject)
82 DEFINE_STANDARD_HANDLE (_pySubMesh ,_pyObject)
83 DEFINE_STANDARD_HANDLE (_pyGroup ,_pySubMesh)
84 DEFINE_STANDARD_HANDLE (_pyMeshEditor ,_pyObject)
85 DEFINE_STANDARD_HANDLE (_pyHypothesis ,_pyObject)
86 DEFINE_STANDARD_HANDLE (_pyAlgorithm ,_pyHypothesis)
87 
88 typedef TCollection_AsciiString _pyID;
89 typedef TCollection_AsciiString _AString;
90 
91 // ===========================================================
96 // ===========================================================
97 
99 {
100  int myOrderNb;
102  _AString myRes, myObj, myMeth;
103  TColStd_SequenceOfAsciiString myArgs;
104  TColStd_SequenceOfAsciiString myResults;
105  TColStd_SequenceOfInteger myBegPos;
107 
108  enum { UNKNOWN=-1, EMPTY=0, RESULT_IND, OBJECT_IND, METHOD_IND, ARG1_IND };
109  int GetBegPos( int thePartIndex ) const;
110  void SetBegPos( int thePartIndex, int thePosition );
111  void SetPart( int thePartIndex, const _AString& theNewPart, _AString& theOldPart);
112  void FindAllArgs() { GetArg(1); }
113 
114 public:
116  _pyCommand( const _AString& theString, int theNb=-1 )
117  : myOrderNb( theNb ), myString( theString ) {};
118  _AString & GetString() { return myString; }
119  int GetOrderNb() const { return myOrderNb; }
120  void SetOrderNb( int theNb ) { myOrderNb = theNb; }
121  typedef void* TAddr;
122  TAddr GetAddress() const { return (void*) this; }
123  int Length() const { return myString.Length(); }
124  void Clear() { myString.Clear(); myBegPos.Clear(); myArgs.Clear(); }
125  bool IsEmpty() const { return myString.IsEmpty(); }
126  _AString GetIndentation();
127  const _AString & GetResultValue();
128  int GetNbResultValues();
129  const _AString & GetResultValue(int res);
130  const _AString & GetObject();
131  const _AString & GetMethod();
132  const _AString & GetArg( int index );
133  int GetNbArgs() { FindAllArgs(); return myArgs.Length(); }
134  int GetArgBeginning() const;
135  bool IsMethodCall();
136  bool MethodStartsFrom(const _AString& beg)
137  { GetMethod(); return ( myMeth.Location( beg, 1, myMeth.Length() ) == 1 ); }
138  void SetResultValue( const _AString& theResult )
139  { GetResultValue(); SetPart( RESULT_IND, theResult, myRes ); }
140  void SetObject(const _AString& theObject)
141  { GetObject(); SetPart( OBJECT_IND, theObject, myObj ); }
142  void SetMethod(const _AString& theMethod)
143  { GetMethod(); SetPart( METHOD_IND, theMethod, myMeth ); }
144  void SetArg( int index, const _AString& theArg);
145  void RemoveArgs();
146  void Comment();
147  static bool SkipSpaces( const _AString & theSring, int & thePos );
148  static _AString GetWord( const _AString & theSring, int & theStartPos,
149  const bool theForward, const bool dotIsWord = false);
150  static bool IsStudyEntry( const _AString& str );
151  static bool IsID( const _AString& str );
152  static bool IsIDChar( char c )
153  { return ( isalnum( c ) || c == '_' || c == ':' ); }
154  static std::list< _pyID > GetStudyEntries( const _AString& str );
155  void AddDependantCmd( Handle(_pyCommand) cmd, bool prepend = false)
156  { if (prepend) myDependentCmds.push_front( cmd ); else myDependentCmds.push_back( cmd ); }
157  bool SetDependentCmdsAfter() const;
158 
159  bool AddAccessorMethod( _pyID theObjectID, const char* theAcsMethod );
160 
161  DEFINE_STANDARD_RTTIEXT(_pyCommand,Standard_Transient)
162 };
163 
164 // -------------------------------------------------------------------------------------
168 // -------------------------------------------------------------------------------------
169 
171 {
172 protected:
174  Handle(_pyCommand) myCreationCmd;
176  std::list< Handle(_pyCommand) > myArgCmds; // where this obj is used as an argument
178 
179  void setID(const _pyID& theID);
180 public:
181  _pyObject(const Handle(_pyCommand)& theCreationCmd, const _pyID& theID=_pyID());
182  const _pyID& GetID() { return myID.IsEmpty() ? myCreationCmd->GetResultValue() : myID; }
183  static _pyID FatherID(const _pyID & childID);
184  const Handle(_pyCommand)& GetCreationCmd() { return myCreationCmd; }
185  int GetNbCalls() const { return myProcessedCmds.size(); }
186  bool IsInStudy() const { return myIsPublished; }
187  virtual void SetRemovedFromStudy(const bool isRemoved) { myIsPublished = !isRemoved; }
188  void SetCreationCmd( Handle(_pyCommand) cmd ) { myCreationCmd = cmd; }
189  int GetCommandNb() { return myCreationCmd->GetOrderNb(); }
190  void AddProcessedCmd( const Handle(_pyCommand) & cmd )
191  { if (myProcessedCmds.empty() || myProcessedCmds.back()!=cmd) myProcessedCmds.push_back( cmd );}
192  std::list< Handle(_pyCommand) >& GetProcessedCmds() { return myProcessedCmds; }
193  void AddArgCmd( const Handle(_pyCommand) & cmd ) { myArgCmds.push_back( cmd ); }
194  virtual void Process(const Handle(_pyCommand) & cmd) { AddProcessedCmd(cmd); }
195  virtual void Flush() = 0;
196  virtual const char* AccessorMethod() const;
197  virtual bool CanClear();
198  virtual void ClearCommands();
199  virtual void Free() {}
200 
201  DEFINE_STANDARD_RTTIEXT(_pyObject,Standard_Transient)
202 };
203 
204 // -------------------------------------------------------------------------------------
209 // -------------------------------------------------------------------------------------
211 {
212  Handle(_pyMesh) myMesh;
213  Handle(_pyCommand) myLastComputeCmd;
216  ExportedMeshData( const Handle(_pyMesh)& mesh, Handle(_pyCommand) computeCmd):
217  myMesh( mesh ), myLastComputeCmd( computeCmd )
218  {
219  if ( !myLastComputeCmd.IsNull())
220  myLastComputeCmdString = myLastComputeCmd->GetString();
221  }
222 };
223 
224 // -------------------------------------------------------------------------------------
231 // -------------------------------------------------------------------------------------
233 {
235  std::list< _pyStringFamily > _subFams;
236  std::list< _AString > _strings;
237  int isIn( const char* str );
238 public:
239  bool Add( const char* str );
240  bool IsInArgs( Handle( _pyCommand)& cmd, std::list<_AString>& subStr );
241  void Print( int level = 0 );
242 };
243 
244 // -------------------------------------------------------------------------------------
249 // -------------------------------------------------------------------------------------
250 class _pyGen: public _pyObject
251 {
252 public:
253  _pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
254  Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
255  std::set< TCollection_AsciiString >& theRemovedObjIDs,
256  const bool theToKeepAllCommands);
257  Handle(_pyCommand) AddCommand( const _AString& theCommand );
258  void ExchangeCommands( Handle(_pyCommand) theCmd1, Handle(_pyCommand) theCmd2 );
259  void SetCommandAfter ( Handle(_pyCommand) theCmd, Handle(_pyCommand) theAfterCmd );
260  void SetCommandBefore( Handle(_pyCommand) theCmd, Handle(_pyCommand) theBeforeCmd );
261  Handle(_pyCommand)& GetLastCommand();
262  std::list< Handle(_pyCommand) >& GetCommands() { return myCommands; }
263  void PlaceSubmeshAfterItsCreation( Handle(_pyCommand) theCmdUsingSubmesh ) const;
264 
265  _pyID GenerateNewID( const _pyID& theID );
266  bool AddObject( Handle(_pyObject)& theObj );
267  void CheckObjectIsReCreated( Handle(_pyObject)& theObj );
268  void SetProxyObject( const _pyID& theID, Handle(_pyObject)& theObj );
269  Handle(_pyObject) FindObject( const _pyID& theObjID ) const;
270  Handle(_pySubMesh) FindSubMesh( const _pyID& theSubMeshID );
271  Handle(_pyHypothesis) FindHyp( const _pyID& theHypID );
272  Handle(_pyHypothesis) FindAlgo( const _pyID& theGeom, const _pyID& theMesh,
273  const Handle(_pyHypothesis)& theHypothesis);
274 
275  void SetAccessorMethod(const _pyID& theID, const char* theMethod );
276  bool AddMeshAccessorMethod( Handle(_pyCommand) theCmd ) const;
277  bool AddAlgoAccessorMethod( Handle(_pyCommand) theCmd ) const;
278  virtual const char* AccessorMethod() const;
279 
280  bool IsGeomObject(const _pyID& theObjID) const;
281  bool IsNotPublished(const _pyID& theObjID) const;
282  void ObjectCreationRemoved(const _pyID& theObjID);
283 #ifdef USE_STRING_FAMILY
284  void KeepAgrCmds(const _pyID& theObjID) { myKeepAgrCmdsIDs.Add( theObjID.ToCString() ); }
285 #else
286  void KeepAgrCmds(const _pyID& theObjID) { myKeepAgrCmdsIDs.push_back( theObjID ); }
287 #endif
288  bool IsToKeepAllCommands() const { return myToKeepAllCommands; }
289  void AddExportedMesh(const _AString& file, const ExportedMeshData& mesh )
290  { myFile2ExportedMesh[ file ] = mesh; }
292  { return myFile2ExportedMesh[ file ]; }
293 
294  virtual void Process( const Handle(_pyCommand)& theCommand );
295  virtual void Flush();
296  virtual void ClearCommands();
297  virtual void Free();
298 
299  Handle( _pyHypothesisReader ) GetHypothesisReader() const;
300 
301 private:
302  void setNeighbourCommand( Handle(_pyCommand)& theCmd,
303  Handle(_pyCommand)& theOtherCmd,
304  const bool theIsAfter );
305  //void addFilterUser( Handle(_pyCommand)& theCmd, const Handle(_pyObject)& user );
306 
307 private:
308  std::map< _pyID, Handle(_pyMesh) > myMeshes;
312  std::list< Handle(_pyObject) > myOrderedObjects; // to know order of myObjects creation
313 #ifdef USE_STRING_FAMILY
315 #else
316  std::list< _pyID > myKeepAgrCmdsIDs;
317 #endif
318  std::list< Handle(_pyCommand) > myCommands;
320  Resource_DataMapOfAsciiStringAsciiString& myID2AccessorMethod;
321  Resource_DataMapOfAsciiStringAsciiString& myObjectNames;
322  std::set< TCollection_AsciiString >& myRemovedObjIDs;
323  Handle(_pyCommand) myLastCommand;
326  // difference of entry and index of this difference
328  // difference of entry and index of this difference, specific for the SHAPER study
330  std::map< _AString, ExportedMeshData > myFile2ExportedMesh;
331  Handle( _pyHypothesisReader ) myHypReader;
332 
333  DEFINE_STANDARD_RTTIEXT(_pyGen,_pyObject)
334 };
335 
336 // -------------------------------------------------------------------------------------
340 // -------------------------------------------------------------------------------------
341 #define _pyMesh_ACCESS_METHOD "GetMesh()"
342 class _pyMesh: public _pyObject
343 {
344  std::list< Handle(_pyHypothesis) > myHypos;
347  std::list< Handle(_pyGroup) > myGroups;
349  //d::list< Handle(_pyMesh) > myFatherMeshes; // this mesh depends on
350  std::list< Handle(_pyMesh) > myChildMeshes; // depending on me
352  Handle(_pyCommand) myLastComputeCmd;
353 public:
354  _pyMesh(const Handle(_pyCommand) creationCmd);
355  _pyMesh(const Handle(_pyCommand) theCreationCmd, const _pyID & id);
356  const _pyID& GetGeom() { return GetCreationCmd()->GetArg(1); }
357  void AddGroup( const Handle(_pyGroup)& g ) { myGroups.push_back( g ); }
358  void AddEditor( const Handle(_pyMeshEditor)& e ) { myEditors.push_back( e ); }
360  virtual void Process( const Handle(_pyCommand)& theCommand);
361  virtual void Flush();
362  virtual void SetRemovedFromStudy(const bool isRemoved);
363  virtual bool CanClear();
364  virtual void ClearCommands();
365  virtual void Free() { /*myFatherMeshes.clear();*/ myChildMeshes.clear(); }
366  virtual const char* AccessorMethod() const { return _pyMesh_ACCESS_METHOD; }
367 private:
368  void addFatherMesh( const Handle(_pyMesh)& mesh );
369  void addFatherMesh( const _pyID& meshID );
370  static bool NeedMeshAccess( const Handle(_pyCommand)& theCommand );
371  static void AddMeshAccess( const Handle(_pyCommand)& theCommand )
372  { theCommand->SetObject( theCommand->GetObject() + "." _pyMesh_ACCESS_METHOD ); }
373 
374  DEFINE_STANDARD_RTTIEXT(_pyMesh,_pyObject)
375 };
376 #undef _pyMesh_ACCESS_METHOD
377 
378 // -------------------------------------------------------------------------------------
382 // -------------------------------------------------------------------------------------
384 {
387 public:
388  _pyMeshEditor(const Handle(_pyCommand)& theCreationCmd);
389  _pyID GetMesh() const { return myMesh; }
390  virtual void Process( const Handle(_pyCommand)& theCommand);
391  virtual void Flush() {}
392  virtual bool CanClear();
393 
394  DEFINE_STANDARD_RTTIEXT(_pyMeshEditor,_pyObject)
395 };
396 
397 // -------------------------------------------------------------------------------------
401 // -------------------------------------------------------------------------------------
403 {
404  friend class _pyHypothesisReader;
405 protected:
408  struct CreationMethod {
409  _AString myMethod; // method of algo or mesh creating a hyp
410  // myArgNb(i)-th arg of myArgMethods(i) of hyp becomes an i-th arg of myMethod
411  std::vector<_AString> myArgMethods;
412  std::vector<int> myArgNb; // arg nb countered from 1
413  std::vector<_AString> myArgs; // creation arguments
414  };
415  void setCreationArg( const int argNb, const _AString& arg );
416  // a hypothesis can be created by different algos by different methods
417  typedef std::map<_AString, CreationMethod > TType2CrMethod;
419  std::set< _AString > myAccumulativeMethods;
420  CreationMethod* myCurCrMethod; // used for adding to myAlgoType2CreationMethod
424  // maps used to clear commands setting parameters if result of setting is
425  // discarded (e.g. by mesh.Clear())
426  std::map<_AString, std::list<Handle(_pyCommand)> > myMeth2Commands;
429  void rememberCmdOfParameter( const Handle(_pyCommand) & cmd );
430  bool isCmdUsedForCompute( const Handle(_pyCommand) & cmd,
431  _pyCommand::TAddr avoidComputeAddr=NULL ) const;
432 public:
433  _pyHypothesis(const Handle(_pyCommand)& theCreationCmd);
434  void SetConvMethodAndType(const _AString& creationMethod, const _AString& type)
436  myCurCrMethod->myMethod = creationMethod; }
437  void AddArgMethod(const _AString& method, const int argNb = 1)
438  { myCurCrMethod->myArgMethods.push_back( method );
439  myCurCrMethod->myArgNb.push_back( argNb ); }
440  void AddAccumulativeMethod( const _AString& method)
441  { myAccumulativeMethods.insert( method ); }
442  //const TColStd_SequenceOfAsciiString& GetArgs() const { return myArgs; }
443  const std::list<Handle(_pyCommand)>& GetArgCommands() const { return myArgCommands; }
444  void ClearAllCommands();
445  virtual bool IsAlgo() const { return myIsAlgo; }
446  bool IsValid() const { return !myAlgoType2CreationMethod.empty(); }
447  bool IsWrapped() const { return myIsWrapped; }
448  const _pyID & GetGeom() const { return myGeom; }
449  void SetMesh( const _pyID& theMeshId) { if ( myMesh.IsEmpty() ) myMesh = theMeshId; }
450  const _pyID & GetMesh() const { return myMesh; }
451  const _AString& GetAlgoType() const
452  { return myAlgoType2CreationMethod.begin()->first; }
454  { return myAlgoType2CreationMethod.begin()->second.myMethod; }
455  bool CanBeCreatedBy(const _AString& algoType ) const
456  { return myAlgoType2CreationMethod.find( algoType ) != myAlgoType2CreationMethod.end(); }
457  const _AString& GetCreationMethod(const _AString& algoType)
458  { return ( myCurCrMethod = & myAlgoType2CreationMethod[ algoType ])->myMethod; }
459  static Handle(_pyHypothesis) NewHypothesis( const Handle(_pyCommand)& theCreationCmd);
460 
461  virtual bool IsWrappable(const _pyID& theMesh) const;
462  virtual bool Addition2Creation( const Handle(_pyCommand)& theAdditionCmd,
463  const _pyID& theMesh);
464  virtual void Process( const Handle(_pyCommand)& theCommand);
465  virtual void Flush();
466  virtual void Free() { myReferredObjs.clear(); }
467  virtual void Assign( const Handle(_pyHypothesis)& theOther,
468  const _pyID& theMesh );
469  virtual bool CanClear();
470  virtual void ClearCommands();
471  virtual bool GetReferredMeshesAndGeom( std::list< Handle(_pyMesh) >& meshes );
472 
473  void MeshComputed ( const Handle(_pyCommand)& theComputeCommand );
474  void ComputeDiscarded( const Handle(_pyCommand)& theComputeCommand );
475  //void ComputeSaved ( const Handle(_pyCommand)& theComputeCommand );
476 
477 
478  DEFINE_STANDARD_RTTIEXT(_pyHypothesis,_pyObject)
479 };
480 
481 // -------------------------------------------------------------------------------------
485 // -------------------------------------------------------------------------------------
487 {
488 public:
489  _pyAlgorithm(const Handle(_pyCommand)& theCreationCmd);
490  virtual bool Addition2Creation( const Handle(_pyCommand)& theAdditionCmd,
491  const _pyID& theMesh);
492  virtual const char* AccessorMethod() const { return "GetAlgorithm()"; }
493  virtual bool IsWrappable(const _pyID& /*theMesh*/) { return !myIsWrapped; }
494 
495  DEFINE_STANDARD_RTTIEXT(_pyAlgorithm,_pyHypothesis)
496 };
497 
498 // -------------------------------------------------------------------------------------
502 // -------------------------------------------------------------------------------------
504 {
505 public:
506  _pyComplexParamHypo(const Handle(_pyCommand)& theCreationCmd): _pyHypothesis(theCreationCmd) {}
507  virtual void Process( const Handle(_pyCommand)& theCommand);
508  virtual void Flush();
509 
510  DEFINE_STANDARD_RTTIEXT(_pyComplexParamHypo,_pyHypothesis)
511 };
512 DEFINE_STANDARD_HANDLE (_pyComplexParamHypo, _pyHypothesis)
513 
514 // -------------------------------------------------------------------------------------
518 // -------------------------------------------------------------------------------------
520 {
523 public:
524  _pyLayerDistributionHypo(const Handle(_pyCommand)& theCreationCmd, const char* algoMethod):
525  _pyHypothesis(theCreationCmd), myAlgoMethod((char*)algoMethod) {}
526  virtual void Process( const Handle(_pyCommand)& theCommand);
527  virtual void Flush();
528  virtual bool Addition2Creation( const Handle(_pyCommand)& theAdditionCmd,
529  const _pyID& theMesh);
530  virtual void Free() { my1dHyp.Nullify(); }
531 
532  DEFINE_STANDARD_RTTIEXT(_pyLayerDistributionHypo,_pyHypothesis)
533 };
534 DEFINE_STANDARD_HANDLE (_pyLayerDistributionHypo, _pyHypothesis)
535 
536 // -------------------------------------------------------------------------------------
540 // -------------------------------------------------------------------------------------
542 {
543 public:
544  _pyNumberOfSegmentsHyp(const Handle(_pyCommand)& theCrCmd): _pyHypothesis(theCrCmd) {}
545  virtual bool Addition2Creation( const Handle(_pyCommand)& theAdditionCmd,
546  const _pyID& theMesh);
547  void Flush();
548 
549  DEFINE_STANDARD_RTTIEXT(_pyNumberOfSegmentsHyp,_pyHypothesis)
550 };
551 DEFINE_STANDARD_HANDLE (_pyNumberOfSegmentsHyp, _pyHypothesis)
552 
553 // -------------------------------------------------------------------------------------
557 // -------------------------------------------------------------------------------------
559 {
560 public:
562  virtual bool Addition2Creation( const Handle(_pyCommand)& theAdditionCmd,
563  const _pyID& theMesh);
564  DEFINE_STANDARD_RTTIEXT(_pySegmentLengthAroundVertexHyp,_pyHypothesis)
565 };
566 DEFINE_STANDARD_HANDLE (_pySegmentLengthAroundVertexHyp, _pyHypothesis)
567 
568 // -------------------------------------------------------------------------------------
572 // -------------------------------------------------------------------------------------
574 {
575  bool myIgnoreOwnCalls; // not to erase only if this obj is used as argument
576 public:
577  _pySelfEraser(const Handle(_pyCommand)& theCreationCmd);
578  void IgnoreOwnCalls() { myIgnoreOwnCalls = true; }
579  virtual void Flush();
580  virtual bool CanClear();
581  static bool IsAliveCmd( const Handle(_pyCommand)& theCmd );
582 
583  DEFINE_STANDARD_RTTIEXT(_pySelfEraser,_pyObject)
584 };
585 DEFINE_STANDARD_HANDLE (_pySelfEraser, _pyObject)
586 
587 // -------------------------------------------------------------------------------------
591 // -------------------------------------------------------------------------------------
592 class _pySubMesh: public _pyObject
593 {
594  Handle(_pyObject) myCreator;
595  Handle(_pyMesh) myMesh;
596 public:
597  _pySubMesh(const Handle(_pyCommand)& theCreationCmd, bool toKeepAgrCmds=true);
598  virtual void Process( const Handle(_pyCommand)& theCommand);
599  virtual void Flush();
600  virtual Handle(_pyMesh) GetMesh() { return myMesh; }
601  virtual void Free() { myCreator.Nullify(); myMesh.Nullify(); }
602  void SetCreator( const Handle(_pyObject)& theCreator ) { myCreator = theCreator; }
603  static bool CanBeArgOfMethod(const _AString& theMethodName);
604 
605  DEFINE_STANDARD_RTTIEXT(_pySubMesh,_pyObject)
606 };
607 // -------------------------------------------------------------------------------------
611 // -------------------------------------------------------------------------------------
612 class _pyFilter: public _pyObject
613 {
615  //std::list< Handle(_pyObject) > myUsers;
616 public:
617  _pyFilter(const Handle(_pyCommand)& theCreationCmd, const _pyID& newID="");
618  //void AddUser( const Handle(_pyObject)& user) { myUsers.push_back( user ); }
619  virtual void Process( const Handle(_pyCommand)& theCommand);
620  virtual void Flush();
621  //virtual bool CanClear();
622  //virtual void Free() { myUsers.clear(); }
623  const _pyID& GetNewID() const { return myNewID; }
624 
625  DEFINE_STANDARD_RTTIEXT(_pyFilter,_pyObject)
626 };
627 DEFINE_STANDARD_HANDLE (_pyFilter, _pyObject)
628 
629 // -------------------------------------------------------------------------------------
633 // -------------------------------------------------------------------------------------
634 class _pyGroup: public _pySubMesh // use myMesh of _pySubMesh
635 {
636  Handle(_pyFilter) myFilter;
638 public:
639  _pyGroup(const Handle(_pyCommand)& theCreationCmd, const _pyID & id=_pyID());
640  virtual void Process( const Handle(_pyCommand)& theCommand);
641  virtual void Flush();
642  virtual void Free() { myFilter.Nullify(); }
643  virtual bool CanClear();
644  void RemovedWithContents();
645 
646  DEFINE_STANDARD_RTTIEXT(_pyGroup,_pySubMesh)
647 };
648 
649 // -------------------------------------------------------------------------------------
653 // -------------------------------------------------------------------------------------
655 {
657 public:
659  Handle(_pyHypothesis) GetHypothesis(const _AString& hypType,
660  const Handle(_pyCommand)& creationCmd) const;
661  DEFINE_STANDARD_RTTIEXT(_pyHypothesisReader,Standard_Transient)
662 };
663 
664 #endif
Handle(SALOME_InteractiveObject) GeomSelectionTools
Return the first selected Salome Interactive Object (Handle(Salome_InteractiveObject))
Definition: GeomSelectionTools.cxx:97
#define _pyMesh_ACCESS_METHOD
Contains commands concerning mesh substructures.
Definition: SMESH_2smeshpy.hxx:341
TCollection_AsciiString _pyID
Definition: SMESH_2smeshpy.hxx:75
TCollection_AsciiString _AString
Definition: SMESH_2smeshpy.hxx:89
Class representing smesh.Mesh_Algorithm.
Definition: SMESH_2smeshpy.hxx:487
virtual const char * AccessorMethod() const
Return method name giving access to an interaface object wrapped by python class.
Definition: SMESH_2smeshpy.hxx:492
virtual bool IsWrappable(const _pyID &)
Definition: SMESH_2smeshpy.hxx:493
virtual bool Addition2Creation(const Handle(_pyCommand)&theAdditionCmd, const _pyID &theMesh)
Convert the command adding an algorithm to mesh.
Definition: SMESH_2smeshpy.cxx:3617
_pyAlgorithm(const Handle(_pyCommand)&theCreationCmd)
_pyAlgorithm constructor
Definition: SMESH_2smeshpy.cxx:3602
Class operating on a command string looking like ResultValue = Object.Method( Arg1,...
Definition: SMESH_2smeshpy.hxx:99
void SetObject(const _AString &theObject)
Definition: SMESH_2smeshpy.hxx:140
void Clear()
Definition: SMESH_2smeshpy.hxx:124
const _AString & GetObject()
Return substring of python command looking like ResVal = Object.Meth()
Definition: SMESH_2smeshpy.cxx:3763
_AString & GetString()
Definition: SMESH_2smeshpy.hxx:118
void * TAddr
Definition: SMESH_2smeshpy.hxx:121
_pyCommand(const _AString &theString, int theNb=-1)
Definition: SMESH_2smeshpy.hxx:116
void SetMethod(const _AString &theMethod)
Definition: SMESH_2smeshpy.hxx:142
_AString myString
command text
Definition: SMESH_2smeshpy.hxx:101
int GetOrderNb() const
Definition: SMESH_2smeshpy.hxx:119
TColStd_SequenceOfAsciiString myResults
found results
Definition: SMESH_2smeshpy.hxx:104
static bool IsIDChar(char c)
Definition: SMESH_2smeshpy.hxx:152
bool IsEmpty() const
Definition: SMESH_2smeshpy.hxx:125
int GetNbArgs()
Definition: SMESH_2smeshpy.hxx:133
void FindAllArgs()
Definition: SMESH_2smeshpy.hxx:112
_pyCommand()
Definition: SMESH_2smeshpy.hxx:115
int myOrderNb
position within the script
Definition: SMESH_2smeshpy.hxx:100
std::list< Handle(_pyCommand) > myDependentCmds
commands that should follow me in the script
Definition: SMESH_2smeshpy.hxx:106
TColStd_SequenceOfAsciiString myArgs
found arguments
Definition: SMESH_2smeshpy.hxx:103
void AddDependantCmd(Handle(_pyCommand) cmd, bool prepend=false)
Definition: SMESH_2smeshpy.hxx:155
TAddr GetAddress() const
Definition: SMESH_2smeshpy.hxx:122
TColStd_SequenceOfInteger myBegPos
where myRes, myObj, ...
Definition: SMESH_2smeshpy.hxx:105
void SetOrderNb(int theNb)
Definition: SMESH_2smeshpy.hxx:120
bool MethodStartsFrom(const _AString &beg)
Definition: SMESH_2smeshpy.hxx:136
void SetResultValue(const _AString &theResult)
Definition: SMESH_2smeshpy.hxx:138
int Length() const
Definition: SMESH_2smeshpy.hxx:123
_AString myMeth
found parts of command
Definition: SMESH_2smeshpy.hxx:102
Class for hypotheses having several parameters modified by one method.
Definition: SMESH_2smeshpy.hxx:504
_pyComplexParamHypo(const Handle(_pyCommand)&theCreationCmd)
Definition: SMESH_2smeshpy.hxx:506
virtual void Flush()
Clear SetObjectEntry() as it is called by methods of Mesh_Segment.
Definition: SMESH_2smeshpy.cxx:3301
virtual void Process(const Handle(_pyCommand)&theCommand)
Remember hypothesis parameter values.
Definition: SMESH_2smeshpy.cxx:3234
A filter sets a human readable name to self.
Definition: SMESH_2smeshpy.hxx:613
virtual void Flush()
Set new filter name to the creation command and to myArgCmds.
Definition: SMESH_2smeshpy.cxx:4855
_pyID myNewID
Definition: SMESH_2smeshpy.hxx:614
virtual void Process(const Handle(_pyCommand)&theCommand)
To convert creation of a filter by criteria and to replace an old name by a new one.
Definition: SMESH_2smeshpy.cxx:4808
_pyFilter(const Handle(_pyCommand)&theCreationCmd, const _pyID &newID="")
Constructor of _pyFilter.
Definition: SMESH_2smeshpy.cxx:4794
const _pyID & GetNewID() const
Definition: SMESH_2smeshpy.hxx:623
_pyID myMesh
Definition: SMESH_2smeshpy.hxx:614
Class corresponding to SMESH_Gen.
Definition: SMESH_2smeshpy.hxx:251
Handle(_pyHypothesis) FindAlgo(const _pyID &theGeom
bool AddAlgoAccessorMethod(Handle(_pyCommand) theCmd) const
Add access method to algo that is an object or an argument.
Definition: SMESH_2smeshpy.cxx:1360
const _pyID const Handle(_pyHypothesis) &theHypothesis)
Handle(_pyHypothesis) FindHyp(const _pyID &theHypID)
int myNbFilters
Definition: SMESH_2smeshpy.hxx:324
virtual void ClearCommands()
Clean commands of removed objects depending on myIsPublished flag.
Definition: SMESH_2smeshpy.cxx:1277
Handle(_pyCommand) myLastCommand
int myGeomIDNb
Definition: SMESH_2smeshpy.hxx:327
bool IsGeomObject(const _pyID &theObjID) const
void KeepAgrCmds(const _pyID &theObjID)
Definition: SMESH_2smeshpy.hxx:284
virtual void Process(const Handle(_pyCommand)&theCommand)
Convert the command or remember it for later conversion.
Definition: SMESH_2smeshpy.cxx:1008
bool IsToKeepAllCommands() const
Definition: SMESH_2smeshpy.hxx:288
std::list< Handle(_pyCommand) > & GetCommands()
Definition: SMESH_2smeshpy.hxx:262
void ExchangeCommands(Handle(_pyCommand) theCmd1, Handle(_pyCommand) theCmd2)
Change order of commands in the script.
Definition: SMESH_2smeshpy.cxx:1441
Handle(_pyHypothesisReader) myHypReader
virtual const char * AccessorMethod() const
name of SMESH_Gen in smeshBuilder.py
Definition: SMESH_2smeshpy.cxx:626
void SetProxyObject(const _pyID &theID, Handle(_pyObject)&theObj)
Re-register an object with other ID to make it Process() commands of other object having this ID.
Definition: SMESH_2smeshpy.cxx:1660
int myShaperIDNb
Definition: SMESH_2smeshpy.hxx:329
std::map< _pyID, Handle(_pyObject) > myObjects
Definition: SMESH_2smeshpy.hxx:311
Handle(_pyCommand) AddCommand(const _AString &theCommand)
std::list< Handle(_pyObject) > myOrderedObjects
Definition: SMESH_2smeshpy.hxx:312
_pyGen(Resource_DataMapOfAsciiStringAsciiString &theEntry2AccessorMethod, Resource_DataMapOfAsciiStringAsciiString &theObjectNames, std::set< TCollection_AsciiString > &theRemovedObjIDs, const bool theToKeepAllCommands)
_pyGen constructor
Definition: SMESH_2smeshpy.cxx:565
std::set< TCollection_AsciiString > & myRemovedObjIDs
Definition: SMESH_2smeshpy.hxx:322
void CheckObjectIsReCreated(Handle(_pyObject)&theObj)
Erases an existing object with the same ID.
Definition: SMESH_2smeshpy.cxx:1622
bool myToKeepAllCommands
Definition: SMESH_2smeshpy.hxx:325
_pyID GenerateNewID(const _pyID &theID)
Generated new ID for object and assign with existing name.
Definition: SMESH_2smeshpy.cxx:1570
void ObjectCreationRemoved(const _pyID &theObjID)
void PlaceSubmeshAfterItsCreation(Handle(_pyCommand) theCmdUsingSubmesh) const
Prevent moving a command creating a sub-mesh to the end of the script if the sub-mesh is used in theC...
Definition: SMESH_2smeshpy.cxx:1250
bool AddObject(Handle(_pyObject)&theObj)
Stores theObj in myObjects.
Definition: SMESH_2smeshpy.cxx:1592
Handle(_pyHypothesisReader) GetHypothesisReader() const
int myShaperIDIndex
Definition: SMESH_2smeshpy.hxx:329
void setNeighbourCommand(Handle(_pyCommand)&theCmd, Handle(_pyCommand)&theOtherCmd, const bool theIsAfter)
Set one command before or after the other.
Definition: SMESH_2smeshpy.cxx:1492
ExportedMeshData & FindExportedMesh(const _AString &file)
Definition: SMESH_2smeshpy.hxx:291
_pyStringFamily myKeepAgrCmdsIDs
Definition: SMESH_2smeshpy.hxx:314
void SetAccessorMethod(const _pyID &theID, const char *theMethod)
Set method to access to object wrapped with python class.
Definition: SMESH_2smeshpy.cxx:1558
std::list< Handle(_pyCommand) > myCommands
Definition: SMESH_2smeshpy.hxx:318
std::map< _pyID, Handle(_pyMeshEditor) > myMeshEditors
Definition: SMESH_2smeshpy.hxx:309
Resource_DataMapOfAsciiStringAsciiString & myID2AccessorMethod
Definition: SMESH_2smeshpy.hxx:320
int myNbCommands
Definition: SMESH_2smeshpy.hxx:319
void AddExportedMesh(const _AString &file, const ExportedMeshData &mesh)
Definition: SMESH_2smeshpy.hxx:289
Handle(_pySubMesh) FindSubMesh(const _pyID &theSubMeshID)
virtual void Flush()
Convert the remembered commands.
Definition: SMESH_2smeshpy.cxx:1181
bool AddMeshAccessorMethod(Handle(_pyCommand) theCmd) const
Add access method to mesh that is an argument.
Definition: SMESH_2smeshpy.cxx:1341
Handle(_pyCommand) &GetLastCommand()
int myGeomIDIndex
Definition: SMESH_2smeshpy.hxx:327
std::map< _pyID, Handle(_pyHypothesis) > myHypos
Definition: SMESH_2smeshpy.hxx:310
void SetCommandAfter(Handle(_pyCommand) theCmd, Handle(_pyCommand) theAfterCmd)
Set one command after the other.
Definition: SMESH_2smeshpy.cxx:1466
virtual void Free()
Release mutual handles of objects.
Definition: SMESH_2smeshpy.cxx:1305
void SetCommandBefore(Handle(_pyCommand) theCmd, Handle(_pyCommand) theBeforeCmd)
Set one command before the other.
Definition: SMESH_2smeshpy.cxx:1479
const _pyID & theMesh
Definition: SMESH_2smeshpy.hxx:272
bool IsNotPublished(const _pyID &theObjID) const
std::map< _AString, ExportedMeshData > myFile2ExportedMesh
Definition: SMESH_2smeshpy.hxx:330
std::map< _pyID, Handle(_pyMesh) > myMeshes
Definition: SMESH_2smeshpy.hxx:308
Resource_DataMapOfAsciiStringAsciiString & myObjectNames
Definition: SMESH_2smeshpy.hxx:321
Handle(_pyObject) FindObject(const _pyID &theObjID) const
To convert creation of a group by filter.
Definition: SMESH_2smeshpy.hxx:635
virtual void Free()
Definition: SMESH_2smeshpy.hxx:642
Handle(_pyFilter) myFilter
bool myCanClearCreationCmd
Definition: SMESH_2smeshpy.hxx:637
Class reading _pyHypothesis'es from resource files of mesher Plugins.
Definition: SMESH_2smeshpy.hxx:655
Handle(_pyHypothesis) GetHypothesis(const _AString &hypType
_pyHypothesisReader()
Reads _pyHypothesis'es from resource files of mesher Plugins.
Definition: SMESH_2smeshpy.cxx:4904
const Handle(_pyCommand) &creationCmd) const
std::map< _AString, Handle(_pyHypothesis)> myType2Hyp
Definition: SMESH_2smeshpy.hxx:656
Root class for hypothesis.
Definition: SMESH_2smeshpy.hxx:403
virtual bool GetReferredMeshesAndGeom(std::list< Handle(_pyMesh) > &meshes)
Find arguments that are objects like mesh, group, geometry.
Definition: SMESH_2smeshpy.cxx:3043
const _AString & GetAlgoType() const
Definition: SMESH_2smeshpy.hxx:451
const _pyID & GetMesh() const
Definition: SMESH_2smeshpy.hxx:450
virtual bool Addition2Creation(const Handle(_pyCommand)&theAdditionCmd, const _pyID &theMesh)
Convert the command adding a hypothesis to mesh into a smesh command.
Definition: SMESH_2smeshpy.cxx:2819
const _AString & GetAlgoCreationMethod() const
Definition: SMESH_2smeshpy.hxx:453
void setCreationArg(const int argNb, const _AString &arg)
Sets an argNb-th argument of current creation command.
Definition: SMESH_2smeshpy.cxx:3213
void MeshComputed(const Handle(_pyCommand)&theComputeCommand)
Save commands setting parameters as they are used for a mesh computation.
Definition: SMESH_2smeshpy.cxx:3159
bool myIsWrapped
Definition: SMESH_2smeshpy.hxx:406
void ClearAllCommands()
clear creation, arg and unknown commands
Definition: SMESH_2smeshpy.cxx:2944
_pyID myMesh
Definition: SMESH_2smeshpy.hxx:407
void AddAccumulativeMethod(const _AString &method)
Definition: SMESH_2smeshpy.hxx:440
void ComputeDiscarded(const Handle(_pyCommand)&theComputeCommand)
Clear commands setting parameters as a mesh computed using them is cleared.
Definition: SMESH_2smeshpy.cxx:3175
bool IsValid() const
Definition: SMESH_2smeshpy.hxx:446
std::map< _AString, std::list< Handle(_pyCommand)> > myMeth2Commands
Definition: SMESH_2smeshpy.hxx:426
bool myIsAlgo
Definition: SMESH_2smeshpy.hxx:406
void rememberCmdOfParameter(const Handle(_pyCommand) &cmd)
Remember theCommand setting a parameter.
Definition: SMESH_2smeshpy.cxx:3097
static Handle(_pyHypothesis) NewHypothesis(const Handle(_pyCommand) &theCreationCmd)
virtual void Process(const Handle(_pyCommand)&theCommand)
Remember hypothesis parameter values.
Definition: SMESH_2smeshpy.cxx:2882
virtual void Assign(const Handle(_pyHypothesis)&theOther, const _pyID &theMesh)
Assign fields of theOther to me except myIsWrapped.
Definition: SMESH_2smeshpy.cxx:2962
bool IsWrapped() const
Definition: SMESH_2smeshpy.hxx:447
void AddArgMethod(const _AString &method, const int argNb=1)
Definition: SMESH_2smeshpy.hxx:437
CreationMethod * myCurCrMethod
Definition: SMESH_2smeshpy.hxx:420
virtual void Free()
Definition: SMESH_2smeshpy.hxx:466
std::list< Handle(_pyObject) > myReferredObjs
Definition: SMESH_2smeshpy.hxx:423
std::map< _AString, CreationMethod > TType2CrMethod
Definition: SMESH_2smeshpy.hxx:417
std::list< Handle(_pyCommand)> myArgCommands
Definition: SMESH_2smeshpy.hxx:421
virtual void Flush()
Finish conversion.
Definition: SMESH_2smeshpy.cxx:2914
_pyID myGeom
Definition: SMESH_2smeshpy.hxx:407
std::map< _pyCommand::TAddr, std::list< Handle(_pyCommand) > > myComputeAddr2Cmds
Definition: SMESH_2smeshpy.hxx:427
std::list< Handle(_pyCommand) > myComputeCmds
Definition: SMESH_2smeshpy.hxx:428
_pyHypothesis(const Handle(_pyCommand)&theCreationCmd)
_pyHypothesis constructor
Definition: SMESH_2smeshpy.cxx:2714
std::list< Handle(_pyCommand)> myUnusedCommands
Definition: SMESH_2smeshpy.hxx:422
virtual void ClearCommands()
Clear my commands depending on usage by meshes.
Definition: SMESH_2smeshpy.cxx:3002
const _AString & GetCreationMethod(const _AString &algoType)
Definition: SMESH_2smeshpy.hxx:457
virtual bool IsAlgo() const
Definition: SMESH_2smeshpy.hxx:445
void SetMesh(const _pyID &theMeshId)
Definition: SMESH_2smeshpy.hxx:449
const std::list< Handle(_pyCommand)> & GetArgCommands() const
Definition: SMESH_2smeshpy.hxx:443
std::set< _AString > myAccumulativeMethods
Definition: SMESH_2smeshpy.hxx:419
const _pyID & GetGeom() const
Definition: SMESH_2smeshpy.hxx:448
virtual bool CanClear()
Analyze my erasability depending on myReferredObjs.
Definition: SMESH_2smeshpy.cxx:2983
virtual bool IsWrappable(const _pyID &theMesh) const
Returns true if addition of this hypothesis to a given mesh can be wrapped into hypothesis creation.
Definition: SMESH_2smeshpy.cxx:2799
void SetConvMethodAndType(const _AString &creationMethod, const _AString &type)
Definition: SMESH_2smeshpy.hxx:434
bool CanBeCreatedBy(const _AString &algoType) const
Definition: SMESH_2smeshpy.hxx:455
TType2CrMethod myAlgoType2CreationMethod
Definition: SMESH_2smeshpy.hxx:418
bool isCmdUsedForCompute(const Handle(_pyCommand) &cmd, _pyCommand::TAddr avoidComputeAddr=NULL) const
Return true if a setting parameter command ha been used to compute mesh.
Definition: SMESH_2smeshpy.cxx:3138
Class for LayerDistribution hypothesis conversion.
Definition: SMESH_2smeshpy.hxx:520
virtual void Free()
Definition: SMESH_2smeshpy.hxx:530
_AString myAlgoMethod
Definition: SMESH_2smeshpy.hxx:522
_pyLayerDistributionHypo(const Handle(_pyCommand)&theCreationCmd, const char *algoMethod)
Definition: SMESH_2smeshpy.hxx:524
Handle(_pyHypothesis) my1dHyp
MeshEditor convert its commands to ones of mesh.
Definition: SMESH_2smeshpy.hxx:384
_pyID GetMesh() const
Definition: SMESH_2smeshpy.hxx:389
virtual bool CanClear()
Return true if my mesh can be removed.
Definition: SMESH_2smeshpy.cxx:2701
_AString myCreationCmdStr
Definition: SMESH_2smeshpy.hxx:386
_pyMeshEditor(const Handle(_pyCommand)&theCreationCmd)
MeshEditor convert its commands to ones of mesh.
Definition: SMESH_2smeshpy.cxx:2478
virtual void Flush()
Definition: SMESH_2smeshpy.hxx:391
_pyID myMesh
Definition: SMESH_2smeshpy.hxx:385
virtual void Process(const Handle(_pyCommand)&theCommand)
convert its commands to ones of mesh
Definition: SMESH_2smeshpy.cxx:2496
Definition: SMESH_2smeshpy.hxx:343
Handle(_pyCommand) myLastComputeCmd
static bool NeedMeshAccess(const Handle(_pyCommand)&theCommand)
Return True if addition of accesor method is needed.
Definition: SMESH_2smeshpy.cxx:2203
bool IsNotGeomPublished()
Definition: SMESH_2smeshpy.hxx:359
virtual void Free()
Definition: SMESH_2smeshpy.hxx:365
virtual void SetRemovedFromStudy(const bool isRemoved)
Sets myIsPublished of me and of all objects depending on me.
Definition: SMESH_2smeshpy.cxx:2367
std::list< Handle(_pyCommand) > myNotConvertedAddHypCmds
Definition: SMESH_2smeshpy.hxx:345
_pyMesh(const Handle(_pyCommand) creationCmd)
std::list< Handle(_pyMeshEditor)> myEditors
Definition: SMESH_2smeshpy.hxx:348
std::list< Handle(_pySubMesh) > mySubmeshes
Definition: SMESH_2smeshpy.hxx:346
virtual void ClearCommands()
Clear my commands and commands of mesh editor.
Definition: SMESH_2smeshpy.cxx:2413
std::list< Handle(_pyGroup) > myGroups
Definition: SMESH_2smeshpy.hxx:347
std::list< Handle(_pyMesh) > myChildMeshes
Definition: SMESH_2smeshpy.hxx:350
void AddGroup(const Handle(_pyGroup)&g)
Definition: SMESH_2smeshpy.hxx:357
void AddEditor(const Handle(_pyMeshEditor)&e)
Definition: SMESH_2smeshpy.hxx:358
const _pyID & GetGeom()
Definition: SMESH_2smeshpy.hxx:356
bool myGeomNotInStudy
Definition: SMESH_2smeshpy.hxx:351
static void AddMeshAccess(const Handle(_pyCommand)&theCommand)
Definition: SMESH_2smeshpy.hxx:371
std::list< Handle(_pyCommand) > myAddHypCmds
Definition: SMESH_2smeshpy.hxx:345
virtual const char * AccessorMethod() const
Return method name giving access to an interaface object wrapped by python class.
Definition: SMESH_2smeshpy.hxx:366
virtual void Process(const Handle(_pyCommand)&theCommand)
Convert an IDL API command of SMESH::SMESH_Mesh to a method call of python Mesh.
Definition: SMESH_2smeshpy.cxx:1853
virtual bool CanClear()
Return true if none of myChildMeshes is in study.
Definition: SMESH_2smeshpy.cxx:2394
virtual void Flush()
Convert creation and addition of all algos and hypos.
Definition: SMESH_2smeshpy.cxx:2238
void addFatherMesh(const Handle(_pyMesh)&mesh)
Add a father mesh.
Definition: SMESH_2smeshpy.cxx:2460
std::list< Handle(_pyHypothesis) > myHypos
Definition: SMESH_2smeshpy.hxx:344
Class representing NumberOfSegments hypothesis.
Definition: SMESH_2smeshpy.hxx:542
_pyNumberOfSegmentsHyp(const Handle(_pyCommand)&theCrCmd)
Definition: SMESH_2smeshpy.hxx:544
Root of all objects.
Definition: SMESH_2smeshpy.hxx:171
virtual void Flush()=0
std::list< Handle(_pyCommand) > myArgCmds
Definition: SMESH_2smeshpy.hxx:176
const Handle(_pyCommand) &GetCreationCmd()
Definition: SMESH_2smeshpy.hxx:184
std::list< Handle(_pyCommand) > myProcessedCmds
Definition: SMESH_2smeshpy.hxx:175
static _pyID FatherID(const _pyID &childID)
Return ID of a father.
Definition: SMESH_2smeshpy.cxx:4389
virtual void SetRemovedFromStudy(const bool isRemoved)
Definition: SMESH_2smeshpy.hxx:187
Handle(_pyCommand) myCreationCmd
virtual const char * AccessorMethod() const
Return method name giving access to an interaface object wrapped by python class.
Definition: SMESH_2smeshpy.cxx:4379
virtual void Process(const Handle(_pyCommand) &cmd)
Definition: SMESH_2smeshpy.hxx:194
void AddArgCmd(const Handle(_pyCommand) &cmd)
Definition: SMESH_2smeshpy.hxx:193
virtual void Free()
Definition: SMESH_2smeshpy.hxx:199
virtual void ClearCommands()
Clear myCreationCmd and myProcessedCmds.
Definition: SMESH_2smeshpy.cxx:4359
const _pyID & GetID()
Definition: SMESH_2smeshpy.hxx:182
bool myIsPublished
Definition: SMESH_2smeshpy.hxx:177
virtual bool CanClear()
Return true if all my users can be cleared.
Definition: SMESH_2smeshpy.cxx:4885
void setID(const _pyID &theID)
Set up myID and myIsPublished.
Definition: SMESH_2smeshpy.cxx:4347
_pyID myID
Definition: SMESH_2smeshpy.hxx:173
int GetNbCalls() const
Definition: SMESH_2smeshpy.hxx:185
std::list< Handle(_pyCommand) > & GetProcessedCmds()
Definition: SMESH_2smeshpy.hxx:192
int GetCommandNb()
Definition: SMESH_2smeshpy.hxx:189
void AddProcessedCmd(const Handle(_pyCommand) &cmd)
Definition: SMESH_2smeshpy.hxx:190
bool IsInStudy() const
Definition: SMESH_2smeshpy.hxx:186
void SetCreationCmd(Handle(_pyCommand) cmd)
Definition: SMESH_2smeshpy.hxx:188
_pyObject(const Handle(_pyCommand)&theCreationCmd, const _pyID &theID=_pyID())
Creates pyObject.
Definition: SMESH_2smeshpy.cxx:4335
Class representing SegmentLengthAroundVertex hypothesis.
Definition: SMESH_2smeshpy.hxx:559
_pySegmentLengthAroundVertexHyp(const Handle(_pyCommand)&theCrCmd)
Definition: SMESH_2smeshpy.hxx:561
SelfEraser erases creation command if no more it's commands invoked.
Definition: SMESH_2smeshpy.hxx:574
void IgnoreOwnCalls()
Definition: SMESH_2smeshpy.hxx:578
bool myIgnoreOwnCalls
Definition: SMESH_2smeshpy.hxx:575
A container of strings groupped by prefix.
Definition: SMESH_2smeshpy.hxx:233
void Print(int level=0)
DEBUG.
Definition: SMESH_2smeshpy.cxx:5255
std::list< _AString > _strings
Definition: SMESH_2smeshpy.hxx:236
bool IsInArgs(Handle(_pyCommand)&cmd, std::list< _AString > &subStr)
Finds an object ID in the command.
Definition: SMESH_2smeshpy.cxx:5160
std::list< _pyStringFamily > _subFams
Definition: SMESH_2smeshpy.hxx:235
bool Add(const char *str)
_AString _prefix
Definition: SMESH_2smeshpy.hxx:234
int isIn(const char *str)
Return remainder length of the object ID after my _prefix.
Definition: SMESH_2smeshpy.cxx:5206
SubMesh creation can be moved to the end of engine commands.
Definition: SMESH_2smeshpy.hxx:593
Handle(_pyObject) myCreator
virtual Handle(_pyMesh) GetMesh()
Definition: SMESH_2smeshpy.hxx:600
Handle(_pyMesh) myMesh
virtual void Free()
Definition: SMESH_2smeshpy.hxx:601
void SetCreator(const Handle(_pyObject)&theCreator)
Definition: SMESH_2smeshpy.hxx:602
Data used to restore cleared Compute() command of an exported mesh when an imported mesh is created.
Definition: SMESH_2smeshpy.hxx:211
Handle(_pyMesh) myMesh
ExportedMeshData()
Definition: SMESH_2smeshpy.hxx:215
ExportedMeshData(const Handle(_pyMesh)&mesh, Handle(_pyCommand) computeCmd)
Definition: SMESH_2smeshpy.hxx:216
_AString myLastComputeCmdString
Definition: SMESH_2smeshpy.hxx:214
Handle(_pyCommand) myLastComputeCmd
Definition: SMESH_2smeshpy.hxx:408
std::vector< _AString > myArgMethods
Definition: SMESH_2smeshpy.hxx:411
std::vector< _AString > myArgs
Definition: SMESH_2smeshpy.hxx:413
std::vector< int > myArgNb
Definition: SMESH_2smeshpy.hxx:412
_AString myMethod
Definition: SMESH_2smeshpy.hxx:409