Back to index

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

SubMesh creation can be moved to the end of engine commands. More...

#include <SMESH_2smeshpy.hxx>

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

List of all members.

Public Member Functions

 _pySubMesh (const Handle(_pyCommand)&theCreationCmd)
 _pySubMesh constructor
virtual void Process (const Handle(_pyCommand)&theCommand)
 count invoked commands
virtual void Flush ()
 Move creation command depending on invoked commands.
virtual Handle (_pyMesh) GetMesh()
virtual void Free ()
void SetCreator (const Handle(_pyObject)&theCreator)
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 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.

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

Private Member Functions

 Handle (_pyObject) myCreator
 Handle (_pyMesh) myMesh

Detailed Description

SubMesh creation can be moved to the end of engine commands.

Definition at line 538 of file SMESH_2smeshpy.hxx.


Constructor & Destructor Documentation

_pySubMesh::_pySubMesh ( const Handle(_pyCommand)&  theCreationCmd)

_pySubMesh constructor

Definition at line 3659 of file SMESH_2smeshpy.cxx.

                                                              :
  _pyObject(theCreationCmd)
{
  myMesh = ObjectToMesh( theGen->FindObject( theCreationCmd->GetObject() ));
}

Here is the call graph for this function:


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 _pySubMesh::Flush ( ) [virtual]

Move creation command depending on invoked commands.

Implements _pyObject.

Reimplemented in _pyGroup.

Definition at line 3683 of file SMESH_2smeshpy.cxx.

{
  if ( GetNbCalls() == 0 ) // move to the end of all commands
    theGen->GetLastCommand()->AddDependantCmd( GetCreationCmd() );
  else if ( !myCreator.IsNull() )
    // move to be just after creator
    myCreator->GetCreationCmd()->AddDependantCmd( GetCreationCmd() );
}

Here is the call graph for this function:

virtual void _pySubMesh::Free ( ) [inline, virtual]

Reimplemented from _pyObject.

Reimplemented in _pyGroup.

Definition at line 547 of file SMESH_2smeshpy.hxx.

{ myCreator.Nullify(); myMesh.Nullify(); }
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:

_pySubMesh::Handle ( _pyObject  ) [private]
_pySubMesh::Handle ( _pyMesh  ) [private]
virtual _pySubMesh::Handle ( _pyMesh  ) [inline, virtual]

Definition at line 546 of file SMESH_2smeshpy.hxx.

{ return myMesh; }
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:

void _pySubMesh::Process ( const Handle(_pyCommand)&  theCommand) [virtual]

count invoked commands

Reimplemented from _pyObject.

Reimplemented in _pyGroup.

Definition at line 3671 of file SMESH_2smeshpy.cxx.

{
  _pyObject::Process(theCommand); // count calls of Process()
  GetCreationCmd()->AddDependantCmd( theCommand );
}
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 _pySubMesh::SetCreator ( const Handle(_pyObject)&  theCreator) [inline]

Definition at line 548 of file SMESH_2smeshpy.hxx.

{ myCreator = theCreator; }
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: