![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
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>

Public Member Functions | |
| IFSelect_TransformStandard () | |
| Creates a TransformStandard, option StandardCopy, no Modifier. | |
| void | SetCopyOption (const bool option) |
| Sets the Copy option to a new value : True for StandardCopy. False for OnTheSpot. | |
| bool | CopyOption () const |
| Returns the Copy option. | |
| void | SetSelection (const occ::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. | |
| occ::handle< IFSelect_Selection > | Selection () const |
| Returns the Selection, Null by default. | |
| int | NbModifiers () const |
| Returns the count of recorded Modifiers. | |
| occ::handle< IFSelect_Modifier > | Modifier (const int num) const |
| Returns a Modifier given its rank in the list. | |
| int | ModifierRank (const occ::handle< IFSelect_Modifier > &modif) const |
| Returns the rank of a Modifier in the list, 0 if unknown. | |
| bool | AddModifier (const occ::handle< IFSelect_Modifier > &modif, const int atnum=0) |
| Adds a Modifier to the list : | |
| bool | RemoveModifier (const occ::handle< IFSelect_Modifier > &modif) |
| Removes a Modifier from the list Returns True if done, False if <modif> not in the list. | |
| bool | RemoveModifier (const int num) |
| Removes a Modifier from the list, given its rank Returns True if done, False if <num> is out of range. | |
| bool | Perform (const Interface_Graph &G, const occ::handle< Interface_Protocol > &protocol, Interface_CheckIterator &checks, occ::handle< Interface_InterfaceModel > &newmod) override |
| Performs the Standard Transformation, by calling Copy then ApplyModifiers (which can return an error status) | |
| occ::handle< Interface_InterfaceModel > | Copy (const Interface_Graph &G, Interface_CopyTool &TC) const |
| This the first operation. It calls StandardCopy or OnTheSpot according the option Performs the copy operation. Calls StandardCopy or OnTheSpot according to the copy option. | |
| void | Copy (const Interface_Graph &G, Interface_CopyTool &TC, occ::handle< Interface_InterfaceModel > &newmod) const |
| occ::handle< Interface_InterfaceModel > | StandardCopy (const Interface_Graph &G, Interface_CopyTool &TC) const |
| This is the standard action of Copy : its takes into account only the remaining entities (noted by Graph Status positive) and their proper dependences of course. Produces a new model. Performs a standard copy of remaining entities and their dependencies. | |
| void | StandardCopy (const Interface_Graph &G, Interface_CopyTool &TC, occ::handle< Interface_InterfaceModel > &newmod) const |
| occ::handle< Interface_InterfaceModel > | OnTheSpot (const Interface_Graph &G, Interface_CopyTool &TC) const |
| This is the OnTheSpot action : each entity is bound with ... itself. The produced model is the same as the starting one. Performs the on-the-spot action: each entity is bound with itself. The produced model is the same as the starting one. | |
| void | OnTheSpot (const Interface_Graph &G, Interface_CopyTool &TC, occ::handle< Interface_InterfaceModel > &newmod) const |
| bool | ApplyModifiers (const Interface_Graph &G, const occ::handle< Interface_Protocol > &protocol, Interface_CopyTool &TC, Interface_CheckIterator &checks, occ::handle< Interface_InterfaceModel > &newmod) const |
| Applies the modifiers sequentially. 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. | |
| bool | Updated (const occ::handle< Standard_Transient > &entfrom, occ::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. | |
| 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". | |
Public Member Functions inherited from IFSelect_Transformer | |
| virtual bool | ChangeProtocol (occ::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. | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. | |
| virtual | ~Standard_Transient ()=default |
| Destructor must be virtual. | |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. | |
| bool | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. | |
| bool | IsInstance (const char *const theTypeName) const |
| Returns a true value if this is an instance of TypeName. | |
| bool | 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. | |
| bool | IsKind (const char *const 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. | |
| Standard_Transient * | This () 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. | |
| int | GetRefCount () const noexcept |
| Get the reference counter of this object. | |
| void | IncrementRefCounter () noexcept |
| Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations. | |
| int | DecrementRefCounter () noexcept |
| Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement. | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. | |
Additional Inherited Members | |
Public Types inherited from Standard_Transient | |
| typedef void | base_type |
| Returns a type descriptor about this object. | |
Static Public Member Functions inherited from Standard_Transient | |
| static constexpr const char * | get_type_name () |
| Returns a type descriptor about this object. | |
| static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
| Returns type descriptor of Standard_Transient class. | |
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
| IFSelect_TransformStandard::IFSelect_TransformStandard | ( | ) |
Creates a TransformStandard, option StandardCopy, no Modifier.
| bool IFSelect_TransformStandard::AddModifier | ( | const occ::handle< IFSelect_Modifier > & | modif, |
| const int | atnum = 0 ) |
Adds a Modifier to the list :
| bool IFSelect_TransformStandard::ApplyModifiers | ( | const Interface_Graph & | G, |
| const occ::handle< Interface_Protocol > & | protocol, | ||
| Interface_CopyTool & | TC, | ||
| Interface_CheckIterator & | checks, | ||
| occ::handle< Interface_InterfaceModel > & | newmod ) const |
Applies the modifiers sequentially. 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.
| occ::handle< Interface_InterfaceModel > IFSelect_TransformStandard::Copy | ( | const Interface_Graph & | G, |
| Interface_CopyTool & | TC ) const |
This the first operation. It calls StandardCopy or OnTheSpot according the option Performs the copy operation. Calls StandardCopy or OnTheSpot according to the copy option.
| [in] | G | the interface graph |
| [in,out] | TC | the copy tool |
| void IFSelect_TransformStandard::Copy | ( | const Interface_Graph & | G, |
| Interface_CopyTool & | TC, | ||
| occ::handle< Interface_InterfaceModel > & | newmod ) const |
Use Copy() returning handle by value instead.
("Use Copy() returning handle by value instead")
| bool IFSelect_TransformStandard::CopyOption | ( | ) | const |
Returns the Copy option.
|
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.
| occ::handle< IFSelect_Modifier > IFSelect_TransformStandard::Modifier | ( | const int | num | ) | const |
Returns a Modifier given its rank in the list.
| int IFSelect_TransformStandard::ModifierRank | ( | const occ::handle< IFSelect_Modifier > & | modif | ) | const |
Returns the rank of a Modifier in the list, 0 if unknown.
| int IFSelect_TransformStandard::NbModifiers | ( | ) | const |
Returns the count of recorded Modifiers.
| occ::handle< Interface_InterfaceModel > IFSelect_TransformStandard::OnTheSpot | ( | const Interface_Graph & | G, |
| Interface_CopyTool & | TC ) const |
This is the OnTheSpot action : each entity is bound with ... itself. The produced model is the same as the starting one. Performs the on-the-spot action: each entity is bound with itself. The produced model is the same as the starting one.
| [in] | G | the interface graph |
| [in,out] | TC | the copy tool |
| void IFSelect_TransformStandard::OnTheSpot | ( | const Interface_Graph & | G, |
| Interface_CopyTool & | TC, | ||
| occ::handle< Interface_InterfaceModel > & | newmod ) const |
Use OnTheSpot() returning handle by value instead.
("Use OnTheSpot() returning handle by value instead")
|
overridevirtual |
Performs the Standard Transformation, by calling Copy then ApplyModifiers (which can return an error status)
Implements IFSelect_Transformer.
Removes a Modifier from the list, given its rank Returns True if done, False if <num> is out of range.
| bool IFSelect_TransformStandard::RemoveModifier | ( | const occ::handle< IFSelect_Modifier > & | modif | ) |
Removes a Modifier from the list Returns True if done, False if <modif> not in the list.
| occ::handle< IFSelect_Selection > IFSelect_TransformStandard::Selection | ( | ) | const |
Returns the Selection, Null by default.
Sets the Copy option to a new value : True for StandardCopy. False for OnTheSpot.
| void IFSelect_TransformStandard::SetSelection | ( | const occ::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.
| occ::handle< Interface_InterfaceModel > IFSelect_TransformStandard::StandardCopy | ( | const Interface_Graph & | G, |
| Interface_CopyTool & | TC ) const |
This is the standard action of Copy : its takes into account only the remaining entities (noted by Graph Status positive) and their proper dependences of course. Produces a new model. Performs a standard copy of remaining entities and their dependencies.
| [in] | G | the interface graph |
| [in,out] | TC | the copy tool |
| void IFSelect_TransformStandard::StandardCopy | ( | const Interface_Graph & | G, |
| Interface_CopyTool & | TC, | ||
| occ::handle< Interface_InterfaceModel > & | newmod ) const |
Use StandardCopy() returning handle by value instead.
("Use StandardCopy() returning handle by value instead")
|
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.