Back to index

salome-smesh  6.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
_pySelfEraser Class Reference

SelfEraser erases creation command if no more it's commands invoked. More...

#include <SMESH_2smeshpy.hxx>

Inheritance diagram for _pySelfEraser:
Inheritance graph
[legend]
Collaboration diagram for _pySelfEraser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 _pySelfEraser (const Handle(_pyCommand)&theCreationCmd)
virtual void Flush ()
 SelfEraser erases creation command if no more it's commands invoked.
const Handle (_pyCommand)&GetCreationCmd()
const _pyIDGetID ()
int GetNbCalls () const
bool IsInStudy () const
virtual void SetRemovedFromStudy (const bool isRemoved)
void SetCreationCmd (Handle(_pyCommand) cmd)
int GetCommandNb ()
void AddProcessedCmd (const Handle(_pyCommand)&cmd)
std::list< Handle(_pyCommand) > & GetProcessedCmds ()
virtual void Process (const Handle(_pyCommand)&cmd)
virtual const char * AccessorMethod () const
 Return method name giving access to an interaface object wrapped by python class.
virtual bool CanClear ()
virtual void ClearCommands ()
 Clear myCreationCmd and myProcessedCmds.
virtual void Free ()

Static Public Member Functions

static _pyID FatherID (const _pyID &childID)
 Return ID of a father.

Protected Member Functions

 Handle (_pyCommand) myCreationCmd
void setID (const _pyID &theID)
 Set up myID and myIsPublished.

Protected Attributes

_pyID myID
std::list< Handle(_pyCommand) > myProcessedCmds
bool myIsPublished

Detailed Description

SelfEraser erases creation command if no more it's commands invoked.

Definition at line 522 of file SMESH_2smeshpy.hxx.


Constructor & Destructor Documentation

_pySelfEraser::_pySelfEraser ( const Handle(_pyCommand)&  theCreationCmd) [inline]

Definition at line 525 of file SMESH_2smeshpy.hxx.

    :_pyObject(theCreationCmd) { myIsPublished = true; }

Member Function Documentation

const char * _pyObject::AccessorMethod ( ) const [virtual, inherited]

Return method name giving access to an interaface object wrapped by python class.

Return values:
constchar* - method name

Reimplemented in _pyAlgorithm, _pyMesh, and _pyGen.

Definition at line 3623 of file SMESH_2smeshpy.cxx.

{
  return 0;
}
void _pyObject::AddProcessedCmd ( const Handle(_pyCommand)&  cmd) [inline, inherited]

Definition at line 181 of file SMESH_2smeshpy.hxx.

  { if (myProcessedCmds.empty() || myProcessedCmds.back()!=cmd) myProcessedCmds.push_back( cmd );}

Here is the caller graph for this function:

virtual bool _pyObject::CanClear ( ) [inline, virtual, inherited]

Reimplemented in _pyFilter, _pyHypothesis, _pyMeshEditor, and _pyMesh.

Definition at line 187 of file SMESH_2smeshpy.hxx.

{ return !myIsPublished; }

Here is the caller graph for this function:

void _pyObject::ClearCommands ( ) [virtual, inherited]

Clear myCreationCmd and myProcessedCmds.

Reimplemented in _pyHypothesis, _pyMesh, and _pyGen.

Definition at line 3603 of file SMESH_2smeshpy.cxx.

{
  if ( !CanClear() )
    return;

  if ( !myCreationCmd.IsNull() )
    myCreationCmd->Clear();

  list< Handle(_pyCommand) >::iterator cmd = myProcessedCmds.begin();
  for ( ; cmd != myProcessedCmds.end(); ++cmd )
    (*cmd)->Clear();
}

Here is the call graph for this function:

_pyID _pyObject::FatherID ( const _pyID childID) [static, inherited]

Return ID of a father.

Definition at line 3633 of file SMESH_2smeshpy.cxx.

{
  int colPos = childID.SearchFromEnd(':');
  if ( colPos > 0 )
    return childID.SubString( 1, colPos-1 );
  return "";
}

Here is the caller graph for this function:

void _pySelfEraser::Flush ( ) [virtual]

SelfEraser erases creation command if no more it's commands invoked.

Implements _pyObject.

Definition at line 3647 of file SMESH_2smeshpy.cxx.

{
  if ( GetNbCalls() == 0 )
    GetCreationCmd()->Clear();
}

Here is the call graph for this function:

virtual void _pyObject::Free ( ) [inline, virtual, inherited]

Reimplemented in _pyGroup, _pyFilter, _pySubMesh, _pyLayerDistributionHypo, _pyHypothesis, _pyMesh, and _pyGen.

Definition at line 189 of file SMESH_2smeshpy.hxx.

{}
int _pyObject::GetCommandNb ( ) [inline, inherited]

Definition at line 180 of file SMESH_2smeshpy.hxx.

{ return myCreationCmd->GetOrderNb(); }
const _pyID& _pyObject::GetID ( ) [inline, inherited]

Definition at line 173 of file SMESH_2smeshpy.hxx.

{ return myID.IsEmpty() ? myCreationCmd->GetResultValue() : myID; }

Here is the call graph for this function:

Here is the caller graph for this function:

int _pyObject::GetNbCalls ( ) const [inline, inherited]

Definition at line 176 of file SMESH_2smeshpy.hxx.

{ return myProcessedCmds.size(); }

Here is the caller graph for this function:

std::list< Handle(_pyCommand) >& _pyObject::GetProcessedCmds ( ) [inline, inherited]

Definition at line 183 of file SMESH_2smeshpy.hxx.

{ return myProcessedCmds; }
_pyObject::Handle ( _pyCommand  ) [protected, inherited]

Reimplemented in _pyMesh, _pyGen, and _pyGen.

Here is the caller graph for this function:

const _pyObject::Handle ( _pyCommand  ) [inline, inherited]

Reimplemented in _pyMesh, _pyGen, and _pyGen.

Definition at line 175 of file SMESH_2smeshpy.hxx.

{ return myCreationCmd; }
bool _pyObject::IsInStudy ( ) const [inline, inherited]

Definition at line 177 of file SMESH_2smeshpy.hxx.

{ return myIsPublished; }

Here is the caller graph for this function:

virtual void _pyObject::Process ( const Handle(_pyCommand)&  cmd) [inline, virtual, inherited]

Reimplemented in _pyGroup, _pyFilter, _pySubMesh, _pyLayerDistributionHypo, _pyComplexParamHypo, _pyHypothesis, _pyMeshEditor, _pyMesh, and _pyGen.

Definition at line 184 of file SMESH_2smeshpy.hxx.

{ AddProcessedCmd(cmd); }

Here is the call graph for this function:

Here is the caller graph for this function:

void _pyObject::SetCreationCmd ( Handle(_pyCommand cmd) [inline, inherited]

Definition at line 179 of file SMESH_2smeshpy.hxx.

{ myCreationCmd = cmd; }

Here is the caller graph for this function:

void _pyObject::setID ( const _pyID theID) [protected, inherited]

Set up myID and myIsPublished.

Definition at line 3591 of file SMESH_2smeshpy.cxx.

{
  myID = theID;
  myIsPublished = !theGen->IsNotPublished( GetID() );
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void _pyObject::SetRemovedFromStudy ( const bool  isRemoved) [inline, virtual, inherited]

Reimplemented in _pyMesh.

Definition at line 178 of file SMESH_2smeshpy.hxx.

{ myIsPublished = !isRemoved; }

Member Data Documentation

_pyID _pyObject::myID [protected, inherited]

Definition at line 165 of file SMESH_2smeshpy.hxx.

bool _pyObject::myIsPublished [protected, inherited]

Definition at line 168 of file SMESH_2smeshpy.hxx.

std::list< Handle(_pyCommand) > _pyObject::myProcessedCmds [protected, inherited]

Definition at line 167 of file SMESH_2smeshpy.hxx.


The documentation for this class was generated from the following files: