Back to index

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

Class representing SegmentLengthAroundVertex hypothesis. More...

#include <SMESH_2smeshpy.hxx>

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

List of all members.

Public Member Functions

 _pySegmentLengthAroundVertexHyp (const Handle(_pyCommand)&theCrCmd)
virtual bool Addition2Creation (const Handle(_pyCommand)&theAdditionCmd, const _pyID &theMesh)
 Convert the command adding "SegmentLengthAroundVertex" to mesh into regular1D.LengthNearVertex( length, vertex )
void SetConvMethodAndType (const _AString &creationMethod, const _AString &type)
void AddArgMethod (const _AString &method, const int argNb=1)
const std::list< Handle(_pyCommand)> & GetArgCommands () const
void ClearAllCommands ()
 clear creation, arg and unkown commands
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.
virtual void Process (const Handle(_pyCommand)&theCommand)
 Remember hypothesis parameter values.
virtual void Flush ()
 Finish conversion.
virtual void Free ()
virtual void Assign (const Handle(_pyHypothesis)&theOther, const _pyID &theMesh)
 Assign fields of theOther to me except myIsWrapped.
virtual bool CanClear ()
 Analyze my erasability depending on myReferredObjs.
virtual void ClearCommands ()
 Clear my commands depending on usage by meshes.
virtual bool GetReferredMeshesAndGeom (std::list< Handle(_pyMesh) > &meshes)
 Find arguments that are objects like mesh, group, geometry.
void MeshComputed (const Handle(_pyCommand)&theComputeCommand)
 Save commands setting parameters as they are used for a mesh computation.
void ComputeDiscarded (const Handle(_pyCommand)&theComputeCommand)
 Clear commands setting parameters as a mesh computed using them is cleared.
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.

Static Public Member Functions

static Handle (_pyHypothesis) NewHypothesis(const Handle(_pyCommand)&theCreationCmd)
static _pyID FatherID (const _pyID &childID)
 Return ID of a father.

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.
void rememberCmdOfParameter (const Handle(_pyCommand)&cmd)
 Remember theCommand setting a parameter.
bool isCmdUsedForCompute (const Handle(_pyCommand)&cmd, _pyCommand::TAddr avoidComputeAddr=NULL) const
 Return true if a setting parameter command ha been used to compute mesh.
 Handle (_pyCommand) myCreationCmd
void setID (const _pyID &theID)
 Set up myID and myIsPublished.

Protected Attributes

bool myIsAlgo
bool myIsWrapped
_pyID myGeom
_pyID myMesh
TType2CrMethod myAlgoType2CreationMethod
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
bool myIsPublished

Detailed Description

Class representing SegmentLengthAroundVertex hypothesis.

Definition at line 507 of file SMESH_2smeshpy.hxx.


Member Typedef Documentation

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

Definition at line 369 of file SMESH_2smeshpy.hxx.


Constructor & Destructor Documentation

Definition at line 510 of file SMESH_2smeshpy.hxx.

: _pyHypothesis(theCrCmd) {}

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 _pyHypothesis::AddArgMethod ( const _AString method,
const int  argNb = 1 
) [inline, inherited]

Definition at line 388 of file SMESH_2smeshpy.hxx.

  { myCurCrMethod->myArgMethods.push_back( method );
    myCurCrMethod->myArgNb.push_back( argNb ); }
bool _pySegmentLengthAroundVertexHyp::Addition2Creation ( const Handle(_pyCommand)&  theCmd,
const _pyID theMeshID 
) [virtual]

Convert the command adding "SegmentLengthAroundVertex" to mesh into regular1D.LengthNearVertex( length, vertex )

Parameters:
theCmd- The command like mesh.AddHypothesis( vertex, SegmentLengthAroundVertex )
theMesh- The mesh needing this hypo
Return values:
bool- false if the command cant be converted

Reimplemented from _pyHypothesis.

Definition at line 2876 of file SMESH_2smeshpy.cxx.

{
  if ( IsWrappable( theMeshID )) {

    _pyID vertex = theCmd->GetArg( 1 );

    // the problem here is that segment algo will not be found
    // by pyHypothesis::Addition2Creation() for <vertex>, so we try to find
    // geometry where segment algorithm is assigned
    Handle(_pyHypothesis) algo;
    _pyID geom = vertex;
    while ( algo.IsNull() && !geom.IsEmpty()) {
      // try to find geom as a father of <vertex>
      geom = FatherID( geom );
      algo = theGen->FindAlgo( geom, theMeshID, this );
    }
    if ( algo.IsNull() )
      return false; // also possible to find geom as brother of veretex...
    // set geom instead of vertex
    theCmd->SetArg( 1, geom );

    // set vertex as a second arg
    if ( myCurCrMethod->myArgs.size() < 1) setCreationArg( 1, "1" ); // :(
    setCreationArg( 2, vertex );

    // mesh.AddHypothesis(vertex, SegmentLengthAroundVertex) -->
    // theMeshID.LengthNearVertex( length, vertex )
    return _pyHypothesis::Addition2Creation( theCmd, theMeshID );
  }
  return false;
}

Here is the call graph for this function:

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:

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

Assign fields of theOther to me except myIsWrapped.

Definition at line 2304 of file SMESH_2smeshpy.cxx.

{
  // myCreationCmd = theOther->myCreationCmd;
  myIsAlgo                  = theOther->myIsAlgo;
  myIsWrapped               = false;
  myGeom                    = theOther->myGeom;
  myMesh                    = theMesh;
  myAlgoType2CreationMethod = theOther->myAlgoType2CreationMethod;
  //myArgCommands             = theOther->myArgCommands;
  //myUnusedCommands          = theOther->myUnusedCommands;
  // init myCurCrMethod
  GetCreationMethod( theOther->GetAlgoType() );
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool _pyHypothesis::CanBeCreatedBy ( const _AString algoType) const [inline, inherited]

Definition at line 404 of file SMESH_2smeshpy.hxx.

  { return myAlgoType2CreationMethod.find( algoType ) != myAlgoType2CreationMethod.end(); }
bool _pyHypothesis::CanClear ( ) [virtual, inherited]

Analyze my erasability depending on myReferredObjs.

Reimplemented from _pyObject.

Definition at line 2325 of file SMESH_2smeshpy.cxx.

{
  if ( IsInStudy() )
  {
    list< Handle(_pyObject) >::iterator obj = myReferredObjs.begin();
    for ( ; obj != myReferredObjs.end(); ++obj )
      if ( (*obj)->CanClear() )
        return true;
    return false;
  }
  return true;
}

Here is the call graph for this function:

void _pyHypothesis::ClearAllCommands ( ) [inherited]

clear creation, arg and unkown commands

Definition at line 2286 of file SMESH_2smeshpy.cxx.

{
  GetCreationCmd()->Clear();
  list<Handle(_pyCommand)>::iterator cmd = myArgCommands.begin();
  for ( ; cmd != myArgCommands.end(); ++cmd )
    ( *cmd )->Clear();
  cmd = myUnusedCommands.begin();
  for ( ; cmd != myUnusedCommands.end(); ++cmd )
    ( *cmd )->Clear();
}
void _pyHypothesis::ClearCommands ( ) [virtual, inherited]

Clear my commands depending on usage by meshes.

Reimplemented from _pyObject.

Definition at line 2344 of file SMESH_2smeshpy.cxx.

{
  // if ( !theGen->IsToKeepAllCommands() )
  // {
  //   bool isUsed = false;
  //   int lastComputeOrder = 0;
  //   list<Handle(_pyCommand) >::iterator cmd = myComputeCmds.begin();
  //   for ( ; cmd != myComputeCmds.end(); ++cmd )
  //     if ( ! (*cmd)->IsEmpty() )
  //     {
  //       isUsed = true;
  //       if ( (*cmd)->GetOrderNb() > lastComputeOrder )
  //         lastComputeOrder = (*cmd)->GetOrderNb();
  //     }
  //   if ( !isUsed )
  //   {
  //     SetRemovedFromStudy( true );
  //   }
  //   else
  //   {
  //     // clear my commands invoked after lastComputeOrder
  //     // map<TCollection_AsciiString, list< Handle(_pyCommand) > >::iterator m2c;
  //     // for ( m2c = myMeth2Commands.begin(); m2c != myMeth2Commands.end(); ++m2c )
  //     // {
  //     //   list< Handle(_pyCommand)> & cmds = m2c->second;
  //     //   if ( !cmds.empty() && cmds.back()->GetOrderNb() > lastComputeOrder )
  //     //     cmds.back()->Clear();
  //     // }
  //   }
  // }
  _pyObject::ClearCommands();
}
void _pyHypothesis::ComputeDiscarded ( const Handle(_pyCommand)&  theComputeCommand) [inherited]

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

Definition at line 2515 of file SMESH_2smeshpy.cxx.

{
  list<Handle(_pyCommand)>& savedCmds = myComputeAddr2Cmds[ theComputeCmd->GetAddress() ];

  list<Handle(_pyCommand)>::iterator cmd = savedCmds.begin();
  for ( ; cmd != savedCmds.end(); ++cmd )
  {
    // check if a cmd has been used to compute another mesh
    if ( isCmdUsedForCompute( *cmd, theComputeCmd->GetAddress() ))
      continue;
    // check if a cmd is a sole command setting its parameter;
    // don't use method name for search as it can change
    map<TCollection_AsciiString, list<Handle(_pyCommand)> >::iterator
      m2cmds = myMeth2Commands.begin();
    for ( ; m2cmds != myMeth2Commands.end(); ++m2cmds )
    {
      list< Handle(_pyCommand)>& cmds = m2cmds->second;
      list< Handle(_pyCommand)>::iterator cmdIt = std::find( cmds.begin(), cmds.end(), *cmd );
      if ( cmdIt != cmds.end() )
      {
        if ( cmds.back() != *cmd )
        {
          cmds.erase( cmdIt );
          (*cmd)->Clear();
        }
        break;
      }
    }
  }
  myComputeAddr2Cmds.erase( theComputeCmd->GetAddress() );
}

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 _pyHypothesis::Flush ( ) [virtual, inherited]

Finish conversion.

Implements _pyObject.

Reimplemented in _pyNumberOfSegmentsHyp, _pyLayerDistributionHypo, and _pyComplexParamHypo.

Definition at line 2256 of file SMESH_2smeshpy.cxx.

{
  if ( !IsAlgo() )
  {
    list < Handle(_pyCommand) >::iterator cmd = myArgCommands.begin();
    for ( ; cmd != myArgCommands.end(); ++cmd ) {
      // Add access to a wrapped mesh
      theGen->AddMeshAccessorMethod( *cmd );
      // Add access to a wrapped algorithm
      theGen->AddAlgoAccessorMethod( *cmd );
    }
    cmd = myUnusedCommands.begin();
    for ( ; cmd != myUnusedCommands.end(); ++cmd ) {
      // Add access to a wrapped mesh
      theGen->AddMeshAccessorMethod( *cmd );
      // Add access to a wrapped algorithm
      theGen->AddAlgoAccessorMethod( *cmd );
    }
  }
  // forget previous hypothesis modifications
  myArgCommands.clear();
  myUnusedCommands.clear();
}

Here is the call graph for this function:

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

Reimplemented from _pyObject.

Reimplemented in _pyLayerDistributionHypo.

Definition at line 415 of file SMESH_2smeshpy.hxx.

{ myReferredObjs.clear(); }
const _AString& _pyHypothesis::GetAlgoCreationMethod ( ) const [inline, inherited]

Definition at line 402 of file SMESH_2smeshpy.hxx.

  { return myAlgoType2CreationMethod.begin()->second.myMethod; }

Here is the caller graph for this function:

const _AString& _pyHypothesis::GetAlgoType ( ) const [inline, inherited]

Definition at line 400 of file SMESH_2smeshpy.hxx.

  { return myAlgoType2CreationMethod.begin()->first; }

Here is the caller graph for this function:

const std::list<Handle(_pyCommand)>& _pyHypothesis::GetArgCommands ( ) const [inline, inherited]

Definition at line 392 of file SMESH_2smeshpy.hxx.

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

Definition at line 180 of file SMESH_2smeshpy.hxx.

{ return myCreationCmd->GetOrderNb(); }
const _AString& _pyHypothesis::GetCreationMethod ( const _AString algoType) [inline, inherited]

Definition at line 406 of file SMESH_2smeshpy.hxx.

  { return ( myCurCrMethod = & myAlgoType2CreationMethod[ algoType ])->myMethod; }

Here is the caller graph for this function:

const _pyID& _pyHypothesis::GetGeom ( ) const [inline, inherited]

Definition at line 397 of file SMESH_2smeshpy.hxx.

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

const _pyID& _pyHypothesis::GetMesh ( ) const [inline, inherited]

Definition at line 399 of file SMESH_2smeshpy.hxx.

{ return myMesh; }

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; }
bool _pyHypothesis::GetReferredMeshesAndGeom ( std::list< Handle(_pyMesh) > &  meshes) [virtual, inherited]

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

Definition at line 2385 of file SMESH_2smeshpy.cxx.

{
  if ( IsAlgo() ) return true;

  bool geomPublished = true;
  vector< _AString > args;
  TType2CrMethod::iterator type2meth = myAlgoType2CreationMethod.begin();
  for ( ; type2meth != myAlgoType2CreationMethod.end(); ++type2meth )
  {
    CreationMethod& crMethod = type2meth->second;
    args.insert( args.end(), crMethod.myArgs.begin(), crMethod.myArgs.end());
  }
  list<Handle(_pyCommand)>::iterator cmd = myUnusedCommands.begin();
  for ( ; cmd != myUnusedCommands.end(); ++cmd ) {
    for ( int nb = (*cmd)->GetNbArgs(); nb; --nb )
      args.push_back( (*cmd)->GetArg( nb ));
  }

  for ( size_t i = 0; i < args.size(); ++i )
  {
    list< _pyID > idList = _pyCommand::GetStudyEntries( args[ i ]);
    if ( idList.empty() && !args[ i ].IsEmpty() )
      idList.push_back( args[ i ]);
    list< _pyID >::iterator id = idList.begin();
    for ( ; id != idList.end(); ++id )
    {
      Handle(_pyObject)   obj = theGen->FindObject( *id );
      if ( obj.IsNull() ) obj = theGen->FindHyp( *id );
      if ( obj.IsNull() )
      {
        if ( theGen->IsGeomObject( *id ) && theGen->IsNotPublished( *id ))
          geomPublished = false;
      }
      else
      {
        myReferredObjs.push_back( obj );
        Handle(_pyMesh) mesh = ObjectToMesh( obj );
        if ( !mesh.IsNull() )
          meshes.push_back( mesh );
        // prevent clearing not published hyps referred e.g. by "LayerDistribution"
        else if ( obj->IsKind( STANDARD_TYPE( _pyHypothesis )) && this->IsInStudy() )
          obj->SetRemovedFromStudy( false );
      }
    }
  }
  return geomPublished;
}

Here is the call graph for this function:

_pyObject::Handle ( _pyCommand  ) [protected, inherited]

Reimplemented in _pyMesh, _pyGen, and _pyGen.

Here is the caller graph for this function:

static _pyHypothesis::Handle ( _pyHypothesis  ) const [static, inherited]

Here is the caller graph for this function:

virtual bool _pyHypothesis::IsAlgo ( ) const [inline, virtual, inherited]

Definition at line 394 of file SMESH_2smeshpy.hxx.

{ return myIsAlgo; }

Here is the caller graph for this function:

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

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

Definition at line 2478 of file SMESH_2smeshpy.cxx.

{
  bool isUsed = false;
  map< _pyCommand::TAddr, list<Handle(_pyCommand) > >::const_iterator addr2cmds =
    myComputeAddr2Cmds.begin();
  for ( ; addr2cmds != myComputeAddr2Cmds.end() && !isUsed; ++addr2cmds )
  {
    if ( addr2cmds->first == avoidComputeAddr ) continue;
    const list<Handle(_pyCommand)> & cmds = addr2cmds->second;
    isUsed = ( std::find( cmds.begin(), cmds.end(), cmd ) != cmds.end() );
  }
  return isUsed;
}

Here is the caller graph for this function:

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:

bool _pyHypothesis::IsValid ( ) const [inline, inherited]

Definition at line 395 of file SMESH_2smeshpy.hxx.

{ return !myAlgoType2CreationMethod.empty(); }
bool _pyHypothesis::IsWrappable ( const _pyID theMesh) const [virtual, inherited]

Returns true if addition of this hypothesis to a given mesh can be wrapped into hypothesis creation.

Definition at line 2141 of file SMESH_2smeshpy.cxx.

{
  if ( !myIsWrapped && myMesh == theMesh && IsInStudy() )
  {
    Handle(_pyObject) pyMesh = theGen->FindObject( myMesh );
    if ( !pyMesh.IsNull() && pyMesh->IsInStudy() )
      return true;
  }
  return false;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool _pyHypothesis::IsWrapped ( ) const [inline, inherited]

Definition at line 396 of file SMESH_2smeshpy.hxx.

{ return myIsWrapped; }

Here is the caller graph for this function:

void _pyHypothesis::MeshComputed ( const Handle(_pyCommand)&  theComputeCommand) [inherited]

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

Definition at line 2499 of file SMESH_2smeshpy.cxx.

{
  myComputeCmds.push_back( theComputeCmd );
  list<Handle(_pyCommand)>& savedCmds = myComputeAddr2Cmds[ theComputeCmd->GetAddress() ];

  map<TCollection_AsciiString, list< Handle(_pyCommand) > >::iterator m2c;
  for ( m2c = myMeth2Commands.begin(); m2c != myMeth2Commands.end(); ++m2c )
    savedCmds.push_back( m2c->second.back() );
}

Here is the call graph for this function:

void _pyHypothesis::Process ( const Handle(_pyCommand)&  theCommand) [virtual, inherited]

Remember hypothesis parameter values.

Parameters:
theCommand- The called hypothesis method

Reimplemented from _pyObject.

Reimplemented in _pyLayerDistributionHypo, and _pyComplexParamHypo.

Definition at line 2224 of file SMESH_2smeshpy.cxx.

{
  ASSERT( !myIsAlgo );
  if ( !theGen->IsToKeepAllCommands() )
    rememberCmdOfParameter( theCommand );
  // set args
  bool usedCommand = false;
  TType2CrMethod::iterator type2meth = myAlgoType2CreationMethod.begin();
  for ( ; type2meth != myAlgoType2CreationMethod.end(); ++type2meth )
  {
    CreationMethod& crMethod = type2meth->second;
    for ( size_t i = 0; i < crMethod.myArgMethods.size(); ++i ) {
      if ( crMethod.myArgMethods[ i ] == theCommand->GetMethod() ) {
        if ( !usedCommand )
          myArgCommands.push_back( theCommand );
        usedCommand = true;
        while ( crMethod.myArgs.size() < i+1 )
          crMethod.myArgs.push_back( "[]" );
        crMethod.myArgs[ i ] = theCommand->GetArg( crMethod.myArgNb[i] );
      }
    }
  }
  if ( !usedCommand )
    myUnusedCommands.push_back( theCommand );
}

Here is the call graph for this function:

void _pyHypothesis::rememberCmdOfParameter ( const Handle(_pyCommand)&  cmd) [protected, inherited]

Remember theCommand setting a parameter.

Definition at line 2439 of file SMESH_2smeshpy.cxx.

{
  // parameters are discriminated by method name
  TCollection_AsciiString method = theCommand->GetMethod();

  // discriminate commands setting different parameters via one method
  // by passing parameter names like e.g. SetOption("size", "0.2")
  if ( theCommand->GetString().FirstLocationInSet( "'\"", 1, theCommand->Length() ) &&
       theCommand->GetNbArgs() > 1 )
  {
    // mangle method by appending a 1st textual arg
    for ( int iArg = 1; iArg <= theCommand->GetNbArgs(); ++iArg )
    {
      const TCollection_AsciiString& arg = theCommand->GetArg( iArg );
      if ( arg.Value(1) != '\"' && arg.Value(1) != '\'' ) continue;
      if ( !isalpha( arg.Value(2))) continue;
      method += arg;
      break;
    }
  }
  // parameters are discriminated by method name
  list< Handle(_pyCommand)>& cmds = myMeth2Commands[ theCommand->GetMethod() ];
  if ( !cmds.empty() && !isCmdUsedForCompute( cmds.back() ))
  {
    cmds.back()->Clear(); // previous parameter value has not been used
    cmds.back() = theCommand;
  }
  else
  {
    cmds.push_back( theCommand );
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void _pyHypothesis::SetConvMethodAndType ( const _AString creationMethod,
const _AString type 
) [inline, inherited]

Definition at line 385 of file SMESH_2smeshpy.hxx.

  { myCurCrMethod = &myAlgoType2CreationMethod[ type ];
    myCurCrMethod->myMethod = creationMethod; }

Here is the caller graph for this function:

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

Sets an argNb-th argument of current creation command.

Parameters:
argNb- argument index countered from 1

Definition at line 2554 of file SMESH_2smeshpy.cxx.

{
  if ( myCurCrMethod )
  {
    while ( myCurCrMethod->myArgs.size() < argNb )
      myCurCrMethod->myArgs.push_back( "None" );
    if ( arg.IsEmpty() )
      myCurCrMethod->myArgs[ argNb-1 ] = "None";
    else
      myCurCrMethod->myArgs[ argNb-1 ] = arg;
  }
}

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:

void _pyHypothesis::SetMesh ( const _pyID theMeshId) [inline, inherited]

Definition at line 398 of file SMESH_2smeshpy.hxx.

{ if ( myMesh.IsEmpty() ) myMesh = theMeshId; }
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

Definition at line 370 of file SMESH_2smeshpy.hxx.

std::list<Handle(_pyCommand)> _pyHypothesis::myArgCommands [protected, inherited]

Definition at line 372 of file SMESH_2smeshpy.hxx.

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

Definition at line 378 of file SMESH_2smeshpy.hxx.

std::list<Handle(_pyCommand) > _pyHypothesis::myComputeCmds [protected, inherited]

Definition at line 379 of file SMESH_2smeshpy.hxx.

Definition at line 371 of file SMESH_2smeshpy.hxx.

_pyID _pyHypothesis::myGeom [protected, inherited]

Definition at line 359 of file SMESH_2smeshpy.hxx.

_pyID _pyObject::myID [protected, inherited]

Definition at line 165 of file SMESH_2smeshpy.hxx.

bool _pyHypothesis::myIsAlgo [protected, inherited]

Definition at line 358 of file SMESH_2smeshpy.hxx.

bool _pyObject::myIsPublished [protected, inherited]

Definition at line 168 of file SMESH_2smeshpy.hxx.

bool _pyHypothesis::myIsWrapped [protected, inherited]

Definition at line 358 of file SMESH_2smeshpy.hxx.

_pyID _pyHypothesis::myMesh [protected, inherited]

Definition at line 359 of file SMESH_2smeshpy.hxx.

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

Definition at line 377 of file SMESH_2smeshpy.hxx.

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

Definition at line 167 of file SMESH_2smeshpy.hxx.

std::list<Handle(_pyObject) > _pyHypothesis::myReferredObjs [protected, inherited]

Definition at line 374 of file SMESH_2smeshpy.hxx.

std::list<Handle(_pyCommand)> _pyHypothesis::myUnusedCommands [protected, inherited]

Definition at line 373 of file SMESH_2smeshpy.hxx.


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