Version: 9.16.0
_pyHypothesis Class Reference

Root class for hypothesis. More...

#include <SMESH_2smeshpy.hxx>

Inheritance diagram for _pyHypothesis:

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 _pyIDGetGeom () const
 
void SetMesh (const _pyID &theMeshId)
 
const _pyIDGetMesh () const
 
const _AStringGetAlgoType () const
 
const _AStringGetAlgoCreationMethod () const
 
bool CanBeCreatedBy (const _AString &algoType) const
 
const _AStringGetCreationMethod (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 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 ()
 
void AddArgCmd (const Handle(_pyCommand) &cmd)
 
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. 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, CreationMethodTType2CrMethod
 

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 has 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< _AStringmyAccumulativeMethods
 
CreationMethodmyCurCrMethod
 
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
 

Detailed Description

Root class for hypothesis.

Member Typedef Documentation

◆ TType2CrMethod

typedef std::map<_AString, CreationMethod > _pyHypothesis::TType2CrMethod
protected

Constructor & Destructor Documentation

◆ _pyHypothesis()

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

_pyHypothesis constructor

Parameters
theCreationCmd-

References myIsAlgo, and myIsWrapped.

Member Function Documentation

◆ AccessorMethod()

const char * _pyObject::AccessorMethod ( ) const
virtualinherited

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

Return values
constchar* - method name

Reimplemented in _pyGen, _pyMesh, and _pyAlgorithm.

◆ AddAccumulativeMethod()

void _pyHypothesis::AddAccumulativeMethod ( const _AString method)

References myAccumulativeMethods.

◆ AddArgCmd()

void _pyObject::AddArgCmd ( const Handle(_pyCommand) &  cmd)
inherited

References _pyObject::myArgCmds.

◆ AddArgMethod()

void _pyHypothesis::AddArgMethod ( const _AString method,
const int  argNb = 1 
)

◆ Addition2Creation()

bool _pyHypothesis::Addition2Creation ( const Handle(_pyCommand)&  theCmd,
const _pyID theMesh 
)
virtual

◆ AddProcessedCmd()

void _pyObject::AddProcessedCmd ( const Handle(_pyCommand) &  cmd)
inherited

◆ Assign()

void _pyHypothesis::Assign ( const Handle(_pyHypothesis)&  theOther,
const _pyID theMesh 
)
virtual

Assign fields of theOther to me except myIsWrapped.

References GetAlgoType(), GetCreationMethod(), myAccumulativeMethods, myAlgoType2CreationMethod, myGeom, myIsAlgo, myIsWrapped, and myMesh.

◆ CanBeCreatedBy()

bool _pyHypothesis::CanBeCreatedBy ( const _AString algoType) const

◆ CanClear()

bool _pyHypothesis::CanClear ( )
virtual

Analyze my erasability depending on myReferredObjs.

Reimplemented from _pyObject.

References Handle(), _pyObject::IsInStudy(), and myReferredObjs.

◆ ClearAllCommands()

void _pyHypothesis::ClearAllCommands ( )

clear creation, arg and unknown commands

References Handle(), myArgCommands, and myUnusedCommands.

◆ ClearCommands()

void _pyHypothesis::ClearCommands ( )
virtual

Clear my commands depending on usage by meshes.

Reimplemented from _pyObject.

References _pyObject::ClearCommands().

◆ ComputeDiscarded()

void _pyHypothesis::ComputeDiscarded ( const Handle(_pyCommand)&  theComputeCommand)

Clear commands setting parameters as a mesh computed using them is cleared.

References _pyCommand::GetAddress(), Handle(), isCmdUsedForCompute(), myComputeAddr2Cmds, and myMeth2Commands.

◆ FatherID()

_pyID _pyObject::FatherID ( const _pyID childID)
staticinherited

Return ID of a father.

Referenced by _pySegmentLengthAroundVertexHyp::Addition2Creation().

◆ Flush()

void _pyHypothesis::Flush ( )
virtual

Finish conversion.

Implements _pyObject.

Reimplemented in _pyComplexParamHypo, _pyLayerDistributionHypo, and _pyNumberOfSegmentsHyp.

References Handle(), IsAlgo(), myArgCommands, and myUnusedCommands.

◆ Free()

virtual void _pyHypothesis::Free ( )
virtual

Reimplemented from _pyObject.

Reimplemented in _pyLayerDistributionHypo.

References myReferredObjs.

◆ GetAlgoCreationMethod()

const _AString & _pyHypothesis::GetAlgoCreationMethod ( ) const

References myAlgoType2CreationMethod.

Referenced by Addition2Creation().

◆ GetAlgoType()

const _AString & _pyHypothesis::GetAlgoType ( ) const

◆ GetArgCommands()

const std::list< Handle(_pyCommand)> & _pyHypothesis::GetArgCommands ( ) const

References myArgCommands.

◆ GetCommandNb()

int _pyObject::GetCommandNb ( )
inherited

◆ GetCreationMethod()

const _AString & _pyHypothesis::GetCreationMethod ( const _AString algoType)

◆ GetGeom()

const _pyID & _pyHypothesis::GetGeom ( ) const

References myGeom.

◆ GetID()

◆ GetMesh()

const _pyID & _pyHypothesis::GetMesh ( ) const

References myMesh.

◆ GetNbCalls()

int _pyObject::GetNbCalls ( ) const
inherited

◆ GetProcessedCmds()

std::list< Handle(_pyCommand) > & _pyObject::GetProcessedCmds ( )
inherited

◆ GetReferredMeshesAndGeom()

bool _pyHypothesis::GetReferredMeshesAndGeom ( std::list< Handle(_pyMesh) > &  meshes)
virtual

Find arguments that are objects like mesh, group, geometry.

Parameters
meshes- referred meshes (directly or indirrectly)
Return values
bool- false if a referred geometry is not in the study

References _pyCommand::GetStudyEntries(), Handle(), IsAlgo(), _pyObject::IsInStudy(), myAlgoType2CreationMethod, _pyHypothesis::CreationMethod::myArgs, myReferredObjs, and myUnusedCommands.

◆ Handle() [1/3]

const _pyObject::Handle ( _pyCommand  ) &
inherited

◆ Handle() [2/3]

◆ Handle() [3/3]

◆ IsAlgo()

virtual bool _pyHypothesis::IsAlgo ( ) const
virtual

◆ isCmdUsedForCompute()

bool _pyHypothesis::isCmdUsedForCompute ( const Handle(_pyCommand) &  cmd,
_pyCommand::TAddr  avoidComputeAddr = NULL 
) const
protected

Return true if a setting parameter command has been used to compute mesh.

References Handle(), and myComputeAddr2Cmds.

Referenced by ComputeDiscarded(), and rememberCmdOfParameter().

◆ IsInStudy()

◆ IsValid()

bool _pyHypothesis::IsValid ( ) const

◆ IsWrappable()

bool _pyHypothesis::IsWrappable ( const _pyID theMesh) const
virtual

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().

◆ IsWrapped()

bool _pyHypothesis::IsWrapped ( ) const

◆ MeshComputed()

void _pyHypothesis::MeshComputed ( const Handle(_pyCommand)&  theComputeCommand)

Save commands setting parameters as they are used for a mesh computation.

References _pyCommand::GetAddress(), Handle(), myComputeAddr2Cmds, myComputeCmds, and myMeth2Commands.

◆ Process() [1/2]

virtual void _pyObject::Process ( const Handle(_pyCommand) &  cmd)
virtualinherited

◆ Process() [2/2]

void _pyHypothesis::Process ( const Handle(_pyCommand)&  theCommand)
virtual

◆ rememberCmdOfParameter()

void _pyHypothesis::rememberCmdOfParameter ( const Handle(_pyCommand) &  cmd)
protected

◆ SetConvMethodAndType()

void _pyHypothesis::SetConvMethodAndType ( const _AString creationMethod,
const _AString type 
)

◆ setCreationArg()

void _pyHypothesis::setCreationArg ( const int  argNb,
const _AString arg 
)
protected

Sets an argNb-th argument of current creation command.

Parameters
argNb- argument index countered from 1

References _pyHypothesis::CreationMethod::myArgs, and myCurCrMethod.

Referenced by _pyComplexParamHypo::Process().

◆ SetCreationCmd()

void _pyObject::SetCreationCmd ( Handle(_pyCommand cmd)
inherited

Referenced by Addition2Creation().

◆ setID()

void _pyObject::setID ( const _pyID theID)
protectedinherited

Set up myID and myIsPublished.

References _pyObject::GetID(), _pyObject::myID, and _pyObject::myIsPublished.

Referenced by _pyGroup::_pyGroup(), and _pyObject::_pyObject().

◆ SetMesh()

void _pyHypothesis::SetMesh ( const _pyID theMeshId)

References myMesh.

◆ SetRemovedFromStudy()

virtual void _pyObject::SetRemovedFromStudy ( const bool  isRemoved)
virtualinherited

Reimplemented in _pyMesh.

References _pyObject::myIsPublished.

Referenced by _pyMesh::SetRemovedFromStudy().

Friends And Related Function Documentation

◆ _pyHypothesisReader

friend class _pyHypothesisReader
friend

Field Documentation

◆ myAccumulativeMethods

std::set< _AString > _pyHypothesis::myAccumulativeMethods
protected

◆ myAlgoType2CreationMethod

◆ myArgCmds

std::list< Handle(_pyCommand) > _pyObject::myArgCmds
protectedinherited

◆ myArgCommands

◆ myComputeAddr2Cmds

std::map< _pyCommand::TAddr, std::list<Handle(_pyCommand) > > _pyHypothesis::myComputeAddr2Cmds
protected

◆ myComputeCmds

std::list<Handle(_pyCommand) > _pyHypothesis::myComputeCmds
protected

Referenced by MeshComputed().

◆ myCurCrMethod

◆ myGeom

_pyID _pyHypothesis::myGeom
protected

Referenced by Addition2Creation(), Assign(), and GetGeom().

◆ myID

_pyID _pyObject::myID
protectedinherited

◆ myIsAlgo

bool _pyHypothesis::myIsAlgo
protected

◆ myIsPublished

◆ myIsWrapped

◆ myMesh

_pyID _pyHypothesis::myMesh
protected

Referenced by Assign(), GetMesh(), IsWrappable(), and SetMesh().

◆ myMeth2Commands

std::map<_AString, std::list<Handle(_pyCommand)> > _pyHypothesis::myMeth2Commands
protected

◆ myProcessedCmds

std::list< Handle(_pyCommand) > _pyObject::myProcessedCmds
protectedinherited

◆ myReferredObjs

std::list<Handle(_pyObject) > _pyHypothesis::myReferredObjs
protected

◆ myUnusedCommands