Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
IFSelect_ContextModif Class Reference

This class gathers various information used by Model Modifiers apart from the target model itself, and the CopyTool which must be passed directly. More...

#include <IFSelect_ContextModif.hxx>

Public Member Functions

 IFSelect_ContextModif (const Interface_Graph &graph, const Interface_CopyTool &TC, const char *const filename="")
 Prepares a ContextModif with these information :
 
 IFSelect_ContextModif (const Interface_Graph &graph, const char *const filename="")
 Prepares a ContextModif with these information :
 
void Select (Interface_EntityIterator &list)
 This method requires ContextModif to be applied with a filter. If a ModelModifier is defined with a Selection criterium, the result of this Selection is used as a filter :
 
const Interface_GraphOriginalGraph () const
 Returns the original Graph (compared to OriginalModel, it gives more query capabilitites)
 
occ::handle< Interface_InterfaceModelOriginalModel () const
 Returns the original model.
 
void SetProtocol (const occ::handle< Interface_Protocol > &proto)
 Allows to transmit a Protocol as part of a ContextModif.
 
occ::handle< Interface_ProtocolProtocol () const
 Returns the Protocol (Null if not set)
 
bool HasFileName () const
 Returns True if a non empty file name has been defined.
 
const charFileName () const
 Returns File Name (can be empty)
 
occ::handle< Interface_CopyControlControl () const
 Returns the map for a direct use, if required.
 
bool IsForNone () const
 Returns True if Select has determined that a Modifier may not be run (filter defined and empty)
 
bool IsForAll () const
 Returns True if no filter is defined : a Modifier has to work on all entities of the resulting (target) model.
 
bool IsTransferred (const occ::handle< Standard_Transient > &ent) const
 Returns True if a starting item has been transferred.
 
bool IsSelected (const occ::handle< Standard_Transient > &ent) const
 Returns True if a starting item has been transferred and selected.
 
bool Search (const occ::handle< Standard_Transient > &ent, occ::handle< Standard_Transient > &res) const
 Returns True if a starting entity has been transferred, and the result is in <res>. Returns False else (direct call to the map)
 
Interface_EntityIterator SelectedOriginal () const
 Returns the list of original selected items. See also the iteration.
 
Interface_EntityIterator SelectedResult () const
 Returns the list of resulting counterparts of selected items. See also the iteration.
 
int SelectedCount () const
 Returns the count of selected and transferred items.
 
void Start ()
 Starts an iteration on selected items. It takes into account IsForAll/IsForNone, by really iterating on all selected items.
 
bool More () const
 Returns True until the iteration has finished.
 
void Next ()
 Advances the iteration.
 
occ::handle< Standard_TransientValueOriginal () const
 Returns the current selected item in the original model.
 
occ::handle< Standard_TransientValueResult () const
 Returns the result counterpart of current selected item (in the target model)
 
void TraceModifier (const occ::handle< IFSelect_GeneralModifier > &modif)
 Traces the application of a Modifier. Works with default trace File and Level. Fills the trace if default trace level is at least 1. Traces the Modifier (its Label) and its Selection if there is one (its Label). To be called after Select (because status IsForAll is printed) Worths to trace a global modification. See also Trace below.
 
void Trace (const char *const mess="")
 Traces the modification of the current entity (see above, ValueOriginal and ValueResult) for default trace level >= 2. To be called on each individual entity really modified <mess> is an optional additional message.
 
void AddCheck (const occ::handle< Interface_Check > &check)
 Adds a Check to the CheckList. If it is empty, nothing is done If it concerns an Entity from the Original Model (by SetEntity) to which another Check is attached, it is merged to it. Else, it is added or merged as to GlobalCheck.
 
void AddWarning (const occ::handle< Standard_Transient > &start, const char *const mess, const char *const orig="")
 Adds a Warning Message for an Entity from the original Model If <start> is not an Entity from the original model (e.g. the model itself) this message is added to Global Check.
 
void AddFail (const occ::handle< Standard_Transient > &start, const char *const mess, const char *const orig="")
 Adds a Fail Message for an Entity from the original Model If <start> is not an Entity from the original model (e.g. the model itself) this message is added to Global Check.
 
occ::handle< Interface_CheckCCheck (const int num=0)
 Returns a Check given an Entity number (in the original Model) by default a Global Check. Creates it the first time. It can then be acknowledged on the spot, in condition that the caller works by reference ("Interface_Check& check = ...")
 
occ::handle< Interface_CheckCCheck (const occ::handle< Standard_Transient > &start)
 Returns a Check attached to an Entity from the original Model It can then be acknowledged on the spot, in condition that the caller works by reference ("Interface_Check& check = ...")
 
Interface_CheckIterator CheckList () const
 Returns the complete CheckList.
 

Detailed Description

This class gathers various information used by Model Modifiers apart from the target model itself, and the CopyTool which must be passed directly.

These information report to original data : model, entities, and the selection list if there is one : it allows to query about such or such starting entity, or result entity, or iterate on selection list ... Also data useful for file output are available (because some Modifiers concern models produced for file output).

Furthermore, in return, ContextModif can record Checks, either one for all, or one for each Entity. It supports trace too.

Constructor & Destructor Documentation

◆ IFSelect_ContextModif() [1/2]

IFSelect_ContextModif::IFSelect_ContextModif ( const Interface_Graph & graph,
const Interface_CopyTool & TC,
const char *const filename = "" )

Prepares a ContextModif with these information :

  • the graph established from original model (target passed directly to Modifier)
  • the CopyTool which detains the CopyControl, which maps starting (in original) and result (in target) entities
  • an optional file name (for file output)

Such a ContextModif is considered to be applied on all transferred entities (no filter active)

◆ IFSelect_ContextModif() [2/2]

IFSelect_ContextModif::IFSelect_ContextModif ( const Interface_Graph & graph,
const char *const filename = "" )

Prepares a ContextModif with these information :

  • the graph established from original model (target passed directly to Modifier)
  • an optional file name (for file output) Here, no CopyControl, hence all entities are considered equal as starting and result

Such a ContextModif is considered to be applied on all transferred entities (no filter active)

Member Function Documentation

◆ AddCheck()

void IFSelect_ContextModif::AddCheck ( const occ::handle< Interface_Check > & check)

Adds a Check to the CheckList. If it is empty, nothing is done If it concerns an Entity from the Original Model (by SetEntity) to which another Check is attached, it is merged to it. Else, it is added or merged as to GlobalCheck.

◆ AddFail()

void IFSelect_ContextModif::AddFail ( const occ::handle< Standard_Transient > & start,
const char *const mess,
const char *const orig = "" )

Adds a Fail Message for an Entity from the original Model If <start> is not an Entity from the original model (e.g. the model itself) this message is added to Global Check.

◆ AddWarning()

void IFSelect_ContextModif::AddWarning ( const occ::handle< Standard_Transient > & start,
const char *const mess,
const char *const orig = "" )

Adds a Warning Message for an Entity from the original Model If <start> is not an Entity from the original model (e.g. the model itself) this message is added to Global Check.

◆ CCheck() [1/2]

occ::handle< Interface_Check > IFSelect_ContextModif::CCheck ( const int num = 0)

Returns a Check given an Entity number (in the original Model) by default a Global Check. Creates it the first time. It can then be acknowledged on the spot, in condition that the caller works by reference ("Interface_Check& check = ...")

◆ CCheck() [2/2]

occ::handle< Interface_Check > IFSelect_ContextModif::CCheck ( const occ::handle< Standard_Transient > & start)

Returns a Check attached to an Entity from the original Model It can then be acknowledged on the spot, in condition that the caller works by reference ("Interface_Check& check = ...")

◆ CheckList()

Interface_CheckIterator IFSelect_ContextModif::CheckList ( ) const

Returns the complete CheckList.

◆ Control()

occ::handle< Interface_CopyControl > IFSelect_ContextModif::Control ( ) const

Returns the map for a direct use, if required.

◆ FileName()

const char * IFSelect_ContextModif::FileName ( ) const

Returns File Name (can be empty)

◆ HasFileName()

bool IFSelect_ContextModif::HasFileName ( ) const

Returns True if a non empty file name has been defined.

◆ IsForAll()

bool IFSelect_ContextModif::IsForAll ( ) const

Returns True if no filter is defined : a Modifier has to work on all entities of the resulting (target) model.

◆ IsForNone()

bool IFSelect_ContextModif::IsForNone ( ) const

Returns True if Select has determined that a Modifier may not be run (filter defined and empty)

◆ IsSelected()

bool IFSelect_ContextModif::IsSelected ( const occ::handle< Standard_Transient > & ent) const

Returns True if a starting item has been transferred and selected.

◆ IsTransferred()

bool IFSelect_ContextModif::IsTransferred ( const occ::handle< Standard_Transient > & ent) const

Returns True if a starting item has been transferred.

◆ More()

bool IFSelect_ContextModif::More ( ) const

Returns True until the iteration has finished.

◆ Next()

void IFSelect_ContextModif::Next ( )

Advances the iteration.

◆ OriginalGraph()

const Interface_Graph & IFSelect_ContextModif::OriginalGraph ( ) const

Returns the original Graph (compared to OriginalModel, it gives more query capabilitites)

◆ OriginalModel()

occ::handle< Interface_InterfaceModel > IFSelect_ContextModif::OriginalModel ( ) const

Returns the original model.

◆ Protocol()

occ::handle< Interface_Protocol > IFSelect_ContextModif::Protocol ( ) const

Returns the Protocol (Null if not set)

◆ Search()

bool IFSelect_ContextModif::Search ( const occ::handle< Standard_Transient > & ent,
occ::handle< Standard_Transient > & res ) const

Returns True if a starting entity has been transferred, and the result is in <res>. Returns False else (direct call to the map)

◆ Select()

void IFSelect_ContextModif::Select ( Interface_EntityIterator & list)

This method requires ContextModif to be applied with a filter. If a ModelModifier is defined with a Selection criterium, the result of this Selection is used as a filter :

  • if none of its items has been transferred, the modification does not apply at all
  • else, the Modifier can query for what entities were selected and what are their results
  • if this method is not called before working, the Modifier has to work on the whole Model

◆ SelectedCount()

int IFSelect_ContextModif::SelectedCount ( ) const

Returns the count of selected and transferred items.

◆ SelectedOriginal()

Interface_EntityIterator IFSelect_ContextModif::SelectedOriginal ( ) const

Returns the list of original selected items. See also the iteration.

◆ SelectedResult()

Interface_EntityIterator IFSelect_ContextModif::SelectedResult ( ) const

Returns the list of resulting counterparts of selected items. See also the iteration.

◆ SetProtocol()

void IFSelect_ContextModif::SetProtocol ( const occ::handle< Interface_Protocol > & proto)

Allows to transmit a Protocol as part of a ContextModif.

◆ Start()

void IFSelect_ContextModif::Start ( )

Starts an iteration on selected items. It takes into account IsForAll/IsForNone, by really iterating on all selected items.

◆ Trace()

void IFSelect_ContextModif::Trace ( const char *const mess = "")

Traces the modification of the current entity (see above, ValueOriginal and ValueResult) for default trace level >= 2. To be called on each individual entity really modified <mess> is an optional additional message.

◆ TraceModifier()

void IFSelect_ContextModif::TraceModifier ( const occ::handle< IFSelect_GeneralModifier > & modif)

Traces the application of a Modifier. Works with default trace File and Level. Fills the trace if default trace level is at least 1. Traces the Modifier (its Label) and its Selection if there is one (its Label). To be called after Select (because status IsForAll is printed) Worths to trace a global modification. See also Trace below.

◆ ValueOriginal()

occ::handle< Standard_Transient > IFSelect_ContextModif::ValueOriginal ( ) const

Returns the current selected item in the original model.

◆ ValueResult()

occ::handle< Standard_Transient > IFSelect_ContextModif::ValueResult ( ) const

Returns the result counterpart of current selected item (in the target model)


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