Class corresponding to SMESH_Gen. More...
#include <SMESH_2smeshpy.hxx>
Public Member Functions | |
_pyGen (Resource_DataMapOfAsciiStringAsciiString &theEntry2AccessorMethod, Resource_DataMapOfAsciiStringAsciiString &theObjectNames, std::set< TCollection_AsciiString > &theRemovedObjIDs, SALOMEDS::Study_ptr &theStudy, const bool theToKeepAllCommands) | |
_pyGen constructor More... | |
Handle (_pyCommand) AddCommand(const _AString &theCommand) | |
void | ExchangeCommands (Handle(_pyCommand) theCmd1, Handle(_pyCommand) theCmd2) |
Change order of commands in the script. More... | |
void | SetCommandAfter (Handle(_pyCommand) theCmd, Handle(_pyCommand) theAfterCmd) |
Set one command after the other. More... | |
void | SetCommandBefore (Handle(_pyCommand) theCmd, Handle(_pyCommand) theBeforeCmd) |
Set one command before the other. More... | |
Handle (_pyCommand)&GetLastCommand() | |
std::list< Handle(_pyCommand) > & | GetCommands () |
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 theCmdUsingSubmesh as argument. More... | |
_pyID | GenerateNewID (const _pyID &theID) |
Generated new ID for object and assign with existing name. More... | |
bool | AddObject (Handle(_pyObject)&theObj) |
Stores theObj in myObjects. More... | |
void | CheckObjectIsReCreated (Handle(_pyObject)&theObj) |
Erases an existing object with the same ID. More... | |
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. More... | |
Handle (_pyObject) FindObject(const _pyID &theObjID) const | |
Handle (_pySubMesh) FindSubMesh(const _pyID &theSubMeshID) | |
Handle (_pyHypothesis) FindHyp(const _pyID &theHypID) | |
Handle (_pyHypothesis) FindAlgo(const _pyID &theGeom | |
const _pyID const | Handle (_pyHypothesis)&theHypothesis) |
void | SetAccessorMethod (const _pyID &theID, const char *theMethod) |
Set method to access to object wrapped with python class. More... | |
bool | AddMeshAccessorMethod (Handle(_pyCommand) theCmd) const |
Add access method to mesh that is an argument. More... | |
bool | AddAlgoAccessorMethod (Handle(_pyCommand) theCmd) const |
Add access method to algo that is an object or an argument. More... | |
virtual const char * | AccessorMethod () const |
name of SMESH_Gen in smeshBuilder.py More... | |
bool | IsGeomObject (const _pyID &theObjID) const |
Check if a study entry is under GEOM component. More... | |
bool | IsNotPublished (const _pyID &theObjID) const |
Returns true if an object is not present in a study. More... | |
void | ObjectCreationRemoved (const _pyID &theObjID) |
Add an object to myRemovedObjIDs that leads to that SetName() for this object is not dumped. More... | |
void | KeepAgrCmds (const _pyID &theObjID) |
bool | IsToKeepAllCommands () const |
void | AddExportedMesh (const _AString &file, const ExportedMeshData &mesh) |
ExportedMeshData & | FindExportedMesh (const _AString &file) |
virtual void | Process (const Handle(_pyCommand)&theCommand) |
Convert the command or remember it for later conversion. More... | |
virtual void | Flush () |
Convert the remembered commands. More... | |
virtual void | ClearCommands () |
Clean commmands of removed objects depending on myIsPublished flag. More... | |
virtual void | Free () |
Release mutual handles of objects. More... | |
Handle (_pyHypothesisReader) GetHypothesisReader() const | |
const _pyID & | GetID () |
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 () |
void | AddArgCmd (const Handle(_pyCommand)&cmd) |
virtual bool | CanClear () |
Return true if all my users can be cleared. More... | |
Static Public Member Functions | |
static _pyID | FatherID (const _pyID &childID) |
Return ID of a father. More... | |
Data Fields | |
const _pyID & | theMesh |
Protected Member Functions | |
void | setID (const _pyID &theID) |
Set up myID and myIsPublished. More... | |
Protected Attributes | |
_pyID | myID |
std::list< Handle(_pyCommand) > | myProcessedCmds |
std::list< Handle(_pyCommand) > | myArgCmds |
bool | myIsPublished |
Private Member Functions | |
void | setNeighbourCommand (Handle(_pyCommand)&theCmd, Handle(_pyCommand)&theOtherCmd, const bool theIsAfter) |
Set one command before or after the other. More... | |
Handle (_pyCommand) myLastCommand | |
Handle (_pyHypothesisReader) myHypReader | |
Private Attributes | |
std::map< _pyID, Handle(_pyMesh) > | myMeshes |
std::map< _pyID, Handle(_pyMeshEditor) > | myMeshEditors |
std::map< _pyID, Handle(_pyHypothesis) > | myHypos |
std::map< _pyID, Handle(_pyObject) > | myObjects |
std::list< Handle(_pyObject) > | myOrderedObjects |
_pyStringFamily | myKeepAgrCmdsIDs |
std::list< Handle(_pyCommand) > | myCommands |
int | myNbCommands |
Resource_DataMapOfAsciiStringAsciiString & | myID2AccessorMethod |
Resource_DataMapOfAsciiStringAsciiString & | myObjectNames |
std::set < TCollection_AsciiString > & | myRemovedObjIDs |
int | myNbFilters |
bool | myToKeepAllCommands |
SALOMEDS::Study_var | myStudy |
int | myGeomIDNb |
int | myGeomIDIndex |
std::map< _AString, ExportedMeshData > | myFile2ExportedMesh |
Class corresponding to SMESH_Gen.
It holds info on existing meshes and hypotheses
_pyGen::_pyGen | ( | Resource_DataMapOfAsciiStringAsciiString & | theEntry2AccessorMethod, |
Resource_DataMapOfAsciiStringAsciiString & | theObjectNames, | ||
std::set< TCollection_AsciiString > & | theRemovedObjIDs, | ||
SALOMEDS::Study_ptr & | theStudy, | ||
const bool | theToKeepAllCommands | ||
) |
_pyGen constructor
References _pyCommand::IsStudyEntry(), myGeomIDIndex, and myGeomIDNb.
|
virtual |
name of SMESH_Gen in smeshBuilder.py
Reimplemented from _pyObject.
References SMESH_2smeshpy::GenName().
bool _pyGen::AddAlgoAccessorMethod | ( | Handle(_pyCommand) | theCmd | ) | const |
Add access method to algo that is an object or an argument.
theCmd | - command to add access method |
bool | - true if added |
References _pyCommand::AddAccessorMethod(), and myHypos.
Referenced by _pyHypothesis::Flush().
|
inherited |
References _pyObject::myArgCmds.
void _pyGen::AddExportedMesh | ( | const _AString & | file, |
const ExportedMeshData & | mesh | ||
) |
References myFile2ExportedMesh.
Referenced by _pyMesh::Process().
bool _pyGen::AddMeshAccessorMethod | ( | Handle(_pyCommand) | theCmd | ) | const |
Add access method to mesh that is an argument.
theCmd | - command to add access method |
bool | - true if added |
References _pyCommand::AddAccessorMethod(), and myMeshes.
Referenced by _pyHypothesis::Flush(), Process(), _pyMeshEditor::Process(), _pyFilter::Process(), and _pyGroup::Process().
Stores theObj in myObjects.
References CheckObjectIsReCreated(), SMESH::DownCast(), _pyObject::GetID(), Handle(), myMeshEditors, myMeshes, myObjects, and myOrderedObjects.
Referenced by Process(), and _pyMesh::Process().
|
inherited |
References _pyObject::myProcessedCmds.
Referenced by _pyObject::Process().
|
virtualinherited |
Return true if all my users can be cleared.
Reimplemented in _pyGroup, _pySelfEraser, _pyHypothesis, _pyMeshEditor, and _pyMesh.
References _pyObject::Handle(), _pyObject::myArgCmds, and _pyObject::myIsPublished.
Referenced by _pyObject::ClearCommands(), and _pySelfEraser::IsAliveCmd().
Erases an existing object with the same ID.
This method should be called before storing theObj in _pyGen
References _pyObject::GetID(), Handle(), _pyCommand::IsStudyEntry(), myHypos, myMeshes, and myObjects.
Referenced by AddObject(), and Process().
|
virtual |
Clean commmands of removed objects depending on myIsPublished flag.
Reimplemented from _pyObject.
References myHypos, myMeshes, and myOrderedObjects.
Referenced by SMESH_2smeshpy::ConvertScript().
void _pyGen::ExchangeCommands | ( | Handle(_pyCommand) | theCmd1, |
Handle(_pyCommand) | theCmd2 | ||
) |
Change order of commands in the script.
theCmd1 | - One command |
theCmd2 | - Another command |
References _pyCommand::GetOrderNb(), myCommands, and _pyCommand::SetOrderNb().
Return ID of a father.
Referenced by _pySegmentLengthAroundVertexHyp::Addition2Creation().
ExportedMeshData& _pyGen::FindExportedMesh | ( | const _AString & | file | ) |
References myFile2ExportedMesh.
Referenced by _pyMesh::_pyMesh().
|
virtual |
Convert the remembered commands.
Implements _pyObject.
References SMESH_2smeshpy::GenName(), id_obj, IsToKeepAllCommands(), myCommands, myHypos, myMeshes, myNbCommands, myObjects, and myOrderedObjects.
Referenced by SMESH_2smeshpy::ConvertScript().
|
virtual |
Release mutual handles of objects.
Reimplemented from _pyObject.
References id_obj, myFile2ExportedMesh, myHypos, myMeshEditors, myMeshes, and myObjects.
Referenced by SMESH_2smeshpy::ConvertScript().
Generated new ID for object and assign with existing name.
theID | - ID of existing object |
References myObjectNames.
Referenced by _pyMesh::Flush().
|
inherited |
std::list< Handle(_pyCommand) >& _pyGen::GetCommands | ( | ) |
References myCommands.
Referenced by SMESH_2smeshpy::ConvertScript(), _pyLayerDistributionHypo::Flush(), _pyMesh::Process(), and _pyGroup::Process().
|
inherited |
References _pyCommand::GetResultValue(), and _pyObject::myID.
Referenced by _pyFilter::_pyFilter(), _pyMesh::_pyMesh(), _pySelfEraser::_pySelfEraser(), _pySubMesh::_pySubMesh(), _pyMesh::addFatherMesh(), _pyHypothesis::Addition2Creation(), _pyAlgorithm::Addition2Creation(), _pyLayerDistributionHypo::Addition2Creation(), AddObject(), _pySelfEraser::CanClear(), _pyGroup::CanClear(), CheckObjectIsReCreated(), _pyMesh::Flush(), _pyFilter::Flush(), _pyFilter::Process(), and _pyObject::setID().
|
inherited |
References _pyObject::myProcessedCmds.
Referenced by _pySubMesh::Flush(), and _pyFilter::Process().
|
inherited |
References _pyObject::myProcessedCmds.
Referenced by _pySelfEraser::CanClear().
_pyGen::Handle | ( | _pyCommand | ) | const |
Referenced by AddObject(), CheckObjectIsReCreated(), Process(), and SetProxyObject().
_pyGen::Handle | ( | _pyCommand | ) |
_pyGen::Handle | ( | _pyObject | ) | const |
_pyGen::Handle | ( | _pySubMesh | ) | const |
_pyGen::Handle | ( | _pyHypothesis | ) | const |
_pyGen::Handle | ( | _pyHypothesis | ) | const |
const _pyID const _pyGen::Handle | ( | _pyHypothesis | ) |
_pyGen::Handle | ( | _pyHypothesisReader | ) | const |
|
private |
|
private |
Check if a study entry is under GEOM component.
References _pyCommand::IsStudyEntry(), myGeomIDIndex, and myGeomIDNb.
Referenced by _pyHypothesis::GetReferredMeshesAndGeom(), and IsNotPublished().
|
inherited |
Returns true if an object is not present in a study.
References IsGeomObject(), myObjectNames, and myStudy.
Referenced by _pyMesh::_pyMesh(), _pyHypothesis::GetReferredMeshesAndGeom(), and _pyObject::setID().
bool _pyGen::IsToKeepAllCommands | ( | ) | const |
References myToKeepAllCommands.
Referenced by Flush(), _pyGroup::Flush(), _pySelfEraser::IsAliveCmd(), _pyMesh::Process(), and _pyHypothesis::Process().
void _pyGen::KeepAgrCmds | ( | const _pyID & | theObjID | ) |
References _pyStringFamily::Add(), and myKeepAgrCmdsIDs.
Referenced by _pyFilter::_pyFilter(), _pySelfEraser::_pySelfEraser(), and _pySubMesh::_pySubMesh().
void _pyGen::ObjectCreationRemoved | ( | const _pyID & | theObjID | ) |
Add an object to myRemovedObjIDs that leads to that SetName() for this object is not dumped.
[in] | theObjID | - entry of the object whose creation command was eliminated |
References myRemovedObjIDs.
void _pyGen::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 theCmdUsingSubmesh as argument.
|
virtual |
Convert the command or remember it for later conversion.
theCommand | - The python command calling a method of SMESH_Gen |
Reimplemented from _pyObject.
References AddMeshAccessorMethod(), AddObject(), CheckObjectIsReCreated(), _pyCommand::Clear(), SMESH_2smeshpy::GenName(), _pyCommand::GetArg(), _pyCommand::GetMethod(), _pyCommand::GetNbArgs(), _pyCommand::GetResultValue(), _pyCommand::GetStudyEntries(), Handle(), myHypos, myMeshes, _pyCommand::RemoveArgs(), _pyCommand::SetArg(), _pyCommand::SetMethod(), _pyCommand::SetObject(), and SMESH_2smeshpy::SmeshpyName().
Referenced by _pyMesh::Process().
void _pyGen::SetAccessorMethod | ( | const _pyID & | theID, |
const char * | theMethod | ||
) |
Set method to access to object wrapped with python class.
theID | - The wrapped object entry |
theMethod | - The accessor method |
References myID2AccessorMethod.
Referenced by _pyMesh::_pyMesh(), and _pyAlgorithm::Addition2Creation().
void _pyGen::SetCommandAfter | ( | Handle(_pyCommand) | theCmd, |
Handle(_pyCommand) | theAfterCmd | ||
) |
Set one command after the other.
theCmd | - Command to move |
theAfterCmd | - Command ater which to insert the first one |
References setNeighbourCommand().
Referenced by _pyCommand::SetDependentCmdsAfter().
void _pyGen::SetCommandBefore | ( | Handle(_pyCommand) | theCmd, |
Handle(_pyCommand) | theBeforeCmd | ||
) |
Set one command before the other.
theCmd | - Command to move |
theBeforeCmd | - Command before which to insert the first one |
References setNeighbourCommand().
Referenced by _pyMesh::Flush().
|
inherited |
Referenced by _pyHypothesis::Addition2Creation().
|
protectedinherited |
Set up myID and myIsPublished.
References _pyObject::GetID(), IsNotPublished(), _pyObject::myID, and _pyObject::myIsPublished.
Referenced by _pyGroup::_pyGroup(), and _pyObject::_pyObject().
|
private |
Set one command before or after the other.
theCmd | - Command to move |
theOtherCmd | - Command ater or before which to insert the first one |
References myCommands.
Referenced by SetCommandAfter(), and SetCommandBefore().
Re-register an object with other ID to make it Process() commands of other object having this ID.
References SMESH::DownCast(), Handle(), myMeshEditors, myMeshes, and myObjects.
Referenced by _pyGroup::Process().
|
virtualinherited |
Reimplemented in _pyMesh.
References _pyObject::myIsPublished.
Referenced by _pyMesh::SetRemovedFromStudy().
|
protectedinherited |
Referenced by _pyObject::AddArgCmd(), _pyObject::CanClear(), _pySelfEraser::CanClear(), _pySubMesh::Flush(), and _pyFilter::Flush().
|
private |
Referenced by ExchangeCommands(), Flush(), GetCommands(), and setNeighbourCommand().
|
private |
Referenced by AddExportedMesh(), FindExportedMesh(), and Free().
|
private |
Referenced by _pyGen(), and IsGeomObject().
|
private |
Referenced by _pyGen(), and IsGeomObject().
|
private |
Referenced by AddAlgoAccessorMethod(), CheckObjectIsReCreated(), ClearCommands(), Flush(), Free(), and Process().
|
protectedinherited |
Referenced by _pyObject::GetID(), and _pyObject::setID().
|
private |
Referenced by SetAccessorMethod().
|
protectedinherited |
|
private |
Referenced by KeepAgrCmds().
|
private |
Referenced by AddObject(), Free(), and SetProxyObject().
Referenced by AddMeshAccessorMethod(), AddObject(), CheckObjectIsReCreated(), ClearCommands(), Flush(), Free(), Process(), and SetProxyObject().
|
private |
|
private |
Referenced by GenerateNewID(), and IsNotPublished().
Referenced by AddObject(), CheckObjectIsReCreated(), Flush(), Free(), and SetProxyObject().
Referenced by AddObject(), ClearCommands(), and Flush().
|
protectedinherited |
|
private |
Referenced by ObjectCreationRemoved().
|
private |
Referenced by IsNotPublished().
|
private |
Referenced by IsToKeepAllCommands().
const _pyID& _pyGen::theMesh |