Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes
IFSelect_WorkSession Class Reference

This class can be used to simply manage a process such as splitting a file, extracting a set of Entities ... It allows to manage different types of Variables : Integer or Text Parameters, Selections, Dispatches, in addition to a ShareOut. To each of these variables, a unique Integer Identifier is attached. A Name can be attached too as desired. More...

#include <IFSelect_WorkSession.hxx>

Inheritance diagram for IFSelect_WorkSession:
Inheritance graph
[legend]

Public Member Functions

 IFSelect_WorkSession ()
 Creates a Work Session It provides default, empty ShareOut and ModelCopier, which can be replaced (if required, should be done just after creation).
 
void SetErrorHandle (const bool toHandle)
 Changes the Error Handler status (by default, it is not set)
 
bool ErrorHandle () const
 Returns the Error Handler status.
 
const occ::handle< IFSelect_ShareOut > & ShareOut () const
 Returns the ShareOut defined at creation time.
 
void SetShareOut (const occ::handle< IFSelect_ShareOut > &shareout)
 Sets a new ShareOut. Fills Items which its content Warning : data from the former ShareOut are lost.
 
void SetModeStat (const bool theMode)
 Set value of mode responsible for presence of selections after loading If mode set to true that different selections will be accessible after loading else selections will be not accessible after loading( for economy memory in applications)
 
bool GetModeStat () const
 Return value of mode defining of filling selection during loading.
 
void SetLibrary (const occ::handle< IFSelect_WorkLibrary > &theLib)
 Sets a WorkLibrary, which will be used to Read and Write Files.
 
const occ::handle< IFSelect_WorkLibrary > & WorkLibrary () const
 Returns the WorkLibrary. Null Handle if not yet set should be C++ : return const &.
 
void SetProtocol (const occ::handle< Interface_Protocol > &protocol)
 Sets a Protocol, which will be used to determine Graphs, to Read and to Write Files.
 
const occ::handle< Interface_Protocol > & Protocol () const
 Returns the Protocol. Null Handle if not yet set should be C++ : return const &.
 
void SetSignType (const occ::handle< IFSelect_Signature > &signtype)
 Sets a specific Signature to be the SignType, i.e. the Signature which will determine TypeName from the Model (basic function). It is recorded in the GTool This Signature is also set as "xst-sign-type" (reserved name)
 
occ::handle< IFSelect_SignatureSignType () const
 Returns the current SignType.
 
bool HasModel () const
 Returns True is a Model has been set.
 
void SetModel (const occ::handle< Interface_InterfaceModel > &model, const bool clearpointed=true)
 Sets a Model as input : this will be the Model from which the ShareOut will work if <clearpointed> is True (default) all SelectPointed items are cleared, else they must be managed by the caller Remark : SetModel clears the Graph, recomputes it if a Protocol is set and if the Model is not empty, of course.
 
const occ::handle< Interface_InterfaceModel > & Model () const
 Returns the Model of the Work Session (Null Handle if none) should be C++ : return const &.
 
void SetLoadedFile (const char *const theFileName)
 Stores the filename used for read for setting the model It is cleared by SetModel and ClearData(1)
 
const charLoadedFile () const
 Returns the filename used to load current model empty if unknown.
 
IFSelect_ReturnStatus ReadFile (const char *const filename)
 Reads a file with the WorkLibrary (sets Model and LoadedFile) Returns a integer status which can be : RetDone if OK, RetVoid if no Protocol not defined, RetError for file not found, RetFail if fail during read.
 
IFSelect_ReturnStatus ReadStream (const char *const theName, std::istream &theIStream)
 Reads a file from stream with the WorkLibrary (sets Model and LoadedFile) Returns a integer status which can be : RetDone if OK, RetVoid if no Protocol not defined, RetError for file not found, RetFail if fail during read.
 
int NbStartingEntities () const
 Returns the count of Entities stored in the Model, or 0.
 
occ::handle< Standard_TransientStartingEntity (const int num) const
 Returns an Entity stored in the Model of the WorkSession (Null Handle is no Model or num out of range)
 
int StartingNumber (const occ::handle< Standard_Transient > &ent) const
 Returns the Number of an Entity in the Model (0 if no Model set or <ent> not in the Model)
 
int NumberFromLabel (const char *const val, const int afternum=0) const
 From a given label in Model, returns the corresponding number Starts from first entity by Default, may start after a given number : this number may be given negative, its absolute value is then considered. Hence a loop on NumberFromLabel may be programmed (stop test is : returned value positive or null)
 
occ::handle< TCollection_HAsciiStringEntityLabel (const occ::handle< Standard_Transient > &ent) const
 Returns the label for <ent>, as the Model does If <ent> is not in the Model or if no Model is loaded, a Null Handle is returned.
 
occ::handle< TCollection_HAsciiStringEntityName (const occ::handle< Standard_Transient > &ent) const
 Returns the Name of an Entity This Name is computed by the general service Name Returns a Null Handle if fails.
 
int CategoryNumber (const occ::handle< Standard_Transient > &ent) const
 Returns the Category Number determined for an entity it is computed by the class Category An unknown entity (number 0) gives a value -1.
 
const charCategoryName (const occ::handle< Standard_Transient > &ent) const
 Returns the Category Name determined for an entity it is computed by the class Category Remark : an unknown entity gives an empty string.
 
const charValidityName (const occ::handle< Standard_Transient > &ent) const
 Returns the Validity Name determined for an entity it is computed by the class SignValidity Remark : an unknown entity gives an empty string.
 
virtual void ClearData (const int mode)
 Clears recorded data (not the items) according mode : 1 : all Data : Model, Graph, CheckList, + ClearData 4 2 : Graph and CheckList (they will then be recomputed later) 3 : CheckList (it will be recomputed by ComputeCheck) 4 : just content of SelectPointed and Counters Plus 0 : does nothing but called by SetModel ClearData is virtual, hence it can be redefined to clear other data of a specialised Work Session.
 
bool ComputeGraph (const bool enforce=false)
 Computes the Graph used for Selections, Displays ... If a HGraph is already set, with same model as given by method Model, does nothing. Else, computes a new Graph. If <enforce> is given True, computes a new Graph anyway. Remark that a call to ClearGraph will cause ComputeGraph to really compute a new Graph Returns True if Graph is OK, False else (i.e. if no Protocol is set, or if Model is absent or empty).
 
occ::handle< Interface_HGraphHGraph ()
 Returns the Computed Graph as HGraph (Null Handle if not set)
 
const Interface_GraphGraph ()
 Returns the Computed Graph, for Read only.
 
occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > Shareds (const occ::handle< Standard_Transient > &ent)
 Returns the list of entities shared by <ent> (can be empty) Returns a null Handle if <ent> is unknown.
 
occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > Sharings (const occ::handle< Standard_Transient > &ent)
 Returns the list of entities sharing <ent> (can be empty) Returns a null Handle if <ent> is unknown.
 
bool IsLoaded () const
 Returns True if a Model is defined and really loaded (not empty), a Protocol is set and a Graph has been computed. In this case, the WorkSession can start to work.
 
bool ComputeCheck (const bool enforce=false)
 Computes the CheckList for the Model currently loaded It can then be used for displays, queries ... Returns True if OK, False else (i.e. no Protocol set, or Model absent). If <enforce> is False, works only if not already done or if a new Model has been loaded from last call. Remark : computation is enforced by every call to SetModel or RunTransformer.
 
Interface_CheckIterator ModelCheckList (const bool complete=true)
 Returns the Check List for the Model currently loaded : <complete> = True : complete (syntactic & semantic messages), computed if not yet done <complete> = False : only syntactic (check file form)
 
Interface_CheckIterator CheckOne (const occ::handle< Standard_Transient > &ent, const bool complete=true)
 Returns a Check for a single entity, under the form of a CheckIterator (this gives only one form for the user) if <ent> is Null or equates the current Model, it gives the Global Check, else the Check for the given entity <complete> as for ModelCheckList.
 
Interface_CheckIterator LastRunCheckList () const
 Returns the Check List produced by the last execution of either : EvaluateFile(for Split), SendSplit, SendAll, SendSelected, RunTransformer-RunModifier Cleared by SetModel or ClearData(1) The field is protected, hence a specialized WorkSession may fill it.
 
int MaxIdent () const
 Returns the Maximum Value for an Item Identifier. It can be greater to the count of known Items, because some can have been removed.
 
occ::handle< Standard_TransientItem (const int id) const
 Returns an Item, given its Ident. Returns a Null Handle if no Item corresponds to this Ident.
 
int ItemIdent (const occ::handle< Standard_Transient > &item) const
 Returns the Ident attached to an Item in the WorkSession, or Zero if it is unknown.
 
occ::handle< Standard_TransientNamedItem (const char *const name) const
 Returns the Item which corresponds to a Variable, given its Name (whatever the type of this Item). Returns a Null Handle if this Name is not recorded.
 
occ::handle< Standard_TransientNamedItem (const occ::handle< TCollection_HAsciiString > &name) const
 Same as above, but <name> is given through a Handle Especially useful with methods SelectionNames, etc...
 
int NameIdent (const char *const name) const
 Returns the Ident attached to a Name, 0 if name not recorded.
 
bool HasName (const occ::handle< Standard_Transient > &item) const
 Returns True if an Item of the WorkSession has an attached Name.
 
occ::handle< TCollection_HAsciiStringName (const occ::handle< Standard_Transient > &item) const
 Returns the Name attached to an Item as a Variable of this WorkSession. If is Null or not recorded, returns an empty string.
 
int AddItem (const occ::handle< Standard_Transient > &item, const bool active=true)
 Adds an Item and returns its attached Ident. Does nothing if is already recorded (and returns its attached Ident) <active> if True commands call to SetActive (see below) Remark : the determined Ident is used if is a Dispatch, to fill the ShareOut.
 
int AddNamedItem (const char *const name, const occ::handle< Standard_Transient > &item, const bool active=true)
 Adds an Item with an attached Name. If the Name is already known in the WorkSession, the older item losts it Returns Ident if Done, 0 else, i.e. if is null If <name> is empty, works as AddItem (i.e. with no name) If is already known but with no attached Name, this method tries to attached a Name to it <active> if True commands call to SetActive (see below)
 
bool SetActive (const occ::handle< Standard_Transient > &item, const bool mode)
 Following the type of :
 
bool RemoveNamedItem (const char *const name)
 Removes an Item from the Session, given its Name Returns True if Done, False else (Name not recorded) (Applies only on Item which are Named)
 
bool RemoveName (const char *const name)
 Removes a Name without removing the Item Returns True if Done, False else (Name not recorded)
 
bool RemoveItem (const occ::handle< Standard_Transient > &item)
 Removes an Item given its Ident. Returns False if <id> is attached to no Item in the WorkSession. For a Named Item, also removes its Name.
 
void ClearItems ()
 Clears all the recorded Items : Selections, Dispatches, Modifiers, and Strings & IntParams, with their Idents & Names. Remark that if a Model has been loaded, it is not cleared.
 
occ::handle< TCollection_HAsciiStringItemLabel (const int id) const
 Returns a Label which illustrates the content of an Item, given its Ident. This Label is :
 
occ::handle< NCollection_HSequence< int > > ItemIdents (const occ::handle< Standard_Type > &type) const
 Fills a Sequence with the List of Idents attached to the Items of which Type complies with (IsKind) <type> (alphabetic order) Remark : <type> = TYPE(Standard_Transient) gives all the Idents which are suitable in the WorkSession.
 
occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > ItemNames (const occ::handle< Standard_Type > &type) const
 Fills a Sequence with the list of the Names attached to Items of which Type complies with (IsKind) <type> (alphabetic order) Remark : <type> = TYPE(Standard_Transient) gives all the Names.
 
occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > ItemNamesForLabel (const char *const label) const
 Fills a Sequence with the NAMES of the control items, of which the label matches <label> (contain it) : see NextIdentForLabel Search mode is fixed to "contained" If <label> is empty, returns all Names.
 
int NextIdentForLabel (const char *const label, const int id, const int mode=0) const
 For query by Label with possible iterations Searches the Ident of which Item has a Label which matches a given one, the search starts from an initial Ident. Returns the first found Ident which follows <id>, or ZERO.
 
occ::handle< Standard_TransientNewParamFromStatic (const char *const statname, const char *const name="")
 Creates a parameter as being bound to a Static If the Static is Integer, this creates an IntParam bound to it by its name. Else this creates a String which is the value of the Static. Returns a null handle if <statname> is unknown as a Static.
 
occ::handle< IFSelect_IntParamIntParam (const int id) const
 Returns an IntParam, given its Ident in the Session Null result if <id> is not suitable for an IntParam (undefined, or defined for another kind of variable)
 
int IntValue (const occ::handle< IFSelect_IntParam > &it) const
 Returns Integer Value of an IntParam.
 
occ::handle< IFSelect_IntParamNewIntParam (const char *const name="")
 Creates a new IntParam. A Name can be set (Optional) Returns the created IntParam, or a Null Handle in case of Failure (see AddItem/AddNamedItem)
 
bool SetIntValue (const occ::handle< IFSelect_IntParam > &it, const int val)
 Changes the Integer Value of an IntParam Returns True if Done, False if <it> is not in the WorkSession.
 
occ::handle< TCollection_HAsciiStringTextParam (const int id) const
 Returns a TextParam, given its Ident in the Session Null result if <id> is not suitable for a TextParam (undefined, or defined for another kind of variable)
 
TCollection_AsciiString TextValue (const occ::handle< TCollection_HAsciiString > &par) const
 Returns Text Value of a TextParam (a String) or an empty string if <it> is not in the WorkSession.
 
occ::handle< TCollection_HAsciiStringNewTextParam (const char *const name="")
 Creates a new (empty) TextParam. A Name can be set (Optional) Returns the created TextParam (as an HAsciiString), or a Null Handle in case of Failure (see AddItem/AddNamedItem)
 
bool SetTextValue (const occ::handle< TCollection_HAsciiString > &par, const char *const val)
 Changes the Text Value of a TextParam (an HAsciiString) Returns True if Done, False if <it> is not in the WorkSession.
 
occ::handle< IFSelect_SignatureSignature (const int id) const
 Returns a Signature, given its Ident in the Session Null result if <id> is not suitable for a Signature (undefined, or defined for another kind of variable)
 
const charSignValue (const occ::handle< IFSelect_Signature > &sign, const occ::handle< Standard_Transient > &ent) const
 Returns the Value computed by a Signature for an Entity Returns an empty string if the entity does not belong to the loaded model.
 
occ::handle< IFSelect_SelectionSelection (const int id) const
 Returns a Selection, given its Ident in the Session Null result if <id> is not suitable for a Selection (undefined, or defined for another kind of variable)
 
Interface_EntityIterator EvalSelection (const occ::handle< IFSelect_Selection > &sel) const
 Evaluates the effect of a Selection applied on the input Model Returned Result remains empty if no input Model has been set.
 
IFSelect_SelectionIterator Sources (const occ::handle< IFSelect_Selection > &sel) const
 Returns the Selections which are source of Selection, given its rank in the List of Selections (see SelectionIterator) Returned value is empty if <num> is out of range or if <sel> is not in the WorkSession.
 
occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > SelectionResult (const occ::handle< IFSelect_Selection > &sel) const
 Returns the result of a Selection, computed by EvalSelection (see above) under the form of a HSequence (hence, it can be used by a frontal-engine logic). It can be empty Returns a Null Handle if <sel> is not in the WorkSession.
 
occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > SelectionResultFromList (const occ::handle< IFSelect_Selection > &sel, const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > &list) const
 Returns the result of a Selection, by forcing its input with a given list

unless

Null). RULES :

only for a SelectDeduct kind Selection : its Input is considered : if it is a SelectDeduct kind Selection, its Input is considered, etc... until an Input is not a Deduct/Extract : its result is replaced by

all the chain of deductions is applied.

 
bool SetItemSelection (const occ::handle< Standard_Transient > &item, const occ::handle< IFSelect_Selection > &sel)
 Sets a Selection as input for an item, according its type : if is a Dispatch : as Final Selection if is a GeneralModifier (i.e. any kind of Modifier) : as Selection used to filter entities to modify <sel> Null causes this Selection to be nullified Returns False if is not of a suitable type, or or <sel> is not in the WorkSession.
 
bool ResetItemSelection (const occ::handle< Standard_Transient > &item)
 Resets input Selection which was set by SetItemSelection Same conditions as for SetItemSelection Returns True if done, False if is not in the WorkSession.
 
occ::handle< IFSelect_SelectionItemSelection (const occ::handle< Standard_Transient > &item) const
 Returns the Selection of a Dispatch or a GeneralModifier. Returns a Null Handle if none is defined or not good type.
 
occ::handle< IFSelect_SignCounterSignCounter (const int id) const
 Returns a SignCounter from its ident in the Session Null result if <id> is not suitable for a SignCounter (undefined, or defined for another kind of variable)
 
bool ComputeCounter (const occ::handle< IFSelect_SignCounter > &counter, const bool forced=false)
 Computes the content of a SignCounter when it is defined with a Selection, then returns True Returns False if the SignCounter is not defined with a Selection, or if its Selection Mode is inhibited <forced> to work around optimisations.
 
bool ComputeCounterFromList (const occ::handle< IFSelect_SignCounter > &counter, const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > &list, const bool clear=true)
 Computes the content of a SignCounter from an input list If

Null, uses internal definition of the Counter : a Selection, else the whole Model (recomputation forced) If <clear> is True (D), starts from scratch Else, cumulates computations.

 
occ::handle< NCollection_HSequence< int > > AppliedDispatches () const
 Returns the ordered list of dispatches stored by the ShareOut.
 
void ClearShareOut (const bool onlydisp)
 Clears the list of Dispatches recorded by the ShareOut if <only> disp is True, tha's all. Else, clears also the lists of Modifiers recorded by the ShareOut.
 
occ::handle< IFSelect_DispatchDispatch (const int id) const
 Returns a Dispatch, given its Ident in the Session Null result if <id> is not suitable for a Dispatch (undefined, or defined for another kind of variable)
 
int DispatchRank (const occ::handle< IFSelect_Dispatch > &disp) const
 Returns the rank of a Dispatch in the ShareOut, or 0 if <disp> is not in the ShareOut or not in the WorkSession.
 
const occ::handle< IFSelect_ModelCopier > & ModelCopier () const
 Gives access to the complete ModelCopier.
 
void SetModelCopier (const occ::handle< IFSelect_ModelCopier > &copier)
 Sets a new ModelCopier. Fills Items which its content.
 
int NbFinalModifiers (const bool formodel) const
 Returns the count of Modifiers applied to final sending Model Modifiers if <formodel> is True, File Modifiers else (i.e. Modifiers which apply once the Models have been filled)
 
occ::handle< NCollection_HSequence< int > > FinalModifierIdents (const bool formodel) const
 Fills a Sequence with a list of Idents, those attached to the Modifiers applied to final sending. Model Modifiers if <formodel> is True, File Modifiers else This list is given in the order in which they will be applied (which takes into account the Changes to Modifier Ranks)
 
occ::handle< IFSelect_GeneralModifierGeneralModifier (const int id) const
 Returns a Modifier, given its Ident in the Session Null result if <id> is not suitable for a Modifier (undefined, or defined for another kind of variable)
 
occ::handle< IFSelect_ModifierModelModifier (const int id) const
 Returns a Model Modifier, given its Ident in the Session, i.e. typed as a Modifier (not simply a GeneralModifier) Null result if <id> is not suitable for a Modifier (undefined, or defined for another kind of variable)
 
int ModifierRank (const occ::handle< IFSelect_GeneralModifier > &item) const
 Returns the Rank of a Modifier given its Ident. Model or File Modifier according its type (ModelModifier or not) Remember that Modifiers are applied sequentially following their Rank : first Model Modifiers then File Modifiers Rank is given by rank of call to AddItem and can be changed by ChangeModifierRank.
 
bool ChangeModifierRank (const bool formodel, const int before, const int after)
 Changes the Rank of a Modifier in the Session : Model Modifiers if <formodel> is True, File Modifiers else the Modifier n0 <before> is put to n0 <after> Return True if Done, False if <before> or <after> out of range.
 
void ClearFinalModifiers ()
 Removes all the Modifiers active in the ModelCopier : they become inactive and they are removed from the Session.
 
bool SetAppliedModifier (const occ::handle< IFSelect_GeneralModifier > &modif, const occ::handle< Standard_Transient > &item)
 Sets a GeneralModifier to be applied to an item :
 
bool ResetAppliedModifier (const occ::handle< IFSelect_GeneralModifier > &modif)
 Resets a GeneralModifier to be applied Returns True if done, False if <modif> was not applied.
 
occ::handle< Standard_TransientUsesAppliedModifier (const occ::handle< IFSelect_GeneralModifier > &modif) const
 Returns the item on which a GeneralModifier is applied : the ShareOut, or a given Dispatch Returns a Null Handle if <modif> is not applied.
 
occ::handle< IFSelect_TransformerTransformer (const int id) const
 Returns a Transformer, given its Ident in the Session Null result if <id> is not suitable for a Transformer (undefined, or defined for another kind of variable)
 
int RunTransformer (const occ::handle< IFSelect_Transformer > &transf)
 Runs a Transformer on starting Model, which can then be edited or replaced by a new one. The Protocol can also be changed. Fills LastRunCheckList.
 
int RunModifier (const occ::handle< IFSelect_Modifier > &modif, const bool copy)
 Runs a Modifier on Starting Model. It can modify entities, or add new ones. But the Model or the Protocol is unchanged. The Modifier is applied on each entity of the Model. See also RunModifierSelected Fills LastRunCheckList.
 
int RunModifierSelected (const occ::handle< IFSelect_Modifier > &modif, const occ::handle< IFSelect_Selection > &sel, const bool copy)
 Acts as RunModifier, but the Modifier is applied on the list determined by a Selection, rather than on the whole Model If the selection is a null handle, the whole model is taken.
 
occ::handle< IFSelect_TransformerNewTransformStandard (const bool copy, const char *const name="")
 Creates and returns a TransformStandard, empty, with its Copy Option (True = Copy, False = On the Spot) and an optional name. To a TransformStandard, the method SetAppliedModifier applies.
 
bool SetModelContent (const occ::handle< IFSelect_Selection > &sel, const bool keep)
 Defines a new content from the former one If <keep> is True, it is given by entities selected by Selection <sel> (and all shared entities) Else, it is given by all the former content but entities selected by the Selection <sel> (and properly shared ones) Returns True if done. Returns False if the selected list (from <sel>) is empty, hence nothing is done.
 
occ::handle< TCollection_HAsciiStringFilePrefix () const
 Returns the defined File Prefix. Null Handle if not defined.
 
occ::handle< TCollection_HAsciiStringDefaultFileRoot () const
 Returns the defined Default File Root. It is used for Dispatches which have no specific root attached. Null Handle if not defined.
 
occ::handle< TCollection_HAsciiStringFileExtension () const
 Returns the defined File Extension. Null Handle if not defined.
 
occ::handle< TCollection_HAsciiStringFileRoot (const occ::handle< IFSelect_Dispatch > &disp) const
 Returns the File Root defined for a Dispatch. Null if no Root Name is defined for it (hence, no File will be produced)
 
void SetFilePrefix (const char *const name)
 Defines a File Prefix.
 
bool SetDefaultFileRoot (const char *const name)
 Defines a Default File Root Name. Clears it is <name> = "" Returns True if OK, False if <name> already set for a Dispatch.
 
void SetFileExtension (const char *const name)
 Defines a File Extension.
 
bool SetFileRoot (const occ::handle< IFSelect_Dispatch > &disp, const char *const name)
 Defines a Root for a Dispatch If <name> is empty, clears Root Name This has as effect to inhibit the production of File by <disp> Returns False if <disp> is not in the WorkSession or if a root name is already defined for it.
 
const charGiveFileRoot (const char *const file) const
 Extracts File Root Name from a given complete file name (uses OSD_Path)
 
const charGiveFileComplete (const char *const file) const
 Completes a file name as required, with Prefix and Extension (if defined; for a non-defined item, completes nothing)
 
void ClearFile ()
 Erases all stored data from the File Evaluation (i.e. ALL former naming information are lost)
 
void EvaluateFile ()
 Performs and stores a File Evaluation. The Results are a List of produced Models and a List of names (Strings), in parallel Fills LastRunCheckList.
 
int NbFiles () const
 Returns the count of produced Models.
 
occ::handle< Interface_InterfaceModelFileModel (const int num) const
 Returns a Model, given its rank in the Evaluation List.
 
TCollection_AsciiString FileName (const int num) const
 Returns the name of a file corresponding to a produced Model, given its rank in the Evaluation List.
 
void BeginSentFiles (const bool record)
 Commands file sending to clear the list of already sent files, commands to record a new one if <record> is True This list is managed by the ModelCopier when SendSplit is called It allows a global exploitation of the set of sent files.
 
occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > SentFiles () const
 Returns the list of recorded sent files, or a Null Handle is recording has not been enabled.
 
bool SendSplit ()
 Performs creation of derived files from the input Model Takes its data (sub-models and names), from result EvaluateFile if active, else by dynamic Evaluation (not stored) After SendSplit, result of EvaluateFile is Cleared Fills LastRunCheckList.
 
occ::handle< IFSelect_PacketListEvalSplit () const
 Returns an Evaluation of the whole ShareOut definition : i.e. how the entities of the starting model are forecast to be sent to various files : list of packets according the dispatches, effective lists of roots for each packet (which determine the content of the corresponding file); plus evaluation of which entities are : forgotten (sent into no file), duplicated (sent into more than one file), sent into a given file. See the class PacketList for more details.
 
Interface_EntityIterator SentList (const int count=-1) const
 Returns the list of Entities sent in files, according to the count of files each one has been sent (these counts are reset by SetModel or SetRemaining(Forget) ) stored in Graph Status <count> = -1 (default) is for ENtities sent at least once <count> = 0 is for the Remaining List (entities not yet sent) <count> = 1 is for entities sent in one and only one file (the ideal case) Remaining Data are computed on each Sending/Copying output files (see methods EvaluateFile and SendSplit) Graph Status is 0 for Remaining Entity, <count> for Sent into <count> files This status is set to 0 (not yet sent) for all by SetModel and by SetRemaining(mode=Forget,Display)
 
int MaxSendingCount () const
 Returns the greater count of different files in which any of the starting entities could be sent. Before any file output, this count is 0. Ideal count is 1. More than 1 means that duplications occur.
 
bool SetRemaining (const IFSelect_RemainMode mode)
 Processes Remaining data (after having sent files), mode : Forget : forget remaining info (i.e. clear all "Sent" status) Compute : compute and keep remaining (does nothing if : remaining is empty or if no files has been sent) Display : display entities recorded as remaining Undo : restore former state of data (after Remaining(1) ) Returns True if OK, False else (i.e. mode = 2 and Remaining List is either empty or takes all the entities, or mode = 3 and no former computation of remaining data was done)
 
IFSelect_ReturnStatus SendAll (const char *const filename, const bool computegraph=false)
 Sends the starting Model into one file, without splitting, managing remaining data or anything else. <computegraph> true commands the Graph to be recomputed before sending : required when a Model is filled in several steps.
 
IFSelect_ReturnStatus SendSelected (const char *const filename, const occ::handle< IFSelect_Selection > &sel, const bool computegraph=false)
 Sends a part of the starting Model into one file, without splitting. But remaining data are managed. <computegraph> true commands the Graph to be recomputed before sending : required when a Model is filled in several steps.
 
IFSelect_ReturnStatus WriteFile (const char *const filename)
 Writes the current Interface Model globally to a File, and returns a write status which can be : Done OK, Fail file could not be written, Error no norm is selected Remark : It is a simple, one-file writing, other operations are available (such as splitting ...) which calls SendAll.
 
IFSelect_ReturnStatus WriteFile (const char *const filename, const occ::handle< IFSelect_Selection > &sel)
 Writes a sub-part of the current Interface Model to a File, as defined by a Selection <sel>, recomputes the Graph, and returns a write status which can be : Done OK, Fail file could not be written, Error no norm is selected Remark : It is a simple, one-file writing, other operations are available (such as splitting ...) which calls SendSelected.
 
int NbSources (const occ::handle< IFSelect_Selection > &sel) const
 Returns the count of Input Selections known for a Selection, or 0 if <sel> not in the WorkSession. This count is one for a SelectDeduct / SelectExtract kind, two for SelectControl kind, variable for a SelectCombine (Union/Intersection), zero else.
 
occ::handle< IFSelect_SelectionSource (const occ::handle< IFSelect_Selection > &sel, const int num=1) const
 Returns the <num>th Input Selection of a Selection (see NbSources). Returns a Null Handle if <sel> is not in the WorkSession or if <num> is out of the range <1-NbSources> To obtain more details, see the method Sources.
 
bool IsReversedSelectExtract (const occ::handle< IFSelect_Selection > &sel) const
 Returns True if <sel> a Reversed SelectExtract, False else.
 
bool ToggleSelectExtract (const occ::handle< IFSelect_Selection > &sel)
 Toggles the Sense (Direct <-> Reversed) of a SelectExtract Returns True if Done, False if <sel> is not a SelectExtract or is not in the WorkSession.
 
bool SetInputSelection (const occ::handle< IFSelect_Selection > &sel, const occ::handle< IFSelect_Selection > &input)
 Sets an Input Selection (as <input>) to a SelectExtract or a SelectDeduct (as <sel>). Returns True if Done, False if <sel> is neither a SelectExtract nor a SelectDeduct, or not in the WorkSession.
 
bool SetControl (const occ::handle< IFSelect_Selection > &sel, const occ::handle< IFSelect_Selection > &sc, const bool formain=true)
 Sets an Input Selection, Main if <formain> is True, Second else (as <sc>) to a SelectControl (as <sel>). Returns True if Done, False if <sel> is not a SelectControl, or <sc> or <sel> is not in the WorkSession.
 
int CombineAdd (const occ::handle< IFSelect_Selection > &selcomb, const occ::handle< IFSelect_Selection > &seladd, const int atnum=0)
 Adds an input selection to a SelectCombine (Union or Inters.). Returns new count of inputs for this SelectCombine if Done or 0 if <sel> is not kind of SelectCombine, or if <seladd> or <sel> is not in the WorkSession By default, adding is done at the end of the list Else, it is an insertion to rank <atnum> (useful for Un-ReDo)
 
bool CombineRemove (const occ::handle< IFSelect_Selection > &selcomb, const occ::handle< IFSelect_Selection > &selrem)
 Removes an input selection from a SelectCombine (Union or Intersection). Returns True if done, False if <selcomb> is not kind of SelectCombine or <selrem> is not source of <selcomb>
 
occ::handle< IFSelect_SelectionNewSelectPointed (const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > &list, const char *const name)
 Creates a new Selection, of type SelectPointed, its content starts with

A name must be given (can be empty)

 
bool SetSelectPointed (const occ::handle< IFSelect_Selection > &sel, const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > &list, const int mode) const
 Changes the content of a Selection of type SelectPointed According <mode> : 0 set

new content (clear former) 1 : adds

actual content -1 : removes

actual content Returns True if done, False if <sel> is not a SelectPointed.

 
occ::handle< IFSelect_SelectionGiveSelection (const char *const selname) const
 Returns a Selection from a Name :
 
occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > GiveList (const occ::handle< Standard_Transient > &obj) const
 Determines a list of entities from an object : <obj> already HSequenceOfTransient : returned itself <obj> Selection : its Result of Evaluation is returned <obj> an entity of the Model : a HSequence which contains it else, an empty HSequence <obj> the Model it self : ALL its content (not only the roots)
 
occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > GiveList (const char *const first, const char *const second="") const
 Computes a List of entities from two alphanums, first and second, as follows : if <first> is a Number or Label of an entity : this entity if <first> is a list of Numbers/Labels : the list of entities if <first> is the name of a Selection in <WS>, and <second> not defined, the standard result of this Selection else, let's consider "first second" : this whole phrase is split by blanks, as follows (RECURSIVE CALL) :
 
occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > GiveListFromList (const char *const selname, const occ::handle< Standard_Transient > &ent) const
 Computes a List of entities from the model as follows <first> being a Selection or a combination of Selections, <ent> being an entity or a list of entities (as a HSequenceOfTransient) : the standard result of this selection applied to this list if <ent> is Null, the standard definition of the selection is used (which contains a default input selection) if <selname> is erroneous, a null handle is returned.
 
occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > GiveListCombined (const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > &l1, const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > &l2, const int mode) const
 Combines two lists and returns the result, according to mode : <mode> < 0 : entities in <l1> AND NOT in <l2> <mode> = 0 : entities in <l1> AND in <l2> <mode> > 0 : entities in <l1> OR in <l2>
 
void QueryCheckList (const Interface_CheckIterator &chl)
 Loads data from a check iterator to query status on it.
 
int QueryCheckStatus (const occ::handle< Standard_Transient > &ent) const
 Determines check status for an entity regarding last call to QueryCheckList : -1 : <ent> unknown in the model, ignored 0 : no check at all, immediate or inherited thru Graph 1 : immediate warning (no fail), no inherited check 2 : immediate fail, no inherited check +10 : idem but some inherited warning (no fail) +20 : idem but some inherited fail.
 
int QueryParent (const occ::handle< Standard_Transient > &entdad, const occ::handle< Standard_Transient > &entson) const
 Determines if <entdad> is parent of <entson> (in the graph), returns : -1 if no; 0 if <entdad> = <entson> 1 if immediate parent, > 1 if parent, gives count of steps.
 
void SetParams (const NCollection_DynamicArray< occ::handle< Standard_Transient > > &params, const NCollection_DynamicArray< int > &uselist)
 Sets a list of Parameters, i.e. TypedValue, to be handled through an Editor The two lists are parallel, if <params> is longer than <uses>, surnumeral parameters are for general use.
 
void TraceStatics (const int use, const int mode=0) const
 Traces the Statics attached to a given use number If <use> is given positive (normal), the trace is embedded with a header and a trailer If <use> is negative, just values are printed (this allows to make compositions) Remark : use number 5 commands use -2 to be traced Remark : use numbers 4 and 6 command use -3 to be traced.
 
void DumpShare () const
 Dumps contents of the ShareOut (on "cout")
 
void ListItems (const char *const label="") const
 Lists the Labels of all Items of the WorkSession If <label> is defined, lists labels which contain it.
 
void ListFinalModifiers (const bool formodel) const
 Lists the Modifiers of the session (for each one, displays its Label). Listing is done following Ranks (Modifiers are invoked following their ranks) Model Modifiers if <formodel> is True, File Modifiers else.
 
void DumpSelection (const occ::handle< IFSelect_Selection > &sel) const
 Lists a Selection and its Sources (see SelectionIterator), given its rank in the list.
 
void DumpModel (const int level, Standard_OStream &S)
 Lists the content of the Input Model (if there is one) According level : 0 -> gives only count of Entities and Roots 1 -> Lists also Roots; 2 -> Lists all Entities (by TraceType) 3 -> Performs a call to CheckList (Fails) and lists the result 4 -> as 3 but all CheckList (Fails + Warnings) 5,6,7 : as 3 but resp. Count,List,Labels by Fail 8,9,10 : as 4 but resp. Count,List,Labels by message.
 
void TraceDumpModel (const int mode)
 Dumps the current Model (as inherited DumpModel), on currently defined Default Trace File (default is standard output)
 
void DumpEntity (const occ::handle< Standard_Transient > &ent, const int level, Standard_OStream &S) const
 Dumps a starting entity according to the current norm. To do this, it calls DumpEntity from WorkLibrary. <level> is to be interpreted for each norm : see specific classes of WorkLibrary for it. Generally, 0 if for very basic (only type ...), greater values give more and more details.
 
void PrintEntityStatus (const occ::handle< Standard_Transient > &ent, Standard_OStream &S)
 Prints main information about an entity : its number, type, validity (and checks if any), category, shareds and sharings.. mutable because it can recompute checks as necessary.
 
void TraceDumpEntity (const occ::handle< Standard_Transient > &ent, const int level) const
 Dumps an entity from the current Model as inherited DumpEntity on currently defined Default Trace File (<level> interpreted according to the Norm, see WorkLibrary)
 
void PrintCheckList (Standard_OStream &S, const Interface_CheckIterator &checklist, const bool failsonly, const IFSelect_PrintCount mode) const
 Prints a CheckIterator to the current Trace File, controlled with the current Model complete or fails only, according to <failsonly> <mode> defines the mode of printing 0 : sequential, according entities; else with a CheckCounter 1 : according messages, count of entities 2 : id but with list of entities, designated by their numbers 3 : as 2 but with labels of entities.
 
void PrintSignatureList (Standard_OStream &S, const occ::handle< IFSelect_SignatureList > &signlist, const IFSelect_PrintCount mode) const
 Prints a SignatureList to the current Trace File, controlled with the current Model <mode> defines the mode of printing (see SignatureList)
 
void EvaluateSelection (const occ::handle< IFSelect_Selection > &sel) const
 Displays the list of Entities selected by a Selection (i.e. the result of EvalSelection).
 
void EvaluateDispatch (const occ::handle< IFSelect_Dispatch > &disp, const int mode=0) const
 Displays the result of applying a Dispatch on the input Model (also shows Remainder if there is) <mode> = 0 (default), displays nothing else <mode> = 1 : displays also duplicated entities (because of this dispatch) <mode> = 2 : displays the entities of the starting Model which are not taken by this dispatch (forgotten entities) <mode> = 3 : displays both duplicated and forgotten entities Remark : EvaluateComplete displays these data evaluated for for all the dispatches, if there are several.
 
void EvaluateComplete (const int mode=0) const
 Displays the effect of applying the ShareOut on the input Model. <mode> = 0 (default) : displays only roots for each packet, <mode> = 1 : displays all entities for each packet, plus duplicated entities <mode> = 2 : same as <mode> = 1, plus displays forgotten entities (which are in no packet at all)
 
void ListEntities (const Interface_EntityIterator &iter, const int mode, Standard_OStream &S) const
 Internal method which displays an EntityIterator <mode> 0 gives short display (only entity numbers) 1 gives a more complete trace (1 line per Entity) (can be used each time a trace has to be output from a list) 2 gives a form suitable for givelist : (n1,n2,n3...)
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (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_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.
 
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.
 

Protected Attributes

occ::handle< Interface_HGraphthegraph
 
Interface_CheckIterator thecheckrun
 
NCollection_IndexedDataMap< occ::handle< Standard_Transient >, occ::handle< Standard_Transient > > theitems
 
NCollection_DataMap< TCollection_AsciiString, occ::handle< Standard_Transient > > thenames
 

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 charget_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.
 

Detailed Description

This class can be used to simply manage a process such as splitting a file, extracting a set of Entities ... It allows to manage different types of Variables : Integer or Text Parameters, Selections, Dispatches, in addition to a ShareOut. To each of these variables, a unique Integer Identifier is attached. A Name can be attached too as desired.

Constructor & Destructor Documentation

◆ IFSelect_WorkSession()

IFSelect_WorkSession::IFSelect_WorkSession ( )

Creates a Work Session It provides default, empty ShareOut and ModelCopier, which can be replaced (if required, should be done just after creation).

Member Function Documentation

◆ AddItem()

int IFSelect_WorkSession::AddItem ( const occ::handle< Standard_Transient > & item,
const bool active = true )

Adds an Item and returns its attached Ident. Does nothing if is already recorded (and returns its attached Ident) <active> if True commands call to SetActive (see below) Remark : the determined Ident is used if is a Dispatch, to fill the ShareOut.

◆ AddNamedItem()

int IFSelect_WorkSession::AddNamedItem ( const char *const name,
const occ::handle< Standard_Transient > & item,
const bool active = true )

Adds an Item with an attached Name. If the Name is already known in the WorkSession, the older item losts it Returns Ident if Done, 0 else, i.e. if is null If <name> is empty, works as AddItem (i.e. with no name) If is already known but with no attached Name, this method tries to attached a Name to it <active> if True commands call to SetActive (see below)

◆ AppliedDispatches()

occ::handle< NCollection_HSequence< int > > IFSelect_WorkSession::AppliedDispatches ( ) const

Returns the ordered list of dispatches stored by the ShareOut.

◆ BeginSentFiles()

void IFSelect_WorkSession::BeginSentFiles ( const bool record)

Commands file sending to clear the list of already sent files, commands to record a new one if <record> is True This list is managed by the ModelCopier when SendSplit is called It allows a global exploitation of the set of sent files.

◆ CategoryName()

const char * IFSelect_WorkSession::CategoryName ( const occ::handle< Standard_Transient > & ent) const

Returns the Category Name determined for an entity it is computed by the class Category Remark : an unknown entity gives an empty string.

◆ CategoryNumber()

int IFSelect_WorkSession::CategoryNumber ( const occ::handle< Standard_Transient > & ent) const

Returns the Category Number determined for an entity it is computed by the class Category An unknown entity (number 0) gives a value -1.

◆ ChangeModifierRank()

bool IFSelect_WorkSession::ChangeModifierRank ( const bool formodel,
const int before,
const int after )

Changes the Rank of a Modifier in the Session : Model Modifiers if <formodel> is True, File Modifiers else the Modifier n0 <before> is put to n0 <after> Return True if Done, False if <before> or <after> out of range.

◆ CheckOne()

Interface_CheckIterator IFSelect_WorkSession::CheckOne ( const occ::handle< Standard_Transient > & ent,
const bool complete = true )

Returns a Check for a single entity, under the form of a CheckIterator (this gives only one form for the user) if <ent> is Null or equates the current Model, it gives the Global Check, else the Check for the given entity <complete> as for ModelCheckList.

◆ ClearData()

virtual void IFSelect_WorkSession::ClearData ( const int mode)
virtual

Clears recorded data (not the items) according mode : 1 : all Data : Model, Graph, CheckList, + ClearData 4 2 : Graph and CheckList (they will then be recomputed later) 3 : CheckList (it will be recomputed by ComputeCheck) 4 : just content of SelectPointed and Counters Plus 0 : does nothing but called by SetModel ClearData is virtual, hence it can be redefined to clear other data of a specialised Work Session.

Reimplemented in XSControl_WorkSession.

◆ ClearFile()

void IFSelect_WorkSession::ClearFile ( )

Erases all stored data from the File Evaluation (i.e. ALL former naming information are lost)

◆ ClearFinalModifiers()

void IFSelect_WorkSession::ClearFinalModifiers ( )

Removes all the Modifiers active in the ModelCopier : they become inactive and they are removed from the Session.

◆ ClearItems()

void IFSelect_WorkSession::ClearItems ( )

Clears all the recorded Items : Selections, Dispatches, Modifiers, and Strings & IntParams, with their Idents & Names. Remark that if a Model has been loaded, it is not cleared.

◆ ClearShareOut()

void IFSelect_WorkSession::ClearShareOut ( const bool onlydisp)

Clears the list of Dispatches recorded by the ShareOut if <only> disp is True, tha's all. Else, clears also the lists of Modifiers recorded by the ShareOut.

◆ CombineAdd()

int IFSelect_WorkSession::CombineAdd ( const occ::handle< IFSelect_Selection > & selcomb,
const occ::handle< IFSelect_Selection > & seladd,
const int atnum = 0 )

Adds an input selection to a SelectCombine (Union or Inters.). Returns new count of inputs for this SelectCombine if Done or 0 if <sel> is not kind of SelectCombine, or if <seladd> or <sel> is not in the WorkSession By default, adding is done at the end of the list Else, it is an insertion to rank <atnum> (useful for Un-ReDo)

◆ CombineRemove()

bool IFSelect_WorkSession::CombineRemove ( const occ::handle< IFSelect_Selection > & selcomb,
const occ::handle< IFSelect_Selection > & selrem )

Removes an input selection from a SelectCombine (Union or Intersection). Returns True if done, False if <selcomb> is not kind of SelectCombine or <selrem> is not source of <selcomb>

◆ ComputeCheck()

bool IFSelect_WorkSession::ComputeCheck ( const bool enforce = false)

Computes the CheckList for the Model currently loaded It can then be used for displays, queries ... Returns True if OK, False else (i.e. no Protocol set, or Model absent). If <enforce> is False, works only if not already done or if a new Model has been loaded from last call. Remark : computation is enforced by every call to SetModel or RunTransformer.

◆ ComputeCounter()

bool IFSelect_WorkSession::ComputeCounter ( const occ::handle< IFSelect_SignCounter > & counter,
const bool forced = false )

Computes the content of a SignCounter when it is defined with a Selection, then returns True Returns False if the SignCounter is not defined with a Selection, or if its Selection Mode is inhibited <forced> to work around optimisations.

◆ ComputeCounterFromList()

bool IFSelect_WorkSession::ComputeCounterFromList ( const occ::handle< IFSelect_SignCounter > & counter,
const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > & list,
const bool clear = true )

Computes the content of a SignCounter from an input list If

Null, uses internal definition of the Counter : a Selection, else the whole Model (recomputation forced) If <clear> is True (D), starts from scratch Else, cumulates computations.

◆ ComputeGraph()

bool IFSelect_WorkSession::ComputeGraph ( const bool enforce = false)

Computes the Graph used for Selections, Displays ... If a HGraph is already set, with same model as given by method Model, does nothing. Else, computes a new Graph. If <enforce> is given True, computes a new Graph anyway. Remark that a call to ClearGraph will cause ComputeGraph to really compute a new Graph Returns True if Graph is OK, False else (i.e. if no Protocol is set, or if Model is absent or empty).

◆ DefaultFileRoot()

occ::handle< TCollection_HAsciiString > IFSelect_WorkSession::DefaultFileRoot ( ) const

Returns the defined Default File Root. It is used for Dispatches which have no specific root attached. Null Handle if not defined.

◆ Dispatch()

occ::handle< IFSelect_Dispatch > IFSelect_WorkSession::Dispatch ( const int id) const

Returns a Dispatch, given its Ident in the Session Null result if <id> is not suitable for a Dispatch (undefined, or defined for another kind of variable)

◆ DispatchRank()

int IFSelect_WorkSession::DispatchRank ( const occ::handle< IFSelect_Dispatch > & disp) const

Returns the rank of a Dispatch in the ShareOut, or 0 if <disp> is not in the ShareOut or not in the WorkSession.

◆ DumpEntity()

void IFSelect_WorkSession::DumpEntity ( const occ::handle< Standard_Transient > & ent,
const int level,
Standard_OStream & S ) const

Dumps a starting entity according to the current norm. To do this, it calls DumpEntity from WorkLibrary. <level> is to be interpreted for each norm : see specific classes of WorkLibrary for it. Generally, 0 if for very basic (only type ...), greater values give more and more details.

◆ DumpModel()

void IFSelect_WorkSession::DumpModel ( const int level,
Standard_OStream & S )

Lists the content of the Input Model (if there is one) According level : 0 -> gives only count of Entities and Roots 1 -> Lists also Roots; 2 -> Lists all Entities (by TraceType) 3 -> Performs a call to CheckList (Fails) and lists the result 4 -> as 3 but all CheckList (Fails + Warnings) 5,6,7 : as 3 but resp. Count,List,Labels by Fail 8,9,10 : as 4 but resp. Count,List,Labels by message.

◆ DumpSelection()

void IFSelect_WorkSession::DumpSelection ( const occ::handle< IFSelect_Selection > & sel) const

Lists a Selection and its Sources (see SelectionIterator), given its rank in the list.

◆ DumpShare()

void IFSelect_WorkSession::DumpShare ( ) const

Dumps contents of the ShareOut (on "cout")

◆ EntityLabel()

occ::handle< TCollection_HAsciiString > IFSelect_WorkSession::EntityLabel ( const occ::handle< Standard_Transient > & ent) const

Returns the label for <ent>, as the Model does If <ent> is not in the Model or if no Model is loaded, a Null Handle is returned.

◆ EntityName()

occ::handle< TCollection_HAsciiString > IFSelect_WorkSession::EntityName ( const occ::handle< Standard_Transient > & ent) const

Returns the Name of an Entity This Name is computed by the general service Name Returns a Null Handle if fails.

◆ ErrorHandle()

bool IFSelect_WorkSession::ErrorHandle ( ) const
inline

Returns the Error Handler status.

◆ EvalSelection()

Interface_EntityIterator IFSelect_WorkSession::EvalSelection ( const occ::handle< IFSelect_Selection > & sel) const

Evaluates the effect of a Selection applied on the input Model Returned Result remains empty if no input Model has been set.

◆ EvalSplit()

occ::handle< IFSelect_PacketList > IFSelect_WorkSession::EvalSplit ( ) const

Returns an Evaluation of the whole ShareOut definition : i.e. how the entities of the starting model are forecast to be sent to various files : list of packets according the dispatches, effective lists of roots for each packet (which determine the content of the corresponding file); plus evaluation of which entities are : forgotten (sent into no file), duplicated (sent into more than one file), sent into a given file. See the class PacketList for more details.

◆ EvaluateComplete()

void IFSelect_WorkSession::EvaluateComplete ( const int mode = 0) const

Displays the effect of applying the ShareOut on the input Model. <mode> = 0 (default) : displays only roots for each packet, <mode> = 1 : displays all entities for each packet, plus duplicated entities <mode> = 2 : same as <mode> = 1, plus displays forgotten entities (which are in no packet at all)

◆ EvaluateDispatch()

void IFSelect_WorkSession::EvaluateDispatch ( const occ::handle< IFSelect_Dispatch > & disp,
const int mode = 0 ) const

Displays the result of applying a Dispatch on the input Model (also shows Remainder if there is) <mode> = 0 (default), displays nothing else <mode> = 1 : displays also duplicated entities (because of this dispatch) <mode> = 2 : displays the entities of the starting Model which are not taken by this dispatch (forgotten entities) <mode> = 3 : displays both duplicated and forgotten entities Remark : EvaluateComplete displays these data evaluated for for all the dispatches, if there are several.

◆ EvaluateFile()

void IFSelect_WorkSession::EvaluateFile ( )

Performs and stores a File Evaluation. The Results are a List of produced Models and a List of names (Strings), in parallel Fills LastRunCheckList.

◆ EvaluateSelection()

void IFSelect_WorkSession::EvaluateSelection ( const occ::handle< IFSelect_Selection > & sel) const

Displays the list of Entities selected by a Selection (i.e. the result of EvalSelection).

◆ FileExtension()

occ::handle< TCollection_HAsciiString > IFSelect_WorkSession::FileExtension ( ) const

Returns the defined File Extension. Null Handle if not defined.

◆ FileModel()

occ::handle< Interface_InterfaceModel > IFSelect_WorkSession::FileModel ( const int num) const

Returns a Model, given its rank in the Evaluation List.

◆ FileName()

TCollection_AsciiString IFSelect_WorkSession::FileName ( const int num) const

Returns the name of a file corresponding to a produced Model, given its rank in the Evaluation List.

◆ FilePrefix()

occ::handle< TCollection_HAsciiString > IFSelect_WorkSession::FilePrefix ( ) const

Returns the defined File Prefix. Null Handle if not defined.

◆ FileRoot()

occ::handle< TCollection_HAsciiString > IFSelect_WorkSession::FileRoot ( const occ::handle< IFSelect_Dispatch > & disp) const

Returns the File Root defined for a Dispatch. Null if no Root Name is defined for it (hence, no File will be produced)

◆ FinalModifierIdents()

occ::handle< NCollection_HSequence< int > > IFSelect_WorkSession::FinalModifierIdents ( const bool formodel) const

Fills a Sequence with a list of Idents, those attached to the Modifiers applied to final sending. Model Modifiers if <formodel> is True, File Modifiers else This list is given in the order in which they will be applied (which takes into account the Changes to Modifier Ranks)

◆ GeneralModifier()

occ::handle< IFSelect_GeneralModifier > IFSelect_WorkSession::GeneralModifier ( const int id) const

Returns a Modifier, given its Ident in the Session Null result if <id> is not suitable for a Modifier (undefined, or defined for another kind of variable)

◆ GetModeStat()

bool IFSelect_WorkSession::GetModeStat ( ) const
inline

Return value of mode defining of filling selection during loading.

◆ GiveFileComplete()

const char * IFSelect_WorkSession::GiveFileComplete ( const char *const file) const

Completes a file name as required, with Prefix and Extension (if defined; for a non-defined item, completes nothing)

◆ GiveFileRoot()

const char * IFSelect_WorkSession::GiveFileRoot ( const char *const file) const

Extracts File Root Name from a given complete file name (uses OSD_Path)

◆ GiveList() [1/2]

occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > IFSelect_WorkSession::GiveList ( const char *const first,
const char *const second = "" ) const

Computes a List of entities from two alphanums, first and second, as follows : if <first> is a Number or Label of an entity : this entity if <first> is a list of Numbers/Labels : the list of entities if <first> is the name of a Selection in <WS>, and <second> not defined, the standard result of this Selection else, let's consider "first second" : this whole phrase is split by blanks, as follows (RECURSIVE CALL) :

  • the leftest term is the final selection
  • the other terms define the result of the selection
  • and so on (the "leftest minus one" is a selection, of which the input is given by the remaining ...)

◆ GiveList() [2/2]

occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > IFSelect_WorkSession::GiveList ( const occ::handle< Standard_Transient > & obj) const

Determines a list of entities from an object : <obj> already HSequenceOfTransient : returned itself <obj> Selection : its Result of Evaluation is returned <obj> an entity of the Model : a HSequence which contains it else, an empty HSequence <obj> the Model it self : ALL its content (not only the roots)

◆ GiveListCombined()

occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > IFSelect_WorkSession::GiveListCombined ( const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > & l1,
const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > & l2,
const int mode ) const

Combines two lists and returns the result, according to mode : <mode> < 0 : entities in <l1> AND NOT in <l2> <mode> = 0 : entities in <l1> AND in <l2> <mode> > 0 : entities in <l1> OR in <l2>

◆ GiveListFromList()

occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > IFSelect_WorkSession::GiveListFromList ( const char *const selname,
const occ::handle< Standard_Transient > & ent ) const

Computes a List of entities from the model as follows <first> being a Selection or a combination of Selections, <ent> being an entity or a list of entities (as a HSequenceOfTransient) : the standard result of this selection applied to this list if <ent> is Null, the standard definition of the selection is used (which contains a default input selection) if <selname> is erroneous, a null handle is returned.

REMARK : selname is processed as <first second> of preceding GiveList

◆ GiveSelection()

occ::handle< IFSelect_Selection > IFSelect_WorkSession::GiveSelection ( const char *const selname) const

Returns a Selection from a Name :

  • the name of a Selection : this Selection
  • the name of a Signature + criteria between (..) : a new Selection from this Signature
  • an entity or a list of entities : a new SelectPointed Else, returns a Null Handle

◆ Graph()

const Interface_Graph & IFSelect_WorkSession::Graph ( )

Returns the Computed Graph, for Read only.

◆ HasModel()

bool IFSelect_WorkSession::HasModel ( ) const
inline

Returns True is a Model has been set.

◆ HasName()

bool IFSelect_WorkSession::HasName ( const occ::handle< Standard_Transient > & item) const

Returns True if an Item of the WorkSession has an attached Name.

◆ HGraph()

occ::handle< Interface_HGraph > IFSelect_WorkSession::HGraph ( )

Returns the Computed Graph as HGraph (Null Handle if not set)

◆ IntParam()

occ::handle< IFSelect_IntParam > IFSelect_WorkSession::IntParam ( const int id) const

Returns an IntParam, given its Ident in the Session Null result if <id> is not suitable for an IntParam (undefined, or defined for another kind of variable)

◆ IntValue()

int IFSelect_WorkSession::IntValue ( const occ::handle< IFSelect_IntParam > & it) const

Returns Integer Value of an IntParam.

◆ IsLoaded()

bool IFSelect_WorkSession::IsLoaded ( ) const

Returns True if a Model is defined and really loaded (not empty), a Protocol is set and a Graph has been computed. In this case, the WorkSession can start to work.

◆ IsReversedSelectExtract()

bool IFSelect_WorkSession::IsReversedSelectExtract ( const occ::handle< IFSelect_Selection > & sel) const

Returns True if <sel> a Reversed SelectExtract, False else.

◆ Item()

occ::handle< Standard_Transient > IFSelect_WorkSession::Item ( const int id) const

Returns an Item, given its Ident. Returns a Null Handle if no Item corresponds to this Ident.

◆ ItemIdent()

int IFSelect_WorkSession::ItemIdent ( const occ::handle< Standard_Transient > & item) const

Returns the Ident attached to an Item in the WorkSession, or Zero if it is unknown.

◆ ItemIdents()

occ::handle< NCollection_HSequence< int > > IFSelect_WorkSession::ItemIdents ( const occ::handle< Standard_Type > & type) const

Fills a Sequence with the List of Idents attached to the Items of which Type complies with (IsKind) <type> (alphabetic order) Remark : <type> = TYPE(Standard_Transient) gives all the Idents which are suitable in the WorkSession.

◆ ItemLabel()

occ::handle< TCollection_HAsciiString > IFSelect_WorkSession::ItemLabel ( const int id) const

Returns a Label which illustrates the content of an Item, given its Ident. This Label is :

  • for a Text Parameter, "Text:<text value>"
  • for an Integer Parameter, "Integer:<integer value>"
  • for a Selection, a Dispatch or a Modifier, its Label (see these classes)
  • for any other kind of Variable, its cdl type

◆ ItemNames()

occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > IFSelect_WorkSession::ItemNames ( const occ::handle< Standard_Type > & type) const

Fills a Sequence with the list of the Names attached to Items of which Type complies with (IsKind) <type> (alphabetic order) Remark : <type> = TYPE(Standard_Transient) gives all the Names.

◆ ItemNamesForLabel()

occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > IFSelect_WorkSession::ItemNamesForLabel ( const char *const label) const

Fills a Sequence with the NAMES of the control items, of which the label matches <label> (contain it) : see NextIdentForLabel Search mode is fixed to "contained" If <label> is empty, returns all Names.

◆ ItemSelection()

occ::handle< IFSelect_Selection > IFSelect_WorkSession::ItemSelection ( const occ::handle< Standard_Transient > & item) const

Returns the Selection of a Dispatch or a GeneralModifier. Returns a Null Handle if none is defined or not good type.

◆ LastRunCheckList()

Interface_CheckIterator IFSelect_WorkSession::LastRunCheckList ( ) const
inline

Returns the Check List produced by the last execution of either : EvaluateFile(for Split), SendSplit, SendAll, SendSelected, RunTransformer-RunModifier Cleared by SetModel or ClearData(1) The field is protected, hence a specialized WorkSession may fill it.

◆ ListEntities()

void IFSelect_WorkSession::ListEntities ( const Interface_EntityIterator & iter,
const int mode,
Standard_OStream & S ) const

Internal method which displays an EntityIterator <mode> 0 gives short display (only entity numbers) 1 gives a more complete trace (1 line per Entity) (can be used each time a trace has to be output from a list) 2 gives a form suitable for givelist : (n1,n2,n3...)

◆ ListFinalModifiers()

void IFSelect_WorkSession::ListFinalModifiers ( const bool formodel) const

Lists the Modifiers of the session (for each one, displays its Label). Listing is done following Ranks (Modifiers are invoked following their ranks) Model Modifiers if <formodel> is True, File Modifiers else.

◆ ListItems()

void IFSelect_WorkSession::ListItems ( const char *const label = "") const

Lists the Labels of all Items of the WorkSession If <label> is defined, lists labels which contain it.

◆ LoadedFile()

const char * IFSelect_WorkSession::LoadedFile ( ) const
inline

Returns the filename used to load current model empty if unknown.

◆ MaxIdent()

int IFSelect_WorkSession::MaxIdent ( ) const

Returns the Maximum Value for an Item Identifier. It can be greater to the count of known Items, because some can have been removed.

◆ MaxSendingCount()

int IFSelect_WorkSession::MaxSendingCount ( ) const

Returns the greater count of different files in which any of the starting entities could be sent. Before any file output, this count is 0. Ideal count is 1. More than 1 means that duplications occur.

◆ Model()

const occ::handle< Interface_InterfaceModel > & IFSelect_WorkSession::Model ( ) const
inline

Returns the Model of the Work Session (Null Handle if none) should be C++ : return const &.

◆ ModelCheckList()

Interface_CheckIterator IFSelect_WorkSession::ModelCheckList ( const bool complete = true)

Returns the Check List for the Model currently loaded : <complete> = True : complete (syntactic & semantic messages), computed if not yet done <complete> = False : only syntactic (check file form)

◆ ModelCopier()

const occ::handle< IFSelect_ModelCopier > & IFSelect_WorkSession::ModelCopier ( ) const
inline

Gives access to the complete ModelCopier.

◆ ModelModifier()

occ::handle< IFSelect_Modifier > IFSelect_WorkSession::ModelModifier ( const int id) const

Returns a Model Modifier, given its Ident in the Session, i.e. typed as a Modifier (not simply a GeneralModifier) Null result if <id> is not suitable for a Modifier (undefined, or defined for another kind of variable)

◆ ModifierRank()

int IFSelect_WorkSession::ModifierRank ( const occ::handle< IFSelect_GeneralModifier > & item) const

Returns the Rank of a Modifier given its Ident. Model or File Modifier according its type (ModelModifier or not) Remember that Modifiers are applied sequentially following their Rank : first Model Modifiers then File Modifiers Rank is given by rank of call to AddItem and can be changed by ChangeModifierRank.

◆ Name()

occ::handle< TCollection_HAsciiString > IFSelect_WorkSession::Name ( const occ::handle< Standard_Transient > & item) const

Returns the Name attached to an Item as a Variable of this WorkSession. If is Null or not recorded, returns an empty string.

◆ NamedItem() [1/2]

occ::handle< Standard_Transient > IFSelect_WorkSession::NamedItem ( const char *const name) const

Returns the Item which corresponds to a Variable, given its Name (whatever the type of this Item). Returns a Null Handle if this Name is not recorded.

◆ NamedItem() [2/2]

occ::handle< Standard_Transient > IFSelect_WorkSession::NamedItem ( const occ::handle< TCollection_HAsciiString > & name) const

Same as above, but <name> is given through a Handle Especially useful with methods SelectionNames, etc...

◆ NameIdent()

int IFSelect_WorkSession::NameIdent ( const char *const name) const

Returns the Ident attached to a Name, 0 if name not recorded.

◆ NbFiles()

int IFSelect_WorkSession::NbFiles ( ) const

Returns the count of produced Models.

◆ NbFinalModifiers()

int IFSelect_WorkSession::NbFinalModifiers ( const bool formodel) const

Returns the count of Modifiers applied to final sending Model Modifiers if <formodel> is True, File Modifiers else (i.e. Modifiers which apply once the Models have been filled)

◆ NbSources()

int IFSelect_WorkSession::NbSources ( const occ::handle< IFSelect_Selection > & sel) const

Returns the count of Input Selections known for a Selection, or 0 if <sel> not in the WorkSession. This count is one for a SelectDeduct / SelectExtract kind, two for SelectControl kind, variable for a SelectCombine (Union/Intersection), zero else.

◆ NbStartingEntities()

int IFSelect_WorkSession::NbStartingEntities ( ) const

Returns the count of Entities stored in the Model, or 0.

◆ NewIntParam()

occ::handle< IFSelect_IntParam > IFSelect_WorkSession::NewIntParam ( const char *const name = "")

Creates a new IntParam. A Name can be set (Optional) Returns the created IntParam, or a Null Handle in case of Failure (see AddItem/AddNamedItem)

◆ NewParamFromStatic()

occ::handle< Standard_Transient > IFSelect_WorkSession::NewParamFromStatic ( const char *const statname,
const char *const name = "" )

Creates a parameter as being bound to a Static If the Static is Integer, this creates an IntParam bound to it by its name. Else this creates a String which is the value of the Static. Returns a null handle if <statname> is unknown as a Static.

◆ NewSelectPointed()

occ::handle< IFSelect_Selection > IFSelect_WorkSession::NewSelectPointed ( const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > & list,
const char *const name )

Creates a new Selection, of type SelectPointed, its content starts with

A name must be given (can be empty)

◆ NewTextParam()

occ::handle< TCollection_HAsciiString > IFSelect_WorkSession::NewTextParam ( const char *const name = "")

Creates a new (empty) TextParam. A Name can be set (Optional) Returns the created TextParam (as an HAsciiString), or a Null Handle in case of Failure (see AddItem/AddNamedItem)

◆ NewTransformStandard()

occ::handle< IFSelect_Transformer > IFSelect_WorkSession::NewTransformStandard ( const bool copy,
const char *const name = "" )

Creates and returns a TransformStandard, empty, with its Copy Option (True = Copy, False = On the Spot) and an optional name. To a TransformStandard, the method SetAppliedModifier applies.

◆ NextIdentForLabel()

int IFSelect_WorkSession::NextIdentForLabel ( const char *const label,
const int id,
const int mode = 0 ) const

For query by Label with possible iterations Searches the Ident of which Item has a Label which matches a given one, the search starts from an initial Ident. Returns the first found Ident which follows <id>, or ZERO.

The search must start with <id> = 0, it returns the next Ident which matches. To iterate, call again this method which this returned value as <id>. Once an Ident has been returned, the Item can be obtained by the method Item

<mode> precises the required matching mode :

  • 0 (Default) : <label> must match exactly with the Item Label
  • 1 : <label> must match the exact beginning (the end is free)
  • 2 : <label> must be at least once wherever in the Item Label
  • other values are ignored

◆ NumberFromLabel()

int IFSelect_WorkSession::NumberFromLabel ( const char *const val,
const int afternum = 0 ) const

From a given label in Model, returns the corresponding number Starts from first entity by Default, may start after a given number : this number may be given negative, its absolute value is then considered. Hence a loop on NumberFromLabel may be programmed (stop test is : returned value positive or null)

Returns 0 if not found, < 0 if more than one found (first found in negative). If <val> just gives an integer value, returns it

◆ PrintCheckList()

void IFSelect_WorkSession::PrintCheckList ( Standard_OStream & S,
const Interface_CheckIterator & checklist,
const bool failsonly,
const IFSelect_PrintCount mode ) const

Prints a CheckIterator to the current Trace File, controlled with the current Model complete or fails only, according to <failsonly> <mode> defines the mode of printing 0 : sequential, according entities; else with a CheckCounter 1 : according messages, count of entities 2 : id but with list of entities, designated by their numbers 3 : as 2 but with labels of entities.

◆ PrintEntityStatus()

void IFSelect_WorkSession::PrintEntityStatus ( const occ::handle< Standard_Transient > & ent,
Standard_OStream & S )

Prints main information about an entity : its number, type, validity (and checks if any), category, shareds and sharings.. mutable because it can recompute checks as necessary.

◆ PrintSignatureList()

void IFSelect_WorkSession::PrintSignatureList ( Standard_OStream & S,
const occ::handle< IFSelect_SignatureList > & signlist,
const IFSelect_PrintCount mode ) const

Prints a SignatureList to the current Trace File, controlled with the current Model <mode> defines the mode of printing (see SignatureList)

◆ Protocol()

const occ::handle< Interface_Protocol > & IFSelect_WorkSession::Protocol ( ) const
inline

Returns the Protocol. Null Handle if not yet set should be C++ : return const &.

◆ QueryCheckList()

void IFSelect_WorkSession::QueryCheckList ( const Interface_CheckIterator & chl)

Loads data from a check iterator to query status on it.

◆ QueryCheckStatus()

int IFSelect_WorkSession::QueryCheckStatus ( const occ::handle< Standard_Transient > & ent) const

Determines check status for an entity regarding last call to QueryCheckList : -1 : <ent> unknown in the model, ignored 0 : no check at all, immediate or inherited thru Graph 1 : immediate warning (no fail), no inherited check 2 : immediate fail, no inherited check +10 : idem but some inherited warning (no fail) +20 : idem but some inherited fail.

◆ QueryParent()

int IFSelect_WorkSession::QueryParent ( const occ::handle< Standard_Transient > & entdad,
const occ::handle< Standard_Transient > & entson ) const

Determines if <entdad> is parent of <entson> (in the graph), returns : -1 if no; 0 if <entdad> = <entson> 1 if immediate parent, > 1 if parent, gives count of steps.

◆ ReadFile()

IFSelect_ReturnStatus IFSelect_WorkSession::ReadFile ( const char *const filename)

Reads a file with the WorkLibrary (sets Model and LoadedFile) Returns a integer status which can be : RetDone if OK, RetVoid if no Protocol not defined, RetError for file not found, RetFail if fail during read.

◆ ReadStream()

IFSelect_ReturnStatus IFSelect_WorkSession::ReadStream ( const char *const theName,
std::istream & theIStream )

Reads a file from stream with the WorkLibrary (sets Model and LoadedFile) Returns a integer status which can be : RetDone if OK, RetVoid if no Protocol not defined, RetError for file not found, RetFail if fail during read.

◆ RemoveItem()

bool IFSelect_WorkSession::RemoveItem ( const occ::handle< Standard_Transient > & item)

Removes an Item given its Ident. Returns False if <id> is attached to no Item in the WorkSession. For a Named Item, also removes its Name.

◆ RemoveName()

bool IFSelect_WorkSession::RemoveName ( const char *const name)

Removes a Name without removing the Item Returns True if Done, False else (Name not recorded)

◆ RemoveNamedItem()

bool IFSelect_WorkSession::RemoveNamedItem ( const char *const name)

Removes an Item from the Session, given its Name Returns True if Done, False else (Name not recorded) (Applies only on Item which are Named)

◆ ResetAppliedModifier()

bool IFSelect_WorkSession::ResetAppliedModifier ( const occ::handle< IFSelect_GeneralModifier > & modif)

Resets a GeneralModifier to be applied Returns True if done, False if <modif> was not applied.

◆ ResetItemSelection()

bool IFSelect_WorkSession::ResetItemSelection ( const occ::handle< Standard_Transient > & item)

Resets input Selection which was set by SetItemSelection Same conditions as for SetItemSelection Returns True if done, False if is not in the WorkSession.

◆ RunModifier()

int IFSelect_WorkSession::RunModifier ( const occ::handle< IFSelect_Modifier > & modif,
const bool copy )

Runs a Modifier on Starting Model. It can modify entities, or add new ones. But the Model or the Protocol is unchanged. The Modifier is applied on each entity of the Model. See also RunModifierSelected Fills LastRunCheckList.

<copy> : if True, a new data set is produced which brings the modifications (Model + its Entities) if False, data are modified on the spot

It works through a TransformStandard defined with <modif> Returned status as RunTransformer : 0 nothing done, >0 OK, <0 problem, but only between -3 and 3 (protocol unchanged) Remark : <copy> True will give <effect> = 3 or -3

◆ RunModifierSelected()

int IFSelect_WorkSession::RunModifierSelected ( const occ::handle< IFSelect_Modifier > & modif,
const occ::handle< IFSelect_Selection > & sel,
const bool copy )

Acts as RunModifier, but the Modifier is applied on the list determined by a Selection, rather than on the whole Model If the selection is a null handle, the whole model is taken.

◆ RunTransformer()

int IFSelect_WorkSession::RunTransformer ( const occ::handle< IFSelect_Transformer > & transf)

Runs a Transformer on starting Model, which can then be edited or replaced by a new one. The Protocol can also be changed. Fills LastRunCheckList.

Returned status is 0 if nothing done (<transf> or model undefined), positive if OK, negative else : 0 : Nothing done 1 : OK, edition on the spot with no change to the graph of dependencies (purely local) 2 : OK, model edited on the spot (graph recomputed, may have changed), protocol unchanged 3 : OK, new model produced, same protocol 4 : OK, model edited on the spot (graph recomputed), but protocol has changed 5 : OK, new model produced, protocol has changed -1 : Error on the spot (slight changes), data may be corrupted (remark : corruption should not be profound) -2 : Error on edition the spot, data may be corrupted (checking them is recommended) -3 : Error with a new data set, transformation ignored -4 : OK as 4, but graph of dependences count not be recomputed (the former one is kept) : check the protocol

◆ Selection()

occ::handle< IFSelect_Selection > IFSelect_WorkSession::Selection ( const int id) const

Returns a Selection, given its Ident in the Session Null result if <id> is not suitable for a Selection (undefined, or defined for another kind of variable)

◆ SelectionResult()

occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > IFSelect_WorkSession::SelectionResult ( const occ::handle< IFSelect_Selection > & sel) const

Returns the result of a Selection, computed by EvalSelection (see above) under the form of a HSequence (hence, it can be used by a frontal-engine logic). It can be empty Returns a Null Handle if <sel> is not in the WorkSession.

◆ SelectionResultFromList()

occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > IFSelect_WorkSession::SelectionResultFromList ( const occ::handle< IFSelect_Selection > & sel,
const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > & list ) const

Returns the result of a Selection, by forcing its input with a given list

unless

Null). RULES :

only for a SelectDeduct kind Selection : its Input is considered : if it is a SelectDeduct kind Selection, its Input is considered, etc... until an Input is not a Deduct/Extract : its result is replaced by

all the chain of deductions is applied.

◆ SendAll()

IFSelect_ReturnStatus IFSelect_WorkSession::SendAll ( const char *const filename,
const bool computegraph = false )

Sends the starting Model into one file, without splitting, managing remaining data or anything else. <computegraph> true commands the Graph to be recomputed before sending : required when a Model is filled in several steps.

The Model and File Modifiers recorded to be applied on sending files are. Returns a status of execution : Done if OK, Void if no data available, Error if errors occurred (work library is not defined), errors during translation Fail if exception during translation is raised Stop if no disk space or disk, file is write protected Fills LastRunCheckList

◆ SendSelected()

IFSelect_ReturnStatus IFSelect_WorkSession::SendSelected ( const char *const filename,
const occ::handle< IFSelect_Selection > & sel,
const bool computegraph = false )

Sends a part of the starting Model into one file, without splitting. But remaining data are managed. <computegraph> true commands the Graph to be recomputed before sending : required when a Model is filled in several steps.

The Model and File Modifiers recorded to be applied on sending files are. Returns a status : Done if OK, Fail if error during send, Error : WorkLibrary not defined, Void : selection list empty Fills LastRunCheckList

◆ SendSplit()

bool IFSelect_WorkSession::SendSplit ( )

Performs creation of derived files from the input Model Takes its data (sub-models and names), from result EvaluateFile if active, else by dynamic Evaluation (not stored) After SendSplit, result of EvaluateFile is Cleared Fills LastRunCheckList.

Works with the WorkLibrary which acts on specific type of Model and can work with File Modifiers (managed by the Model Copier) and a ModelCopier, which can work with Model Modifiers Returns False if, either WorkLibrary has failed on at least one sub-file, or the Work Session is badly conditioned (no Model defined, or FileNaming not in phase with ShareOut)

◆ SentFiles()

occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > IFSelect_WorkSession::SentFiles ( ) const

Returns the list of recorded sent files, or a Null Handle is recording has not been enabled.

◆ SentList()

Interface_EntityIterator IFSelect_WorkSession::SentList ( const int count = -1) const

Returns the list of Entities sent in files, according to the count of files each one has been sent (these counts are reset by SetModel or SetRemaining(Forget) ) stored in Graph Status <count> = -1 (default) is for ENtities sent at least once <count> = 0 is for the Remaining List (entities not yet sent) <count> = 1 is for entities sent in one and only one file (the ideal case) Remaining Data are computed on each Sending/Copying output files (see methods EvaluateFile and SendSplit) Graph Status is 0 for Remaining Entity, <count> for Sent into <count> files This status is set to 0 (not yet sent) for all by SetModel and by SetRemaining(mode=Forget,Display)

◆ SetActive()

bool IFSelect_WorkSession::SetActive ( const occ::handle< Standard_Transient > & item,
const bool mode )

Following the type of :

  • Dispatch : Adds or Removes it in the ShareOut & FileNaming
  • GeneralModifier : Adds or Removes it for final sending (i.e. in the ModelCopier) Returns True if it did something, False else (state unchanged)

◆ SetAppliedModifier()

bool IFSelect_WorkSession::SetAppliedModifier ( const occ::handle< IFSelect_GeneralModifier > & modif,
const occ::handle< Standard_Transient > & item )

Sets a GeneralModifier to be applied to an item :

  • item = ShareOut : applies for final sending (all dispatches)
  • item is a Dispatch : applies for this dispatch only Returns True if done, False if <modif> or not in <me>

◆ SetControl()

bool IFSelect_WorkSession::SetControl ( const occ::handle< IFSelect_Selection > & sel,
const occ::handle< IFSelect_Selection > & sc,
const bool formain = true )

Sets an Input Selection, Main if <formain> is True, Second else (as <sc>) to a SelectControl (as <sel>). Returns True if Done, False if <sel> is not a SelectControl, or <sc> or <sel> is not in the WorkSession.

◆ SetDefaultFileRoot()

bool IFSelect_WorkSession::SetDefaultFileRoot ( const char *const name)

Defines a Default File Root Name. Clears it is <name> = "" Returns True if OK, False if <name> already set for a Dispatch.

◆ SetErrorHandle()

void IFSelect_WorkSession::SetErrorHandle ( const bool toHandle)

Changes the Error Handler status (by default, it is not set)

◆ SetFileExtension()

void IFSelect_WorkSession::SetFileExtension ( const char *const name)

Defines a File Extension.

◆ SetFilePrefix()

void IFSelect_WorkSession::SetFilePrefix ( const char *const name)

Defines a File Prefix.

◆ SetFileRoot()

bool IFSelect_WorkSession::SetFileRoot ( const occ::handle< IFSelect_Dispatch > & disp,
const char *const name )

Defines a Root for a Dispatch If <name> is empty, clears Root Name This has as effect to inhibit the production of File by <disp> Returns False if <disp> is not in the WorkSession or if a root name is already defined for it.

◆ SetInputSelection()

bool IFSelect_WorkSession::SetInputSelection ( const occ::handle< IFSelect_Selection > & sel,
const occ::handle< IFSelect_Selection > & input )

Sets an Input Selection (as <input>) to a SelectExtract or a SelectDeduct (as <sel>). Returns True if Done, False if <sel> is neither a SelectExtract nor a SelectDeduct, or not in the WorkSession.

◆ SetIntValue()

bool IFSelect_WorkSession::SetIntValue ( const occ::handle< IFSelect_IntParam > & it,
const int val )

Changes the Integer Value of an IntParam Returns True if Done, False if <it> is not in the WorkSession.

◆ SetItemSelection()

bool IFSelect_WorkSession::SetItemSelection ( const occ::handle< Standard_Transient > & item,
const occ::handle< IFSelect_Selection > & sel )

Sets a Selection as input for an item, according its type : if is a Dispatch : as Final Selection if is a GeneralModifier (i.e. any kind of Modifier) : as Selection used to filter entities to modify <sel> Null causes this Selection to be nullified Returns False if is not of a suitable type, or or <sel> is not in the WorkSession.

◆ SetLibrary()

void IFSelect_WorkSession::SetLibrary ( const occ::handle< IFSelect_WorkLibrary > & theLib)
inline

Sets a WorkLibrary, which will be used to Read and Write Files.

◆ SetLoadedFile()

void IFSelect_WorkSession::SetLoadedFile ( const char *const theFileName)
inline

Stores the filename used for read for setting the model It is cleared by SetModel and ClearData(1)

◆ SetModel()

void IFSelect_WorkSession::SetModel ( const occ::handle< Interface_InterfaceModel > & model,
const bool clearpointed = true )

Sets a Model as input : this will be the Model from which the ShareOut will work if <clearpointed> is True (default) all SelectPointed items are cleared, else they must be managed by the caller Remark : SetModel clears the Graph, recomputes it if a Protocol is set and if the Model is not empty, of course.

◆ SetModelContent()

bool IFSelect_WorkSession::SetModelContent ( const occ::handle< IFSelect_Selection > & sel,
const bool keep )

Defines a new content from the former one If <keep> is True, it is given by entities selected by Selection <sel> (and all shared entities) Else, it is given by all the former content but entities selected by the Selection <sel> (and properly shared ones) Returns True if done. Returns False if the selected list (from <sel>) is empty, hence nothing is done.

◆ SetModelCopier()

void IFSelect_WorkSession::SetModelCopier ( const occ::handle< IFSelect_ModelCopier > & copier)

Sets a new ModelCopier. Fills Items which its content.

◆ SetModeStat()

void IFSelect_WorkSession::SetModeStat ( const bool theMode)
inline

Set value of mode responsible for presence of selections after loading If mode set to true that different selections will be accessible after loading else selections will be not accessible after loading( for economy memory in applications)

◆ SetParams()

void IFSelect_WorkSession::SetParams ( const NCollection_DynamicArray< occ::handle< Standard_Transient > > & params,
const NCollection_DynamicArray< int > & uselist )

Sets a list of Parameters, i.e. TypedValue, to be handled through an Editor The two lists are parallel, if <params> is longer than <uses>, surnumeral parameters are for general use.

EditForms are created to handle these parameters (list, edit) on the basis of a ParamEditor xst-params-edit

A use number dispatches the parameter to a given EditForm EditForms are defined as follows Name Use Means xst-params all All Parameters (complete list) xst-params-general 1 Generals xst-params-load 2 LoadFile (no Transfer) xst-params-send 3 SendFile (Write, no Transfer) xst-params-split 4 Split xst-param-read 5 Transfer on Reading xst-param-write 6 Transfer on Writing

◆ SetProtocol()

void IFSelect_WorkSession::SetProtocol ( const occ::handle< Interface_Protocol > & protocol)

Sets a Protocol, which will be used to determine Graphs, to Read and to Write Files.

◆ SetRemaining()

bool IFSelect_WorkSession::SetRemaining ( const IFSelect_RemainMode mode)

Processes Remaining data (after having sent files), mode : Forget : forget remaining info (i.e. clear all "Sent" status) Compute : compute and keep remaining (does nothing if : remaining is empty or if no files has been sent) Display : display entities recorded as remaining Undo : restore former state of data (after Remaining(1) ) Returns True if OK, False else (i.e. mode = 2 and Remaining List is either empty or takes all the entities, or mode = 3 and no former computation of remaining data was done)

◆ SetSelectPointed()

bool IFSelect_WorkSession::SetSelectPointed ( const occ::handle< IFSelect_Selection > & sel,
const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > & list,
const int mode ) const

Changes the content of a Selection of type SelectPointed According <mode> : 0 set

new content (clear former) 1 : adds

actual content -1 : removes

actual content Returns True if done, False if <sel> is not a SelectPointed.

◆ SetShareOut()

void IFSelect_WorkSession::SetShareOut ( const occ::handle< IFSelect_ShareOut > & shareout)

Sets a new ShareOut. Fills Items which its content Warning : data from the former ShareOut are lost.

◆ SetSignType()

void IFSelect_WorkSession::SetSignType ( const occ::handle< IFSelect_Signature > & signtype)

Sets a specific Signature to be the SignType, i.e. the Signature which will determine TypeName from the Model (basic function). It is recorded in the GTool This Signature is also set as "xst-sign-type" (reserved name)

◆ SetTextValue()

bool IFSelect_WorkSession::SetTextValue ( const occ::handle< TCollection_HAsciiString > & par,
const char *const val )

Changes the Text Value of a TextParam (an HAsciiString) Returns True if Done, False if <it> is not in the WorkSession.

◆ Shareds()

occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > IFSelect_WorkSession::Shareds ( const occ::handle< Standard_Transient > & ent)

Returns the list of entities shared by <ent> (can be empty) Returns a null Handle if <ent> is unknown.

◆ ShareOut()

const occ::handle< IFSelect_ShareOut > & IFSelect_WorkSession::ShareOut ( ) const
inline

Returns the ShareOut defined at creation time.

◆ Sharings()

occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > IFSelect_WorkSession::Sharings ( const occ::handle< Standard_Transient > & ent)

Returns the list of entities sharing <ent> (can be empty) Returns a null Handle if <ent> is unknown.

◆ Signature()

occ::handle< IFSelect_Signature > IFSelect_WorkSession::Signature ( const int id) const

Returns a Signature, given its Ident in the Session Null result if <id> is not suitable for a Signature (undefined, or defined for another kind of variable)

◆ SignCounter()

occ::handle< IFSelect_SignCounter > IFSelect_WorkSession::SignCounter ( const int id) const

Returns a SignCounter from its ident in the Session Null result if <id> is not suitable for a SignCounter (undefined, or defined for another kind of variable)

◆ SignType()

occ::handle< IFSelect_Signature > IFSelect_WorkSession::SignType ( ) const

Returns the current SignType.

◆ SignValue()

const char * IFSelect_WorkSession::SignValue ( const occ::handle< IFSelect_Signature > & sign,
const occ::handle< Standard_Transient > & ent ) const

Returns the Value computed by a Signature for an Entity Returns an empty string if the entity does not belong to the loaded model.

◆ Source()

occ::handle< IFSelect_Selection > IFSelect_WorkSession::Source ( const occ::handle< IFSelect_Selection > & sel,
const int num = 1 ) const

Returns the <num>th Input Selection of a Selection (see NbSources). Returns a Null Handle if <sel> is not in the WorkSession or if <num> is out of the range <1-NbSources> To obtain more details, see the method Sources.

◆ Sources()

IFSelect_SelectionIterator IFSelect_WorkSession::Sources ( const occ::handle< IFSelect_Selection > & sel) const

Returns the Selections which are source of Selection, given its rank in the List of Selections (see SelectionIterator) Returned value is empty if <num> is out of range or if <sel> is not in the WorkSession.

◆ StartingEntity()

occ::handle< Standard_Transient > IFSelect_WorkSession::StartingEntity ( const int num) const

Returns an Entity stored in the Model of the WorkSession (Null Handle is no Model or num out of range)

◆ StartingNumber()

int IFSelect_WorkSession::StartingNumber ( const occ::handle< Standard_Transient > & ent) const

Returns the Number of an Entity in the Model (0 if no Model set or <ent> not in the Model)

◆ TextParam()

occ::handle< TCollection_HAsciiString > IFSelect_WorkSession::TextParam ( const int id) const

Returns a TextParam, given its Ident in the Session Null result if <id> is not suitable for a TextParam (undefined, or defined for another kind of variable)

◆ TextValue()

TCollection_AsciiString IFSelect_WorkSession::TextValue ( const occ::handle< TCollection_HAsciiString > & par) const

Returns Text Value of a TextParam (a String) or an empty string if <it> is not in the WorkSession.

◆ ToggleSelectExtract()

bool IFSelect_WorkSession::ToggleSelectExtract ( const occ::handle< IFSelect_Selection > & sel)

Toggles the Sense (Direct <-> Reversed) of a SelectExtract Returns True if Done, False if <sel> is not a SelectExtract or is not in the WorkSession.

◆ TraceDumpEntity()

void IFSelect_WorkSession::TraceDumpEntity ( const occ::handle< Standard_Transient > & ent,
const int level ) const

Dumps an entity from the current Model as inherited DumpEntity on currently defined Default Trace File (<level> interpreted according to the Norm, see WorkLibrary)

◆ TraceDumpModel()

void IFSelect_WorkSession::TraceDumpModel ( const int mode)

Dumps the current Model (as inherited DumpModel), on currently defined Default Trace File (default is standard output)

◆ TraceStatics()

void IFSelect_WorkSession::TraceStatics ( const int use,
const int mode = 0 ) const

Traces the Statics attached to a given use number If <use> is given positive (normal), the trace is embedded with a header and a trailer If <use> is negative, just values are printed (this allows to make compositions) Remark : use number 5 commands use -2 to be traced Remark : use numbers 4 and 6 command use -3 to be traced.

◆ Transformer()

occ::handle< IFSelect_Transformer > IFSelect_WorkSession::Transformer ( const int id) const

Returns a Transformer, given its Ident in the Session Null result if <id> is not suitable for a Transformer (undefined, or defined for another kind of variable)

◆ UsesAppliedModifier()

occ::handle< Standard_Transient > IFSelect_WorkSession::UsesAppliedModifier ( const occ::handle< IFSelect_GeneralModifier > & modif) const

Returns the item on which a GeneralModifier is applied : the ShareOut, or a given Dispatch Returns a Null Handle if <modif> is not applied.

◆ ValidityName()

const char * IFSelect_WorkSession::ValidityName ( const occ::handle< Standard_Transient > & ent) const

Returns the Validity Name determined for an entity it is computed by the class SignValidity Remark : an unknown entity gives an empty string.

◆ WorkLibrary()

const occ::handle< IFSelect_WorkLibrary > & IFSelect_WorkSession::WorkLibrary ( ) const
inline

Returns the WorkLibrary. Null Handle if not yet set should be C++ : return const &.

◆ WriteFile() [1/2]

IFSelect_ReturnStatus IFSelect_WorkSession::WriteFile ( const char *const filename)

Writes the current Interface Model globally to a File, and returns a write status which can be : Done OK, Fail file could not be written, Error no norm is selected Remark : It is a simple, one-file writing, other operations are available (such as splitting ...) which calls SendAll.

◆ WriteFile() [2/2]

IFSelect_ReturnStatus IFSelect_WorkSession::WriteFile ( const char *const filename,
const occ::handle< IFSelect_Selection > & sel )

Writes a sub-part of the current Interface Model to a File, as defined by a Selection <sel>, recomputes the Graph, and returns a write status which can be : Done OK, Fail file could not be written, Error no norm is selected Remark : It is a simple, one-file writing, other operations are available (such as splitting ...) which calls SendSelected.

Field Documentation

◆ thecheckrun

Interface_CheckIterator IFSelect_WorkSession::thecheckrun
protected

◆ thegraph

occ::handle<Interface_HGraph> IFSelect_WorkSession::thegraph
protected

◆ theitems

◆ thenames

NCollection_DataMap<TCollection_AsciiString, occ::handle<Standard_Transient> > IFSelect_WorkSession::thenames
protected

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