Open CASCADE Technology
6.5.4
|
This class gathers various informations used by Model Modifiers
apart from the target model itself, and the CopyTool which
must be passed directly.
These informations 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.
#include <IFSelect_ContextModif.hxx>
Public Member Functions | |
DEFINE_STANDARD_ALLOC | IFSelect_ContextModif (const Interface_Graph &graph, const Interface_CopyTool &TC, const Standard_CString filename="") |
Prepares a ContextModif with these informations : | |
IFSelect_ContextModif (const Interface_Graph &graph, const Standard_CString filename="") | |
Prepares a ContextModif with these informations : | |
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_Graph & | OriginalGraph () const |
Returns the original Graph (compared to OriginalModel, it gives more query capabilitites) | |
Handle_Interface_InterfaceModel | OriginalModel () const |
Returns the original model | |
void | SetProtocol (const Handle< Interface_Protocol > &proto) |
Allows to transmit a Protocol as part of a ContextModif | |
Handle_Interface_Protocol | Protocol () const |
Returns the Protocol (Null if not set) | |
Standard_Boolean | HasFileName () const |
Returns True if a non empty file name has been defined | |
Standard_CString | FileName () const |
Returns File Name (can be empty) | |
Handle_Interface_CopyControl | Control () const |
Returns the map for a direct use, if required | |
Standard_Boolean | IsForNone () const |
Returns True if Select has determined that a Modifier may not be run (filter defined and empty) | |
Standard_Boolean | IsForAll () const |
Returns True if no filter is defined : a Modifier has to work on all entities of the resulting (target) model | |
Standard_Boolean | IsTransferred (const Handle< Standard_Transient > &ent) const |
Returns True if a starting item has been transferred | |
Standard_Boolean | IsSelected (const Handle< Standard_Transient > &ent) const |
Returns True if a starting item has been transferred and selected | |
Standard_Boolean | Search (const Handle< Standard_Transient > &ent, 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 | |
Standard_Integer | 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. | |
Standard_Boolean | More () const |
Returns True until the iteration has finished | |
void | Next () |
Advances the iteration | |
Handle_Standard_Transient | ValueOriginal () const |
Returns the current selected item in the original model | |
Handle_Standard_Transient | ValueResult () const |
Returns the result counterpart of current selected item (in the target model) | |
void | TraceModifier (const 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 Standard_CString mess="") |
Traces the modification of the current entity (see above, ValueOriginal and ValueResult) for default trace level >= 2. To be called on each indivudual entity really modified <mess> is an optionnal additional message | |
void | AddCheck (const 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 Handle< Standard_Transient > &start, const Standard_CString mess, const Standard_CString 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 Handle< Standard_Transient > &start, const Standard_CString mess, const Standard_CString 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. | |
Handle_Interface_Check | CCheck (const Standard_Integer 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 = ...") | |
Handle_Interface_Check | CCheck (const 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 |
DEFINE_STANDARD_ALLOC IFSelect_ContextModif::IFSelect_ContextModif | ( | const Interface_Graph & | graph, |
const Interface_CopyTool & | TC, | ||
const Standard_CString | filename = "" |
||
) |
- the graph established from original model (target passed <br> directly to Modifier) <br> - the CopyTool which detains the CopyControl, which maps <br> starting (in original) and result (in target) entities <br> - an optional file name (for file output) <br>
Such a ContextModif is considered to be applied on all
transferred entities (no filter active)
IFSelect_ContextModif::IFSelect_ContextModif | ( | const Interface_Graph & | graph, |
const Standard_CString | filename = "" |
||
) |
- the graph established from original model (target passed <br> directly to Modifier) <br> - an optional file name (for file output) <br> Here, no CopyControl, hence all entities are considered equal <br> as starting and result <br>
Such a ContextModif is considered to be applied on all
transferred entities (no filter active)
void IFSelect_ContextModif::AddCheck | ( | const Handle< Interface_Check > & | check | ) |
void IFSelect_ContextModif::AddFail | ( | const Handle< Standard_Transient > & | start, |
const Standard_CString | mess, | ||
const Standard_CString | orig = "" |
||
) |
void IFSelect_ContextModif::AddWarning | ( | const Handle< Standard_Transient > & | start, |
const Standard_CString | mess, | ||
const Standard_CString | orig = "" |
||
) |
Handle_Interface_Check IFSelect_ContextModif::CCheck | ( | const Standard_Integer | num = 0 | ) |
Handle_Interface_Check IFSelect_ContextModif::CCheck | ( | const Handle< Standard_Transient > & | start | ) |
Handle_Interface_CopyControl IFSelect_ContextModif::Control | ( | ) | const |
Standard_Boolean IFSelect_ContextModif::IsSelected | ( | const Handle< Standard_Transient > & | ent | ) | const |
Standard_Boolean IFSelect_ContextModif::IsTransferred | ( | const Handle< Standard_Transient > & | ent | ) | const |
Standard_Boolean IFSelect_ContextModif::More | ( | ) | const |
Handle_Interface_InterfaceModel IFSelect_ContextModif::OriginalModel | ( | ) | const |
Handle_Interface_Protocol IFSelect_ContextModif::Protocol | ( | ) | const |
Standard_Boolean IFSelect_ContextModif::Search | ( | const Handle< Standard_Transient > & | ent, |
Handle< Standard_Transient > & | res | ||
) | const |
void IFSelect_ContextModif::SetProtocol | ( | const Handle< Interface_Protocol > & | proto | ) |
void IFSelect_ContextModif::Trace | ( | const Standard_CString | mess = "" | ) |