IFSelect
OCCT package IFSelect: IFSelect, IFSelect_Act, IFSelect_Activator, IFSelect_AppliedModifiers, and 75 more bound classes.
IFSelect
Gives tools to manage Selecting a group of Entities processed by an Interface, for instance to divide up an original Model (from a File) to several smaller ones They use description of an Interface Model as a graph.
Remark that this corresponds to the description of a "scenario" of sharing out a File. Parts of this Scenario are intended to be permanently stored. IFSelect provides the Transient, active counterparts (to run the Scenario). But a permanent one (either as Persistent Objects or as interpretable Text) must be provided elsewhere.
Constructors(1)
Static methods(2)
- SaveSession(WS: IFSelect_WorkSession, file: string): booleanParameters (2)
WSfile
- RestoreSession(WS: IFSelect_WorkSession, file: string): booleanParameters (2)
WSfile
IFSelect_Act
Act gives a simple way to define and add functions to be ran from a SessionPilot, as follows :
Define a function as static IFSelect_RetStatus myfunc (const char* const name, const occ::handle<IFSelect_SessionPilot>& pilot) { ... } When ran, it receives the exact name (string) of the called function, and the SessionPilot which brings other infos
Add it by IFSelect_Act::AddFunc (name,help,myfunc); for a normal function, or IFSelect_Act::AddFSet (name,help,myfunc); for a function which is intended to create a control item name and help are given as CString
Then, it is available for run
Constructors(1)
- constructor(name: string, help: string, func: ((arg0: IFSelect_SessionPilot)): IFSelect_Act
Creates an Act with a name, help and a function mode (Add or AddSet) is given when recording.
Parameters (3)namehelpfunc
Static methods(5)
- SetGroup(group: string, file?: string): void
Changes the default group name for the following Acts group empty means to come back to default from Activator Also a file name can be precised (to query by getsource).
Parameters (2)groupfile
- AddFunc(name: string, help: string, func: ((arg0: IFSelect_SessionPilot)): void
Adds a function with its name and help : creates an Act then records it as normal function.
Parameters (3)namehelpfunc
- AddFSet(name: string, help: string, func: ((arg0: IFSelect_SessionPilot)): void
Adds a function with its name and help : creates an Act then records it as function for XSET (i.e. to create control item).
Parameters (3)namehelpfunc
- get_type_name(): string
Instance methods(3)
- Do(number_: number, pilot: IFSelect_SessionPilot): IFSelect_ReturnStatus
Execution of Command Line. remark that <number> is senseless because each Act brings one and only one function.
Parameters (2)number_pilot
- Help(number_: number): string
Short Help for commands : returns the help given to create.
Parameters (1)number_
IFSelect_Activator
Defines the general frame for working with a SessionPilot. Each Activator treats a set of Commands. Commands are given as alphanumeric strings. They can be of two main forms :
- classic, to list, evaluate, enrich the session (by itself) : no specific remark, its complete execution must be described
- creation of a new item : instead of creatinf it plus adding it to the session (which is a classic way), it is possible to create it and make it recorded by the SessionPilot : then, the Pilot will add it to the session; this way allows the Pilot to manage itself named items
In order to make easier the use of Activator, this class provides a simple way to Select an Actor for a Command : each sub-class of SectionActor defines the command titles it recognizes, plus attaches a Number, unique for this sub-class, to each distinct command title.
Each time an action is required, the corresponding Number can then be given to help the selection of the action to do.
The result of an Execution must indicate if it is worth to be recorded or not : see method Do
Static methods(7)
- Adding(actor: IFSelect_Activator, number_: number, command: string, mode: number): void
Records, in a Dictionary available for all the Activators, the command title an Activator can process, attached with its number, proper for this Activator <mode> allows to distinguish various execution modes 0: default mode; 1 : for xset.
Parameters (4)actornumber_commandmode
- Remove(command: string): void
Removes a Command, if it is recorded (else, does nothing).
Parameters (1)command
- Select(command: string, number_: number): { returnValue: boolean; number_: number; actor: IFSelect_Activator; [Symbol.dispose](): void }
Selects, for a Command given by its title, an actor with its command number. Returns True if found, False else.
Parameters (2)commandnumber_
ReturnsA result object with fields:
returnValue: the C++ return valuenumber_: updated value from the call.actor: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- Mode(command: string): number
Returns mode recorded for a command. -1 if not found.
Parameters (1)command
- Commands(mode?: number, command?: string): NCollection_HSequence_TCollection_AsciiString
Returns, for a root of command title, the list of possible commands. <mode> : -1 (D) for all commands if <commands> is empty -1 + command : about a Group , >= 0 see Adding By default, it returns the whole list of known commands.
Parameters (2)modecommand
- get_type_name(): string
Instance methods(8)
- Add(number_: number, command: string): void
Allows a self-definition by an Activator of the Commands it processes, call the class method Adding (mode 0).
Parameters (2)number_command
- AddSet(number_: number, command: string): void
Same as Add but specifies that this command is candidate for xset (creation of items, xset : named items; mode 1).
Parameters (2)number_command
- Do(number_: number, pilot: IFSelect_SessionPilot): IFSelect_ReturnStatus
Tries to execute a Command Line. <number> is the number of the command for this Activator. It Must forecast to record the result of the execution, for need of Undo-Redo Must Returns : 0 for a void command (not to be recorded), 1 if execution OK, -1 if command incorrect, -2 if error on execution.
Parameters (2)number_pilot
- Help(number_: number): string
Sends a short help message for a given command identified by it number for this Activator (must take one line max).
Parameters (1)number_
- Group(): string
- File(): string
- SetForGroup(group: string, file?: string): void
Group and SetGroup define a "Group of commands" which correspond to an Activator. Default is "XSTEP" Also a file may be attached.
Parameters (2)groupfile
IFSelect_AppliedModifiers
This class allows to memorize and access to the modifiers which are to be applied to a file. To each modifier, is bound a list of integers (optional) : if this list is absent, the modifier applies to all the file. Else, it applies to the entities designated by these numbers in the produced file.
To record a modifier, and a possible list of entity numbers to be applied on: AddModif (amodifier); loop on AddNum (anumber);
To query it, Count gives the count of recorded modifiers, then for each one: Item (numodif, amodifier, entcount); IsForAll () -> can be called, if True, applies on the whole file
for (i = 1; i <= entcount; i ++) nument = ItemNum (i); -> return an entity number
Constructors(1)
- constructor(nbmax: number, nbent: number): IFSelect_AppliedModifiers
Creates an AppliedModifiers, ready to record up to <nbmax> modifiers, on a model of <nbent> entities.
Parameters (2)nbmaxnbent
Static methods(2)
- get_type_name(): string
Instance methods(8)
- AddModif(modif: IFSelect_GeneralModifier): boolean
Records a modifier. By default, it is to apply on all a produced file. Further calls to AddNum will restrict this. Returns True if done, False if too many modifiers are already recorded.
Parameters (1)modif
- AddNum(nument: number): boolean
Adds a number of entity of the output file to be applied on. If a sequence of AddNum is called after AddModif, this Modifier will be applied on the list of designated entities. Else, it will be applied on all the file Returns True if done, False if no modifier has yet been added.
Parameters (1)nument
- Count(): number
Returns the count of recorded modifiers.
- Item(num: number, entcount: number): { returnValue: boolean; modif: IFSelect_GeneralModifier; entcount: number; [Symbol.dispose](): void }
Returns the description for applied modifier n0 <num> : the modifier itself, and the count of entities to be applied on. If no specific list of number has been defined, returns the total count of entities of the file If this count is zero, then the modifier applies to all the file (see below). Else, the numbers are then queried by calls to ItemNum between 1 and <entcount> Returns True if OK, False if <num> is out of range.
Parameters (2)numentcount
ReturnsA result object with fields:
returnValue: the C++ return valuemodif: owned by the returned envelope.entcount: updated value from the call.
Dispose the returned envelope to release owned Handle fields.
- ItemNum(nument: number): number
Returns a numero of entity to be applied on, given its rank in the list. If no list is defined (i.e. for all the file), returns <nument> itself, to give all the entities of the file Returns 0 if <nument> out of range.
Parameters (1)nument
Returns the list of entities to be applied on (see Item) as a HSequence (IsForAll produces the complete list of all the entity numbers of the file.
- IsForAll(): boolean
Returns True if the applied modifier queried by last call to Item is to be applied to all the produced file. Else, <entcount> returned by Item gives the count of entity numbers, each one is queried by ItemNum.
IFSelect_BasicDumper
BasicDumper takes into account, for SessionFile, all the classes defined in the package IFSelect : Selections, Dispatches (there is no Modifier).
Constructors(1)
Creates a BasicDumper and puts it into the Library of Dumper.
Static methods(2)
- get_type_name(): string
Instance methods(3)
- WriteOwn(file: IFSelect_SessionFile, item: Standard_Transient): boolean
Write the Own Parameters of Types defined in package
IFSelectReturns True if has been processed, False else.Parameters (2)fileitem
- ReadOwn(file: IFSelect_SessionFile, type_: TCollection_AsciiString): { returnValue: boolean; item: Standard_Transient; [Symbol.dispose](): void }
Recognizes and Read Own Parameters for Types of package
IFSelect. Returns True if done and created, False else.Parameters (2)filetype_
ReturnsA result object with fields:
returnValue: the C++ return valueitem: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
IFSelect_CheckCounter
A CheckCounter allows to see a CheckList (i.e. CheckIterator) not per entity, its messages, but per message, the entities attached (count and list). Because many messages can be repeated if they are due to systematic errors.
Constructors(1)
- constructor(withlist?: boolean): IFSelect_CheckCounter
Creates a CheckCounter, empty ready to work.
Parameters (1)withlist
Static methods(2)
- get_type_name(): string
Instance methods(3)
- SetSignature(sign: MoniTool_SignText): void
Sets a specific signature Else, the current SignType (in the model) is used.
Parameters (1)sign
Returns the Signature;.
IFSelect_ContextWrite
This class gathers various information used by File Modifiers apart from the writer object, which is specific of the norm and of the physical format.
These information are controlled by an object AppliedModifiers (if it is not defined, no modification is allowed on writing)
Furthermore, in return, ContextModif can record Checks, either one for all, or one for each Entity. It supports trace too.
Constructors(1)
- constructor(model: Interface_InterfaceModel, proto: Interface_Protocol, applieds: IFSelect_AppliedModifiers, filename: string): IFSelect_ContextWrite
Prepares a ContextWrite with these information :
- the model which is to be written
- the protocol to be used
- the filename
- an object AppliedModifiers to work. It gives a list of FileModifiers to be ran, and for each one it can give a restricted list of entities (in the model), else all the model is considered
Parameters (4)modelprotoappliedsfilename
Instance methods(18)
Returns the Protocol;.
- FileName(): string
Returns the File Name.
Returns the object AppliedModifiers.
- NbModifiers(): number
Returns the count of recorded File Modifiers.
- SetModifier(numod: number): boolean
Sets active the File Modifier n0 <numod> Then, it prepares the list of entities to consider, if any Returns False if <numod> out of range.
Parameters (1)numod
Returns the currently active File Modifier. Cast to be done Null if not properly set : must be test IsNull after casting.
- IsForNone(): boolean
Returns True if no modifier is currently set.
- IsForAll(): boolean
Returns True if the current modifier is to be applied to the whole model. Else, a restricted list of selected entities is defined, it can be exploited by the File Modifier.
- NbEntities(): number
Returns the total count of selected entities.
- Start(): void
Starts an iteration on selected items. It takes into account IsForAll/IsForNone, by really iterating on all selected items.
- More(): boolean
Returns True until the iteration has finished.
- Next(): void
Advances the iteration.
Returns the current selected entity in the model.
- AddCheck(check: Interface_Check): void
Adds a Check to the CheckList. If it is empty, nothing is done If it concerns an Entity from the Model (by SetEntity) to which another Check is attached, it is merged to it. Else, it is added or merged as to GlobalCheck.
Parameters (1)check
- AddWarning(start: Standard_Transient, mess: string, orig?: string): void
Adds a Warning
Messagefor an Entity from the Model If <start> is not an Entity from the model (e.g. the model itself) this message is added to Global Check.Parameters (3)startmessorig
- AddFail(start: Standard_Transient, mess: string, orig?: string): void
Adds a Fail
Messagefor an Entity from the Model If <start> is not an Entity from the model (e.g. the model itself) this message is added to Global Check.Parameters (3)startmessorig
- CCheck(num: number): Interface_Check
Returns a Check given an Entity number (in the Model) by default a Global Check. Creates it the first time. It can then be acknowledged on the spot, in condition that the caller works by reference ("Interface_Check& check = ...").
Parameters (1)num
- CCheck(start: Standard_Transient): Interface_Check
Returns a Check attached to an Entity from the Model It can then be acknowledged on the spot, in condition that the caller works by reference ("Interface_Check& check = ...").
Parameters (1)start
IFSelect_Dispatch
This class allows to describe how a set of Entities has to be dispatched into resulting Packets : a Packet is a sub-set of the initial set of entities.
Thus, it can generate zero, one, or more Packets according input set and criterium of dispatching. And it can let apart some entities : it is the Remainder, which can be recovered by a specific Selection (RemainderFromDispatch).
Depending of sub-classes, a Dispatch can potentially generate a limited or not count of packet, and a remainder or none.
The input set is read from a specified Selection, attached to the Dispatch : the Final Selection of the Dispatch. The input is the Unique Root Entities list of the Final Selection
Static methods(2)
- get_type_name(): string
Instance methods(9)
- SetRootName(name: TCollection_HAsciiString): void
Sets a Root Name as an HAsciiString To reset it, give a Null Handle (then, a ShareOut will have to define the Default Root Name).
Parameters (1)name
- HasRootName(): boolean
Returns True if a specific Root Name has been set (else, the Default Root Name has to be used).
Returns the Root Name for files produced by this dispatch It is empty if it has not been set or if it has been reset.
- SetFinalSelection(sel: IFSelect_Selection): void
Stores (or Changes) the Final Selection for a Dispatch.
Parameters (1)sel
Returns the Final Selection of a Dispatch we 'd like : C++ : return const &.
- CanHaveRemainder(): boolean
Returns True if a Dispatch can have a Remainder, i.e. if its criterium can let entities apart. It is a potential answer, remainder can be empty at run-time even if answer is True. (to attach a RemainderFromDispatch Selection is not allowed if answer is True). Default answer given here is False (can be redefined).
- LimitedMax(nbent: number, max: number): { returnValue: boolean; max: number }
Returns True if a Dispatch generates a count of Packets always less than or equal to a maximum value : it can be computed from the total count of Entities to be dispatched : <nbent>. If answer is False, no limited maximum is expected for account If answer is True, expected maximum is given in argument <max> Default answer given here is False (can be redefined).
Parameters (2)nbentmax
ReturnsA result object with fields:
returnValue: the C++ return valuemax: updated value from the call.
Returns a text which defines the way a Dispatch produces packets (which will become files) from its Input.
IFSelect_DispGlobal
A DispGlobal gathers all the input Entities into only one global Packet.
Constructors(1)
Creates a DispGlobal.
Static methods(2)
- get_type_name(): string
Instance methods(3)
Returns as Label, "One File for all Input".
- LimitedMax(nbent: number, max: number): { returnValue: boolean; max: number }
Returns True : maximum equates 1.
Parameters (2)nbentmax
ReturnsA result object with fields:
returnValue: the C++ return valuemax: updated value from the call.
IFSelect_DispPerCount
A DispPerCount gathers all the input Entities into one or several Packets, each containing a defined count of Entity This count is a Parameter of the DispPerCount, given as an IntParam, thus allowing external control of its Value.
Constructors(1)
Creates a DispPerCount with no Count (default value 1).
Static methods(2)
- get_type_name(): string
Instance methods(3)
Returns as Label, "One File per <count> Input Entities".
- LimitedMax(nbent: number, max: number): { returnValue: boolean; max: number }
Returns True, maximum count is given as <nbent>.
Parameters (2)nbentmax
ReturnsA result object with fields:
returnValue: the C++ return valuemax: updated value from the call.
IFSelect_DispPerFiles
A DispPerFiles produces a determined count of Packets from the input Entities. It divides, as equally as possible, the input list into a count of files. This count is the parameter of the DispPerFiles. If the input list has less than this count, of course there will be one packet per input entity. This count is a Parameter of the DispPerFiles, given as an IntParam, thus allowing external control of its Value.
Constructors(1)
Creates a DispPerFiles with no Count (default value 1 file).
Static methods(2)
- get_type_name(): string
Instance methods(3)
Returns as Label, "Maximum <count> Files".
- LimitedMax(nbent: number, max: number): { returnValue: boolean; max: number }
Returns True, maximum count is given as CountValue.
Parameters (2)nbentmax
ReturnsA result object with fields:
returnValue: the C++ return valuemax: updated value from the call.
IFSelect_DispPerOne
A DispPerOne gathers all the input Entities into as many Packets as there Root Entities from the Final Selection, that is, one Packet per Entity.
Constructors(1)
Creates a DispPerOne.
Static methods(2)
- get_type_name(): string
Instance methods(3)
Returns as Label, "One File per Input Entity".
- LimitedMax(nbent: number, max: number): { returnValue: boolean; max: number }
Returns True, maximum limit is given as <nbent>.
Parameters (2)nbentmax
ReturnsA result object with fields:
returnValue: the C++ return valuemax: updated value from the call.
IFSelect_DispPerSignature
A DispPerSignature sorts input Entities according to a Signature : it works with a SignCounter to do this.
Constructors(1)
Creates a DispPerSignature with no SignCounter (by default, produces only one packet).
Static methods(2)
- get_type_name(): string
Instance methods(6)
Returns the SignCounter used for splitting.
- SetSignCounter(sign: IFSelect_SignCounter): void
Sets a SignCounter for sort Remark : it is set to record lists of entities, not only counts.
Parameters (1)sign
- SignName(): string
Returns the name of the SignCounter, which characterises the sorting criterium for this Dispatch.
Returns as Label, "One File per Signature <name>".
- LimitedMax(nbent: number, max: number): { returnValue: boolean; max: number }
Returns True, maximum count is given as <nbent>.
Parameters (2)nbentmax
ReturnsA result object with fields:
returnValue: the C++ return valuemax: updated value from the call.
IFSelect_Editor
An Editor defines a set of values and a way to edit them, on an entity or on the model (e.g. on its header).
Each Value is controlled by a TypedValue, with a number (it is an Integer) and a name under two forms (complete and short) and an edit mode
Static methods(2)
- get_type_name(): string
Instance methods(12)
- SetList(num: number, max?: number): void
Sets a parameter to be a List max < 0 : not for a list (set when starting) max = 0 : list with no length limit (default for SetList) max > 0 : list limited to <max> items.
Parameters (2)nummax
- NbValues(): number
Returns the count of Typed Values.
- TypedValue(num: number): Interface_TypedValue
Returns a Typed Value from its ident.
Parameters (1)num
- IsList(num: number): boolean
Tells if a parameter is a list.
Parameters (1)num
- MaxList(num: number): number
Returns max length allowed for a list = 0 means : list with no limit < 0 means : not a list.
Parameters (1)num
- Name(num: number, isshort: boolean): string
Returns the name of a Value (complete or short) from its ident Short Name can be empty.
Parameters (2)numisshort
- EditMode(num: number): IFSelect_EditValue
Returns the edit mode of a Value.
Parameters (1)num
- NameNumber(name: string): number
Returns the number (ident) of a Value, from its name, short or complete. If not found, returns 0.
Parameters (1)name
- MaxNameLength(what: number): number
Returns the MaxLength of, according to what : <what> = -1 : length of short names <what> = 0 : length of complete names <what> = 1 : length of values labels.
Parameters (1)what
Returns the specific label.
- ListEditor(num: number): IFSelect_ListEditor
Returns a ListEditor for a parameter which is a List Default returns a basic ListEditor for a List, a Null Handle if <num> is not for a List. Can be redefined.
Parameters (1)num
IFSelect_EditValue
Properties(6)
IFSelect_Functions
Functions gives access to all the actions which can be commanded with the resources provided by IFSelect : especially WorkSession and various types of Selections and Dispatches.
It works by adding functions by method Init
Constructors(1)
Static methods(5)
- GiveEntity(WS: IFSelect_WorkSession, name?: string): Standard_Transient
Takes the name of an entity, either as argument, or (if <name> is empty) on keyboard, and returns the entity name can be a label or a number (in alphanumeric), it is searched by NumberFromLabel from WorkSession. If <name> doesn't match en entity, a Null Handle is returned.
Parameters (2)WSname
- GiveEntityNumber(WS: IFSelect_WorkSession, name?: string): number
Same as GetEntity, but returns the number in the model of the entity. Returns 0 for null handle.
Parameters (2)WSname
- GiveList(WS: IFSelect_WorkSession, first?: string, second?: string): NCollection_HSequence_handle_Standard_Transient
Computes a List of entities from a WorkSession and two idents, first and second, as follows : if <first> is a Number or Label of an entity : this entity if <first> is the name of a Selection in <WS>, and <second> not defined, the standard result of this Selection if <first> is for a Selection and <second> is defined, the standard result of this selection from the list computed with <second> (an entity or a selection) If <second> is erroneous, it is ignored.
Parameters (3)WSfirstsecond
- GiveDispatch(WS: IFSelect_WorkSession, name: string, mode?: boolean): IFSelect_Dispatch
Evaluates and returns a Dispatch, from data of a WorkSession if <mode> is False, searches for exact name of Dispatch in WS Else (D), allows a parameter between brackets : ex.: dispatch_name(parameter) The parameter can be: an integer for DispPerCount or DispPerFiles or the name of a Signature for DispPerSignature Returns Null Handle if not found not well evaluated.
Parameters (3)WSnamemode
- Init(): void
Defines and loads all basic functions (as ActFunc).
IFSelect_GeneralModifier
This class gives a frame for Actions which modify the effect of a Dispatch, i.e. : By Selections and Dispatches, an original Model can be split into one or more "target" Models : these Models contain Entities copied from the original one (that is, a part of it). Basically, these dispatched Entities are copied as identical to their original counterparts. Also the copied Models reproduce the Header of the original one.
Modifiers allow to change this copied content : this is the way to be used for any kind of alterations, adaptations ... They are exploited by a ModelCopier, which firstly performs the copy operation described by Dispatches, then invokes the Modifiers to work on the result.
Each GeneralModifier can be attached to :
- all the Models produced
- a Dispatch (it will be applied to all the Models obtained from this Dispatch) designated by its Ident in a ShareOut
- in addition, to a Selection (facultative) : this adds a criterium, the Modifier is invoked on a produced Model only if this Model contains an Entity copied from one of the Entities designated by this Selection. (for special Modifiers from IFAdapt, while they must work on definite Entities, this Selection is mandatory to run)
Remark : this class has no action attached, it only provides a frame to work on criteria. Then, sub-classes will define their kind of action, which can be applied at a precise step of the production of a File : see Modifier, and in the package IFAdapt, EntityModifier and EntityCopier
Static methods(2)
- get_type_name(): string
Instance methods(10)
- MayChangeGraph(): boolean
Returns True if this modifier may change the graph of dependences (acknowledged at creation time).
- SetDispatch(disp: IFSelect_Dispatch): void
Attaches to a Dispatch. If <disp> is Null, Resets it (to apply the Modifier on every Dispatch).
Parameters (1)disp
Returns the Dispatch to be matched, Null if not set.
- Applies(disp: IFSelect_Dispatch): boolean
Returns True if a Model obtained from the Dispatch <disp> is to be treated (apart from the Selection criterium) If Dispatch(me) is Null, returns True. Else, checks <disp>.
Parameters (1)disp
- SetSelection(sel: IFSelect_Selection): void
Sets a Selection : a Model is treated if it contains one or more Entities designated by the Selection.
Parameters (1)sel
- ResetSelection(): void
Resets the Selection : this criterium is not longer active.
- HasSelection(): boolean
Returns True if a Selection is set as an additional criterium.
Returns the Selection, or a Null Handle if not set.
Returns a short text which defines the operation performed.
IFSelect_GraphCounter
A GraphCounter computes values to be sorted with the help of a Graph. I.E. not from a Signature.
The default GraphCounter works with an Applied Selection (a SelectDeduct), the value is the count of selected entities from each input entities)
Constructors(1)
- constructor(withmap?: boolean, withlist?: boolean): IFSelect_GraphCounter
Creates a GraphCounter, without applied selection.
Parameters (2)withmapwithlist
Static methods(2)
- get_type_name(): string
Instance methods(2)
- SetApplied(sel: IFSelect_SelectDeduct): void
Sets a new applied selection.
Parameters (1)sel
IFSelect_ListEditor
A ListEditor is an auxiliary operator for Editor/EditForm I.E. it works on parameter values expressed as strings.
For a parameter which is a list, it may not be edited in once by just setting a new value (as a string)
Firstly, a list can be long (and tedious to be accessed flat) then requires a better way of accessing
Moreover, not only its VALUES may be changed (SetValue), but also its LENGTH : items may be added or removed ...
Hence, the way of editing a parameter as a list is :
- edit it separately, with the help of a ListEditor
- it remains possible to prepare a new list of values apart
- then give the new list in once to the EditForm
An EditList is produced by the Editor, with a basic definition This definition (brought by this class) can be redefined Hence the Editor may produce a specific ListEditor as needed
Constructors(2)
Creates a ListEditor with absolutely no constraint.
- constructor(def: Interface_TypedValue, max?: number): IFSelect_ListEditor
Creates a ListEditor, for which items of the list to edit are defined by <def>, and <max> describes max length : 0 (D) means no limit value > 0 means : no more the <max> items are allowed.
Parameters (2)defmax
Static methods(2)
- get_type_name(): string
Instance methods(17)
- LoadModel(model: Interface_InterfaceModel): void
Loads a Model. It is used to check items of type Entity(Ident).
Parameters (1)model
Loads the original values for the list. Remark : If its length is more then MaxLength, editions remain allowed, except Add.
Parameters (1)vals
- SetTouched(): void
Declares this ListEditor to have been touched (whatever action).
- ClearEdit(): void
Clears all editions already recorded.
- LoadEdited(list: NCollection_HSequence_handle_TCollection_HAsciiString): boolean
Loads a new list to replace the older one, in once ! By default (can be redefined) checks the length of the list and the value of each item according to the def Items are all recorded as Modified.
If no def has been given at creation time, no check is done Returns True when done, False if checks have failed ... a specialisation may also lock it by returning always False ...Parameters (1)list
- SetValue(num: number, val: TCollection_HAsciiString): boolean
Sets a new value for the item <num> (in edited list) <val> may be a Null Handle, then the value will be cleared but not removed Returns True when done. False if <num> is out of range or if <val> does not satisfy the definition.
Parameters (2)numval
- AddValue(val: TCollection_HAsciiString, atnum?: number): boolean
Adds a new item. By default appends (at the end of the list) Can insert before a given rank <num>, if positive Returns True when done. False if MaxLength may be overpassed or if <val> does not satisfy the definition.
Parameters (2)valatnum
- Remove(num?: number, howmany?: number): boolean
Removes items from the list By default removes one item. Else, count given by <howmany> Remove from rank <num> included. By default, from the end Returns True when done, False (and does not work) if case of out of range of if <howmany> is greater than current length.
Parameters (2)numhowmany
Returns the value from which the edition started.
Returns the result of the edition.
- NbValues(edited?: boolean): number
Returns count of values, edited (D) or original.
Parameters (1)edited
- Value(num: number, edited?: boolean): TCollection_HAsciiString
Returns a value given its rank. Edited (D) or Original A Null String means the value is cleared but not removed.
Parameters (2)numedited
- IsChanged(num: number): boolean
Tells if a value (in edited list) has been changed, i.e. either modified-value, or added.
Parameters (1)num
- IsModified(num: number): boolean
Tells if a value (in edited list) has been modified-value (not added).
Parameters (1)num
- IsAdded(num: number): boolean
Tells if a value (in edited list) has been added (new one).
Parameters (1)num
- IsTouched(): boolean
Tells if at least one edition (SetValue-AddValue-Remove) has been recorded.
IFSelect_ModelCopier
This class performs the Copy operations involved by the description of a ShareOut (evaluated by a ShareOutResult) plus, if there are, the Modifications on the results, with the help of Modifiers. Each Modifier can work on one or more resulting packets, according to its criteria : it operates on a Model once copied and filled with the content of the packet.
Modifiers can be :
- Model Modifiers, inheriting from the specific class Modifier able to run on the content of a Model (header or entities), activated by the ModelCopier itself
- File Modifiers, inheriting directly from GeneralModifier, intended to be activated under the control of a WorkLibrary, once the Model has been produced (i.e. to act on output format, or other specific file features)
The Copy operations can be : - immediately put to files : for each packet, a Model is created and filled, then the file is output, at that's all
- memorized : for each packet, a Model is created and filled, it is memorized with the corresponding file name. it is possible to query the result of memorization (list of produced Models and their file names) -> it is also possible to send it into the files : once files are written, the result is cleared
In addition, a list of really written files is managed : A first call to BeginSentFiles clears the list and commands, either to begin a new list, or to stop recording it. A call to SentFiles returns the list (if recording has been required) This list allows to globally exploit the set of produced files
Remark : For operations which concern specific Entities, see also in package IFAdapt : a sub-class of ModelCopier allows to work with EntityModifier, in addition to Modifier itself which still applies to a whole copied Model.
Constructors(1)
Creates an empty ModelCopier.
Static methods(2)
- get_type_name(): string
Instance methods(14)
- ClearResult(): void
Clears the list of produced Models.
- AddFile(filename: TCollection_AsciiString, content: Interface_InterfaceModel): boolean
Records a new File to be sent, as a couple (Name as AsciiString, Content as InterfaceModel) Returns True if Done, False if <filename> is already attached to another File.
Parameters (2)filenamecontent
- NameFile(num: number, filename: TCollection_AsciiString): boolean
Changes the Name attached to a File which was formerly defined by a call to AddFile Returns True if Done, False else : if <num> out of range or if the new <filename> is already attached to another File Remark : Giving an empty File Name is equivalent to ClearFile.
Parameters (2)numfilename
- ClearFile(num: number): boolean
Clears the Name attached to a File which was formerly defined by a call to AddFile. This Clearing can be undone by a call to NameFile (with same <num>) Returns True if Done, False else : if <num> is out of range.
Parameters (1)num
- SetAppliedModifiers(num: number, applied: IFSelect_AppliedModifiers): boolean
Sets a list of File Modifiers to be applied on a file.
Parameters (2)numapplied
- ClearAppliedModifiers(num: number): boolean
Clears the list of File Modifiers to be applied on a file.
Parameters (1)num
- NbFiles(): number
Returns the count of Files produced, i.e. the count of Models memorized (produced by the mmethod Copy) with their file names.
- FileName(num: number): TCollection_AsciiString
Returns the File Name for a file given its rank It is empty after a call to ClearFile on same <num>.
Parameters (1)num
- FileModel(num: number): Interface_InterfaceModel
Returns the content of a file before sending, under the form of an InterfaceModel, given its rank.
Parameters (1)num
- AppliedModifiers(num: number): IFSelect_AppliedModifiers
Returns the list of File Modifiers to be applied on a file when it will be sent, as computed by CopiedModel : If it is a null handle, no File Modifier has to be applied.
Parameters (1)num
- BeginSentFiles(sho: IFSelect_ShareOut, record: boolean): void
Begins a sequence of recording the really sent files <sho> : the default file numbering is cleared If <record> is False, clears the list and stops recording If <record> is True, clears the list and commands recording Creation time corresponds to "stop recording".
Parameters (2)shorecord
- AddSentFile(filename: string): void
Adds the name of a just sent file, if BeginSentFiles has commanded recording; else does nothing It is called by methods SendCopied Sending.
Parameters (1)filename
Returns the list of recorded names of sent files. Can be empty (if no file has been sent). Returns a Null Handle if BeginSentFiles has stopped recording.
IFSelect_ModifEditForm
This modifier applies an EditForm on the entities selected.
Static methods(2)
- get_type_name(): string
Instance methods(1)
IFSelect_Modifier
This class gives a frame for Actions which can work globally on a File once completely defined (i.e. afterwards).
Remark : if no Selection is set as criterium, the Modifier is set to work and should consider all the content of the Model produced.
Static methods(1)
Instance methods(1)
IFSelect_ModifReorder
This modifier reorders a whole model from its roots, i.e. according to <rootlast> status, it considers each of its roots, then it orders all its shared entities at any level, the result begins by the lower level entities ... ends by the roots.
Constructors(1)
- constructor(rootlast?: boolean): IFSelect_ModifReorder
Creates a ModifReorder. It may change the graph (it does !) If <rootlast> is True (D), roots are set at the end of packets Else, they are set at beginning (as done by AddWithRefs).
Parameters (1)rootlast
Static methods(2)
- get_type_name(): string
Instance methods(1)
IFSelect_PacketList
This class gives a simple way to return then consult a list of packets, determined from the content of a Model, by various criteria.
It allows to describe several lists with entities from a given model, possibly more than one list knowing every entity, and to determine the remaining list (entities in no lists) and the duplications (with their count).
Constructors(1)
Creates a PackList, empty, ready to receive entities from a given Model.
Parameters (1)model
Static methods(2)
- get_type_name(): string
Instance methods(11)
- SetName(name: string): void
Sets a name to a packet list : this makes easier a general routine to print it. Default is "Packets".
Parameters (1)name
- Name(): string
Returns the recorded name for a packet list.
Returns the Model of reference.
- AddPacket(): void
Declares a new Packet, ready to be filled The entities to be added will be added to this Packet.
- Add(ent: Standard_Transient): void
Adds an entity from the Model into the current packet for Add.
Parameters (1)ent
- AddList(list: NCollection_HSequence_handle_Standard_Transient): void
Adds an list of entities into the current packet for Add.
Parameters (1)list
- NbPackets(): number
Returns the count of non-empty packets.
- NbEntities(numpack: number): number
Returns the count of entities in a Packet given its rank, or 0.
Parameters (1)numpack
- HighestDuplicationCount(): number
Returns the highest number of packets which know a same entity For no duplication, should be one.
- NbDuplicated(count: number, andmore: boolean): number
Returns the count of entities duplicated : <count> times, if <andmore> is False, or <count> or more times, if <andmore> is True See Duplicated for more details.
Parameters (2)countandmore
IFSelect_ParamEditor
A ParamEditor gives access for edition to a list of TypedValue (i.e. of Static too) Its definition is made of the TypedValue to edit themselves, and can add some constants, which can then be displayed but not changed (for instance, system name, processor version ...).
I.E. it gives a way of editing or at least displaying parameters as global
Constructors(1)
- constructor(nbmax?: number, label?: string): IFSelect_ParamEditor
Creates a ParamEditor, empty, with a maximum count of params (default is 100) And a label, by default it will be "Param Editor".
Parameters (2)nbmaxlabel
Static methods(3)
- StaticEditor(list: NCollection_HSequence_handle_TCollection_HAsciiString, label?: string): IFSelect_ParamEditor
Returns a ParamEditor to work on the Static Parameters of which names are listed in Handle if null or empty.
Parameters (2)listlabel
- get_type_name(): string
Instance methods(3)
- AddConstantText(val: string, shortname: string, completename?: string): void
Adds a Constant Text, it will be Read Only By default, its long name equates its shortname.
Parameters (3)valshortnamecompletename
Returns the specific label.
IFSelect_PrintCount
Properties(9)
IFSelect_PrintFail
Properties(2)
IFSelect_RemainMode
Properties(4)
IFSelect_ReturnStatus
Properties(5)
IFSelect_SelectAnyList
A SelectAnyList kind Selection selects a List of an Entity, as well as this Entity contains some. A List contains sub-entities as one per Item, or several (for instance if an Entity binds couples of sub-entities, each item is one of these couples). Remark that only Entities are taken into account (neither Reals, nor Strings, etc...).
To define the list on which to work, SelectAnyList has two deferred methods : NbItems (which gives the length of the list), FillResult (which fills an EntityIterator). They are intended to get a List in an Entity of the required Type (and consider that list is empty if Entity has not required Type)
In addition, remark that some types of Entity define more than one list in each instance : a given sub-class of SelectAnyList must be attached to one list
SelectAnyList keeps or rejects a sub-set of the list, that is the Items of which rank in the list is in a given range (for instance form 2nd to 6th, etc...) Range is defined by two Integer values. In order to allow external control of them, these values are not directly defined as fields, but accessed through IntParams, that is, referenced as Transient (Handle) objects
Warning : the Input can be any kind of Selection, BUT its RootResult must have zero (empty) or one Entity maximum
Static methods(2)
- get_type_name(): string
Instance methods(7)
- HasLower(): boolean
Returns True if a Lower limit is defined.
- LowerValue(): number
Returns Integer Value of Lower Limit (0 if none).
- HasUpper(): boolean
Returns True if a Lower limit is defined.
- UpperValue(): number
Returns Integer Value of Upper Limit (0 if none).
Returns a text defining the criterium : "Components of List " then Specific List Label, then, following cases : " From .. Until .." or "From .." or "Until .." or "Rank no .." Specific type is given by deferred method ListLabel.
Returns the specific label for the list, which is included as a part of Label.
IFSelect_SelectAnyType
A SelectAnyType sorts the Entities of which the Type is Kind of a given Type : this Type for Match is specific of each class of SelectAnyType.
Static methods(2)
- get_type_name(): string
Instance methods(3)
Returns the Type which has to be matched for select.
- Sort(rank: number, ent: Standard_Transient, model: Interface_InterfaceModel): boolean
Returns True for an Entity (model->Value(num)) which is kind of the chosen type, given by the method TypeForMatch. Criterium is IsKind.
Parameters (3)rankentmodel
IFSelect_SelectBase
SelectBase works directly from an InterfaceModel : it is the first base for other Selections.
Static methods(2)
- get_type_name(): string
Instance methods(1)
IFSelect_SelectCombine
A SelectCombine type Selection defines algebraic operations between results of several Selections It is a deferred class : sub-classes will have to define precise what operator is to be applied.
Static methods(2)
- get_type_name(): string
Instance methods(7)
- NbInputs(): number
Returns the count of Input Selections.
- Input(num: number): IFSelect_Selection
Returns an Input Selection, given its rank in the list.
Parameters (1)num
- InputRank(sel: IFSelect_Selection): number
Returns the rank of an input Selection, 0 if not in the list. Most generally, its value is meaningless, except for testing the presence of an input Selection :
- == 0 if <sel> is not an input for <me>
- > 0 if <sel> is an input for <me>
Parameters (1)sel
- Add(sel: IFSelect_Selection, atnum?: number): void
Adds a Selection to the filling list By default, adds it to the end of the list A Positive rank less then NbInputs gives an insertion rank (InsertBefore : the new <atnum>th item of the list is <sel>).
Parameters (2)selatnum
- Remove(sel: IFSelect_Selection): boolean
Removes an input Selection. Returns True if Done, False, if <sel> is not an input for <me>.
Parameters (1)sel
- Remove(num: number): boolean
Removes an input Selection, given its rank in the list Returns True if Done, False if <num> is out of range.
Parameters (1)num
IFSelect_SelectControl
A SelectControl kind Selection works with two input Selections in a dissymmetric way : the Main Input which gives an input list of Entities, to be processed, and the Second Input which gives another list, to be used to filter the main input.
e.g. : SelectDiff retains the items of the Main Input which are not in the Control Input (which acts as Diff Input) or a specific selection which retains Entities from the Main Input if and only if they are concerned by an entity from the Control Input (such as Views in IGES, etc...)
The way RootResult and Label are produced are at charge of each sub-class
Static methods(2)
- get_type_name(): string
Instance methods(6)
Returns the Main Input Selection.
- HasSecondInput(): boolean
Returns True if a Control Input is defined Thus, Result can be computed differently if there is a Control Input or if there is none.
Returns the Control Input Selection, or a Null Handle.
- SetMainInput(sel: IFSelect_Selection): void
Sets a Selection to be the Main Input.
Parameters (1)sel
- SetSecondInput(sel: IFSelect_Selection): void
Sets a Selection to be the Control Input.
Parameters (1)sel
IFSelect_SelectDeduct
A SelectDeduct determines a list of Entities from an Input Selection, by a computation : Output list is not obliged to be a sub-list of Input list (for more specific, see SelectExtract for filtered sub-lists, and SelectExplore for recurcive exploration).
A SelectDeduct may use an alternate input for one shot This allows to use an already existing definition, by overloading the input selection by an alternate list, already defined, for one use : If this alternate list is set, InputResult queries it instead of calling the input selection, then clears it immediately
Static methods(2)
- get_type_name(): string
Instance methods(6)
- SetInput(sel: IFSelect_Selection): void
Defines or Changes the Input Selection.
Parameters (1)sel
Returns the Input Selection.
- HasInput(): boolean
Returns True if the Input Selection is defined, False else.
- HasAlternate(): boolean
Tells if an Alternate List has been set, i.e. : the Alternate Definition is present and set.
Returns the Alternate Definition It is returned modifiable, hence an already defined SelectPointed can be used But if it was not yet defined, it is created the first time.
It is exploited by InputResult
IFSelect_SelectDiff
A SelectDiff keeps the entities from a Selection, the Main Input, which are not listed by the Second Input.
Constructors(1)
Creates an empty SelectDiff.
Static methods(2)
- get_type_name(): string
Instance methods(2)
Returns a text defining the criterium : "Difference".
IFSelect_SelectEntityNumber
A SelectEntityNumber gets in an InterfaceModel (through a Graph), the Entity which has a specified Number (its rank of adding into the Model) : there can be zero (if none) or one. The Number is not directly defined as an Integer, but as a Parameter, which can be externally controlled.
Constructors(1)
Creates a SelectEntityNumber, initially with no specified Number.
Static methods(2)
- get_type_name(): string
Instance methods(1)
IFSelect_SelectErrorEntities
A SelectErrorEntities sorts the Entities which are qualified as "Error" (their Type has not been recognized) during reading a File. This does not concern Entities which are syntactically correct, but with incorrect data (for integrity constraints).
Constructors(1)
Creates a SelectErrorEntities.
Static methods(2)
- get_type_name(): string
Instance methods(3)
- Sort(rank: number, ent: Standard_Transient, model: Interface_InterfaceModel): boolean
Returns True for an Entity which is qualified as "Error", i.e. if <model> explicitly knows <ent> (through its Number) as Erroneous.
Parameters (3)rankentmodel
Returns a text defining the criterium : "Error Entities".
IFSelect_SelectExplore
A SelectExplore determines from an input list of Entities, a list obtained by a way of exploration. This implies the possibility of recursive exploration : the output list is itself reused as input, etc... Examples : Shared Entities, can be considered at one level (immediate shared) or more, or max level.
Then, for each input entity, if it is not rejected, it can be either taken itself, or explored : it then produces a list. According to a level, either the produced lists or taken entities give the result (level one), or lists are themselves considered and for each item, is it taken or explored.
Remark that rejection is just a safety : normally, an input entity is, either taken itself, or explored A maximum level can be specified. Else, the process continues until all entities have been either taken or rejected
Static methods(2)
- get_type_name(): string
Instance methods(4)
- Level(): number
Returns the required exploring level.
Returns a text saying "(Recursive)" or "(Level nn)" plus specific criterium returned by ExploreLabel (see below).
Returns a text defining the way of exploration.
IFSelect_SelectExtract
A SelectExtract determines a list of Entities from an Input Selection, as a sub-list of the Input Result It works by applying a sort criterium on each Entity of the Input. This criterium can be applied Direct to Pick Items (default case) or Reverse to Remove Item.
Basic features (the unique Input) are inherited from SelectDeduct
Static methods(2)
- get_type_name(): string
Instance methods(5)
- SetDirect(direct: boolean): void
Sets Sort criterium sense to a new value (True : Direct , False : Reverse).
Parameters (1)direct
- Sort(rank: number, ent: Standard_Transient, model: Interface_InterfaceModel): boolean
Returns True for an Entity if it satisfies the Sort criterium It receives :
- <rank>, the rank of the Entity in the Iteration,
- <ent> , the Entity itself, and
- <model>, the Starting Model Hence, the Entity to check is "model->Value(num)" (but an InterfaceModel allows other checks) This method is specific to each class of SelectExtract
Parameters (3)rankentmodel
Returns a text saying "Picked" or "Removed", plus the specific criterium returned by ExtractLabel (see below).
Returns a text defining the criterium for extraction.
IFSelect_SelectFlag
A SelectFlag queries a flag noted in the bitmap of the Graph. The Flag is designated by its Name. Flag Names are defined by Work Session and, as necessary, other functional objects.
WorkSession from IFSelect defines flag "Incorrect" Objects which control application running define some others
Constructors(1)
- constructor(flagname: string): IFSelect_SelectFlag
Creates a Select Flag, to query a flag designated by its name.
Parameters (1)flagname
Static methods(2)
- get_type_name(): string
Instance methods(4)
- FlagName(): string
Returns the name of the flag.
- Sort(rank: number, ent: Standard_Transient, model: Interface_InterfaceModel): boolean
Returns always False because RootResult has done the work.
Parameters (3)rankentmodel
Returns a text defining the criterium, includes the flag name.
IFSelect_SelectIncorrectEntities
A SelectIncorrectEntities sorts the Entities which have been noted as Incorrect in the Graph of the Session (flag "Incorrect") It can find a result only if ComputeCheck has formerly been called on the WorkSession. Else, its result will be empty.
Constructors(1)
Creates a SelectIncorrectEntities i.e. a SelectFlag("Incorrect").
Static methods(2)
- get_type_name(): string
Instance methods(1)
IFSelect_SelectInList
A SelectInList kind Selection selects a List of an Entity, which is composed of single Entities To know the list on which to work, SelectInList has two deferred methods : NbItems (inherited from SelectAnyList) and ListedEntity (which gives an item as an Entity) which must be defined to get a List in an Entity of the required Type (and consider that list is empty if Entity has not required Type).
As for SelectAnyList, if a type of Entity defines several lists, a given sub-class of SelectInList is attached on one
Static methods(2)
- get_type_name(): string
Instance methods(2)
- ListedEntity(num: number, ent: Standard_Transient): Standard_Transient
Returns an Entity, given its rank in the list.
Parameters (2)nument
IFSelect_SelectIntersection
A SelectIntersection filters the Entities issued from several other Selections as Intersection of results : "AND" operator.
Constructors(1)
Creates an empty SelectIntersection.
Static methods(2)
- get_type_name(): string
Instance methods(2)
Returns a text defining the criterium : "Intersection (AND)".
IFSelect_Selection
A Selection allows to define a set of Interface Entities. Entities to be put on an output file should be identified in a way as independent from such or such execution as possible. This permits to handle comprehensive criteria, and to replay them when a new variant of an input file has to be processed.
Its input can be, either an Interface Model (the very source), or another-other Selection(s) or any other output. All list computations start from an input Graph (from IFGraph)
Static methods(2)
- get_type_name(): string
Instance methods(2)
Returns a text which defines the criterium applied by a Selection (can be used to be printed, displayed ...) Specific to each class.
IFSelect_SelectionIterator
Defines an Iterator on a list of Selections.
Constructors(2)
Creates an empty iterator, ready to be filled.
Creates an iterator from a Selection : it lists the Selections from which <sel> depends (given by its method FillIterator).
Parameters (1)sel
Instance methods(5)
- AddItem(sel: IFSelect_Selection): void
Adds a Selection to an iterator (if not yet noted).
Parameters (1)sel
- AddList(list: NCollection_Sequence_handle_IFSelect_Selection): void
Adds a list of Selections to an iterator (this list comes from the description of a Selection or a Dispatch, etc...).
Parameters (1)list
- More(): boolean
Returns True if there are more Selections to get.
- Next(): void
Sets iterator to the next item.
Returns the current Selection being iterated Error if count of Selection has been passed.
IFSelect_SelectModelEntities
A SelectModelEntities gets all the Entities of an InterfaceModel.
Constructors(1)
Creates a SelectModelRoot.
Static methods(2)
- get_type_name(): string
Instance methods(2)
Returns a text defining the criterium : "Model Entities".
IFSelect_SelectModelRoots
A SelectModelRoots gets all the Root Entities of an InterfaceModel. Remember that a "Root Entity" is defined as having no Sharing Entity (if there is a Loop between Entities, none of them can be a "Root").
Constructors(1)
Creates a SelectModelRoot.
Static methods(2)
- get_type_name(): string
Instance methods(2)
Returns a text defining the criterium : "Model Roots".
IFSelect_SelectPointed
This type of Selection is intended to describe a direct selection without an explicit criterium, for instance the result of picking viewed entities on a graphic screen.
It can also be used to provide a list as internal alternate input : this use implies to clear the list once queried
Constructors(1)
Creates a SelectPointed.
Static methods(2)
- get_type_name(): string
Instance methods(17)
- Clear(): void
Clears the list of selected items Also says the list is unset All Add* methods and SetList say the list is set.
- IsSet(): boolean
Tells if the list has been set. Even if empty.
- SetEntity(item: Standard_Transient): void
As SetList but with only one entity If <ent> is Null, the list is said as being set but is empty.
Parameters (1)item
- SetList(list: NCollection_HSequence_handle_Standard_Transient): void
Sets a given list to define the list of selected items be empty or null : in this case, the list is said as being set, but it is empty.
To use it as an alternate input, one shot :- SetList or SetEntity to define the input list
- RootResult to get it
- then Clear to drop it
Parameters (1)list
- Add(item: Standard_Transient): boolean
Adds an item. Returns True if Done, False if is already in the selected list.
Parameters (1)item
- Remove(item: Standard_Transient): boolean
Removes an item. Returns True if Done, False if was not in the selected list.
Parameters (1)item
- Toggle(item: Standard_Transient): boolean
Toggles status of an item : adds it if not pointed or removes it if already pointed. Returns the new status (Pointed or not).
Parameters (1)item
- AddList(list: NCollection_HSequence_handle_Standard_Transient): boolean
Adds all the items defined in a list. Returns True if at least one item has been added, False else.
Parameters (1)list
- RemoveList(list: NCollection_HSequence_handle_Standard_Transient): boolean
Removes all the items defined in a list. Returns True if at least one item has been removed, False else.
Parameters (1)list
- ToggleList(list: NCollection_HSequence_handle_Standard_Transient): boolean
Toggles status of all the items defined in a list : adds it if not pointed or removes it if already pointed.
Parameters (1)list
- Rank(item: Standard_Transient): number
Returns the rank of an item in the selected list, or 0.
Parameters (1)item
- NbItems(): number
Returns the count of selected items.
- Item(num: number): Standard_Transient
Returns an item given its rank, or a Null Handle.
Parameters (1)num
- Update(control: Interface_CopyControl): void
Rebuilds the selected list. Any selected entity which has a bound result is replaced by this result, else it is removed.
Parameters (1)control
- Update(trf: IFSelect_Transformer): void
Rebuilds the selected list, by querying a Transformer (same principle as from a CopyControl).
Parameters (1)trf
Returns a text which identifies the type of selection made. It is "Pointed Entities".
IFSelect_SelectRange
A SelectRange keeps or rejects a sub-set of the input set, that is the Entities of which rank in the iteration list is in a given range (for instance form 2nd to 6th, etc...).
Constructors(1)
Creates a SelectRange. Default is Take all the input list.
Static methods(2)
- get_type_name(): string
Instance methods(6)
- LowerValue(): number
Returns Value of Lower Limit (0 if none is defined).
- HasUpper(): boolean
Returns True if a Lower limit is defined.
- UpperValue(): number
Returns Value of Upper Limit (0 if none is defined).
- Sort(rank: number, ent: Standard_Transient, model: Interface_InterfaceModel): boolean
Returns True for an Entity of which occurrence number in the iteration is inside the selected Range (considers <rank>).
Parameters (3)rankentmodel
Returns a text defining the criterium : following cases, " From .. Until .." or "From .." or "Until .." or "Rank no ..".
IFSelect_SelectRootComps
A SelectRootComps sorts the Entities which are part of Strong Components, local roots of a set of Entities : they can be Single Components (containing one Entity) or Cycles This class gives a more secure result than SelectRoots (which considers only Single Components) but is longer to work : it can be used when there can be or there are cycles in a Model For each cycle, one Entity is given arbitrarily Reject works as for SelectRoots : Strong Components defined in the input list which are not local roots are given.
Constructors(1)
Creates a SelectRootComps.
Static methods(2)
- get_type_name(): string
Instance methods(3)
- Sort(rank: number, ent: Standard_Transient, model: Interface_InterfaceModel): boolean
Returns always True, because RootResult has done work.
Parameters (3)rankentmodel
Returns a text defining the criterium : "Local Root Components".
IFSelect_SelectRoots
A SelectRoots sorts the Entities which are local roots of a set of Entities (not shared by other Entities inside this set, even if they are shared by other Entities outside it).
Constructors(1)
Creates a SelectRoots.
Static methods(2)
- get_type_name(): string
Instance methods(3)
- Sort(rank: number, ent: Standard_Transient, model: Interface_InterfaceModel): boolean
Returns always True, because RootResult has done work.
Parameters (3)rankentmodel
Returns a text defining the criterium : "Local Root Entities".
IFSelect_SelectSent
This class returns entities according sending to a file Once a model has been loaded, further sendings are recorded as status in the graph (for each value, a count of sendings).
Hence, it is possible to query entities : sent ones (at least once), non-sent (i.e. remaining) ones, duplicated ones, etc...
This selection performs this query
Constructors(1)
- constructor(sentcount?: number, atleast?: boolean): IFSelect_SelectSent
Creates a SelectSent : sentcount = 0 -> remaining (non-sent) entities sentcount = 1, atleast = True (D) -> sent (at least once) sentcount = 2, atleast = True -> duplicated (sent least twice) etc... sentcount = 1, atleast = False -> sent just once (non-dupl.d) sentcount = 2, atleast = False -> sent just twice etc...
Parameters (2)sentcountatleast
Static methods(2)
- get_type_name(): string
Instance methods(5)
- SentCount(): number
Returns the queried count of sending.
- AtLeast(): boolean
Returns the <atleast> status, True for sending at least the sending count, False for sending exactly the sending count Remark : if SentCount is 0, AtLeast is ignored.
- Sort(rank: number, ent: Standard_Transient, model: Interface_InterfaceModel): boolean
Returns always False because RootResult has done the work.
Parameters (3)rankentmodel
Returns a text defining the criterium : query : SentCount = 0 -> "Remaining (non-sent) entities" SentCount = 1, AtLeast = True -> "Sent entities" SentCount = 1, AtLeast = False -> "Sent once (no duplicated)" SentCount = 2, AtLeast = True -> "Sent several times entities" SentCount = 2, AtLeast = False -> "Sent twice entities" SentCount > 2, AtLeast = True -> "Sent at least <count> times entities" SentCount > 2, AtLeast = False -> "Sent <count> times entities".
IFSelect_SelectShared
A SelectShared selects Entities which are directly Shared by the Entities of the Input list.
Constructors(1)
Static methods(2)
Instance methods(2)
IFSelect_SelectSharing
A SelectSharing selects Entities which directly Share (Level One) the Entities of the Input list Remark : if an Entity of the Input List directly shares another one, it is of course present in the Result List.
Constructors(1)
Creates a SelectSharing;.
Static methods(2)
- get_type_name(): string
Instance methods(2)
Returns a text defining the criterium : "Sharing (one level)".
IFSelect_SelectSignature
A SelectSignature sorts the Entities on a Signature Matching. The signature to match is given at creation time. Also, the required match is given at creation time : exact (IsEqual) or contains (the Type's Name must contain the criterium Text).
Remark that no more interpretation is done, it is an alphanumeric signature : for instance, DynamicType is matched as such, super-types are not considered
Also, numeric (integer) comparisons are supported : an item can be <val ou <=val or >val or >=val , val being an Integer
A SelectSignature may also be created from a SignCounter, which then just gives its LastValue as SignatureValue
Constructors(3)
- constructor(matcher: IFSelect_Signature, signtext: string, exact?: boolean): IFSelect_SelectSignature
Creates a SelectSignature with its Signature and its Text to Match. <exact> if True requires exact match, if False requires <signtext> to be contained in the Signature of the entity (default is "exact").
Parameters (3)matchersigntextexact
- constructor(matcher: IFSelect_Signature, signtext: TCollection_AsciiString, exact?: boolean): IFSelect_SelectSignature
As above with an AsciiString.
Parameters (3)matchersigntextexact
- constructor(matcher: IFSelect_SignCounter, signtext: string, exact?: boolean): IFSelect_SelectSignature
Creates a SelectSignature with a Counter, more precisely a SelectSignature. Which is used here to just give a Signature Value (by SignOnly Mode) Matching is the default provided by the class Signature.
Parameters (3)matchersigntextexact
Static methods(2)
- get_type_name(): string
Instance methods(6)
Returns the used SignCounter. Can be used as alternative for Signature.
- Sort(rank: number, ent: Standard_Transient, model: Interface_InterfaceModel): boolean
Not called, defined only to remove a deferred method here.
Parameters (3)rankentmodel
Returns Text used to Sort Entity on its Signature or SignCounter.
- IsExact(): boolean
Returns True if match must be exact.
Returns a text defining the criterium. (it refers to the text and exact flag to be matched, and is qualified by the Name provided by the Signature).
IFSelect_SelectSignedShared
In the graph, explore the Shareds of the input entities, until it encounters some which match a given Signature (for a limited level, filters the returned list) By default, fitted for any level.
Constructors(1)
Static methods(2)
Instance methods(5)
IFSelect_SelectSignedSharing
In the graph, explore the sharings of the input entities, until it encounters some which match a given Signature (for a limited level, filters the returned list) By default, fitted for any level.
Constructors(1)
- constructor(matcher: IFSelect_Signature, signtext: string, exact?: boolean, level?: number): IFSelect_SelectSignedSharing
Creates a SelectSignedSharing, defaulted for any level with a given Signature and text to match.
Parameters (4)matchersigntextexactlevel
Static methods(2)
- get_type_name(): string
Instance methods(5)
Returns the used Signature, then it is possible to access it, modify it as required.
Returns Text used to Sort Entity on its Signature.
- IsExact(): boolean
Returns True if match must be exact.
Returns a text defining the criterium. (it refers to the text and exact flag to be matched, and is qualified by the Name provided by the Signature).
IFSelect_SelectSuite
A SelectSuite can describe a suite of SelectDeduct as a unique one : in other words, it can be seen as a "macro selection".
It works by applying each of its items (which is a SelectDeduct) on the result computed by the previous one (by using Alternate Input)
But each of these Selections used as items may be used independently, it will then give its own result
Hence, SelectSuite gives a way of defining a new Selection from existing ones, without having to do copies or saves
Constructors(1)
Creates an empty SelectSuite.
Static methods(2)
- get_type_name(): string
Instance methods(8)
- AddInput(item: IFSelect_Selection): boolean
Adds an input selection. I.E. : If is a SelectDeduct, adds it as Previous, not as Input Else, sets it as Input Returns True when done Returns False and refuses to work if Input is already defined.
Parameters (1)item
- AddPrevious(item: IFSelect_SelectDeduct): void
Adds a new first item (prepends to the list). The Input is not touched If is null, does nothing.
Parameters (1)item
- AddNext(item: IFSelect_SelectDeduct): void
Adds a new last item (prepends to the list) If is null, does nothing.
Parameters (1)item
- NbItems(): number
Returns the count of Items.
- Item(num: number): IFSelect_SelectDeduct
Returns an item from its rank in the list (the Input is always apart).
Parameters (1)num
- SetLabel(lab: string): void
Sets a value for the Label.
Parameters (1)lab
Returns the Label Either it has been defined by SetLabel, or it will give "Suite of nn Selections".
IFSelect_SelectType
A SelectType keeps or rejects Entities of which the Type is Kind of a given Cdl Type.
Constructors(2)
Creates a SelectType. Default is no filter.
- constructor(atype: Standard_Type): IFSelect_SelectType
Creates a SelectType for a given Type.
Parameters (1)atype
Static methods(2)
- get_type_name(): string
Instance methods(4)
- SetType(atype: Standard_Type): void
Sets a TYpe for filter.
Parameters (1)atype
Returns the Type to be matched for select : this is the type given at instantiation time.
Returns a text defining the criterium. (should by gotten from Type of Entity used for instantiation).
IFSelect_SelectUnion
A SelectUnion cumulates the Entities issued from several other Selections (union of results : "OR" operator).
Constructors(1)
Creates an empty SelectUnion.
Static methods(2)
- get_type_name(): string
Instance methods(2)
Returns a text defining the criterium : "Union (OR)".
IFSelect_SelectUnknownEntities
A SelectUnknownEntities sorts the Entities which are qualified as "Unknown" (their Type has not been recognized).
Constructors(1)
Creates a SelectUnknownEntities.
Static methods(2)
- get_type_name(): string
Instance methods(3)
- Sort(rank: number, ent: Standard_Transient, model: Interface_InterfaceModel): boolean
Returns True for an Entity which is qualified as "Unknown", i.e. if <model> known <ent> (through its Number) as Unknown.
Parameters (3)rankentmodel
Returns a text defining the criterium : "Recognized Entities".
IFSelect_SessionDumper
A SessionDumper is called by SessionFile. It takes into account a set of classes (such as Selections, Dispatches ...). SessionFile writes the Type (as defined by cdl) of each Item and its general Parameters. It manages the names of the Items.
A SessionDumper must be able to Write the Parameters which are own of each Item it takes into account, given its Class, then to Recognize the Type and Read its Own Parameters to create an Item of this Type with these own Parameters.
Then, there must be defined one sub-type of SessionDumper per consistent set of classes (e.g. a package).
By Own Parameters, understand Parameters given at Creation Time if there are, or specific of a given class, apart from those defined at superclass levels (e.g. Final Selection for a Dispatch, Input Selection for a SelectExtract or SelectDeduct, Direct Status for a SelectExtract, etc...).
The Parameters are those stored in a WorkSession, they can be of Types : IntParam, HAsciiString (for TextParam), Selection, Dispatch.
SessionDumpers are organized in a Library which is used by SessionFile. They are put at Creation Time in this Library.
Static methods(3)
Returns the First item of the Library of Dumper. The Next ones are then obtained by Next on the returned items.
- get_type_name(): string
Instance methods(4)
Returns the Next SesionDumper in the Library. Returns a Null Handle at the End.
- WriteOwn(file: IFSelect_SessionFile, item: Standard_Transient): boolean
Writes the Own Parameters of a given Item, if it forecast to manage its Type. Returns True if it has recognized the Type of the Item (in this case, it is assumed to have written the Own Parameters if there are some), False else : in that case, SessionFile will try another SessionDumper in the Library. WriteOwn can use these methods from SessionFile : SendVoid, SendItem, SendText, and if necessary, WorkSession.
Parameters (2)fileitem
- ReadOwn(file: IFSelect_SessionFile, type_: TCollection_AsciiString): { returnValue: boolean; item: Standard_Transient; [Symbol.dispose](): void }
Recognizes a Type (given as <type>) then Creates an Item of this Type with the Own Parameter, as required. Returns True if it has recognized the Type (in this case, it is assumed to have created the Item, returned as ), False else : in that case, SessionFile will try another SessionDumper in the Library. ReadOwn can use these methods from SessionFile to access Own Parameters : NbOwnParams, IsVoid, IsText, TextValue, ItemValue.
Parameters (2)filetype_
ReturnsA result object with fields:
returnValue: the C++ return valueitem: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
IFSelect_SessionFile
A SessionFile is intended to manage access between a WorkSession and an Ascii Form, to be considered as a Dump. It allows to write the File from the WorkSession, and later read the File to the WorkSession, by keeping required descriptions (such as dependences).
The produced File is under an Ascii Form, then it may be easily consulted. It is possible to cumulate reading of several Files. But in case of Names conflict, the newer Names are forgottens.
The Dump supports the description of XSTEP functionalities (Sharing an Interface File, with Selections, Dispatches, Modifiers ...) but does not refer to the Interface File which is currently loaded.
SessionFile works with a library of SessionDumper type objects
The File is Produced as follows : SessionFile produces all general Information (such as Int and Text Parameters, Types and Inputs of Selections, Dispatches, Modifiers ...) and calls the SessionDumpers to produce all the particular Data : creation arguments, parameters to be set It is Read in the same terms : SessionFile reads and interprets all general Information, and calls the SessionDumpers to recognize Types and for a recognized Type create the corresponding Object with its particular parameters as they were written. The best way to work is to have one SessionDumper for each consistent set of classes (e.g. a package).
Constructors(2)
Creates a SessionFile, ready to read Files in order to load them into a given WorkSession. The following Read Operations must then be called. It is also possible to perform a Write, which produces a complete File of all the content of the WorkSession.
Parameters (1)WS
- constructor(WS: IFSelect_WorkSession, filename: string): IFSelect_SessionFile
Creates a SessionFile which Writes the content of a WorkSession to a File (directly calls Write) Then, IsDone acknowledges on the result of the Operation. But such a SessionFile may not Read a File to a WorkSession.
Parameters (2)WSfilename
Instance methods(35)
- ClearLines(): void
Clears the lines recorded whatever for writing or for reading.
- NbLines(): number
Returns the count of recorded lines.
- Line(num: number): TCollection_AsciiString
Returns a line given its rank in the list of recorded lines.
Parameters (1)num
- AddLine(line: string): void
Adds a line to the list of recorded lines.
Parameters (1)line
- RemoveLastLine(): void
Removes the last line. Can be called recursively. Does nothing if the list is empty.
- WriteFile(name: string): boolean
Writes the recorded lines to a file named <name> then clears the list of lines. Returns False (with no clearing) if the file could not be created.
Parameters (1)name
- ReadFile(name: string): boolean
Reads the recorded lines from a file named <name>, after having cleared the list (stops if RecognizeFile fails) Returns False (with no clearing) if the file could not be read.
Parameters (1)name
- RecognizeFile(headerline: string): boolean
Recognizes the header line. returns True if OK, False else.
Parameters (1)headerline
- Write(filename: string): number
Performs a Write Operation from a WorkSession to a File i.e. calls WriteSession then WriteEnd, and WriteFile Returned Value is : 0 for OK, -1 File could not be created, >0 Error during Write (see WriteSession) IsDone can be called too (will return True for OK).
Parameters (1)filename
- Read(filename: string): number
Performs a Read Operation from a file to a WorkSession i.e. calls ReadFile, then ReadSession and ReadEnd Returned Value is : 0 for OK, -1 File could not be opened, >0 Error during Read (see WriteSession) IsDone can be called too (will return True for OK).
Parameters (1)filename
- WriteSession(): number
Prepares the Write operation from a WorkSession (
IFSelect) to a File, i.e. fills the list of lines (the file itself remains to be written; or NbLines/Line may be called) Important Remark : this excludes the reading of the last line, which is performed by WriteEnd Returns 0 if OK, status > 0 in case of error. - WriteEnd(): number
Writes the trailing line. It is separate from WriteSession, in order to allow to redefine WriteSession without touching WriteEnd (WriteSession defines the body of the file) WriteEnd fills the list of lines. Returns a status of error, 0 if OK, >0 else.
- WriteLine(line: string, follow?: string): void
Writes a line to the File. If <follow> is given, it is added at the following of the line. ' ' must be added for the end.
Parameters (2)linefollow
- WriteOwn(item: Standard_Transient): boolean
Writes the Parameters own to each type of Item. Uses the Library of SessionDumpers Returns True if Done, False if could not be treated (hence it remains written with no Own Parameter).
Parameters (1)item
- ReadSession(): number
Performs a Read Operation from a File to a WorkSession, i.e. reads the list of line (which must have already been loaded, by ReadFile or by calls to AddLine) Important Remark : this excludes the reading of the last line, which is performed by ReadEnd Returns 0 for OK, >0 status for Read Error (not a suitable File, or WorkSession given as Immutable at Creation Time) IsDone can be called too (will return True for OK).
- ReadEnd(): number
Reads the end of a file (its last line). Returns 0 if OK, status >0 in case of error (not a suitable end line).
- ReadLine(): boolean
Reads a Line and splits it into a set of alphanumeric items, which can then be queried by NbParams/ParamValue ...
- SplitLine(line: string): void
Internal routine which processes a line into words and prepares its exploration.
Parameters (1)line
- ReadOwn(): { returnValue: boolean; item: Standard_Transient; [Symbol.dispose](): void }
Tries to Read an Item, by calling the Library of Dumpers Sets the list of parameters of the line to be read from the first own one.
ReturnsA result object with fields:
returnValue: the C++ return valueitem: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- AddItem(item: Standard_Transient, active?: boolean): void
Adds an Item to the WorkSession, taken as Name the first item of the read Line. If this Name is not a Name but a Number or if this Name is already recorded in the WorkSession, it adds the Item but with no Name. Then the Name is recorded in order to be used by the method ItemValue <active> commands to make active or not in the session.
Parameters (2)itemactive
- IsDone(): boolean
Returns True if the last Read or Write operation has been correctly performed. Else returns False.
Returns the WorkSession on which a SessionFile works. Remark that it is returned as Immutable.
- NewItem(ident: number, par: Standard_Transient): void
At beginning of writing an Item, writes its basics :
- either its name in the session if it has one
- or its relative number of item in the file, else (preceded by a '_')
- then, its Dynamic Type (in the sense of cdl : pk_class) This basic description can be followed by the parameters which are used in the definition of the item.
Parameters (2)identpar
- SetOwn(mode: boolean): void
Sets Parameters to be sent as Own if <mode> is True (their Name or Number or Void Mark or Text Value is preceded by a Column sign ':') else they are sent normally Hence, the Own Parameter are clearly identified in the File.
Parameters (1)mode
- SendVoid(): void
During a Write action, commands to send a Void Parameter i.e. a Parameter which is present but undefined Its form will be the dollar sign : $.
- SendItem(par: Standard_Transient): void
During a Write action, commands to send the identification of a Parameter : if it is Null (undefined) it is send as Void ($) if it is Named in the WorkSession, its Name is sent preceded by ':', else a relative Ident Number is sent preceded by '#' (relative to the present Write, i.e. starting at one, without skip, and counted part from Named Items).
Parameters (1)par
- SendText(text: string): void
During a Write action, commands to send a Text without interpretation. It will be sent as well.
Parameters (1)text
- SetLastGeneral(lastgen: number): void
Sets the rank of Last General Parameter to a new value. It is followed by the Fist Own Parameter of the item. Used by SessionFile after reading general parameters.
Parameters (1)lastgen
- NbParams(): number
During a Read operation, SessionFile processes sequentially the Items to read. For each one, it gives access to the list of its Parameters : they were defined by calls to SendVoid/SendParam/SendText during Writing the File. NbParams returns the count of Parameters for the line currently read.
- IsVoid(num: number): boolean
Returns True if a Parameter, given its rank in the Own List (see NbOwnParams), is Void. Returns also True if <num> is out of range (undefined parameters).
Parameters (1)num
- IsText(num: number): boolean
Returns True if a Parameter, in the Own List (see NbOwnParams) is a Text (between "..."). Else it is an Item (Parameter, Selection, Dispatch ...), which can be Void.
Parameters (1)num
- ParamValue(num: number): TCollection_AsciiString
Returns a Parameter (alphanumeric item of a line) as it has been read.
Parameters (1)num
- TextValue(num: number): TCollection_AsciiString
Returns the content of a Text Parameter (without the quotes). Returns an empty string if the Parameter is not a Text.
Parameters (1)num
- ItemValue(num: number): Standard_Transient
Returns a Parameter as an Item. Returns a Null Handle if the Parameter is a Text, or if it is defined as Void.
Parameters (1)num
- Destroy(): void
Specific Destructor (closes the File if not yet done).
IFSelect_SessionPilot
A SessionPilot is intended to make easier the use of a WorkSession. It receives commands, under alphanumeric form, then calls a library of Activators to interpret and run them.
Then, WorkSession just records data required to work : Rules for Selection, Dispatch ... ; File Data (InterfaceModel and results of Evaluations and Transfer as required). SessionPilot records and works with alphanumeric commands and their results (under a very simple form). It calls a list of Activators to perform the actions.
A Command can have several forms :
- classic execution, to list, evaluate, or enrich the session
- command which creates a new item (a Selection for instance) such a command should not add it to the session, but make it recorded by the Pilot (method RecordItem). The Pilot will add the item in the session, with no name -> such a command may be called :
- directly, it will add an item with no name
- by command xset, in the following form : xset name command ... calls the command and adds the item to the session under the specified name (if not yet known)
Thus, to a specific Norm or way of working, only Activators change. A specific Initialisation can be done by starting with a specific set of commands.
In addition, SessionPilot is a sub-type of Activator, to recognize some built-in commands : exit/x, help/?, control of command line, and commands xstep xset ... See method Do
At least, empty lines and comment lines (beginning by '#') are skipped (comment lines are display if read from file)
Constructors(1)
- constructor(prompt?: string): IFSelect_SessionPilot
Creates an empty SessionPilot, with a prompt which will be displayed on querying commands. If not precised (""), this prompt is set to "Test-XSTEP>".
Parameters (1)prompt
Static methods(2)
- get_type_name(): string
Instance methods(27)
Returns the WorkSession which is worked on.
Returns the WorKlibrary (Null if not set). WorkLibrary is used to Read and Write Files, according to the Norm.
- RecordMode(): boolean
Returns the Record Mode for Commands. Default is False.
- SetSession(WS: IFSelect_WorkSession): void
Sets a WorkSession to be worked on.
Parameters (1)WS
- SetLibrary(WL: IFSelect_WorkLibrary): void
Sets a WorkLibrary.
Parameters (1)WL
- SetRecordMode(mode: boolean): void
Changes the RecordMode.
Parameters (1)mode
- SetCommandLine(command: TCollection_AsciiString): void
Sets the value of the Command Line to be interpreted Also prepares the interpretation (splitting by blanks).
Parameters (1)command
Returns the Command Line to be interpreted.
- CommandPart(numarg: number): string
Returns the part of the command line which begins at argument <numarg> between 0 and NbWords-1 (by default, all the line) Empty string if out of range.
Parameters (1)numarg
- NbWords(): number
Returns the count of words of the Command Line, separated by blanks : 0 if empty, one if a command without args, else it gives the count of args minus one. Warning : limited to 10 (command title + 9 args).
- Word(num: number): TCollection_AsciiString
Returns a word given its rank in the Command Line. Begins at 0 which is the Command Title, 1 is the 1st arg., etc...
Parameters (1)num
- Arg(num: number): string
Returns a word given its rank, as a CString. As for Word, begins at 0 (the command name), etc...
Parameters (1)num
- RemoveWord(num: number): boolean
Removes a word given its rank. Returns True if Done, False if <num> is out of range.
Parameters (1)num
- NbCommands(): number
Returns the count of recorded Commands.
- Command(num: number): TCollection_AsciiString
Returns a recorded Command, given its rank (from 1).
Parameters (1)num
Allows to associate a Transient Value with the last execution as a partial result Returns RetDone if item is not Null, RetFail if item is Null Remark : it is nullified for each Perform.
Parameters (1)item
Returns the Transient Object which was recorded with the current Line Command. If none was, returns a Null Handle.
- Clear(): void
Clears the recorded information (commands, objects).
- ReadScript(file?: string): IFSelect_ReturnStatus
Reads commands from a Script File, named <file>. By default (file = ""), reads from standard input with a prompt Else (reading from a file), the read commands are displayed onto standard output. Allows nested reads. Reading is stopped either by command x or exit, or by reaching end of file Return Value follows the rules of Do : RetEnd for normal end, RetFail if script could not be opened.
Parameters (1)file
Executes the Command, itself (for built-in commands, which have priority) or by using the list of Activators. The value returned is : RetVoid if nothing done (void command) RetDone if execution OK, RetEnd if END OF SESSION, RetError if command unknown or incorrect, RetFail if error on execution If execution is OK and RecordMode is set, this Command Line is recorded to the list (see below).
- ExecuteAlias(aliasname: TCollection_AsciiString): IFSelect_ReturnStatus
Executes the Commands, except that the command name (word 0) is aliased. The rest of the command line is unchanged If <alias> is empty, Executes with no change.
Error status is returned if the alias is unknown as commandParameters (1)aliasname
- Execute(command: TCollection_AsciiString): IFSelect_ReturnStatus
Sets the Command then tries to execute it. Return value : same as for Perform.
Parameters (1)command
- ExecuteCounter(counter: IFSelect_SignCounter, numword: number, mode?: IFSelect_PrintCount): IFSelect_ReturnStatus
Executes a Counter in a general way If <numword> is greater than count of command words, it counts all the model. Else it considers the word <numword> as the identifier of a Selection <mode> gives the mode of printing results, default is CountByItem.
Parameters (3)counternumwordmode
- Number(val: string): number
Interprets a string value as an entity number : if it gives an integer, returns its value else, considers it as ENtityLabel (preferably case sensitive) in case of failure, returns 0.
Parameters (1)val
- Do(number_: number, pilot: IFSelect_SessionPilot): IFSelect_ReturnStatus
Processes specific commands, which are : x or exit for end of session ? or help for help messages xcommand to control command lines (Record Mode, List, Clear, File Output ...) xsource to execute a command file (no nesting allowed), in case of error, source is stopped and keyword recovers xstep is a simple prefix (useful in a wider environment, to avoid conflicts on command names) xset control commands which create items with names.
Parameters (2)number_pilot
- Help(number_: number): string
Help for specific commands (apart from general command help).
Parameters (1)number_
IFSelect_ShareOut
This class gathers the information required to produce one or several file(s) from the content of an InterfaceModel (passing through the creation of intermediate Models).
It can correspond to a complete Divide up of a set of Entities intended to be exhaustive and to limit duplications. Or to a simple Extraction of some Entities, in order to work on them.
A ShareOut is composed of a list of Dispatches. To Each Dispatch in the ShareOut, is bound an Id. Number This Id. Number allows to identify a Display inside the ShareOut in a stable way (for instance, to attach file names)
ShareOut can be seen as a "passive" description, activated through a ShareOutResult, which gives the InterfaceModel on which to work, as a unique source. Thus it is easy to change it without coherence problems
Services about it are provided by the class ShareOutResult which is a service class : simulation (list of files and of entities per file; "forgotten" entities; duplicated entities), exploitation (generation of derivated Models, each of them generating an output file)
Constructors(1)
Static methods(2)
Instance methods(31)
IFSelect_ShareOutResult
This class gives results computed from a ShareOut : simulation before transfer, helps to list entities ... Transfer itself will later be performed, either by a TransferCopy to simply divide up a file, or a TransferDispatch which can be parametred with more details.
Constructors(2)
Instance methods(12)
IFSelect_SignAncestor
Constructors(1)
- constructor(nopk?: boolean): IFSelect_SignAncestorParameters (1)
nopk
Static methods(2)
- get_type_name(): string
Instance methods(2)
- Matches(ent: Standard_Transient, model: Interface_InterfaceModel, text: TCollection_AsciiString, exact: boolean): boolean
Tells if the value for <ent> in <model> matches a text, with a criterium <exact>. The default definition calls MatchValue Can be redefined.
Parameters (4)entmodeltextexact
IFSelect_Signature
Signature provides the basic service used by the classes SelectSignature and Counter (i.e. Name, Value), which is :
- for an entity in a model, give a characteristic string, its signature This string has not to be unique in the model, but gives a value for such or such important feature. Examples : Dynamic Type; Category; etc
Static methods(4)
- MatchValue(val: string, text: TCollection_AsciiString, exact: boolean): boolean
Default procedure to tell if a value <val> matches a text with a criterium <exact>. <exact> = True requires equality, else only contained (no reg-exp).
Parameters (3)valtextexact
- IntValue(val: number): string
This procedure converts an Integer to a CString It is a convenient way when the value of a signature has the form of a simple integer value The value is to be used immediately (one buffer only, no copy).
Parameters (1)val
- get_type_name(): string
Instance methods(8)
- SetIntCase(hasmin: boolean, valmin: number, hasmax: boolean, valmax: number): void
Sets the information data to tell "integer cases" with possible min and max values To be called when creating.
Parameters (4)hasminvalminhasmaxvalmax
- IsIntCase(hasmin: boolean, valmin: number, hasmax: boolean, valmax: number): { returnValue: boolean; hasmin: boolean; valmin: number; hasmax: boolean; valmax: number }
Tells if this Signature gives integer values and returns values from SetIntCase if True.
Parameters (4)hasminvalminhasmaxvalmax
ReturnsA result object with fields:
returnValue: the C++ return valuehasmin: updated value from the call.valmin: updated value from the call.hasmax: updated value from the call.valmax: updated value from the call.
- AddCase(acase: string): void
Adds a possible case To be called when creating, IF the list of possible cases for Value is known when starting For instance, for CDL types, rather do not fill this, but for a specific enumeration (such as a status), can be used.
Parameters (1)acase
Returns the predefined list of possible cases, filled by AddCase Null Handle if no predefined list (hence, to be counted) Useful to filter on really possible vase, for instance, or for a help.
- Name(): string
Returns an identification of the Signature (a word), given at initialization time Returns the Signature for a Transient object. It is specific of each sub-class of Signature. For a Null Handle, it should provide "" It can work with the model which contains the entity.
The label of a Signature uses its name as follow : "Signature : <name>".
- Matches(ent: Standard_Transient, model: Interface_InterfaceModel, text: TCollection_AsciiString, exact: boolean): boolean
Tells if the value for <ent> in <model> matches a text, with a criterium <exact>. The default definition calls MatchValue Can be redefined.
Parameters (4)entmodeltextexact
IFSelect_SignatureList
A SignatureList is given as result from a Counter (any kind) It gives access to a list of signatures, with counts, and optionally with list of corresponding entities.
It can also be used only to give a signature, through SignOnly Mode. This can be useful for a specific counter (used in a Selection), while it remains better to use a Signature whenever possible
Constructors(1)
- constructor(withlist?: boolean): IFSelect_SignatureList
Creates a SignatureList. If <withlist> is True, entities will be not only counted per signature, but also listed.
Parameters (1)withlist
Static methods(2)
- get_type_name(): string
Instance methods(14)
- SetList(withlist: boolean): void
Changes the record-list status. The list is not cleared but its use changes.
Parameters (1)withlist
- ModeSignOnly(): boolean
Returns modifiable the SignOnly Mode If False (D), the counter normally counts If True, the counting work is turned off, Add only fills the LastValue, which can be used as signature, when a counter works from data which are not available from a Signature.
- Clear(): void
- Add(ent: Standard_Transient, sign: string): void
Adds an entity with its signature, i.e. :
- counts an item more for <sign>
- if record-list status is set, records the entity Accepts a null entity (the signature is then for the global model). But if the string is empty, counts a Null item.
If SignOnly Mode is set, this work is replaced by just setting LastValue
Parameters (2)entsign
- LastValue(): string
Returns the last value recorded by Add (only if SignMode set) Cleared by Clear or Init.
- Init(name: string, count: NCollection_IndexedDataMap_TCollection_AsciiString_int, list: NCollection_IndexedDataMap_TCollection_AsciiString_handle_Standard_Transient, nbnuls: number): void
Acknowledges the list in once. Name identifies the Signature.
Parameters (4)namecountlistnbnuls
- List(root?: string): NCollection_HSequence_handle_TCollection_HAsciiString
Returns the list of signatures, as a sequence of strings (but without their respective counts). It is ordered. By default, for all the signatures. If <root> is given non empty, for the signatures which begin by <root>.
Parameters (1)root
- HasEntities(): boolean
Returns True if the list of Entities is acknowledged, else the method Entities will always return a Null Handle.
- NbNulls(): number
Returns the count of null entities.
- NbTimes(sign: string): number
Returns the number of times a signature was counted, 0 if it has not been recorded at all.
Parameters (1)sign
- Entities(sign: string): NCollection_HSequence_handle_Standard_Transient
Returns the list of entities attached to a signature It is empty if <sign> has not been recorded It is a Null Handle if the list of entities is not known.
Parameters (1)sign
- SetName(name: string): void
Defines a name for a SignatureList (used to print it).
Parameters (1)name
- Name(): string
Returns the recorded Name. Remark : default is "..." (no SetName called).
IFSelect_SignCategory
This Signature returns the Category of an entity, as recorded in the model.
Constructors(1)
Returns a SignCategory.
Static methods(2)
- get_type_name(): string
Instance methods(2)
- Value(ent: Standard_Transient, model: Interface_InterfaceModel): string
Returns the Signature for a Transient object, as its Category recorded in the model.
Parameters (2)entmodel
IFSelect_SignCounter
SignCounter gives the frame to count signatures associated with entities, deducted from them. Ex.: their Dynamic Type.
It can sort a set of Entities according a signature, i.e. :
- list of different values found for this Signature
- for each one, count and list of entities Results are returned as a SignatureList, which can be queried on the count (list of strings, count per signature, or list of entities per signature)
A SignCounter can be filled, either directly from lists, or from the result of a Selection : hence, its content can be automatically recomputed as desired
SignCounter works by using a Signature in its method AddSign
Methods can be redefined to, either - directly compute the value without a Signature
- compute the value in the context of a Graph
Constructors(2)
- constructor(withmap?: boolean, withlist?: boolean): IFSelect_SignCounter
Creates a SignCounter, without proper Signature If <withmap> is True (default), added entities are counted only if they are not yet recorded in the map Map control can be set off if the input guarantees uniqueness of data <withlist> is transmitted to SignatureList (option to list entities, not only to count them).
Parameters (2)withmapwithlist
- constructor(matcher: IFSelect_Signature, withmap?: boolean, withlist?: boolean): IFSelect_SignCounter
Creates a SignCounter, with a predefined Signature Other arguments as for Create without Signature.
Parameters (3)matcherwithmapwithlist
Static methods(2)
- get_type_name(): string
Instance methods(11)
- SetMap(withmap: boolean): void
Changes the control status. The map is not cleared, simply its use changes.
Parameters (1)withmap
- AddEntity(ent: Standard_Transient, model: Interface_InterfaceModel): boolean
Adds an entity by considering its signature, which is given by call to method AddSign Returns True if added, False if already in the map (and map control status set).
Parameters (2)entmodel
- AddSign(ent: Standard_Transient, model: Interface_InterfaceModel): void
Adds an entity (already filtered by Map) with its signature. This signature can be computed with the containing model. Its value is provided by the object Signature given at start, if no Signature is defined, it does nothing.
Can be redefined (in this case, see also Sign)Parameters (2)entmodel
- AddList(list: NCollection_HSequence_handle_Standard_Transient, model: Interface_InterfaceModel): void
Adds a list of entities by adding each of the items.
Parameters (2)listmodel
- AddModel(model: Interface_InterfaceModel): void
Adds all the entities contained in a Model.
Parameters (1)model
- SetSelection(sel: IFSelect_Selection): void
Sets a Selection as input : this causes content to be cleared then the Selection to be ready to compute (but not immediately).
Parameters (1)sel
Returns the selection, or a null Handle.
- SetSelMode(selmode: number): void
Changes the mode of working with the selection : -1 just clears optimisation data and nothing else 0 clears it 1 inhibits it for computing (but no clearing) 2 sets it active for computing Default at creation is 0, after SetSelection (not null) is 2.
Parameters (1)selmode
- SelMode(): number
Returns the mode of working with the selection.
- Sign(ent: Standard_Transient, model: Interface_InterfaceModel): TCollection_HAsciiString
Determines and returns the value of the signature for an entity as an HAsciiString. This method works exactly as AddSign, which is optimized.
Can be redefined, accorded with AddSignParameters (2)entmodel
IFSelect_SignMultiple
Multiple Signature : ordered list of other Signatures It concatenates on a same line the result of its sub-items separated by sets of 3 blanks It is possible to define tabulations between sub-items Moreover, match rules are specific.
Constructors(1)
- constructor(name: string): IFSelect_SignMultiple
Creates an empty SignMultiple with a Name This name should take expected tabulations into account.
Parameters (1)name
Static methods(2)
- get_type_name(): string
Instance methods(4)
- Add(subsign: IFSelect_Signature, width?: number, maxi?: boolean): void
Adds a Signature. Width, if given, gives the tabulation If <maxi> is True, it is a forced tabulation (overlength is replaced by a final dot) If <maxi> is False, just 3 blanks follow an overlength.
Parameters (3)subsignwidthmaxi
- Value(ent: Standard_Transient, model: Interface_InterfaceModel): string
Concatenates the values of sub-signatures, with their tabulations.
Parameters (2)entmodel
- Matches(ent: Standard_Transient, model: Interface_InterfaceModel, text: TCollection_AsciiString, exact: boolean): boolean
Specialized Match Rule If <exact> is False, simply checks if at least one sub-item matches If <exact> is True, standard match with Value (i.e. tabulations must be respected).
Parameters (4)entmodeltextexact
IFSelect_SignType
This Signature returns the cdl Type of an entity, under two forms :
- complete dynamic type (package and class)
- class type, without package name
Constructors(1)
- constructor(nopk?: boolean): IFSelect_SignType
Returns a SignType <nopk> false (D) : complete dynamic type (name = Dynamic Type) <nopk> true : class type without pk (name = Class Type).
Parameters (1)nopk
Static methods(2)
- get_type_name(): string
Instance methods(2)
- Value(ent: Standard_Transient, model: Interface_InterfaceModel): string
Returns the Signature for a Transient object, as its Dynamic Type, with or without package name, according starting option.
Parameters (2)entmodel
IFSelect_SignValidity
This Signature returns the Validity Status of an entity, as deducted from data in the model : it can be "OK" "Unknown" "Unloaded" "Syntactic Fail"(but loaded) "Syntactic Warning" "Semantic Fail" "Semantic Warning".
Constructors(1)
Returns a SignValidity.
Static methods(3)
- CVal(ent: Standard_Transient, model: Interface_InterfaceModel): string
Returns the Signature for a Transient object, as a validity deducted from data (reports) stored in the model. Class method, can be called by any one.
Parameters (2)entmodel
- get_type_name(): string
Instance methods(2)
- Value(ent: Standard_Transient, model: Interface_InterfaceModel): string
Returns the Signature for a Transient object, as a validity deducted from data (reports) stored in the model Calls the class method CVal.
Parameters (2)entmodel
IFSelect_Transformer
A Transformer defines the way an InterfaceModel is transformed (without sending it to a file). In order to work, each type of Transformer defines it method Perform, it can be parametred as needed.
It receives a Model (the data set) as input. It then can :
- edit this Model on the spot (i.e. alter its content: by editing entities, or adding/replacing some ...)
- produce a copied Model, which detains the needed changes (typically on the same type, but some or all entities being rebuilt or converted; or converted from a protocol to another one)
Static methods(2)
- get_type_name(): string
Instance methods(4)
- ChangeProtocol(): { returnValue: boolean; newproto: Interface_Protocol; [Symbol.dispose](): void }
This methods allows to declare that the Protocol applied to the new Model has changed. It applies to the last call to Perform.
Returns True if the Protocol has changed, False else. The provided default keeps the starting Protocol. This method should be redefined as required by the effect of Perform.ReturnsA result object with fields:
returnValue: the C++ return valuenewproto: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- Updated(entfrom: Standard_Transient): { returnValue: boolean; entto: Standard_Transient; [Symbol.dispose](): void }
This method allows to know what happened to a starting entity after the last Perform. If <entfrom> (from starting model) has one and only one known item which corresponds in the new produced model, this method must return True and fill the argument <entto>. Else, it returns False.
Parameters (1)entfrom
ReturnsA result object with fields:
returnValue: the C++ return valueentto: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
Returns a text which defines the way a Transformer works (to identify the transformation it performs).
IFSelect_TransformStandard
This class runs transformations made by Modifiers, as the ModelCopier does when it produces files (the same set of Modifiers can then be used, as to transform the starting Model, as at file sending time).
First, considering the resulting model, two options :
- modifications are made directly on the starting model (OnTheSpot option), or
- data are copied by the standard service Copy, only the remaining (not yet sent in a file) entities are copied (StandardCopy option)
If a Selection is set, it forces the list of Entities on which the Modifiers are applied. Else, each Modifier is considered its Selection. By default, it is for the whole Model
Then, the Modifiers are sequentially applied If at least one Modifier "May Change Graph", or if the option StandardCopy is selected, the graph will be recomputed (by the WorkSession, see method RunTransformer)
Remark that a TransformStandard with option StandardCopy and no Modifier at all has the effect of computing the remaining data (those not yet sent in any output file). Moreover, the Protocol is not changed
Constructors(1)
Creates a TransformStandard, option StandardCopy, no Modifier.
Static methods(2)
- get_type_name(): string
Instance methods(12)
- CopyOption(): boolean
Returns the Copy option.
- SetSelection(sel: IFSelect_Selection): void
Sets a Selection (or unsets if Null) This Selection then defines the list of entities on which the Modifiers will be applied If it is set, it has priority on Selections of Modifiers Else, for each Modifier its Selection is evaluated By default, all the Model is taken.
Parameters (1)sel
Returns the Selection, Null by default.
- NbModifiers(): number
Returns the count of recorded Modifiers.
- Modifier(num: number): IFSelect_Modifier
Returns a Modifier given its rank in the list.
Parameters (1)num
- ModifierRank(modif: IFSelect_Modifier): number
Returns the rank of a Modifier in the list, 0 if unknown.
Parameters (1)modif
- AddModifier(modif: IFSelect_Modifier, atnum?: number): boolean
Adds a Modifier to the list :
- <atnum> = 0 (default) : at the end of the list
- <atnum> > 0 : at rank <atnum> Returns True if done, False if <atnum> is out of range
Parameters (2)modifatnum
- RemoveModifier(modif: IFSelect_Modifier): boolean
Removes a Modifier from the list Returns True if done, False if <modif> not in the list.
Parameters (1)modif
- RemoveModifier(num: number): boolean
Removes a Modifier from the list, given its rank Returns True if done, False if <num> is out of range.
Parameters (1)num
- Updated(entfrom: Standard_Transient): { returnValue: boolean; entto: Standard_Transient; [Symbol.dispose](): void }
This methods allows to know what happened to a starting entity after the last Perform. It reads result from the map which was filled by Perform.
Parameters (1)entfrom
ReturnsA result object with fields:
returnValue: the C++ return valueentto: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
Returns a text which defines the way a Transformer works : "On the spot edition" or "Standard Copy" followed by "<nn> Modifiers".
IFSelect_WorkLibrary
This class defines the (empty) frame which can be used to enrich a XSTEP set with new capabilities In particular, a specific WorkLibrary must give the way for Reading a File into a Model, and Writing a Model to a File Thus, it is possible to define several Work Libraries for each norm, but recommended to define one general class for each one : this general class will define the Read and Write methods.
Also a Dump service is provided, it can produce, according the norm, either a parcel of a file for an entity, or any other kind of information relevant for the norm,
Static methods(2)
- get_type_name(): string
Instance methods(7)
- ReadFile(name: string, protocol: Interface_Protocol): { returnValue: number; model: Interface_InterfaceModel; [Symbol.dispose](): void }
Gives the way to Read a File and transfer it to a Model <mod> is the resulting Model, which has to be created by this method. In case of error, <mod> must be returned Null Return value is a status with free values. Simply, 0 is for "Execution OK" The Protocol can be used to work (e.g. create the Model, read and recognize the Entities).
Parameters (2)nameprotocol
ReturnsA result object with fields:
returnValue: the C++ return valuemodel: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- WriteFile(ctx: IFSelect_ContextWrite): boolean
Gives the way to Write a File from a Model. <ctx> contains all necessary information : the model, the protocol, the file name, and the list of File Modifiers to be applied, also with restricted list of selected entities for each one, if required. In return, it brings the produced check-list.
The WorkLibrary has to query <applied> to get then run the ContextWrite by looping like this (example) : for (numap = 1; numap <= ctx.NbModifiers(); numap ++) { ctx.SetModifier (numap); cast ctx.FileModifier() to specific type -> variable filemod if (!filemod.IsNull()) filemod->Perform (ctx,writer); filemod then works with ctx. It can, either act on the model itself (for instance on its header), or iterate on selected entities (Start/Next/More/Value) it can call AddFail or AddWarning, as necessary }Parameters (1)ctx
- SetDumpLevels(def: number, max: number): void
Records a default level and a maximum value for level level for DumpEntity can go between 0 and <max> default value will be <def>.
Parameters (2)defmax
- DumpLevels(def: number, max: number): { def: number; max: number }
Returns the recorded default and maximum dump levels If none was recorded, max is returned negative, def as zero.
Parameters (2)defmax
ReturnsA result object with fields:
def: updated value from the call.max: updated value from the call.
- SetDumpHelp(level: number, help: string): void
Records a short line of help for a level (0 - max).
Parameters (2)levelhelp
- DumpHelp(level: number): string
Returns the help line recorded for <level>, or an empty string.
Parameters (1)level
IFSelect_WorkSession
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.
Constructors(1)
Creates a Work Session It provides default, empty ShareOut and ModelCopier, which can be replaced (if required, should be done just after creation).
Static methods(2)
- get_type_name(): string
Instance methods(144)
- ErrorHandle(): boolean
Returns the Error Handler status.
- SetModeStat(theMode: boolean): void
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).
Parameters (1)theMode
- GetModeStat(): boolean
Return value of mode defining of filling selection during loading.
- SetLibrary(theLib: IFSelect_WorkLibrary): void
Sets a WorkLibrary, which will be used to Read and Write Files.
Parameters (1)theLib
Returns the WorkLibrary. Null Handle if not yet set should be C++ : return const &.
- SetProtocol(protocol: Interface_Protocol): void
Sets a Protocol, which will be used to determine Graphs, to Read and to Write Files.
Parameters (1)protocol
Returns the Protocol. Null Handle if not yet set should be C++ : return const &.
- SetSignType(signtype: IFSelect_Signature): void
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).
Parameters (1)signtype
Returns the current SignType.
- HasModel(): boolean
Returns True is a Model has been set.
- SetModel(model: Interface_InterfaceModel, clearpointed?: boolean): void
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.
Parameters (2)modelclearpointed
Returns the Model of the Work Session (Null Handle if none) should be C++ : return const &.
- SetLoadedFile(theFileName: string): void
Stores the filename used for read for setting the model It is cleared by SetModel and ClearData(1).
Parameters (1)theFileName
- LoadedFile(): string
Returns the filename used to load current model empty if unknown.
- ReadFile(filename: string): IFSelect_ReturnStatus
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.
Parameters (1)filename
- NbStartingEntities(): number
Returns the count of Entities stored in the Model, or 0.
- StartingEntity(num: number): Standard_Transient
Returns an Entity stored in the Model of the WorkSession (Null Handle is no Model or num out of range).
Parameters (1)num
- StartingNumber(ent: Standard_Transient): number
Returns the Number of an Entity in the Model (0 if no Model set or <ent> not in the Model).
Parameters (1)ent
- NumberFromLabel(val: string, afternum?: number): number
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 itParameters (2)valafternum
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.
Parameters (1)ent
Returns the Name of an Entity This Name is computed by the general service Name Returns a Null Handle if fails.
Parameters (1)ent
- CategoryNumber(ent: Standard_Transient): number
Returns the Category Number determined for an entity it is computed by the class Category An unknown entity (number 0) gives a value -1.
Parameters (1)ent
- CategoryName(ent: Standard_Transient): string
Returns the Category Name determined for an entity it is computed by the class Category Remark : an unknown entity gives an empty string.
Parameters (1)ent
- ValidityName(ent: Standard_Transient): string
Returns the Validity Name determined for an entity it is computed by the class SignValidity Remark : an unknown entity gives an empty string.
Parameters (1)ent
- ClearData(mode: number): void
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.
Parameters (1)mode
- ComputeGraph(enforce?: boolean): boolean
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).
Parameters (1)enforce
Returns the list of entities sharing <ent> (can be empty) Returns a null Handle if <ent> is unknown.
Parameters (1)ent
- IsLoaded(): boolean
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.
- ComputeCheck(enforce?: boolean): boolean
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.
Parameters (1)enforce
- MaxIdent(): number
Returns the Maximum Value for an Item Identifier. It can be greater to the count of known Items, because some can have been removed.
- Item(id: number): Standard_Transient
Returns an Item, given its Ident. Returns a Null Handle if no Item corresponds to this Ident.
Parameters (1)id
- ItemIdent(item: Standard_Transient): number
Returns the Ident attached to an Item in the WorkSession, or Zero if it is unknown.
Parameters (1)item
- NamedItem(name: string): Standard_Transient
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.
Parameters (1)name
Same as above, but <name> is given through a Handle Especially useful with methods SelectionNames, etc...
Parameters (1)name
- NameIdent(name: string): number
Returns the Ident attached to a Name, 0 if name not recorded.
Parameters (1)name
- HasName(item: Standard_Transient): boolean
Returns True if an Item of the WorkSession has an attached Name.
Parameters (1)item
Returns the Name attached to an Item as a Variable of this WorkSession. If is Null or not recorded, returns an empty string.
Parameters (1)item
- AddItem(item: Standard_Transient, active?: boolean): number
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.
Parameters (2)itemactive
- AddNamedItem(name: string, item: Standard_Transient, active?: boolean): number
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).
Parameters (3)nameitemactive
- SetActive(item: Standard_Transient, mode: boolean): boolean
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)
Parameters (2)itemmode
- RemoveNamedItem(name: string): boolean
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).
Parameters (1)name
- RemoveName(name: string): boolean
Removes a Name without removing the Item Returns True if Done, False else (Name not recorded).
Parameters (1)name
- RemoveItem(item: Standard_Transient): boolean
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.
Parameters (1)item
- ClearItems(): void
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.
- ItemLabel(id: number): TCollection_HAsciiString
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
Parameters (1)id
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.
Parameters (1)type_
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.
Parameters (1)type_
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.
Parameters (1)label
- NextIdentForLabel(label: string, id: number, mode?: number): number
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
Parameters (3)labelidmode
- NewParamFromStatic(statname: string, name?: string): Standard_Transient
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.
Parameters (2)statnamename
- TextParam(id: number): TCollection_HAsciiString
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).
Parameters (1)id
Returns Text Value of a TextParam (a String) or an empty string if <it> is not in the WorkSession.
Parameters (1)par
- NewTextParam(name?: string): TCollection_HAsciiString
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).
Parameters (1)name
- SetTextValue(par: TCollection_HAsciiString, val: string): boolean
Changes the Text Value of a TextParam (an HAsciiString) Returns True if Done, False if <it> is not in the WorkSession.
Parameters (2)parval
- Signature(id: number): IFSelect_Signature
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).
Parameters (1)id
- SignValue(sign: IFSelect_Signature, ent: Standard_Transient): string
Returns the Value computed by a Signature for an Entity Returns an empty string if the entity does not belong to the loaded model.
Parameters (2)signent
- Selection(id: number): IFSelect_Selection
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).
Parameters (1)id
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.
Parameters (1)sel
- SelectionResultFromList(sel: IFSelect_Selection, list: NCollection_HSequence_handle_Standard_Transient): NCollection_HSequence_handle_Standard_Transient
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.
Parameters (2)sellist
- SetItemSelection(item: Standard_Transient, sel: IFSelect_Selection): boolean
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.
Parameters (2)itemsel
- ResetItemSelection(item: Standard_Transient): boolean
Resets input Selection which was set by SetItemSelection Same conditions as for SetItemSelection Returns True if done, False if is not in the WorkSession.
Parameters (1)item
Returns the Selection of a Dispatch or a GeneralModifier. Returns a Null Handle if none is defined or not good type.
Parameters (1)item
- SignCounter(id: number): IFSelect_SignCounter
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).
Parameters (1)id
- ComputeCounter(counter: IFSelect_SignCounter, forced?: boolean): boolean
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.
Parameters (2)counterforced
- ComputeCounterFromList(counter: IFSelect_SignCounter, list: NCollection_HSequence_handle_Standard_Transient, clear?: boolean): boolean
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.
Parameters (3)counterlistclear
Returns the ordered list of dispatches stored by the ShareOut.
- Dispatch(id: number): IFSelect_Dispatch
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).
Parameters (1)id
- DispatchRank(disp: IFSelect_Dispatch): number
Returns the rank of a Dispatch in the ShareOut, or 0 if <disp> is not in the ShareOut or not in the WorkSession.
Parameters (1)disp
Gives access to the complete ModelCopier.
- SetModelCopier(copier: IFSelect_ModelCopier): void
Sets a new ModelCopier. Fills Items which its content.
Parameters (1)copier
- NbFinalModifiers(formodel: boolean): number
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).
Parameters (1)formodel
- FinalModifierIdents(formodel: boolean): NCollection_HSequence_int
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).
Parameters (1)formodel
- GeneralModifier(id: number): IFSelect_GeneralModifier
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).
Parameters (1)id
- ModelModifier(id: number): IFSelect_Modifier
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).
Parameters (1)id
- ModifierRank(item: IFSelect_GeneralModifier): number
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.
Parameters (1)item
- ChangeModifierRank(formodel: boolean, before: number, after: number): boolean
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.
Parameters (3)formodelbeforeafter
- ClearFinalModifiers(): void
Removes all the Modifiers active in the ModelCopier : they become inactive and they are removed from the Session.
- SetAppliedModifier(modif: IFSelect_GeneralModifier, item: Standard_Transient): boolean
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>
Parameters (2)modifitem
- ResetAppliedModifier(modif: IFSelect_GeneralModifier): boolean
Resets a GeneralModifier to be applied Returns True if done, False if <modif> was not applied.
Parameters (1)modif
Returns the item on which a GeneralModifier is applied : the ShareOut, or a given Dispatch Returns a Null Handle if <modif> is not applied.
Parameters (1)modif
- Transformer(id: number): IFSelect_Transformer
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).
Parameters (1)id
- RunTransformer(transf: IFSelect_Transformer): number
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 protocolParameters (1)transf
- RunModifier(modif: IFSelect_Modifier, copy: boolean): number
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 -3Parameters (2)modifcopy
- RunModifierSelected(modif: IFSelect_Modifier, sel: IFSelect_Selection, copy: boolean): number
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.
Parameters (3)modifselcopy
- NewTransformStandard(copy: boolean, name?: string): IFSelect_Transformer
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.
Parameters (2)copyname
- SetModelContent(sel: IFSelect_Selection, keep: boolean): boolean
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.
Parameters (2)selkeep
Returns the defined File Prefix. Null Handle if not defined.
Returns the defined Default File Root. It is used for Dispatches which have no specific root attached. Null Handle if not defined.
Returns the defined File Extension. Null Handle if not defined.
Returns the File Root defined for a Dispatch. Null if no Root Name is defined for it (hence, no File will be produced).
Parameters (1)disp
- SetFilePrefix(name: string): void
Defines a File Prefix.
Parameters (1)name
- SetDefaultFileRoot(name: string): boolean
Defines a Default File Root Name. Clears it is <name> = "" Returns True if OK, False if <name> already set for a Dispatch.
Parameters (1)name
- SetFileExtension(name: string): void
Defines a File Extension.
Parameters (1)name
- SetFileRoot(disp: IFSelect_Dispatch, name: string): boolean
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.
Parameters (2)dispname
- GiveFileRoot(file: string): string
Extracts File Root Name from a given complete file name (uses
OSD_Path).Parameters (1)file
- GiveFileComplete(file: string): string
Completes a file name as required, with Prefix and Extension (if defined; for a non-defined item, completes nothing).
Parameters (1)file
- ClearFile(): void
Erases all stored data from the File Evaluation (i.e. ALL former naming information are lost).
- EvaluateFile(): void
Performs and stores a File Evaluation. The Results are a List of produced Models and a List of names (Strings), in parallel Fills LastRunCheckList.
- NbFiles(): number
Returns the count of produced Models.
- FileModel(num: number): Interface_InterfaceModel
Returns a Model, given its rank in the Evaluation List.
Parameters (1)num
- FileName(num: number): TCollection_AsciiString
Returns the name of a file corresponding to a produced Model, given its rank in the Evaluation List.
Parameters (1)num
- BeginSentFiles(record: boolean): void
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.
Parameters (1)record
Returns the list of recorded sent files, or a Null Handle is recording has not been enabled.
- SendSplit(): boolean
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) 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.
- MaxSendingCount(): number
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.
- SetRemaining(mode: IFSelect_RemainMode): boolean
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).
Parameters (1)mode
- SendAll(filename: string, computegraph?: boolean): IFSelect_ReturnStatus
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 LastRunCheckListParameters (2)filenamecomputegraph
- SendSelected(filename: string, sel: IFSelect_Selection, computegraph?: boolean): IFSelect_ReturnStatus
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 LastRunCheckListParameters (3)filenameselcomputegraph
- WriteFile(filename: string): IFSelect_ReturnStatus
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.
Parameters (1)filename
- WriteFile(filename: string, sel: IFSelect_Selection): IFSelect_ReturnStatus
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.
Parameters (2)filenamesel
- NbSources(sel: IFSelect_Selection): number
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.
Parameters (1)sel
- Source(sel: IFSelect_Selection, num?: number): IFSelect_Selection
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.
Parameters (2)selnum
- IsReversedSelectExtract(sel: IFSelect_Selection): boolean
Returns True if <sel> a Reversed SelectExtract, False else.
Parameters (1)sel
- ToggleSelectExtract(sel: IFSelect_Selection): boolean
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.
Parameters (1)sel
- SetInputSelection(sel: IFSelect_Selection, input: IFSelect_Selection): boolean
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.
Parameters (2)selinput
- SetControl(sel: IFSelect_Selection, sc: IFSelect_Selection, formain?: boolean): boolean
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.
Parameters (3)selscformain
- CombineAdd(selcomb: IFSelect_Selection, seladd: IFSelect_Selection, atnum?: number): number
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).
Parameters (3)selcombseladdatnum
- CombineRemove(selcomb: IFSelect_Selection, selrem: IFSelect_Selection): boolean
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>.
Parameters (2)selcombselrem
- NewSelectPointed(list: NCollection_HSequence_handle_Standard_Transient, name: string): IFSelect_Selection
Creates a new Selection, of type SelectPointed, its content starts with A name must be given (can be empty).
Parameters (2)listname
- SetSelectPointed(sel: IFSelect_Selection, list: NCollection_HSequence_handle_Standard_Transient, mode: number): boolean
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.
Parameters (3)sellistmode
- GiveSelection(selname: string): IFSelect_Selection
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
Parameters (1)selname
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).
Parameters (1)obj
- GiveList(first: string, second: string): NCollection_HSequence_handle_Standard_Transient
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 ...)
Parameters (2)firstsecond
- GiveListFromList(selname: string, ent: Standard_Transient): NCollection_HSequence_handle_Standard_Transient
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 GiveListParameters (2)selnameent
- GiveListCombined(l1: NCollection_HSequence_handle_Standard_Transient, l2: NCollection_HSequence_handle_Standard_Transient, mode: number): NCollection_HSequence_handle_Standard_Transient
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>.
Parameters (3)l1l2mode
- QueryCheckStatus(ent: Standard_Transient): number
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.
Parameters (1)ent
- QueryParent(entdad: Standard_Transient, entson: Standard_Transient): number
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.
Parameters (2)entdadentson
- SetParams(params: NCollection_DynamicArray_handle_Standard_Transient, uselist: NCollection_DynamicArray_int): void
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 WritingParameters (2)paramsuselist
- TraceStatics(use: number, mode?: number): void
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.
Parameters (2)usemode
- ListItems(label?: string): void
Lists the Labels of all Items of the WorkSession If <label> is defined, lists labels which contain it.
Parameters (1)label
- ListFinalModifiers(formodel: boolean): void
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.
Parameters (1)formodel
- DumpSelection(sel: IFSelect_Selection): void
Lists a Selection and its Sources (see SelectionIterator), given its rank in the list.
Parameters (1)sel
- TraceDumpModel(mode: number): void
Dumps the current Model (as inherited DumpModel), on currently defined Default Trace File (default is standard output).
Parameters (1)mode
- TraceDumpEntity(ent: Standard_Transient, level: number): void
Dumps an entity from the current Model as inherited DumpEntity on currently defined Default Trace File (<level> interpreted according to the Norm, see WorkLibrary).
Parameters (2)entlevel
- EvaluateSelection(sel: IFSelect_Selection): void
Displays the list of Entities selected by a Selection (i.e. the result of EvalSelection).
Parameters (1)sel
- EvaluateDispatch(disp: IFSelect_Dispatch, mode?: number): void
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.
Parameters (2)dispmode
- EvaluateComplete(mode?: number): void
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).
Parameters (1)mode