Open CASCADE Technology  7.5.0
Public Member Functions

IFSelect_TransformStandard Class Reference

This class runs transformations made by Modifiers, as the ModelCopier does when it produces files (the same set of Modifiers can then be used, as to transform the starting Model, as at file sending time). More...

#include <IFSelect_TransformStandard.hxx>

Inheritance diagram for IFSelect_TransformStandard:
Inheritance graph
[legend]

Public Member Functions

 IFSelect_TransformStandard ()
 Creates a TransformStandard, option StandardCopy, no Modifier. More...
 
void SetCopyOption (const Standard_Boolean option)
 Sets the Copy option to a new value : More...
 
Standard_Boolean CopyOption () const
 Returns the Copy option. More...
 
void SetSelection (const Handle< IFSelect_Selection > &sel)
 Sets a Selection (or unsets if Null) This Selection then defines the list of entities on which the Modifiers will be applied If it is set, it has priority on Selections of Modifiers Else, for each Modifier its Selection is evaluated By default, all the Model is taken. More...
 
Handle< IFSelect_SelectionSelection () const
 Returns the Selection, Null by default. More...
 
Standard_Integer NbModifiers () const
 Returns the count of recorded Modifiers. More...
 
Handle< IFSelect_ModifierModifier (const Standard_Integer num) const
 Returns a Modifier given its rank in the list. More...
 
Standard_Integer ModifierRank (const Handle< IFSelect_Modifier > &modif) const
 Returns the rank of a Modifier in the list, 0 if unknown. More...
 
Standard_Boolean AddModifier (const Handle< IFSelect_Modifier > &modif, const Standard_Integer atnum=0)
 Adds a Modifier to the list : More...
 
Standard_Boolean RemoveModifier (const Handle< IFSelect_Modifier > &modif)
 Removes a Modifier from the list Returns True if done, False if <modif> not in the list. More...
 
Standard_Boolean RemoveModifier (const Standard_Integer num)
 Removes a Modifier from the list, given its rank Returns True if done, False if <num> is out of range. More...
 
Standard_Boolean Perform (const Interface_Graph &G, const Handle< Interface_Protocol > &protocol, Interface_CheckIterator &checks, Handle< Interface_InterfaceModel > &newmod) override
 Performs the Standard Transformation, by calling Copy then ApplyModifiers (which can return an error status) More...
 
void Copy (const Interface_Graph &G, Interface_CopyTool &TC, Handle< Interface_InterfaceModel > &newmod) const
 This the first operation. It calls StandardCopy or OnTheSpot according the option. More...
 
void StandardCopy (const Interface_Graph &G, Interface_CopyTool &TC, Handle< Interface_InterfaceModel > &newmod) const
 This is the standard action of Copy : its takes into account only the remaining entities (noted by Graph Status positive) and their proper dependances of course. Produces a new model. More...
 
void OnTheSpot (const Interface_Graph &G, Interface_CopyTool &TC, Handle< Interface_InterfaceModel > &newmod) const
 This is the OnTheSpot action : each entity is bound with ... itself. The produced model is the same as the starting one. More...
 
Standard_Boolean ApplyModifiers (const Interface_Graph &G, const Handle< Interface_Protocol > &protocol, Interface_CopyTool &TC, Interface_CheckIterator &checks, Handle< Interface_InterfaceModel > &newmod) const
 Applies the modifiers sequencially. For each one, prepares required data (if a Selection is associated as a filter). For the option OnTheSpot, it determines if the graph may be changed and updates <newmod> if required If a Modifier causes an error (check "HasFailed"), ApplyModifier stops : the following Modifiers are ignored. More...
 
Standard_Boolean Updated (const Handle< Standard_Transient > &entfrom, Handle< Standard_Transient > &entto) const override
 This methods allows to know what happened to a starting entity after the last Perform. It reads result from the map which was filled by Perform. More...
 
TCollection_AsciiString Label () const override
 Returns a text which defines the way a Transformer works : "On the spot edition" or "Standard Copy" followed by "<nn> Modifiers". More...
 
- Public Member Functions inherited from IFSelect_Transformer
virtual Standard_Boolean ChangeProtocol (Handle< Interface_Protocol > &newproto) const
 This methods allows to declare that the Protocol applied to the new Model has changed. It applies to the last call to Perform. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Detailed Description

This class runs transformations made by Modifiers, as the ModelCopier does when it produces files (the same set of Modifiers can then be used, as to transform the starting Model, as at file sending time).

First, considering the resulting model, two options :

If a Selection is set, it forces the list of Entities on which the Modifiers are applied. Else, each Modifier is considered its Selection. By default, it is for the whole Model

Then, the Modifiers are sequentially applied If at least one Modifier "May Change Graph", or if the option StandardCopy is selected, the graph will be recomputed (by the WorkSession, see method RunTransformer)

Remark that a TransformStandard with option StandardCopy and no Modifier at all has the effect of computing the remaining data (those not yet sent in any output file). Moreover, the Protocol is not changed

Constructor & Destructor Documentation

◆ IFSelect_TransformStandard()

IFSelect_TransformStandard::IFSelect_TransformStandard ( )

Creates a TransformStandard, option StandardCopy, no Modifier.

Member Function Documentation

◆ AddModifier()

Standard_Boolean IFSelect_TransformStandard::AddModifier ( const Handle< IFSelect_Modifier > &  modif,
const Standard_Integer  atnum = 0 
)

Adds a Modifier to the list :

  • <atnum> = 0 (default) : at the end of the list
  • <atnum> > 0 : at rank <atnum> Returns True if done, False if <atnum> is out of range

◆ ApplyModifiers()

Standard_Boolean IFSelect_TransformStandard::ApplyModifiers ( const Interface_Graph G,
const Handle< Interface_Protocol > &  protocol,
Interface_CopyTool TC,
Interface_CheckIterator checks,
Handle< Interface_InterfaceModel > &  newmod 
) const

Applies the modifiers sequencially. For each one, prepares required data (if a Selection is associated as a filter). For the option OnTheSpot, it determines if the graph may be changed and updates <newmod> if required If a Modifier causes an error (check "HasFailed"), ApplyModifier stops : the following Modifiers are ignored.

◆ Copy()

void IFSelect_TransformStandard::Copy ( const Interface_Graph G,
Interface_CopyTool TC,
Handle< Interface_InterfaceModel > &  newmod 
) const

This the first operation. It calls StandardCopy or OnTheSpot according the option.

◆ CopyOption()

Standard_Boolean IFSelect_TransformStandard::CopyOption ( ) const

Returns the Copy option.

◆ Label()

TCollection_AsciiString IFSelect_TransformStandard::Label ( ) const
overridevirtual

Returns a text which defines the way a Transformer works : "On the spot edition" or "Standard Copy" followed by "<nn> Modifiers".

Implements IFSelect_Transformer.

◆ Modifier()

Handle< IFSelect_Modifier > IFSelect_TransformStandard::Modifier ( const Standard_Integer  num) const

Returns a Modifier given its rank in the list.

◆ ModifierRank()

Standard_Integer IFSelect_TransformStandard::ModifierRank ( const Handle< IFSelect_Modifier > &  modif) const

Returns the rank of a Modifier in the list, 0 if unknown.

◆ NbModifiers()

Standard_Integer IFSelect_TransformStandard::NbModifiers ( ) const

Returns the count of recorded Modifiers.

◆ OnTheSpot()

void IFSelect_TransformStandard::OnTheSpot ( const Interface_Graph G,
Interface_CopyTool TC,
Handle< Interface_InterfaceModel > &  newmod 
) const

This is the OnTheSpot action : each entity is bound with ... itself. The produced model is the same as the starting one.

◆ Perform()

Standard_Boolean IFSelect_TransformStandard::Perform ( const Interface_Graph G,
const Handle< Interface_Protocol > &  protocol,
Interface_CheckIterator checks,
Handle< Interface_InterfaceModel > &  newmod 
)
overridevirtual

Performs the Standard Transformation, by calling Copy then ApplyModifiers (which can return an error status)

Implements IFSelect_Transformer.

◆ RemoveModifier() [1/2]

Standard_Boolean IFSelect_TransformStandard::RemoveModifier ( const Handle< IFSelect_Modifier > &  modif)

Removes a Modifier from the list Returns True if done, False if <modif> not in the list.

◆ RemoveModifier() [2/2]

Standard_Boolean IFSelect_TransformStandard::RemoveModifier ( const Standard_Integer  num)

Removes a Modifier from the list, given its rank Returns True if done, False if <num> is out of range.

◆ Selection()

Handle< IFSelect_Selection > IFSelect_TransformStandard::Selection ( ) const

Returns the Selection, Null by default.

◆ SetCopyOption()

void IFSelect_TransformStandard::SetCopyOption ( const Standard_Boolean  option)

Sets the Copy option to a new value :

  • True for StandardCopy - False for OnTheSpot

◆ SetSelection()

void IFSelect_TransformStandard::SetSelection ( const Handle< IFSelect_Selection > &  sel)

Sets a Selection (or unsets if Null) This Selection then defines the list of entities on which the Modifiers will be applied If it is set, it has priority on Selections of Modifiers Else, for each Modifier its Selection is evaluated By default, all the Model is taken.

◆ StandardCopy()

void IFSelect_TransformStandard::StandardCopy ( const Interface_Graph G,
Interface_CopyTool TC,
Handle< Interface_InterfaceModel > &  newmod 
) const

This is the standard action of Copy : its takes into account only the remaining entities (noted by Graph Status positive) and their proper dependances of course. Produces a new model.

◆ Updated()

Standard_Boolean IFSelect_TransformStandard::Updated ( const Handle< Standard_Transient > &  entfrom,
Handle< Standard_Transient > &  entto 
) const
overridevirtual

This methods allows to know what happened to a starting entity after the last Perform. It reads result from the map which was filled by Perform.

Implements IFSelect_Transformer.


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