Root class for hypothesis. More...
#include <SMESH_2smeshpy.hxx>
Data Structures | |
struct | CreationMethod |
Public Member Functions | |
_pyHypothesis (const Handle(_pyCommand)&theCreationCmd) | |
_pyHypothesis constructor More... | |
void | SetConvMethodAndType (const _AString &creationMethod, const _AString &type) |
void | AddArgMethod (const _AString &method, const int argNb=1) |
void | AddAccumulativeMethod (const _AString &method) |
const std::list< Handle(_pyCommand)> & | GetArgCommands () const |
void | ClearAllCommands () |
clear creation, arg and unknown commands More... | |
virtual bool | IsAlgo () const |
bool | IsValid () const |
bool | IsWrapped () const |
const _pyID & | GetGeom () const |
void | SetMesh (const _pyID &theMeshId) |
const _pyID & | GetMesh () const |
const _AString & | GetAlgoType () const |
const _AString & | GetAlgoCreationMethod () const |
bool | CanBeCreatedBy (const _AString &algoType) const |
const _AString & | GetCreationMethod (const _AString &algoType) |
virtual bool | IsWrappable (const _pyID &theMesh) const |
Returns true if addition of this hypothesis to a given mesh can be wrapped into hypothesis creation. More... | |
virtual bool | Addition2Creation (const Handle(_pyCommand)&theAdditionCmd, const _pyID &theMesh) |
Convert the command adding a hypothesis to mesh into a smesh command. More... | |
virtual void | Process (const Handle(_pyCommand)&theCommand) |
Remember hypothesis parameter values. More... | |
virtual void | Flush () |
Finish conversion. More... | |
virtual void | Free () |
virtual void | Assign (const Handle(_pyHypothesis)&theOther, const _pyID &theMesh) |
Assign fields of theOther to me except myIsWrapped. More... | |
virtual bool | CanClear () |
Analyze my erasability depending on myReferredObjs. More... | |
virtual void | ClearCommands () |
Clear my commands depending on usage by meshes. More... | |
virtual bool | GetReferredMeshesAndGeom (std::list< Handle(_pyMesh) > &meshes) |
Find arguments that are objects like mesh, group, geometry. More... | |
void | MeshComputed (const Handle(_pyCommand)&theComputeCommand) |
Save commands setting parameters as they are used for a mesh computation. More... | |
void | ComputeDiscarded (const Handle(_pyCommand)&theComputeCommand) |
Clear commands setting parameters as a mesh computed using them is cleared. More... | |
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 const char * | AccessorMethod () const |
Return method name giving access to an interaface object wrapped by python class. More... | |
Static Public Member Functions | |
static | Handle (_pyHypothesis) NewHypothesis(const Handle(_pyCommand)&theCreationCmd) |
static _pyID | FatherID (const _pyID &childID) |
Return ID of a father. More... | |
Protected Types | |
typedef std::map< _AString, CreationMethod > | TType2CrMethod |
Protected Member Functions | |
void | setCreationArg (const int argNb, const _AString &arg) |
Sets an argNb-th argument of current creation command. More... | |
void | rememberCmdOfParameter (const Handle(_pyCommand)&cmd) |
Remember theCommand setting a parameter. More... | |
bool | isCmdUsedForCompute (const Handle(_pyCommand)&cmd, _pyCommand::TAddr avoidComputeAddr=NULL) const |
Return true if a setting parameter command ha been used to compute mesh. More... | |
Handle (_pyCommand) myCreationCmd | |
void | setID (const _pyID &theID) |
Set up myID and myIsPublished. More... | |
Protected Attributes | |
bool | myIsAlgo |
bool | myIsWrapped |
_pyID | myGeom |
_pyID | myMesh |
TType2CrMethod | myAlgoType2CreationMethod |
std::set< _AString > | myAccumulativeMethods |
CreationMethod * | myCurCrMethod |
std::list< Handle(_pyCommand)> | myArgCommands |
std::list< Handle(_pyCommand)> | myUnusedCommands |
std::list< Handle(_pyObject) > | myReferredObjs |
std::map< _AString, std::list < Handle(_pyCommand)> > | myMeth2Commands |
std::map< _pyCommand::TAddr, std::list< Handle(_pyCommand) > > | myComputeAddr2Cmds |
std::list< Handle(_pyCommand) > | myComputeCmds |
_pyID | myID |
std::list< Handle(_pyCommand) > | myProcessedCmds |
std::list< Handle(_pyCommand) > | myArgCmds |
bool | myIsPublished |
Friends | |
class | _pyHypothesisReader |
Root class for hypothesis.
|
protected |
_pyHypothesis::_pyHypothesis | ( | const Handle(_pyCommand)& | theCreationCmd | ) |
|
virtualinherited |
Return method name giving access to an interaface object wrapped by python class.
const | char* - method name |
Reimplemented in _pyAlgorithm, _pyMesh, and _pyGen.
void _pyHypothesis::AddAccumulativeMethod | ( | const _AString & | method | ) |
|
inherited |
References _pyObject::myArgCmds.
|
virtual |
Convert the command adding a hypothesis to mesh into a smesh command.
theCmd | - The command like mesh.AddHypothesis( geom, hypo ) |
theAlgo | - The algo that can create this hypo |
bool | - false if the command can't be converted |
Reimplemented in _pySegmentLengthAroundVertexHyp, _pyNumberOfSegmentsHyp, _pyLayerDistributionHypo, and _pyAlgorithm.
References GetAlgoCreationMethod(), GetAlgoType(), _pyCommand::GetArg(), GetCreationMethod(), _pyObject::GetID(), _pyCommand::GetMethod(), Handle(), IsAlgo(), IsWrappable(), myArgCommands, _pyHypothesis::CreationMethod::myArgs, myCurCrMethod, myGeom, myIsWrapped, myUnusedCommands, _pyCommand::RemoveArgs(), _pyCommand::SetArg(), _pyObject::SetCreationCmd(), _pyCommand::SetMethod(), _pyCommand::SetObject(), and _pyCommand::SetResultValue().
Referenced by _pyAlgorithm::Addition2Creation(), _pyNumberOfSegmentsHyp::Addition2Creation(), and _pySegmentLengthAroundVertexHyp::Addition2Creation().
|
inherited |
References _pyObject::myProcessedCmds.
Referenced by _pyObject::Process().
|
virtual |
Assign fields of theOther to me except myIsWrapped.
References GetAlgoType(), GetCreationMethod(), myAccumulativeMethods, myAlgoType2CreationMethod, myGeom, myIsAlgo, myIsWrapped, and myMesh.
|
virtual |
Analyze my erasability depending on myReferredObjs.
Reimplemented from _pyObject.
References _pyObject::IsInStudy(), and myReferredObjs.
void _pyHypothesis::ClearAllCommands | ( | ) |
clear creation, arg and unknown commands
References myArgCommands, and myUnusedCommands.
|
virtual |
Clear my commands depending on usage by meshes.
Reimplemented from _pyObject.
References _pyObject::ClearCommands().
void _pyHypothesis::ComputeDiscarded | ( | const Handle(_pyCommand)& | theComputeCommand | ) |
Clear commands setting parameters as a mesh computed using them is cleared.
References _pyCommand::GetAddress(), isCmdUsedForCompute(), myComputeAddr2Cmds, and myMeth2Commands.
Return ID of a father.
Referenced by _pySegmentLengthAroundVertexHyp::Addition2Creation().
|
virtual |
Finish conversion.
Implements _pyObject.
Reimplemented in _pyNumberOfSegmentsHyp, _pyLayerDistributionHypo, and _pyComplexParamHypo.
References _pyGen::AddAlgoAccessorMethod(), _pyGen::AddMeshAccessorMethod(), IsAlgo(), myArgCommands, and myUnusedCommands.
|
virtual |
Reimplemented from _pyObject.
Reimplemented in _pyLayerDistributionHypo.
const _AString& _pyHypothesis::GetAlgoCreationMethod | ( | ) | const |
Referenced by Addition2Creation().
const _AString& _pyHypothesis::GetAlgoType | ( | ) | const |
const std::list<Handle(_pyCommand)>& _pyHypothesis::GetArgCommands | ( | ) | const |
|
inherited |
Referenced by Addition2Creation(), and Assign().
const _pyID& _pyHypothesis::GetGeom | ( | ) | const |
|
inherited |
References _pyCommand::GetResultValue(), and _pyObject::myID.
Referenced by _pyFilter::_pyFilter(), _pyMesh::_pyMesh(), _pySelfEraser::_pySelfEraser(), _pySubMesh::_pySubMesh(), _pyMesh::addFatherMesh(), Addition2Creation(), _pyAlgorithm::Addition2Creation(), _pyLayerDistributionHypo::Addition2Creation(), _pyGen::AddObject(), _pySelfEraser::CanClear(), _pyGroup::CanClear(), _pyGen::CheckObjectIsReCreated(), _pyMesh::Flush(), _pyFilter::Flush(), _pyFilter::Process(), and _pyObject::setID().
const _pyID& _pyHypothesis::GetMesh | ( | ) | const |
|
inherited |
References _pyObject::myProcessedCmds.
Referenced by _pySubMesh::Flush(), and _pyFilter::Process().
|
inherited |
References _pyObject::myProcessedCmds.
Referenced by _pySelfEraser::CanClear().
Find arguments that are objects like mesh, group, geometry.
meshes | - referred meshes (directly or indirrectly) |
bool | - false if a referred geometry is not in the study |
References _pyCommand::GetStudyEntries(), Handle(), IsAlgo(), _pyGen::IsGeomObject(), _pyObject::IsInStudy(), _pyGen::IsNotPublished(), myAlgoType2CreationMethod, _pyHypothesis::CreationMethod::myArgs, myReferredObjs, and myUnusedCommands.
|
protectedinherited |
|
static |
|
virtual |
Referenced by Addition2Creation(), Flush(), and GetReferredMeshesAndGeom().
|
protected |
Return true if a setting parameter command ha been used to compute mesh.
References myComputeAddr2Cmds.
Referenced by ComputeDiscarded(), and rememberCmdOfParameter().
|
inherited |
References _pyObject::myIsPublished.
Referenced by _pyMesh::CanClear(), CanClear(), _pyGroup::CanClear(), _pyMesh::ClearCommands(), GetReferredMeshesAndGeom(), and IsWrappable().
bool _pyHypothesis::IsValid | ( | ) | const |
Returns true if addition of this hypothesis to a given mesh can be wrapped into hypothesis creation.
References Handle(), _pyObject::IsInStudy(), myIsWrapped, and myMesh.
Referenced by Addition2Creation(), _pyNumberOfSegmentsHyp::Addition2Creation(), and _pySegmentLengthAroundVertexHyp::Addition2Creation().
bool _pyHypothesis::IsWrapped | ( | ) | const |
Referenced by _pyComplexParamHypo::Flush(), and _pyNumberOfSegmentsHyp::Flush().
void _pyHypothesis::MeshComputed | ( | const Handle(_pyCommand)& | theComputeCommand | ) |
Save commands setting parameters as they are used for a mesh computation.
References _pyCommand::GetAddress(), myComputeAddr2Cmds, myComputeCmds, and myMeth2Commands.
|
virtual |
Remember hypothesis parameter values.
theCommand | - The called hypothesis method |
Reimplemented from _pyObject.
Reimplemented in _pyLayerDistributionHypo, and _pyComplexParamHypo.
References _pyCommand::GetArg(), _pyCommand::GetMethod(), _pyGen::IsToKeepAllCommands(), myAlgoType2CreationMethod, myArgCommands, _pyHypothesis::CreationMethod::myArgMethods, _pyHypothesis::CreationMethod::myArgNb, _pyHypothesis::CreationMethod::myArgs, myIsAlgo, myUnusedCommands, and rememberCmdOfParameter().
Referenced by _pyComplexParamHypo::Process().
|
protected |
Remember theCommand setting a parameter.
References _pyCommand::GetArg(), _pyCommand::GetMethod(), _pyCommand::GetNbArgs(), _pyCommand::GetString(), isCmdUsedForCompute(), _pyCommand::Length(), myAccumulativeMethods, and myMeth2Commands.
Referenced by Process().
Referenced by _pyHypothesisReader::_pyHypothesisReader().
Sets an argNb-th argument of current creation command.
argNb | - argument index countered from 1 |
References _pyHypothesis::CreationMethod::myArgs, and myCurCrMethod.
Referenced by _pyHypothesisReader::_pyHypothesisReader(), and _pyComplexParamHypo::Process().
|
inherited |
Referenced by Addition2Creation().
|
protectedinherited |
Set up myID and myIsPublished.
References _pyObject::GetID(), _pyGen::IsNotPublished(), _pyObject::myID, and _pyObject::myIsPublished.
Referenced by _pyGroup::_pyGroup(), and _pyObject::_pyObject().
void _pyHypothesis::SetMesh | ( | const _pyID & | theMeshId | ) |
|
virtualinherited |
Reimplemented in _pyMesh.
References _pyObject::myIsPublished.
Referenced by _pyMesh::SetRemovedFromStudy().
|
friend |
|
protected |
Referenced by Assign(), and rememberCmdOfParameter().
|
protected |
|
protectedinherited |
Referenced by _pyObject::AddArgCmd(), _pyObject::CanClear(), _pySelfEraser::CanClear(), _pySubMesh::Flush(), and _pyFilter::Flush().
|
protected |
|
protected |
Referenced by ComputeDiscarded(), isCmdUsedForCompute(), and MeshComputed().
|
protected |
Referenced by MeshComputed().
|
protected |
|
protected |
Referenced by Addition2Creation(), and Assign().
|
protectedinherited |
Referenced by _pyObject::GetID(), and _pyObject::setID().
|
protected |
Referenced by _pyAlgorithm::_pyAlgorithm(), _pyHypothesis(), Assign(), and Process().
|
protectedinherited |
|
protected |
Referenced by _pyHypothesis(), Addition2Creation(), _pyLayerDistributionHypo::Addition2Creation(), Assign(), and IsWrappable().
|
protected |
Referenced by Assign(), and IsWrappable().
|
protected |
Referenced by ComputeDiscarded(), MeshComputed(), and rememberCmdOfParameter().
|
protectedinherited |
Referenced by CanClear(), and GetReferredMeshesAndGeom().
|
protected |