+// -------------------------------------------------------------------------------------
+/*!
+ * \brief SelfEraser erases creation command if no more it's commands invoked
+ */
+// -------------------------------------------------------------------------------------
+class _pySelfEraser: public _pyObject
+{
+ bool myIgnoreOwnCalls; // not to erase only if this obj is used as argument
+public:
+ _pySelfEraser(const Handle(_pyCommand)& theCreationCmd);
+ void IgnoreOwnCalls() { myIgnoreOwnCalls = true; }
+ virtual void Flush();
+ virtual bool CanClear();
+ static bool IsAliveCmd( const Handle(_pyCommand)& theCmd );
+
+ DEFINE_STANDARD_RTTI (_pySelfEraser)
+};
+DEFINE_STANDARD_HANDLE (_pySelfEraser, _pyObject);
+
+// -------------------------------------------------------------------------------------
+/*!
+ * \brief SubMesh creation can be moved to the end of engine commands
+ */
+// -------------------------------------------------------------------------------------
+class _pySubMesh: public _pyObject
+{
+ Handle(_pyObject) myCreator;
+ Handle(_pyMesh) myMesh;
+public:
+ _pySubMesh(const Handle(_pyCommand)& theCreationCmd, bool toKeepAgrCmds=true);
+ virtual void Process( const Handle(_pyCommand)& theCommand);
+ virtual void Flush();
+ 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)
+};
+// -------------------------------------------------------------------------------------
+/*!
+ * \brief A filter sets a human readable name to self
+ */
+// -------------------------------------------------------------------------------------
+class _pyFilter: public _pyObject
+{
+ _pyID myNewID, myMesh;
+ //std::list< Handle(_pyObject) > myUsers;
+public:
+ _pyFilter(const Handle(_pyCommand)& theCreationCmd, const _pyID& newID="");
+ //void AddUser( const Handle(_pyObject)& user) { myUsers.push_back( user ); }
+ virtual void Process( const Handle(_pyCommand)& theCommand);
+ virtual void Flush();
+ //virtual bool CanClear();
+ //virtual void Free() { myUsers.clear(); }
+ const _pyID& GetNewID() const { return myNewID; }
+
+ DEFINE_STANDARD_RTTI (_pyFilter)
+};
+DEFINE_STANDARD_HANDLE (_pyFilter, _pyObject);
+
+// -------------------------------------------------------------------------------------
+/*!
+ * \brief To convert creation of a group by filter
+ */
+// -------------------------------------------------------------------------------------
+class _pyGroup: public _pySubMesh // use myMesh of _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 Free() { myFilter.Nullify(); }
+ virtual bool CanClear();
+ void RemovedWithContents();
+
+ DEFINE_STANDARD_RTTI (_pyGroup)
+};
+
+// -------------------------------------------------------------------------------------
+/*!
+ * \brief Class reading _pyHypothesis'es from resource files of mesher Plugins
+ */
+// -------------------------------------------------------------------------------------
+class _pyHypothesisReader: public Standard_Transient
+{
+ std::map<_AString, Handle(_pyHypothesis)> myType2Hyp;
+public:
+ _pyHypothesisReader();
+ Handle(_pyHypothesis) GetHypothesis(const _AString& hypType,
+ const Handle(_pyCommand)& creationCmd) const;
+ DEFINE_STANDARD_RTTI (_pyHypothesisReader)
+};
+