Interface
OCCT package Interface: Interface_BitMap, Interface_Category, Interface_Check, Interface_CheckFailure, and 41 more bound classes.
Interface_BitMap
A bit map simply allows to associate a boolean flag to each item of a list, such as a list of entities, etc... numbered between 1 and a positive count nbitems.
The BitMap class allows to associate several binary flags, each of one is identified by a number from 0 to a count which can remain at zero or be positive : nbflags
Flags lists over than numflag=0 are added after creation Each of one can be named, hence the user can identify it either by its flag number or by a name which gives a flag n0 (flag n0 0 has no name)
Constructors(3)
Creates a empty BitMap.
- constructor(nbitems: number, resflags?: number): Interface_BitMap
Creates a BitMap for <nbitems> items One flag is defined, n0 0 <resflags> prepares allocation for <resflags> more flags Flags values start at false.
Parameters (2)nbitemsresflags
- constructor(other: Interface_BitMap, copied?: boolean): Interface_BitMap
Creates a BitMap from another one if <copied> is True, copies data else, data are not copied, only the header object is.
Parameters (2)othercopied
Instance methods(20)
- Initialize(nbitems: number, resflags: number): void
Initialize empty bit by <nbitems> items One flag is defined, n0 0 <resflags> prepares allocation for <resflags> more flags Flags values start at false.
Parameters (2)nbitemsresflags
- Initialize(other: Interface_BitMap, copied: boolean): void
Initialize a BitMap from another one.
Parameters (2)othercopied
- Reservate(moreflags: number): void
Reservates for a count of more flags.
Parameters (1)moreflags
- SetLength(nbitems: number): void
Sets for a new count of items, which can be either less or greater than the former one For new items, their flags start at false.
Parameters (1)nbitems
- AddFlag(name?: string): number
Adds a flag, a name can be attached to it Returns its flag number Makes required reservation.
Parameters (1)name
- AddSomeFlags(more: number): number
Adds several flags (<more>) with no name Returns the number of last added flag.
Parameters (1)more
- RemoveFlag(num: number): boolean
Removes a flag given its number. Returns True if done, false if num is out of range.
Parameters (1)num
- SetFlagName(num: number, name: string): boolean
Sets a name for a flag, given its number name can be empty (to erase the name of a flag) Returns True if done, false if : num is out of range, or name non-empty already set to another flag.
Parameters (2)numname
- NbFlags(): number
Returns the count of flags (flag 0 not included).
- Length(): number
Returns the count of items (i.e. the length of the bitmap).
- FlagName(num: number): string
Returns the name recorded for a flag, or an empty string.
Parameters (1)num
- FlagNumber(name: string): number
Returns the number or a flag given its name, or zero.
Parameters (1)name
- Value(item: number, flag?: number): boolean
Returns the value (true/false) of a flag, from :
- the number of the item
- the flag number, by default 0
Parameters (2)itemflag
- SetValue(item: number, val: boolean, flag?: number): void
Sets a new value for a flag.
Parameters (3)itemvalflag
- SetTrue(item: number, flag?: number): void
Sets a flag to True.
Parameters (2)itemflag
- SetFalse(item: number, flag?: number): void
Sets a flag to False.
Parameters (2)itemflag
- CTrue(item: number, flag?: number): boolean
Returns the former value for a flag and sets it to True (before : value returned; after : True).
Parameters (2)itemflag
- CFalse(item: number, flag?: number): boolean
Returns the former value for a flag and sets it to False (before : value returned; after : False).
Parameters (2)itemflag
- Init(val: boolean, flag?: number): void
Initialises all the values of Flag Number <flag> to a given value <val>.
Parameters (2)valflag
- Clear(): void
Clear all field of bit map.
Interface_Category
This class manages categories A category is defined by a name and a number, and can be seen as a way of rough classification, i.e. less precise than a cdl type. Hence, it is possible to dispatch every entity in about a dozen of categories, twenty is a reasonable maximum.
Basically, the system provides the following categories : Shape (Geometry, BRep, CSG, Features, etc...) Drawing (Drawing, Views, Annotations, Pictures, Sketches ...) Structure (Component & Part, Groups & Patterns ...) Description (Meta-Data : Relations, Properties, Product ...) Auxiliary (those which do not enter in the above list) and some dedicated categories FEA, Kinematics, Piping, etc... plus Professional for other dedicated non-classed categories
In addition, this class provides a way to compute then quickly query category numbers for an entire model. Values are just recorded as a list of numbers, control must then be done in a wider context (which must provide a Graph)
Constructors(3)
Creates a Category, with no protocol yet.
- constructor(theProtocol: Interface_Protocol): Interface_Category
Creates a Category with a given protocol.
Parameters (1)theProtocol
- constructor(theGTool: Interface_GTool): Interface_Category
Creates a Category with a given GTool.
Parameters (1)theGTool
Static methods(5)
- AddCategory(theName: string): number
Records a new Category defined by its names, produces a number New if not yet recorded.
Parameters (1)theName
- NbCategories(): number
Returns the count of recorded categories.
- Name(theNum: number): string
Returns the name of a category, according to its number.
Parameters (1)theNum
- Number(theName: string): number
Returns the number of a category, according to its name.
Parameters (1)theName
- Init(): void
Default initialisation (protected against several calls : passes only once).
Instance methods(5)
- SetProtocol(theProtocol: Interface_Protocol): void
Sets/Changes Protocol.
Parameters (1)theProtocol
- CatNum(theEnt: Standard_Transient, theShares: Interface_ShareTool): number
Determines the Category Number for an entity in its context, by using general service CategoryNumber.
Parameters (2)theEnttheShares
- ClearNums(): void
Clears the recorded list of category numbers for a Model.
- Compute(theModel: Interface_InterfaceModel, theShares: Interface_ShareTool): void
Computes the Category Number for each entity and records it, in an array (ent.number -> category number) Hence, it can be queried by the method Num. The Model itself is not recorded, this method is intended to be used in a wider context (which detains also a Graph, etc).
Parameters (2)theModeltheShares
- Num(theNumEnt: number): number
Returns the category number recorded for an entity number Returns 0 if out of range.
Parameters (1)theNumEnt
Interface_Check
Defines a Check, as a list of Fail or Warning Messages under a literal form, which can be empty. A Check can also bring an Entity, which is the Entity to which the messages apply (this Entity may be any Transient Object).
Messages can be stored in two forms : the definitive form (the only one by default), and another form, the original form, which can be different if it contains values to be inserted (integers, reals, strings) The original form can be more suitable for some operations such as counting messages
Constructors(2)
Allows definition of a Sequence. Used also for Global Check of an InterfaceModel (which stores global messages for file).
- constructor(anentity: Standard_Transient): Interface_Check
Defines a Check on an Entity.
Parameters (1)anentity
Static methods(2)
- get_type_name(): string
Instance methods(42)
- SendFail(amsg: Message_Msg): void
New name for AddFail (Msg).
Parameters (1)amsg
- AddFail(amess: TCollection_HAsciiString): void
Records a new Fail message.
Parameters (1)amess
- AddFail(amsg: Message_Msg): void
Records a new Fail from the definition of a Msg (Original+Value).
Parameters (1)amsg
- AddFail(amess: TCollection_HAsciiString, orig: TCollection_HAsciiString): void
Records a new Fail message under two forms : final,original.
Parameters (2)amessorig
- AddFail(amess: string, orig: string): void
Records a new Fail message given as "error text" directly If <orig> is given, a distinct original form is recorded else (D), the original form equates <amess>.
Parameters (2)amessorig
- HasFailed(): boolean
Returns True if Check brings at least one Fail
Message. - NbFails(): number
Returns count of recorded Fails.
- Fail(num: number, final?: boolean): TCollection_HAsciiString
Returns Fail
Messageas a String Final form by default, Original form if <final> is False.Parameters (2)numfinal
- CFail(num: number, final: boolean): string
Same as above, but returns a CString (to be printed ...) Final form by default, Original form if <final> is False.
Parameters (2)numfinal
- Fails(final?: boolean): NCollection_HSequence_handle_TCollection_HAsciiString
Returns the list of Fails, for a frontal-engine logic Final forms by default, Original forms if <final> is False Can be empty.
Parameters (1)final
- SendWarning(amsg: Message_Msg): void
New name for AddWarning.
Parameters (1)amsg
- AddWarning(amess: TCollection_HAsciiString): void
Records a new Warning message.
Parameters (1)amess
- AddWarning(amsg: Message_Msg): void
Records a new Warning from the definition of a Msg (Original+Value).
Parameters (1)amsg
- AddWarning(amess: TCollection_HAsciiString, orig: TCollection_HAsciiString): void
Records a new Warning message under two forms : final,original.
Parameters (2)amessorig
- AddWarning(amess: string, orig: string): void
Records a Warning message given as "warning message" directly If <orig> is given, a distinct original form is recorded else (D), the original form equates <amess>.
Parameters (2)amessorig
- HasWarnings(): boolean
Returns True if Check brings at least one Warning
Message. - NbWarnings(): number
Returns count of recorded Warning messages.
- Warning(num: number, final?: boolean): TCollection_HAsciiString
Returns Warning message as a String Final form by default, Original form if <final> is False.
Parameters (2)numfinal
- CWarning(num: number, final: boolean): string
Same as above, but returns a CString (to be printed ...) Final form by default, Original form if <final> is False.
Parameters (2)numfinal
- Warnings(final?: boolean): NCollection_HSequence_handle_TCollection_HAsciiString
Returns the list of Warnings, for a frontal-engine logic Final forms by default, Original forms if <final> is False Can be empty.
Parameters (1)final
- SendMsg(amsg: Message_Msg): void
Records an information message This does not change the status of the Check.
Parameters (1)amsg
- NbInfoMsgs(): number
Returns the count of recorded information messages.
- InfoMsg(num: number, final?: boolean): TCollection_HAsciiString
Returns information message as a String.
Parameters (2)numfinal
- CInfoMsg(num: number, final: boolean): string
Same as above, but returns a CString (to be printed ...) Final form by default, Original form if <final> is False.
Parameters (2)numfinal
- InfoMsgs(final?: boolean): NCollection_HSequence_handle_TCollection_HAsciiString
Returns the list of Info Msg, for a frontal-engine logic Final forms by default, Original forms if <final> is False Can be empty.
Parameters (1)final
Returns the Check Status : OK, Warning or Fail.
- Complies(status: Interface_CheckStatus): boolean
Tells if Check Status complies with a given one (i.e. also status for query).
Parameters (1)status
- Complies(mess: TCollection_HAsciiString, incl: number, status: Interface_CheckStatus): boolean
Tells if a message is brought by a Check, as follows : <incl> = 0 : <mess> exactly matches one of the messages <incl> < 0 : <mess> is contained by one of the messages <incl> > 0 : <mess> contains one of the messages For <status> : for CheckWarning and CheckFail, considers only resp. Warning or Check messages. for CheckAny, considers all other values are ignored (answer will be false).
Parameters (3)messinclstatus
- HasEntity(): boolean
Returns True if a Check is devoted to an entity; else, it is global (for InterfaceModel's storing of global error messages).
Returns the entity on which the Check has been defined.
- Clear(): void
Clears a check, in order to receive information from transfer (Messages and Entity).
- ClearFails(): void
Clears the Fail Messages (for instance to keep only Warnings).
- ClearWarnings(): void
Clears the Warning Messages (for instance to keep only Fails).
- ClearInfoMsgs(): void
Clears the Info Messages.
- Remove(mess: TCollection_HAsciiString, incl: number, status: Interface_CheckStatus): boolean
Removes the messages which comply with <mess>, as follows : <incl> = 0 : <mess> exactly matches one of the messages <incl> < 0 : <mess> is contained by one of the messages <incl> > 0 : <mess> contains one of the messages For <status> : for CheckWarning and CheckFail, considers only resp. Warning or Check messages. for CheckAny, considers all other values are ignored (nothing is done) Returns True if at least one message has been removed, False else.
Parameters (3)messinclstatus
- Mend(pref: string, num?: number): boolean
Mends messages, according <pref> and <num> According to <num>, works on the whole list of Fails if = 0(D) or only one Fail message, given its rank If <pref> is empty, converts Fail(s) to Warning(s) Else, does the conversion but prefixes the new Warning(s) but <pref> followed by a semi-column Some reserved values of <pref> are : "FM" : standard prefix "Mended" (can be translated) "CF" : clears Fail(s) "CW" : clears Warning(s) : here, <num> refers to Warning list "CA" : clears all messages : here, <num> is ignored.
Parameters (2)prefnum
- SetEntity(anentity: Standard_Transient): void
Receives an entity result of a Transfer.
Parameters (1)anentity
- GetEntity(anentity: Standard_Transient): void
same as SetEntity (old form kept for compatibility) Warning : Does nothing if Entity field is not yet clear
Parameters (1)anentity
- GetMessages(other: Interface_Check): void
Copies messages stored in another Check, cumulating Does not regard other's Entity. Used to cumulate messages.
Parameters (1)other
- GetAsWarning(other: Interface_Check, failsonly: boolean): void
Copies messages converted into Warning messages If failsonly is true, only Fails are taken, and converted else, Warnings are taken too. Does not regard Entity Used to keep Fail messages as Warning, after a recovery.
Parameters (2)otherfailsonly
- Trace(level?: number, final?: number): void
Prints the messages of the check to the default trace file By default, according to the default standard level Else, according level (see method Print).
Parameters (2)levelfinal
Interface_CheckFailure
Constructors(2)
- constructor(theMessage: string): Interface_CheckFailureParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Interface_CheckFailureParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Interface_CheckIterator
Result of a Check operation (especially from InterfaceModel).
Constructors(2)
Creates an empty CheckIterator.
- constructor(name: string): Interface_CheckIterator
Creates a CheckIterator with a name (displayed by Print as a title).
Parameters (1)name
Instance methods(21)
- SetName(name: string): void
Sets / Changes the name.
Parameters (1)name
- Name(): string
Returns the recorded name (can be empty).
- SetModel(model: Interface_InterfaceModel): void
Defines a Model, used to locate entities (not required, if it is absent, entities are simply less documented).
Parameters (1)model
Returns the stored model (can be a null handle).
- Clear(): void
Clears the list of checks.
- Add(ach: Interface_Check, num?: number): void
Adds a Check to the list to be iterated This Check is Accompanied by Entity Number in the Model (0 for Global Check or Entity unknown in the Model), if 0 and Model is recorded in <me>, it is computed.
Parameters (2)achnum
- Check(num: number): Interface_Check
Returns the Check which was attached to an Entity given its Number in the Model. <num>=0 is for the Global Check. If no Check was recorded for this Number, returns an empty Check. Remark : Works apart from the iteration methods (no interference).
Parameters (1)num
Returns the Check attached to an Entity If no Check was recorded for this Entity, returns an empty Check. Remark : Works apart from the iteration methods (no interference).
Parameters (1)ent
- CCheck(num: number): Interface_Check
Returns the Check bound to an Entity Number (0 : Global) in order to be consulted or completed on the spot I.e. returns the Check if is already exists, or adds it then returns the new empty Check.
Parameters (1)num
Returns the Check bound to an Entity, in order to be consulted or completed on the spot I.e. returns the Check if is already exists, or adds it then returns the new empty Check.
Parameters (1)ent
- IsEmpty(failsonly: boolean): boolean
Returns True if : no Fail has been recorded if <failsonly> is True, no Check at all if <failsonly> is False.
Parameters (1)failsonly
Returns worst status among : OK, Warning, Fail.
- Complies(status: Interface_CheckStatus): boolean
Tells if this check list complies with a given status : OK (i.e. empty), Warning (at least one Warning, but no Fail), Fail (at least one),
Message(not OK), NoFail, Any.Parameters (1)status
- Remove(mess: string, incl: number, status: Interface_CheckStatus): boolean
Removes the messages of all Checks, under these conditions : <incl> = 0 : <mess> exactly matches one of the messages <incl> < 0 : <mess> is contained by one of the messages <incl> > 0 : <mess> contains one of the messages For <status> : for CheckWarning and CheckFail, considers only resp. Warning or Check messages. for CheckAny, considers all other values are ignored (nothing is done) Returns True if at least one message has been removed, False else.
Parameters (3)messinclstatus
- Checkeds(failsonly: boolean, global: boolean): NCollection_HSequence_handle_Standard_Transient
Returns the list of entities concerned by a Check Only fails if <failsonly> is True, else all non-empty checks If <global> is true, adds the model for a global check Else, global check is ignored.
Parameters (2)failsonlyglobal
- Start(): void
Starts Iteration. Thus, it is possible to restart it Remark : an iteration may be done with a const
IteratorWhile its content is modified (through a pointer), this allows to give it as a const argument to a function. - More(): boolean
Returns True if there are more Checks to get.
- Next(): void
Sets Iteration to next Item.
Returns Check currently Iterated It brings all other information (status, messages, ...) The Number of the Entity in the Model is given by Number below.
- Number(): number
Returns Number of Entity for the Check currently iterated or 0 for GlobalCheck.
- Destroy(): void
Clears data of iteration.
Interface_CheckStatus
Properties(6)
Interface_CheckTool
Performs Checks on Entities, using General Service Library and Modules to work. Works on one Entity or on a complete Model.
Constructors(2)
Creates a CheckTool, by calling the General Service Library and Modules, selected through a Protocol, to work on a Model Protocol and so on are taken from the Model (its GTool).
Parameters (1)model
- constructor(model: Interface_InterfaceModel, protocol: Interface_Protocol): Interface_CheckTool
Creates a CheckTool, by calling the General Service Library and Modules, selected through a Protocol, to work on a Model Moreover, Protocol recognizes Unknown Entities.
Parameters (2)modelprotocol
Instance methods(2)
- Check(num: number): Interface_Check
Returns the Check associated to an Entity identified by its Number in a Model.
Parameters (1)num
- CheckSuccess(reset?: boolean): void
Checks if any Error has been detected (CheckList not empty) Returns normally if none, raises exception if some exists. It reuses the last computations from other checking methods, unless the argument <reset> is given True.
Parameters (1)reset
Interface_CopyControl
This deferred class describes the services required by CopyTool to work. They are very simple and correspond basically to the management of an indexed map. But they can be provided by various classes which can control a Transfer. Each Starting Entity have at most one Result (Mapping one-one).
Static methods(2)
- get_type_name(): string
Instance methods(4)
- Clear(): void
Clears List of Copy Results. Gets Ready to begin another Copy Process.
- Bind(ent: Standard_Transient, res: Standard_Transient): void
Bind a Result to a Starting Entity identified by its Number.
Parameters (2)entres
- Search(ent: Standard_Transient): { returnValue: boolean; res: Standard_Transient; [Symbol.dispose](): void }
Searches for the Result bound to a Startingf Entity identified by its Number. If Found, returns True and fills <res> Else, returns False and nullifies <res>.
Parameters (1)ent
ReturnsA result object with fields:
returnValue: the C++ return valueres: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
Interface_CopyMap
Manages a Map for the need of single Transfers, such as Copies In such transfer, Starting Entities are read from a unique Starting Model, and each transferred Entity is bound to one and only one Result, which cannot be changed later.
Constructors(1)
Creates a CopyMap adapted to work from a Model.
Parameters (1)amodel
Static methods(2)
- get_type_name(): string
Instance methods(5)
- Clear(): void
Clears Transfer List. Gets Ready to begin another Transfer.
Returns the InterfaceModel used at Creation time.
- Bind(ent: Standard_Transient, res: Standard_Transient): void
Binds a Starting Entity identified by its Number <num> in the Starting Model, to a Result of Transfer <res>.
Parameters (2)entres
- Search(ent: Standard_Transient): { returnValue: boolean; res: Standard_Transient; [Symbol.dispose](): void }
Search for the result of a Starting Object (i.e. an Entity, identified by its Number <num> in the Starting Model) Returns True if a Result is Bound (and fills <res>) Returns False if no result is Bound (and nullifies <res>).
Parameters (1)ent
ReturnsA result object with fields:
returnValue: the C++ return valueres: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
Interface_CopyTool
Performs Deep Copies of sets of Entities Allows to perform Copy of Interface Entities from a Model to another one. Works by calling general services GetFromAnother and GetImplied. Uses a CopyMap to bind a unique Result to each Copied Entity.
It is possible to command Copies of Entities (and those they reference) by call to the General Service Library, or to enforce results for transfer of some Entities (calling Bind)
A Same CopyTool can be used for several successive Copies from the same Model : either by restarting from scratch (e.g. to copy different parts of a starting Model to several Targets), or incremental : in that case, it is possible to know what is the content of the last increment (defined by last call to ClearLastFlags and queried by call to LastCopiedAfter)
Works in two times : first, create the list of copied Entities second, pushes them to a target Model (manages also Model's Header) or returns the Result as an Iterator, as desired
The core action (Copy) works by using ShallowCopy (method attached to each class) and Copy from GeneralLib (itself using dedicated tools). It can be redefined for specific actions.
Constructors(3)
Same as above, but works with the Active Protocol.
Parameters (1)amodel
- constructor(amodel: Interface_InterfaceModel, lib: Interface_GeneralLib): Interface_CopyTool
Creates a CopyTool adapted to work from a Model. Works with a General Service Library, given as an argument.
Parameters (2)amodellib
- constructor(amodel: Interface_InterfaceModel, protocol: Interface_Protocol): Interface_CopyTool
Same as above, but Library is defined through a Protocol.
Parameters (2)amodelprotocol
Instance methods(13)
Returns the Model on which the CopyTool works.
- SetControl(othermap: Interface_CopyControl): void
Changes the Map of Result for another one. This allows to work with a more sophisticated Mapping Control than the
Standardone which is CopyMap (e.g. TransferProcess from Transfer).Parameters (1)othermap
Returns the object used for Control.
- Clear(): void
Clears Transfer List. Gets Ready to begin another Transfer.
- Copy(entfrom: Standard_Transient, mapped: boolean, errstat: boolean): { returnValue: boolean; entto: Standard_Transient; [Symbol.dispose](): void }
Creates the CounterPart of an Entity (by ShallowCopy), Binds it, then Copies the content of the former Entity to the other one (same Type), by call to the General Service Library It may command the Copy of Referenced Entities Then, its returns True.
If <mapped> is True, the Map is used to store the Result Else, the Result is simply produced : it can be used to Copy internal sub-parts of Entities, which are not intended to be shared (Strings, Arrays, etc...) If <errstat> is True, this means that the Entity is recorded in the Model as Erroneous : in this case, the General Service for Deep Copy is not called (this could be dangerous) : hence the Counter-Part is produced but empty, it can be referenced.
This method does nothing and returns False if the Protocol does not recognize <ent>. It basically makes a Deep Copy without changing the Types. It can be redefined for special uses.Parameters (3)entfrommappederrstat
ReturnsA result object with fields:
returnValue: the C++ return valueentto: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
Transfers one Entity, if not yet bound to a result Remark : For an Entity which is reported in the Starting Model, the ReportEntity will also be copied with its Content if it has one (at least ShallowCopy; Complete Copy if the Protocol recognizes the Content : see method Copy).
Parameters (1)ent
- Bind(ent: Standard_Transient, res: Standard_Transient): void
Defines a Result for the Transfer of a Starting object. Used by method Transferred (which performs a normal Copy), but can also be called to enforce a result : in the latter case, the enforced result must be compatible with the other Transfers which are performed.
Parameters (2)entres
- Search(ent: Standard_Transient): { returnValue: boolean; res: Standard_Transient; [Symbol.dispose](): void }
Search for the result of a Starting Object (i.e. an Entity) Returns True if a Result is Bound (and fills "result") Returns False if no result is Bound.
Parameters (1)ent
ReturnsA result object with fields:
returnValue: the C++ return valueres: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- ClearLastFlags(): void
Clears LastFlags only. This allows to know what Entities are copied after its call (see method LastCopiedAfter). It can be used when copies are done by increments, which must be distinguished. ClearLastFlags is also called by Clear.
- LastCopiedAfter(numfrom: number): { returnValue: number; ent: Standard_Transient; res: Standard_Transient; [Symbol.dispose](): void }
Returns an copied Entity and its Result which were operated after last call to ClearLastFlags. It returns the first "Last Copied Entity" which Number follows <numfrom>, Zero if none. It is used in a loop as follow : Integer num = 0; while ( (num = CopyTool.LastCopiedAfter(num,ent,res)) ) { .. Process Starting <ent> and its Result <res> }.
Parameters (1)numfrom
ReturnsA result object with fields:
returnValue: the C++ return valueent: owned by the returned envelope.res: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- TransferEntity(ent: Standard_Transient): void
Transfers one Entity and records result into the Transfer List Calls method Transferred.
Parameters (1)ent
- RenewImpliedRefs(): void
Renews the Implied References. These References do not involve Copying of referenced Entities. For such a Reference, if the Entity which defines it AND the referenced Entity are both copied, then this Reference is renewed. Else it is deleted in the copied Entities. Remark : this concerns only some specific references, such as "back pointers".
- FillModel(bmodel: Interface_InterfaceModel): void
Fills a Model with the result of the transfer (TransferList) Commands copy of Header too, and calls RenewImpliedRefs.
Parameters (1)bmodel
Interface_DataState
Properties(7)
Interface_EntityCluster
Auxiliary class for EntityList. An EntityList designates an EntityCluster, which brings itself an fixed maximum count of Entities. If it is full, it gives access to another cluster ("Next"). This class is intended to give a good compromise between access time (faster than a Sequence, good for little count) and memory use (better than a Sequence in any case, overall for little count, better than an Array for a very little count. It is designed for a light management. Remark that a new Item may not be Null, because this is the criterium used for "End of List".
Constructors(4)
Creates an empty, non-chained, EntityCluster.
Creates a non-chained EntityCluster, filled with one Entity.
Parameters (1)ent
Creates an empty EntityCluster, chained with another one (that is, put BEFORE this other one in the list).
Parameters (1)ec
Creates an EntityCluster, filled with a first Entity, and chained to another EntityCluster (BEFORE it, as above).
Parameters (2)antec
Static methods(2)
- get_type_name(): string
Instance methods(7)
- Append(ent: Standard_Transient): void
Appends an Entity to the Cluster. If it is not full, adds the entity directly inside itself. Else, transmits to its Next and Creates it if it does not yet exist.
Parameters (1)ent
- Remove(ent: Standard_Transient): boolean
Removes an Entity from the Cluster. If it is not found, calls its Next one to do so. Returns True if it becomes itself empty, False else (thus, a Cluster which becomes empty is deleted from the list).
Parameters (1)ent
- Remove(num: number): boolean
Removes an Entity from the Cluster, given its rank. If <num> is greater than NbLocal, calls its Next with (num - NbLocal), Returns True if it becomes itself empty, False else.
Parameters (1)num
- NbEntities(): number
Returns total count of Entities (including Next).
- Value(num: number): Standard_Transient
Returns the Entity identified by its rank in the list (including Next).
Parameters (1)num
- SetValue(num: number, ent: Standard_Transient): void
Changes an Entity given its rank.
Parameters (2)nument
Interface_EntityIterator
Defines an Iterator on Entities. Allows considering of various criteria.
Constructors(2)
Defines an empty iterator (see AddList & AddItem).
Defines an iterator on a list, directly i.e. without copying it.
Parameters (1)list
Instance methods(12)
- AddList(list: NCollection_HSequence_handle_Standard_Transient): void
Gets a list of entities and adds its to the iteration list.
Parameters (1)list
- AddItem(anentity: Standard_Transient): void
Adds to the iteration list a defined entity.
Parameters (1)anentity
- GetOneItem(anentity: Standard_Transient): void
same as AddItem (kept for compatibility)
Parameters (1)anentity
- SelectType(atype: Standard_Type, keep: boolean): void
Selects entities with are Kind of a given type, keep only them (is keep is True) or reject only them (if keep is False).
Parameters (2)atypekeep
- NbEntities(): number
Returns count of entities which will be iterated on Calls Start if not yet done.
- NbTyped(type_: Standard_Type): number
Returns count of entities of a given type (kind of).
Parameters (1)type_
- Start(): void
Allows re-iteration (useless for the first iteration).
- More(): boolean
Says if there are other entities (vertices) to iterate the first time, calls Start.
- Next(): void
Sets iteration to the next entity (vertex) to give.
Returns the current Entity iterated, to be used by Interface tools.
Returns the content of the
Iterator, accessed through a Handle to be used by a frontal-engine logic Returns an empty Sequence if theIteratoris empty Calls Start if not yet done.- Destroy(): void
Clears data of iteration.
Interface_EntityList
This class defines a list of Entities (Transient Objects), it can be used as a field of other Transient classes, with these features :
- oriented to define a little list, that is, slower than an Array or a Map of Entities for a big count (about 100 and over), but faster than a Sequence
- allows to work as a Sequence, limited to Clear, Append, Remove, Access to an Item identified by its rank in the list
- space saving, compared to a Sequence, especially for little amounts; better than an Array for a very little amount (less than 10) but less good for a greater amount
Works in conjunction with EntityCluster An EntityList gives access to a list of Entity Clusters, which are chained (in one sense : Single List) Remark : a new Item may not be Null, because this is the criterium used for "End of List"
Constructors(1)
Creates a List as being empty.
Instance methods(11)
- Clear(): void
Clears the List.
- Append(ent: Standard_Transient): void
Appends an Entity, that is to the END of the list (keeps order, but works slowerly than Add, see below).
Parameters (1)ent
- Add(ent: Standard_Transient): void
Adds an Entity to the list, that is, with NO REGARD about the order (faster than Append if count becomes greater than 10).
Parameters (1)ent
- Remove(ent: Standard_Transient): void
Removes an Entity from the list, if it is there.
Parameters (1)ent
- Remove(num: number): void
Removes an Entity from the list, given its rank.
Parameters (1)num
- IsEmpty(): boolean
Returns True if the list is empty.
- NbEntities(): number
Returns count of recorded Entities.
- Value(num: number): Standard_Transient
Returns an Item given its number. Beware about the way the list was filled (see above, Add and Append).
Parameters (1)num
- SetValue(num: number, ent: Standard_Transient): void
Returns an Item given its number. Beware about the way the list was filled (see above, Add and Append).
Parameters (2)nument
- NbTypedEntities(atype: Standard_Type): number
Returns count of Entities of a given Type (0 : none).
Parameters (1)atype
- TypedEntity(atype: Standard_Type, num?: number): Standard_Transient
Returns the Entity which is of a given type. If num = 0 (D), there must be ONE AND ONLY ONE If num > 0, returns the num-th entity of this type.
Parameters (2)atypenum
Interface_FileParameter
Auxiliary class to store a literal parameter in a file intermediate directory or in an UndefinedContent : a reference type Parameter detains an Integer which is used to address a record in the directory. FileParameter is intended to be stored in a ParamSet : hence memory management is performed by ParamSet, which calls Clear to work, while the Destructor (see Destroy) does nothing. Also a FileParameter can be read for consultation only, not to be read from a Structure to be included into another one.
Constructors(1)
Instance methods(8)
- Init(val: TCollection_AsciiString, typ: Interface_ParamType): void
Fills fields (with Entity Number set to zero).
Parameters (2)valtyp
- Init(val: string, typ: Interface_ParamType): void
Same as above, but builds the Value from a CString.
Parameters (2)valtyp
- CValue(): string
Same as above, but as a CString (for immediate exploitation) was C++ : return const.
Returns the type of the parameter.
- SetEntityNumber(num: number): void
Allows to set a reference to an Entity in a numbered list.
Parameters (1)num
- EntityNumber(): number
Returns value set by SetEntityNumber.
- Clear(): void
Clears stored data : frees memory taken for the String Value.
- Destroy(): void
Destructor. Does nothing because Memory is managed by ParamSet.
Interface_FileReaderTool
Defines services which are required to load an InterfaceModel from a File. Typically, it may firstly transform a system file into a FileReaderData object, then work on it, not longer considering file contents, to load an Interface Model. It may also work on a FileReaderData already loaded.
FileReaderTool provides, on one hand, some general services which are common to all read operations but can be redefined, plus general actions to be performed specifically for each Norm, as deferred methods to define.
In particular, FileReaderTool defines the Interface's Unknown and Error entities
Instance methods(17)
- SetModel(amodel: Interface_InterfaceModel): void
Stores a Model. Used when the Model has been loaded.
Parameters (1)amodel
Returns the stored Model.
- SetTraceLevel(tracelev: number): void
Sets trace level used for outputting messages.
- 0: no trace at all
- 1: errors
- 2: errors and warnings
- 3: all messages Default is 1 : Errors traced
Parameters (1)tracelev
- TraceLevel(): number
Returns trace level used for outputting messages.
- SetErrorHandle(err: boolean): void
Allows controlling whether exception raisings are handled If err is False, they are not (hence, dbx can take control) If err is True, they are, and they are traced (by putting on messenger Entity's Number and file record num) Default given at Model's creation time is True.
Parameters (1)err
- ErrorHandle(): boolean
Returns ErrorHandle flag.
- SetEntities(): void
Fills records with empty entities; once done, each entity can ask the FileReaderTool for any entity referenced through an identifier. Calls Recognize which is specific to each specific type of FileReaderTool.
- Recognize(num: number): { returnValue: boolean; ach: Interface_Check; ent: Standard_Transient; [Symbol.dispose](): void }
Recognizes a record, given its number. Specific to each Interface; called by SetEntities. It can call the basic method RecognizeByLib. Returns False if recognition has failed, True else. <ach> has not to be filled if simply Recognition has failed : it must record true error messages : RecognizeByLib can generate error messages if NewRead is called.
Note that it works thru a Recognizer (method Evaluate) which has to be memorized before startingParameters (1)num
ReturnsA result object with fields:
returnValue: the C++ return valueach: owned by the returned envelope.ent: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- RecognizeByLib(num: number, glib: Interface_GeneralLib, rlib: Interface_ReaderLib): { returnValue: boolean; ach: Interface_Check; ent: Standard_Transient; [Symbol.dispose](): void }
Recognizes a record with the help of Libraries. Can be used to implement the method Recognize. <rlib> is used to find Protocol and CaseNumber to apply <glib> performs the creation (by service NewVoid, or NewRead if NewVoid gave no result) <ach> is a check, which is transmitted to NewRead if it is called, gives a result but which is false <ent> is the result Returns False if recognition has failed, True else.
Parameters (3)numglib—Mutated in place; read the updated value from this argument after the call.rlib—Mutated in place; read the updated value from this argument after the call.
ReturnsA result object with fields:
returnValue: the C++ return valueach: owned by the returned envelope.ent: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
Provides an unknown entity, specific to the Interface called by SetEntities when Recognize has failed (Unknown alone) or by LoadModel when an Entity has caused a Fail on reading (to keep at least its literal description) Uses Protocol to do it.
Creates an empty Model of the norm. Uses Protocol to do it.
- LoadModel(amodel: Interface_InterfaceModel): void
Reads and fills Entities from the FileReaderData set by SetData to an InterfaceModel. It enchains required operations, the specific ones correspond to deferred methods (below) to be defined for each Norm. It manages also error recovery and trace. Remark : it calls SetModel. It Can raise any error which can occur during a load operation, unless Error Handling is set. This method can also be redefined if judged necessary.
Parameters (1)amodel
- LoadedEntity(num: number): Standard_Transient
Reads, Fills and Returns one Entity read from a Record of the FileReaderData. This Method manages also case of Fail or Warning, by producing a ReportEntyty plus , for a Fail, a literal Content (as an UnknownEntity). Performs also Trace.
Parameters (1)num
- BeginRead(amodel: Interface_InterfaceModel): void
Fills model's header; each Interface defines for its Model its own file header; this method fills it from FileReaderTool.+ It is called by AnalyseFile from InterfaceModel.
Parameters (1)amodel
- AnalyseRecord(num: number, anent: Standard_Transient): { returnValue: boolean; acheck: Interface_Check; [Symbol.dispose](): void }
Fills an Entity, given record no; specific to each Interface, called by AnalyseFile from InterfaceModel (which manages its calling arguments) To work, each Interface can define a method in its proper Transient class, like this (given as an example) : AnalyseRecord (me : mutable; FR : in out FileReaderTool; num : Integer; acheck : in out Check) returns Boolean; and call it from AnalyseRecord.
Returned Value : True if the entity could be loaded, False else (in case of syntactic fail)Parameters (2)numanent
ReturnsA result object with fields:
returnValue: the C++ return valueacheck: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- EndRead(amodel: Interface_InterfaceModel): void
Ends file reading after reading all the entities default is doing nothing; redefinable as necessary.
Parameters (1)amodel
- Clear(): void
Clear fields.
Interface_FloatWriter
This class converts a floating number (Real) to a string It can be used if the standard C-C++ output functions (Sprintf or std::cout<<) are not convenient. That is to say :
- to suppress trailing '0' and 'E+00' (if desired)
- to control exponent output and floating point output
Formats are given in the form used by printf-Sprintf
Constructors(1)
- constructor(chars?: number): Interface_FloatWriter
Creates a FloatWriter ready to work, with default options.
- zero suppress option is set
- main format is set to "%E"
- secondary format is set to "%f" for values between 0.1 and
- in absolute values If <chars> is given (and positive), it will produce options to produce this count of characters : "%<chars>f","%<chars>%E"
Parameters (1)chars
Static methods(1)
- Convert(val: number, text: string, zerosup: boolean, Range1: number, Range2: number, mainform: string, rangeform: string): number
This class method converts a Real Value to a string, given options given as arguments. It can be called independently. Warning : even if declared in, content of <text> will be modified.
Parameters (7)valtextzerosupRange1Range2mainformrangeform
Instance methods(8)
- SetFormat(form: string, reset?: boolean): void
Sets a specific Format for Sending Reals (main format) (Default from Creation is "%E") If <reset> is given True (default), this call clears effects of former calls to SetFormatForRange and SetZeroSuppress.
Parameters (2)formreset
- SetFormatForRange(form: string, R1: number, R2: number): void
Sets a secondary Format for Real, to be applied between R1 and R2 (in absolute values). A Call to SetRealForm cancels this secondary form if <reset> is True. (Default from Creation is "%f" between 0.1 and 1000.) Warning : if the condition (0. <= R1 < R2) is not fulfilled, this secondary form is canceled.
Parameters (3)formR1R2
- SetZeroSuppress(mode: boolean): void
Sets Sending Real Parameters to suppress trailing Zeros and Null Exponent ("E+00"), if <mode> is given True, Resets this mode if <mode> is False (in addition to Real Forms) A call to SetRealFrom resets this mode to False ig <reset> is given True (Default from Creation is True).
Parameters (1)mode
- SetDefaults(chars?: number): void
Sets again options to the defaults given by Create.
Parameters (1)chars
- Options(zerosup: boolean, range: boolean, R1: number, R2: number): { zerosup: boolean; range: boolean; R1: number; R2: number }
Returns active options : <zerosup> is the option ZeroSuppress, <range> is True if a range is set, False else R1,R2 give the range (if it is set).
Parameters (4)zerosuprangeR1R2
ReturnsA result object with fields:
zerosup: updated value from the call.range: updated value from the call.R1: updated value from the call.R2: updated value from the call.
- MainFormat(): string
Returns the main format was C++ : return const.
- FormatForRange(): string
Returns the format for range, if set Meaningful only if <range> from Options is True was C++ : return const.
- Write(val: number, text: string): number
Writes a Real value <val> to a string <text> by using the options. Returns the useful Length of produced string. It calls the class method Convert. Warning : <text> is assumed to be wide enough (20-30 is correct) And, even if declared in, its content will be modified.
Parameters (2)valtext
Interface_GeneralLib
Constructors(2)
Creates an empty Library : it will later by filled by method AddProtocol.
- constructor(aprotocol: Interface_Protocol): Interface_GeneralLib
Creates a Library which complies with a Protocol, that is : Same class (criterium IsInstance) This creation gets the Modules from the global set, those which are bound to the given Protocol and its Resources.
Parameters (1)aprotocol
Instance methods(6)
- Clear(): void
Clears the list of Modules of a library (can be used to redefine the order of Modules before action : Clear then refill the Library by calls to AddProtocol).
- SetComplete(): void
Sets a library to be defined with the complete Global list (all the couples Protocol/Modules recorded in it).
- Start(): void
Starts Iteration on the Modules (sets it on the first one).
- More(): boolean
Returns True if there are more Modules to iterate on.
- Next(): void
Iterates by getting the next Module in the list If there is none, the exception will be raised by Value.
Returns the current Protocol in the Iteration.
Interface_GlobalNodeOfGeneralLib
Constructors(1)
Creates an empty GlobalNode, with no Next.
Static methods(2)
- get_type_name(): string
Instance methods(2)
Returns the Next GlobalNode. If none is defined, returned value is a Null Handle.
Interface_GlobalNodeOfReaderLib
Constructors(1)
Creates an empty GlobalNode, with no Next.
Static methods(2)
- get_type_name(): string
Instance methods(5)
- Add(amodule: Interface_ReaderModule, aprotocol: Interface_Protocol): void
Adds a Module bound with a Protocol to the list : does nothing if already in the list, THAT IS, Same Type (exact match) and Same State (that is, IsEqual is not required) Once added, stores its attached Protocol in correspondence.
Parameters (2)amoduleaprotocol
Returns the Module stored in a given GlobalNode.
Returns the attached Protocol stored in a given GlobalNode.
Returns the Next GlobalNode. If none is defined, returned value is a Null Handle.
Interface_GraphContent
Defines general form for classes of graph algorithms on Interfaces, this form is that of EntityIterator Each sub-class fills it according to its own algorithm This also allows to combine any graph result to others, all being given under one unique form.
Constructors(1)
Creates an empty GraphContent, ready to be filled.
Instance methods(1)
- Evaluate(): void
Evaluates list of Entities to be iterated. Called by Start Default is set to doing nothing : intended to be redefined by each sub-class.
Interface_GTool
GTool - General Tool for a Model Provides the functions performed by Protocol/GeneralModule for entities of a Model, and recorded in a GeneralLib Optimized : once an entity has been queried, the GeneralLib is not longer queried Shareable between several users : as a Handle.
Constructors(2)
Creates an empty, not set, GTool.
- constructor(proto: Interface_Protocol, nbent?: number): Interface_GTool
Creates a GTool from a Protocol Optional starting count of entities.
Parameters (2)protonbent
Static methods(2)
- get_type_name(): string
Instance methods(9)
Returns the SignType. Can be null.
- SignValue(ent: Standard_Transient, model: Interface_InterfaceModel): string
Returns the Signature for a Transient Object in a Model It calls SignType to do that If SignType is not defined, return ClassName of <ent>.
Parameters (2)entmodel
- SignName(): string
Returns the Name of the SignType, or "Class Name".
- SetProtocol(proto: Interface_Protocol, enforce?: boolean): void
Sets a new Protocol if <enforce> is False and the new Protocol equates the old one then nothing is done.
Parameters (2)protoenforce
Returns the Protocol. Warning: it can be Null.
Returns the GeneralLib itself.
- Reservate(nb: number, enforce?: boolean): void
Reservates maps for a count of entities <enforce> False : minimum count <enforce> True : clears former reservations Does not clear the maps.
Parameters (2)nbenforce
- ClearEntities(): void
Clears the maps which record, for each already recorded entity its Module and Case Number.
Interface_InterfaceError
Constructors(2)
- constructor(theMessage: string): Interface_InterfaceErrorParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Interface_InterfaceErrorParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Interface_InterfaceMismatch
Constructors(2)
- constructor(theMessage: string): Interface_InterfaceMismatchParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Interface_InterfaceMismatchParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Interface_InterfaceModel
Defines an (Indexed) Set of data corresponding to a complete Transfer by a File Interface, i.e. File Header and Transient Entities (Objects) contained in a File. Contained Entities are identified in the Model by unique and consecutive Numbers.
In addition, a Model can attach to each entity, a specific Label according to the norm (e.g. Name for VDA, #ident for Step ...), intended to be output on a string or a stream (remark : labels are not obliged to be unique)
InterfaceModel itself is not Transient, it is intended to work on a set of Transient Data. The services offered are basic Listing and Identification operations on Transient Entities, storage of Error Reports, Copying.
Moreovere, it is possible to define and use templates. These are empty Models, from which copies can be obtained in order to be filled with effective data. This allows to record standard definitions for headers, avoiding to recreate them for each sendings, and assuring customisation of produced files for a given site. A template is attached to a name. It is possible to define a template from another one (get it, edit it then record it under another name).
See also Graph, ShareTool, CheckTool for more
Static methods(7)
- ClassName(typnam: string): string
From a CDL Type Name, returns the Class part (package dropped) WARNING : buffered, to be immediately copied or printed.
Parameters (1)typnam
- HasTemplate(name: string): boolean
Returns true if a template is attached to a given name.
Parameters (1)name
- Template(name: string): Interface_InterfaceModel
Returns the template model attached to a name, or a Null Handle.
Parameters (1)name
- SetTemplate(name: string, model: Interface_InterfaceModel): boolean
Records a new template model with a name. If the name was already recorded, the corresponding template is replaced by the new one. Then, WARNING : test HasTemplate to avoid surprises.
Parameters (2)namemodel
Returns the complete list of names attached to template models.
- get_type_name(): string
Instance methods(46)
- Destroy(): void
Clears the list of entities (service WhenDelete).
- SetProtocol(proto: Interface_Protocol): void
Sets a Protocol for this Model It is also set by a call to AddWithRefs with Protocol It is used for : DumpHeader (as required), ClearEntities ...
Parameters (1)proto
Returns the Protocol which has been set by SetProtocol, or AddWithRefs with Protocol.
- SetGTool(gtool: Interface_GTool): void
Sets a GTool for this model, which already defines a Protocol.
Parameters (1)gtool
Returns the GTool, set by SetProtocol or by SetGTool.
- DispatchStatus(): boolean
Returns the Dispatch Status, either for get or set A Model which is produced from Dispatch may share entities with the original (according to the Protocol), hence these non-copied entities should not be deleted.
- Clear(): void
Erases contained data; used when a Model is copied to others : the new copied ones begin from clear Clear calls specific method ClearHeader (see below).
- ClearEntities(): void
Clears the entities; uses the general service WhenDelete, in addition to the standard Memory Manager; can be redefined.
- ClearLabels(): void
Erases information about labels, if any : specific to each norm.
- ClearHeader(): void
Clears Model's header : specific to each norm.
- NbEntities(): number
Returns count of contained Entities.
- Contains(anentity: Standard_Transient): boolean
Returns True if a Model contains an Entity (for a ReportEntity, looks for the ReportEntity itself AND its Concerned Entity).
Parameters (1)anentity
- Number(anentity: Standard_Transient): number
Returns the Number of an Entity in the Model if it contains it. Else returns 0. For a ReportEntity, looks at Concerned Entity. Returns the Directory entry Number of an Entity in the Model if it contains it. Else returns 0. For a ReportEntity, looks at Concerned Entity.
Parameters (1)anentity
- Value(num: number): Standard_Transient
Returns an Entity identified by its number in the Model Each sub-class of InterfaceModel can define its own method Entity to return its specific class of Entity (e.g. for VDA, VDAModel returns a VDAEntity), working by calling Value Remark : For a Reported Entity, (Erroneous, Corrected, Unknown), this method returns this Reported Entity. See ReportEntity for other questions.
Parameters (1)num
- NbTypes(ent: Standard_Transient): number
Returns the count of DISTINCT types under which an entity may be processed. Defined by the Protocol, which gives default as 1 (dynamic Type).
Parameters (1)ent
- Type(ent: Standard_Transient, num?: number): Standard_Type
Returns a type, given its rank : defined by the Protocol (by default, the first one).
Parameters (2)entnum
- TypeName(ent: Standard_Transient, complete: boolean): string
Returns the type name of an entity, from the list of types (one or more ...) <complete> True (D) gives the complete type, else packages are removed WARNING : buffered, to be immediately copied or printed.
Parameters (2)entcomplete
- EntityState(num: number): Interface_DataState
Returns the State of an entity, given its number.
Parameters (1)num
- IsReportEntity(num: number, semantic?: boolean): boolean
Returns True if <num> identifies a ReportEntity in the Model Hence, ReportEntity can be called.
By default, queries main report, if <semantic> is True, it queries report for semantic check
Remember that a Report Entity can be defined for an Unknown Entity, or a Corrected or Erroneous (at read time) Entity. The ReportEntity is defined before call to method AddEntity.Parameters (2)numsemantic
- ReportEntity(num: number, semantic?: boolean): Interface_ReportEntity
Returns a ReportEntity identified by its number in the Model, or a Null Handle If <num> does not identify a ReportEntity.
By default, queries main report, if <semantic> is True, it queries report for semantic checkParameters (2)numsemantic
- IsErrorEntity(num: number): boolean
Returns True if <num> identifies an Error Entity : in this case, a ReportEntity brings Fail Messages and possibly an "undefined" Content, see IsRedefinedEntity.
Parameters (1)num
- IsRedefinedContent(num: number): boolean
Returns True if <num> identifies an Entity which content is redefined through a ReportEntity (i.e. with literal data only) This happens when an entity is syntactically erroneous in the way that its basic content remains empty. For more details (such as content itself), see ReportEntity.
Parameters (1)num
- ClearReportEntity(num: number): boolean
Removes the ReportEntity attached to Entity <num>. Returns True if done, False if no ReportEntity was attached to <num>. Warning : the caller must assume that this clearing is meaningful.
Parameters (1)num
- SetReportEntity(num: number, rep: Interface_ReportEntity): boolean
Sets or Replaces a ReportEntity for the Entity <num>. Returns True if Report is replaced, False if it has been replaced Warning : the caller must assume that this setting is meaningful.
Parameters (2)numrep
- AddReportEntity(rep: Interface_ReportEntity, semantic?: boolean): boolean
Adds a ReportEntity as such. Returns False if the concerned entity is not recorded in the Model Else, adds it into, either the main report list or the list for semantic checks, then returns True.
Parameters (2)repsemantic
- IsUnknownEntity(num: number): boolean
Returns True if <num> identifies an Unknown Entity : in this case, a ReportEntity with no Check Messages designates it.
Parameters (1)num
- HasSemanticChecks(): boolean
Returns True if semantic checks have been filled.
- Check(num: number, syntactic: boolean): Interface_Check
Returns the check attached to an entity, designated by its Number. 0 for global check <semantic> True : recorded semantic check <semantic> False : recorded syntactic check (see ReportEntity) If no check is recorded for <num>, returns an empty Check.
Parameters (2)numsyntactic
- Reservate(nbent: number): void
Does a reservation for the List of Entities (for optimized storage management). If it is not called, storage management can be less efficient. <nbent> is the expected count of Entities to store.
Parameters (1)nbent
- AddEntity(anentity: Standard_Transient): void
Internal method for adding an Entity. Used by file reading (defined by each Interface) and Transfer tools. It adds the entity required to be added, not its refs : see AddWithRefs. If <anentity> is a ReportEntity, it is added to the list of Reports, its Concerned Entity (Erroneous or Corrected, else Unknown) is added to the list of Entities. That is, the ReportEntity must be created before Adding.
Parameters (1)anentity
- AddWithRefs(anent: Standard_Transient, level: number, listall: boolean): void
Same as above, but works with the Protocol of the Model.
Parameters (3)anentlevellistall
- AddWithRefs(anent: Standard_Transient, proto: Interface_Protocol, level: number, listall: boolean): void
Adds to the Model, an Entity with all its References, as they are defined by General Services FillShared and ListImplied. Process is recursive (any sub-levels) if <level> = 0 (Default) Else, adds sub-entities until the required sub-level. Especially, if <level> = 1, adds immediate subs and that's all.
If <listall> is False (Default), an entity (<anentity> itself or one of its subs at any level) which is already recorded in the Model is not analysed, only the newly added ones are. If <listall> is True, all items are analysed (this allows to ensure the consistency of an adding made by steps)Parameters (4)anentprotolevellistall
- AddWithRefs(anent: Standard_Transient, lib: Interface_GeneralLib, level: number, listall: boolean): void
Same as above, but works with an already created GeneralLib.
Parameters (4)anentliblevellistall
- ReplaceEntity(nument: number, anent: Standard_Transient): void
Replace Entity with Number=nument on other entity - "anent".
Parameters (2)numentanent
- ReverseOrders(after?: number): void
Reverses the Numbers of the Entities, between <after> and the total count of Entities. Thus, the entities : 1,2 ... after, after+1 ... nb-1, nb become numbered as : 1,2 ... after, nb, nb-1 ... after+1 By default (after = 0) the whole list of Entities is reversed.
Parameters (1)after
- ChangeOrder(oldnum: number, newnum: number, count?: number): void
Changes the Numbers of some Entities : <oldnum> is moved to <newnum>, same for <count> entities. Thus : 1,2 ... newnum-1 newnum ... oldnum .. oldnum+count oldnum+count+1 .. gives 1,2 ... newnum-1 oldnum .. oldnum+count newnum ... oldnum+count+1 (can be seen as a circular permutation).
Parameters (3)oldnumnewnumcount
- GetFromAnother(other: Interface_InterfaceModel): void
Gets header (data specific of a defined Interface) from another InterfaceModel; called from TransferCopy.
Parameters (1)other
Returns a New Empty Model, same type as <me> (whatever its Type); called to Copy parts a Model into other ones, then followed by a call to GetFromAnother (Header) then filling with specified Entities, themselves copied.
- SetCategoryNumber(num: number, val: number): boolean
Records a category number for an entity number Returns True when done, False if <num> is out of range.
Parameters (2)numval
- CategoryNumber(num: number): number
Returns the recorded category number for a given entity number 0 if none was defined for this entity.
Parameters (1)num
- GlobalCheck(syntactic?: boolean): Interface_Check
Returns the GlobalCheck, which memorizes messages global to the file (not specific to an Entity), especially Header.
Parameters (1)syntactic
- SetGlobalCheck(ach: Interface_Check): void
Allows to modify GlobalCheck, after getting then completing it Remark : it is SYNTACTIC check. Semantics, see FillChecks.
Parameters (1)ach
- VerifyCheck(): { ach: Interface_Check; [Symbol.dispose](): void }
Minimum Semantic Global Check on data in model (header) Can only check basic Data. See also GlobalCheck from Protocol for a check which takes the Graph into account Default does nothing, can be redefined.
ReturnsA result object with fields:
ach: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
Returns a string with the label attached to a given entity. Warning : While this string may be edited on the spot, if it is a read field, the returned value must be copied before.
Parameters (1)ent
- NextNumberForLabel(label: string, lastnum?: number, exact?: boolean): number
Searches a label which matches with one entity. Begins from <lastnum>+1 (default:1) and scans the entities until <NbEntities>. For the first which matches <label>, this method returns its Number. Returns 0 if nothing found Can be called recursively (labels are not specified as unique) <exact> : if True (default), exact match is required else, checks the END of entity label.
This method is virtual, hence it can be redefined for a more efficient search (if exact is true).Parameters (3)labellastnumexact
Interface_IntList
This class detains the data which describe a Graph. A Graph has two lists, one for shared refs, one for sharing refs (the reverses). Each list comprises, for each Entity of the Model of the Graph, a list of Entities (shared or sharing). In fact, entities are identified by their numbers in the Model or Graph : this gives better performances.
A simple way to implement this is to instantiate a HArray1 with a HSequenceOfInteger : each Entity Number designates a value, which is a Sequence (if it is null, it is considered as empty : this is a little optimisation).
This class gives a more efficient way to implement this. It has two lists (two arrays of integers), one to describe list (empty, one value given immediately, or negated index in the second list), one to store refs (pointed from the first list). This is much more efficient than a list of sequences, in terms of speed (especially for read) and of memory
An IntList can also be set to access data for a given entity number, it then acts as a single sequence
Remark that if an IntList is created from another one, it can be read, but if it is created without copying, it may not be edited
Constructors(3)
Creates empty IntList.
- constructor(nbe: number): Interface_IntList
Creates an IntList for <nbe> entities.
Parameters (1)nbe
- constructor(other: Interface_IntList, copied: boolean): Interface_IntList
Creates an IntList from another one. if <copied> is True, copies data else, data are not copied, only the header object is.
Parameters (2)othercopied
Instance methods(19)
- Initialize(nbe: number): void
Initialize IntList by number of entities.
Parameters (1)nbe
- NbReferences(): number
Returns count of stored references.
Returnsnumber of references
Returns entity headers used to describe the lists.
Returnshandle to the array of entity headers
Returns the packed references storage.
Returnshandle to the array of packed references
- Internals(nbrefs: number): { nbrefs: number; ents: NCollection_HArray1_int; refs: NCollection_HArray1_int; [Symbol.dispose](): void }
Returns internal values, used for copying.
DeprecatedParameters (1)nbrefs
ReturnsA result object with fields:
nbrefs: updated value from the call.ents: owned by the returned envelope.refs: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- NbEntities(): number
Returns count of entities to be acknowledged.
- SetNbEntities(nbe: number): void
Changes the count of entities (ignored if decreased).
Parameters (1)nbe
- SetNumber(number_: number): void
Sets an entity number as current (for read and fill).
Parameters (1)number_
- Number(): number
Returns the current entity number.
- List(number_: number, copied?: boolean): Interface_IntList
Returns an IntList, identical to <me> but set to a specified entity Number By default, not copied (in order to be read) Specified <copied> to produce another list and edit it.
Parameters (2)number_copied
- SetRedefined(mode: boolean): void
Sets current entity list to be redefined or not This is used in a Graph for redefinition list : it can be disable (no redefinition, i.e. list is cleared), or enabled (starts as empty). The original list has not to be "redefined".
Parameters (1)mode
- Reservate(count: number): void
Makes a reservation for <count> references to be later attached to the current entity. If required, it increases the size of array used to store refs. Remark that if count is less than two, it does nothing (because immediate storing).
Parameters (1)count
- Add(ref: number): void
Adds a reference (as an integer value, an entity number) to the current entity number. Zero is ignored.
Parameters (1)ref
- Length(): number
Returns the count of refs attached to current entity number.
- IsRedefined(num?: number): boolean
Returns True if the list for a number (default is taken as current) is "redefined" (useful for empty list).
Parameters (1)num
- Value(num: number): number
Returns a reference number in the list for current number, according to its rank.
Parameters (1)num
- Remove(num: number): boolean
Removes an item in the list for current number, given its rank Returns True if done, False else.
Parameters (1)num
- Clear(): void
Clears all data, hence each entity number has an empty list.
- AdjustSize(margin?: number): void
Resizes lists to exact sizes. For list of refs, a positive margin can be added.
Parameters (1)margin
Interface_IntVal
An Integer through a Handle (i.e. managed as TShared).
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(3)
Interface_LineBuffer
Simple Management of a Line Buffer, to be used by Interface File Writers. While a String is suitable to do that, this class ensures an optimised Memory Management, because this is a hard point of File Writing.
Constructors(1)
- constructor(size?: number): Interface_LineBuffer
Creates a LineBuffer with an absolute maximum size (Default value is only to satisfy compiler requirement).
Parameters (1)size
Instance methods(15)
- SetMax(max: number): void
Changes Maximum allowed size of Buffer. If <max> is Zero, Maximum size is set to the initial size.
Parameters (1)max
- SetInitial(initial: number): void
Sets an Initial reservation for Blank characters (this reservation is counted in the size of the current Line).
Parameters (1)initial
- SetKeep(): void
Sets a Keep Status at current Length. It means that at next Move, the new line will begin by characters between Keep + 1 and current Length.
- CanGet(more: number): boolean
Returns True if there is room enough to add <more> characters Else, it is required to Dump the Buffer before refilling it <more> is recorded to manage SetKeep status.
Parameters (1)more
- Content(): string
Returns the Content of the LineBuffer.
- Length(): number
Returns the Length of the LineBuffer.
- Clear(): void
Clears completely the LineBuffer.
- FreezeInitial(): void
Inhibits effect of SetInitial until the next Move (i.e. Keep) Then Prepare will not insert initial blanks, but further ones will. This allows to cancel initial blanks on an internal Split A call to SetInitial has no effect on this until Move.
- Move(str: TCollection_AsciiString): void
Fills a AsciiString <str> with the Content of the Line Buffer, then Clears the LineBuffer.
Parameters (1)str—Mutated in place; read the updated value from this argument after the call.
- Move(str: TCollection_HAsciiString): void
Same as above, but <str> is known through a Handle.
Parameters (1)str
Same as above, but generates the HAsciiString.
- Add(text: string): void
Adds a text as a CString. Its Length is evaluated from the text (by C function strlen).
Parameters (1)text
- Add(text: TCollection_AsciiString): void
Adds a text as a AsciiString from
TCollection.Parameters (1)text
- Add(text: string): void
Adds a text made of only ONE Character.
Parameters (1)text
- Add(text: string, lntext: number): void
Adds a text as a CString. Its length is given as <lntext>.
Parameters (2)textlntext
Interface_MSG
This class gives a set of functions to manage and use a list of translated messages (messagery).
Keys are strings, their corresponding (i.e. translated) items are strings, managed by a dictionary (a global one).
If the dictionary is not set, or if a key is not recorded, the key is returned as item, and it is possible to :
- trace or not this fail, record or not it for further trace
It is also possible to suspend the translation (keys are then always returned as items)
This class also provides a file format for loading : It is made of couples of lines, the first one begins by '@' the following is the key, the second one is the message Lines which are empty or which begin by '@' are skipped
Constructors(6)
- constructor(key: string): Interface_MSG
A MSG is created to write a "functional code" in conjunction with operator () attached to Value Then, to have a translated message, write in C++ :
Interface_MSG("...mykey...") which returns a CString See also some help which followParameters (1)key
- constructor(key: string, i1: number): Interface_MSG
Translates a message which contains one integer variable It is just a help which avoid the following : char mess[100]; Sprintf(mess,
Interface_MSG("code"),ival); then AddFail(mess); replaced by AddFail (Interface_MSG("code",ival));.
The basic message is intended to be in C-Sprintf format, with one d form in itParameters (2)keyi1
- constructor(key: string, str: string): Interface_MSG
Translates a message which contains one string variable As for one integer, it is just a writing help.
The basic message is intended to be in C-Sprintf format with one s form in itParameters (2)keystr
- constructor(key: string, i1: number, i2: number): Interface_MSG
Translates a message which contains two integer variables As for one integer, it is just a writing help.
The basic message is intended to be in C-Sprintf format with two d forms in itParameters (3)keyi1i2
- constructor(key: string, r1: number, intervals?: number): Interface_MSG
Translates a message which contains one real variable <intervals> if set, commands the variable to be rounded to an interval (see below, method Intervals) As for one integer, it is just a writing help.
The basic message is intended to be in C-Sprintf format with one f form (or equivalent : e etc) in itParameters (3)keyr1intervals
- constructor(key: string, ival: number, str: string): Interface_MSG
Translates a message which contains one integer and one string variables As for one integer, it is just a writing help Used for instance to say "Param n0.<ival> i.e. <str> is not..".
The basic message is intended to be in C-Sprintf format with one d then one s forms in itParameters (3)keyivalstr
Static methods(13)
- Read(file: string): number
Reads a list of messages from a stream, returns read count 0 means empty file, -1 means error.
Parameters (1)file
- IsKey(mess: string): boolean
Returns True if a given message is surely a key (according to the form adopted for keys) (before activating messages, answer is false).
Parameters (1)mess
- Translated(key: string): string
Returns the item recorded for a key. Returns the key itself if :
- it is not recorded (then, the trace system is activated)
- MSG has been required to be hung on
Parameters (1)key
- Record(key: string, item: string): void
Fills the dictionary with a couple (key-item) If a key is already recorded, it is possible to :
- keep the last definition, and activate the trace system
Parameters (2)keyitem
- SetTrace(toprint: boolean, torecord: boolean): void
Sets the trace system to work when activated, as follow :
- if <toprint> is True, print immediately on standard output
- if <torecord> is True, record it for further print
Parameters (2)toprinttorecord
- SetMode(running: boolean, raising: boolean): void
Sets the main modes for MSG :
- if <running> is True, translation works normally
- if <running> is False, translated item equate keys
- if <raising> is True, errors (from Record or Translate) cause MSG to raise an exception
- if <raising> is False, MSG runs without exception, then see also Trace Modes above
Parameters (2)runningraising
- Intervalled(val: number, order?: number, upper?: boolean): number
Returns an "intervalled" value from a starting real <val> : i.e. a value which is rounded on an interval limit
Intervallimits are defined to be in a coarsely "geometric" progression (two successive intervals are inside a limit ratio).
<order> gives the count of desired intervals in a range <1-10> <upper> False, returns the first lower interval (D) <upper> True, returns the first upper interval Values of Intervals according <order> : 0,1 : 1 10 100 ... 2 : 1 3 10 30 100 ... 3(D): 1 2 5 10 20 50 100 ... 4 : 1 2 3 6 10 20 30 60 100 ... 6 : 1 1.5 2 3 5 7 10 15 20 ... 10 : 1 1.2 1.5 2 2.5 3 4 5 6 8 10 12 15 20 25 ...Parameters (3)valorderupper
- TDate(text: string, yy: number, mm: number, dd: number, hh: number, mn: number, ss: number, format?: string): void
Codes a date as a text, from its numeric value (-> seconds) : YYYY-MM-DD:HH-MN-SS fixed format, completed by leading zeros Another format can be provided, as follows : C:d ... C like format, preceded by C: S:... format to call system (not yet implemented).
Parameters (8)textyymmddhhmnssformat
- NDate(text: string, yy: number, mm: number, dd: number, hh: number, mn: number, ss: number): { returnValue: boolean; yy: number; mm: number; dd: number; hh: number; mn: number; ss: number }
Decodes a date to numeric integer values Returns True if OK, False if text does not fit with required format. Incomplete forms are allowed (for instance, for only YYYY-MM-DD, hour is zero).
Parameters (7)textyymmddhhmnss
ReturnsA result object with fields:
returnValue: the C++ return valueyy: updated value from the call.mm: updated value from the call.dd: updated value from the call.hh: updated value from the call.mn: updated value from the call.ss: updated value from the call.
- CDate(text1: string, text2: string): number
Returns a value about comparison of two dates 0 : equal. <0 text1 anterior. >0 text1 posterior.
Parameters (2)text1text2
- Blanks(count: number): string
Returns a blank string of <count> blanks (mini 0, maxi 76).
Parameters (1)count
- Blanks(val: number, max: number): string
Returns a blank string, of length between 0 and <max>, to fill the printing of a numeric value <val>, i.e. If val < 10 , max-1 blanks If val between 10 and 99, max-2 blanks ... etc...
Parameters (2)valmax
- Blanks(val: string, max: number): string
Returns a blank string, to complete a given string <val> up to <max> characters: If strlen(val) is 0, max blanks If strlen(val) is 5, max-5 blanks etc...
Parameters (2)valmax
Instance methods(2)
Interface_NodeOfGeneralLib
Constructors(1)
Creates an empty Node, with no Next.
Static methods(2)
- get_type_name(): string
Instance methods(3)
Returns the Protocol designated by a precise Node.
Returns the Next Node. If none was defined, returned value is a Null Handle.
Interface_NodeOfReaderLib
Constructors(1)
Creates an empty Node, with no Next.
Static methods(2)
- get_type_name(): string
Instance methods(5)
- AddNode(anode: Interface_GlobalNodeOfReaderLib): void
Adds a couple (Module,Protocol), that is, stores it into itself if not yet done, else creates a Next Node to do it.
Parameters (1)anode
Returns the Module designated by a precise Node.
Returns the Protocol designated by a precise Node.
Returns the Next Node. If none was defined, returned value is a Null Handle.
Interface_ParamList
Constructors(1)
- constructor(theIncrement?: number): Interface_ParamList
Creates an vector with size of memory block equal to theIncrement.
Parameters (1)theIncrement
Static methods(2)
- get_type_name(): string
Instance methods(8)
- Length(): number
Returns the number of elements of <me>.
- Lower(): number
Returns the lower bound. Warning.
- Upper(): number
Returns the upper bound. Warning.
- SetValue(Index: number, Value: Interface_FileParameter): void
Assigns the value to the <Index>-th item of this array.
Parameters (2)IndexValue
- Value(Index: number): Interface_FileParameter
Return the value of the <Index>th element of the array.
Parameters (1)Index
- ChangeValue(Index: number): Interface_FileParameter
return the value of the <Index>th element of the array.
Parameters (1)Index
- Clear(): void
Interface_ParamSet
Defines an ordered set of FileParameters, in a way to be efficient as in memory requirement or in speed.
Constructors(1)
- constructor(nres: number, nst?: number): Interface_ParamSet
Creates an empty ParamSet, beginning at number "nst" and of initial reservation "nres" : the "nres" first parameters which follow "ndeb" (included) will be put in an Array (a ParamList). The remainders are set in Next(s) ParamSet(s).
Parameters (2)nresnst
Static methods(2)
- get_type_name(): string
Instance methods(9)
- Append(val: string, lnval: number, typ: Interface_ParamType, nument: number): number
Adds a parameter defined as its Value (CString and length) and Type. Optional EntityNumber (for FileReaderData) can be given Allows a better memory management than Appending a complete FileParameter If <lnval> < 0, <val> is assumed to be managed elsewhere : its address is stored as such. Else, <val> is copied in a locally (quickly) managed Page of Characters Returns new count of recorded Parameters.
Parameters (4)vallnvaltypnument
- Append(FP: Interface_FileParameter): number
Adds a parameter at the end of the ParamSet (transparent about reservation and "Next") Returns new count of recorded Parameters.
Parameters (1)FP
- NbParams(): number
Returns the total count of parameters (including nexts).
- Param(num: number): Interface_FileParameter
Returns a parameter identified by its number.
Parameters (1)num
- ChangeParam(num: number): Interface_FileParameter
Same as above, but in order to be modified on place.
Parameters (1)num
- SetParam(num: number, FP: Interface_FileParameter): void
Changes a parameter identified by its number.
Parameters (2)numFP
- Params(num: number, nb: number): Interface_ParamList
Builds and returns the sub-list corresponding to parameters, from "num" included, with count "nb" If <num> and <nb> are zero, returns the whole list.
Parameters (2)numnb
- Destroy(): void
Destructor (waiting for transparent memory management).
Interface_ParamType
Properties(11)
Interface_Protocol
General description of Interface Protocols. A Protocol defines a set of Entity types. This class provides also the notion of Active Protocol, as a working context, defined once then exploited by various Tools and Libraries.
It also gives control of type definitions. By default, types are provided by CDL, but specific implementations, or topics like multi-typing, may involve another way
Static methods(4)
- SetActive(aprotocol: Interface_Protocol): void
Sets a given Protocol to be the Active one (for the users of Active, see just above). Applies to every sub-type of Protocol.
Parameters (1)aprotocol
- ClearActive(): void
Erases the Active Protocol (hence it becomes undefined).
- get_type_name(): string
Instance methods(12)
- NbResources(): number
Returns count of Protocol used as Resources (level one).
- Resource(num: number): Interface_Protocol
Returns a Resource, given its rank (between 1 and NbResources).
Parameters (1)num
- CaseNumber(obj: Standard_Transient): number
Returns a unique positive CaseNumber for each Recognized Object. By default, recognition is based on Type(1) By default, calls the following one which is deferred.
Parameters (1)obj
- IsDynamicType(obj: Standard_Transient): boolean
Returns True if type of <obj> is that defined from CDL This is the default but it may change according implementation.
Parameters (1)obj
- NbTypes(obj: Standard_Transient): number
Returns the count of DISTINCT types under which an entity may be processed. Each one is candidate to be recognized by TypeNumber, <obj> is then processed according it By default, returns 1 (the DynamicType).
Parameters (1)obj
- Type(obj: Standard_Transient, nt?: number): Standard_Type
Returns a type under which <obj> can be recognized and processed, according its rank in its definition list (see NbTypes). By default, returns DynamicType.
Parameters (2)objnt
- TypeNumber(atype: Standard_Type): number
Returns a unique positive CaseNumber for each Recognized Type, Returns Zero for "<type> not recognized".
Parameters (1)atype
Creates an empty Model of the considered Norm.
- IsSuitableModel(model: Interface_InterfaceModel): boolean
Returns True if <model> is a Model of the considered Norm.
Parameters (1)model
Creates a new Unknown Entity for the considered Norm.
- IsUnknownEntity(ent: Standard_Transient): boolean
Returns True if <ent> is an Unknown Entity for the Norm, i.e. same Type as them created by method UnknownEntity (for an Entity out of the Norm, answer can be unpredictable).
Parameters (1)ent
Interface_ReaderLib
Constructors(2)
Creates an empty Library : it will later by filled by method AddProtocol.
- constructor(aprotocol: Interface_Protocol): Interface_ReaderLib
Creates a Library which complies with a Protocol, that is : Same class (criterium IsInstance) This creation gets the Modules from the global set, those which are bound to the given Protocol and its Resources.
Parameters (1)aprotocol
Static methods(1)
- SetGlobal(amodule: Interface_ReaderModule, aprotocol: Interface_Protocol): void
Adds a couple (Module-Protocol) into the global definition set for this class of Library.
Parameters (2)amoduleaprotocol
Instance methods(9)
- AddProtocol(aprotocol: Standard_Transient): void
Adds a couple (Module-Protocol) to the Library, given the class of a Protocol. Takes Resources into account. (if <aprotocol> is not of type TheProtocol, it is not added).
Parameters (1)aprotocol
- Clear(): void
Clears the list of Modules of a library (can be used to redefine the order of Modules before action : Clear then refill the Library by calls to AddProtocol).
- SetComplete(): void
Sets a library to be defined with the complete Global list (all the couples Protocol/Modules recorded in it).
- Select(obj: Standard_Transient, CN: number): { returnValue: boolean; module_: Interface_ReaderModule; CN: number; [Symbol.dispose](): void }
Selects a Module from the Library, given an Object. Returns True if Select has succeeded, False else. Also Returns (as arguments) the selected Module and the Case Number determined by the associated Protocol. If Select has failed, <module> is Null Handle and CN is zero. (Select can work on any criterium, such as Object DynamicType).
Parameters (2)objCN
ReturnsA result object with fields:
returnValue: the C++ return valuemodule_: owned by the returned envelope.CN: updated value from the call.
Dispose the returned envelope to release owned Handle fields.
- Start(): void
Starts Iteration on the Modules (sets it on the first one).
- More(): boolean
Returns True if there are more Modules to iterate on.
- Next(): void
Iterates by getting the next Module in the list If there is none, the exception will be raised by Value.
Returns the current Module in the Iteration.
Returns the current Protocol in the Iteration.
Interface_ReaderModule
Defines unitary operations required to read an Entity from a File (see FileReaderData, FileReaderTool), under control of a FileReaderTool. The initial creation is performed by a GeneralModule (set in GeneralLib). Then, which remains is Loading data from the FileReaderData to the Entity.
To work, a GeneralModule has formerly recognized the Type read from FileReaderData as a positive Case Number, then the ReaderModule reads it according to this Case Number
Static methods(1)
Instance methods(1)
Interface_ReportEntity
A ReportEntity is produced to acknowledge and memorize the binding between a Check and an Entity. The Check can bring Fails (+ Warnings if any), or only Warnings. If it is empty, the Report Entity is for an Unknown Entity.
The ReportEntity brings : the Concerned Entity, the Check, and if the Entity is empty (Fails due to Read Errors, hence the Entity could not be loaded), a Content. The Content is itself an Transient Object, but remains in a literal form : it is an "Unknown Entity". If the Concerned Entity is itself Unknown, Concerned and Content are equal.
According to the Check, if it brings Fail messages, the ReportEntity is an "Error Entity", the Concerned Entity is an "Erroneous Entity". Else it is a "Correction Entity", the Concerned Entity is a "Corrected Entity". With no Check message and if Concerned and Content are equal, it reports for an "Unknown Entity".
Each norm must produce its own type of Unknown Entity, but can use the class UndefinedContent to brings parameters : it is enough for most of information and avoids to redefine them, only the specific part remains to be defined for each norm.
Constructors(2)
- constructor(unknown: Standard_Transient): Interface_ReportEntity
Creates a ReportEntity for an Unknown Entity : Check is empty, and Concerned equates Content (i.e. the Unknown Entity).
Parameters (1)unknown
- constructor(acheck: Interface_Check, concerned: Standard_Transient): Interface_ReportEntity
Creates a ReportEntity with its features :
- <acheck> is the Check to be memorised
- <concerned> is the Entity to which the Check is bound Later, a Content can be set : it is required for an Error
Parameters (2)acheckconcerned
Static methods(2)
- get_type_name(): string
Instance methods(10)
- SetContent(content: Standard_Transient): void
Sets a Content : it brings non interpreted data which belong to the Concerned Entity. It can be empty then loaded later. Remark that for an Unknown Entity, Content is set by Create.
Parameters (1)content
Returns the stored Check.
Returns the stored Check in order to change it.
Returns the stored Concerned Entity. It equates the Content in the case of an Unknown Entity.
- HasContent(): boolean
Returns True if a Content is stored (it can equate Concerned).
- HasNewContent(): boolean
Returns True if a Content is stored AND differs from Concerned (i.e. redefines content) : used when Concerned could not be loaded.
Returns the stored Content, or a Null Handle Remark that it must be an "Unknown Entity" suitable for the norm of the containing Model.
- IsError(): boolean
Returns True for an Error Entity, i.e. if the Check brings at least one Fail message.
- IsUnknown(): boolean
Returns True for an Unknown Entity, i,e. if the Check is empty and Concerned equates Content.
Interface_ShareFlags
This class only says for each Entity of a Model, if it is Shared or not by one or more other(s) of this Model It uses the General Service "Shared".
Constructors(4)
Instance methods(3)
Interface_ShareTool
Builds the Graph of Dependencies, from the General Service "Shared" -> builds for each Entity of a Model, the Shared and Sharing Lists, and gives access to them. Allows to complete with Implied References (which are not regarded as Shared Entities, but are nevertheless Referenced), this can be useful for Reference Checking.
Constructors(4)
Instance methods(3)
Interface_SignLabel
Signature to give the Label from the Model.
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(3)
- Name(): string
Returns "Entity Label".
- Text(ent: Standard_Transient, context: Standard_Transient): TCollection_AsciiString
Considers context as an InterfaceModel and returns the Label computed by it.
Parameters (2)entcontext
Interface_SignType
Provides the basic service to get a type name, according to a norm It can be used for other classes (general signatures ...).
Static methods(3)
- ClassName(typnam: string): string
From a CDL Type Name, returns the Class part (package dropped) WARNING : buffered, to be immediately copied or printed.
Parameters (1)typnam
- get_type_name(): string
Instance methods(3)
- Text(ent: Standard_Transient, context: Standard_Transient): TCollection_AsciiString
Returns an identification of the Signature (a word), given at initialization time Specialised to consider context as an InterfaceModel.
Parameters (2)entcontext
- Value(ent: Standard_Transient, model: Interface_InterfaceModel): string
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.
Parameters (2)entmodel
Interface_STAT
This class manages statistics to be queried asynchronously. Way of use : An operator describes a STAT form then fills it according to its progression. This produces a state of advancement of the process. This state can then be queried asynchronously : typically it is summarised as a percentage. There are also an identification of the current state, and information on processed volume.
A STAT form can be described once for all (as static). It describes the stream of the process (see later), in terms of phases, cycles, steps, with estimated weights. But it brings no current data.
One STAT at a time is active for filling and querying. It is used to control phasing, weighting ... Specific data for execution are given when running on active STAT : counts of items ... Data for query are then recorded and can be accessed at any time, asynchronously.
A STAT is organised as follows :
- it can be split into PHASES (by default, there is none, and all process takes place in one "default" phase)
- each phase is identified by a name and is attached a weight -> the sum of the weights is used to compute relative weights
- for each phase, or for the unique default phase if none : - the process works on a list of ITEMS - by default, all the items are processed in once - but this list can be split into CYCLES, each one takes a sub-list : the weight of each cycle is related to its count of items - a cycle can be split into STEPS, by default there are none then one "default step" is considered - each step is attached a weight -> the sum of the weights of steps is used to compute relative weights of the steps in each cycle -> all the cycles of a phase have the same organisation
Hence, when defining the STAT form, the phases have to be described. If no weight is precisely known, give 1. for all... No phase description will give only one "default" phase For each phase, a typical cycle can be described by its steps. Here too, for no weight precisely known, give 1. for all...
For executing, activate a STAT to begin count. Give counts of items and cycles for the first phase (for the unique default one if no phasing is described) Else, give count of items and cycles for each new phase. Class methods allow also to set next cycle (given count of items), next step in cycle (if more then one), next item in step.
Constructors(2)
- constructor(title?: string): Interface_STAT
Creates a STAT form. At start, one default phase is defined, with one default step. Then, it suffises to start with a count of items (and cycles if several) then record items, to have a queryable report.
Parameters (1)title
- constructor(other: Interface_STAT): Interface_STAT
used when starting
Parameters (1)other
Static methods(9)
- StartCount(items: number, title?: string): void
Starts a default STAT, with no phase, no step, ready to just count items. <items> gives the total count of items Hence, NextItem is available to directly count.
Parameters (2)itemstitle
- NextPhase(items: number, cycles?: number): void
Commands to resume the preceding phase and start a new one <items> and <cycles> as for Start, but for this new phase Ignored if count of phases is already passed If <cycles> is more than one, the first Cycle must then be started by NextCycle (NextStep/NextItem are ignored). If it is one, NextItem/NextStep can then be called.
Parameters (2)itemscycles
- SetPhase(items: number, cycles?: number): void
Changes the parameters of the phase to start To be used before first counting (i.e. just after NextPhase) Can be used by an operator which has to reajust counts on run.
Parameters (2)itemscycles
- NextCycle(items: number): void
Commands to resume the preceding cycle and start a new one, with a count of items Ignored if count of cycles is already passed Then, first step is started (or default one) NextItem can be called for the first step, or NextStep to pass to the next one.
Parameters (1)items
- NextStep(): void
Commands to resume the preceding step of the cycle Ignored if count of steps is already passed NextItem can be called for this step, NextStep passes to next.
- NextItem(nbitems?: number): void
Commands to add an item in the current step of the current cycle of the current phase By default, one item per call, can be overpassed Ignored if count of items of this cycle is already passed.
Parameters (1)nbitems
- End(): void
Commands to declare the process ended (hence, advancement is forced to 100 %).
- Where(phase: boolean): string
Returns an identification of the STAT : <phase> True (D) : the name of the current phase <phase> False : the title of the current STAT.
Parameters (1)phase
- Percent(phase?: boolean): number
Returns the advancement as a percentage : <phase> True : inside the current phase <phase> False (D) : relative to the whole process.
Parameters (1)phase
Instance methods(5)
- Internals(total: number): { tit: TCollection_HAsciiString; total: number; phn: NCollection_HSequence_TCollection_AsciiString; phw: NCollection_HSequence_double; phdeb: NCollection_HSequence_int; phfin: NCollection_HSequence_int; stw: NCollection_HSequence_double; [Symbol.dispose](): void }
Returns fields in once, without copying them, used for copy when starting.
Parameters (1)total
ReturnsA result object with fields:
tit: owned by the returned envelope.total: updated value from the call.phn: owned by the returned envelope.phw: owned by the returned envelope.phdeb: owned by the returned envelope.phfin: owned by the returned envelope.stw: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- AddPhase(weight: number, name?: string): void
Adds a new phase to the description. The first one after Create replaces the default unique one.
Parameters (2)weightname
- AddStep(weight?: number): void
Adds a new step for the last added phase, the default unique one if no AddPhase has already been added Warning : AddStep before the first AddPhase are cancelled.
Parameters (1)weight
- Step(num: number): number
Returns weight of a Step, related to the cumul given for the phase. <num> is given by <n0step> + i, i between 1 and <nbsteps> (default gives n0step < 0 then weight is one).
Parameters (1)num
- Start(items: number, cycles?: number): void
Starts a STAT on its first phase (or its default one) <items> gives the total count of items, <cycles> the count of cycles If <cycles> is more than one, the first Cycle must then be started by NextCycle (NextStep/NextItem are ignored). If it is one, NextItem/NextStep can then be called.
Parameters (2)itemscycles
Interface_Static
This class gives a way to manage meaningful static variables, used as "global" parameters in various procedures.
A Static brings a specification (its type, constraints if any) and a value. Its basic form is a string, it can be specified as integer or real or enumerative string, and queried as such. Its string content, which is a occ::handle<HAsciiString> can be shared by other data structures, hence gives a direct on line access to its value.
All this description is inherited from TypedValue
A Static can be given an initial value, it can be filled from, either a set of Resources (an applicative feature which accesses and manages parameter files), or environment or internal definition : these define families of Static. In addition, it supports a status for reinitialisation : an initialisation procedure can ask if the value of the Static has changed from its last call, in this case does something then marks the Status "uptodate", else it does nothing.
Statics are named and recorded then accessed in an alphabetic dictionary
Constructors(2)
- constructor(family: string, name: string, other: Interface_Static): Interface_Static
Creates a new Static with same definition as another one (value is copied, except for Entity : it remains null).
Parameters (3)familynameother
- constructor(family: string, name: string, type_?: Interface_ParamType, init?: string): Interface_Static
Creates and records a Static, with a family and a name family can report to a name of resource or to a system or internal definition. The name must be unique.
type gives the type of the parameter, default is free text Also available : Integer, Real, Enum, Entity (i.e. Object) More precise specifications, titles, can be given to the Static once created
init gives an initial value. If it is not given, the Static begin as "not set", its value is emptyParameters (4)familynametype_init
Static methods(20)
- Init(family: string, name: string, type_: Interface_ParamType, init: string): boolean
Declares a new Static (by calling its constructor) If this name is already taken, does nothing and returns False Else, creates it and returns True For additional definitions, get the Static then edit it.
Parameters (4)familynametype_init
- Init(family: string, name: string, type_: string, init: string): boolean
As Init with ParamType, but type is given as a character This allows a simpler call Types : 'i' Integer, 'r' Real, 't' Text, 'e' Enum, 'o' Object '=' for same definition as, <init> gives the initial Static Returns False if <type> does not match this list.
Parameters (4)familynametype_init
- Static(name: string): Interface_Static
Returns a Static from its name. Null Handle if not present.
Parameters (1)name
- IsPresent(name: string): boolean
Returns True if a Static named <name> is present, False else.
Parameters (1)name
- CDef(name: string, part: string): string
Returns a part of the definition of a Static, as a CString The part is designated by its name, as a CString If the required value is not a string, it is converted to a CString then returned If <name> is not present, or <part> not defined for <name>, this function returns an empty string.
Allowed parts for CDef : family : the family type : the type ("integer","real","text","enum") label : the label satis : satisfy function name if any rmin : minimum real value rmax : maximum real value imin : minimum integer value imax : maximum integer value enum nn (nn : value of an integer) : enum value for nn unit : unit definition for a realParameters (2)namepart
- IDef(name: string, part: string): number
Returns a part of the definition of a Static, as an Integer The part is designated by its name, as a CString If the required value is not a string, returns zero For a Boolean, 0 for false, 1 for true If <name> is not present, or <part> not defined for <name>, this function returns zero.
Allowed parts for IDef : imin, imax : minimum or maximum integer value estart : starting number for enum ecount : count of enum values (starting from estart) ematch : exact match status eval val : case determined from a stringParameters (2)namepart
- IsSet(name: string, proper?: boolean): boolean
Returns True if <name> is present AND set <proper> True (D) : considers this item only <proper> False : if not set and attached to a wild-card, considers this wild-card.
Parameters (2)nameproper
- CVal(name: string): string
Returns the value of the parameter identified by the string name. If the specified parameter does not exist, an empty string is returned. Example
Interface_Static::CVal("write.step.schema"); which could return: "AP214".Parameters (1)name
- IVal(name: string): number
Returns the integer value of the translation parameter identified by the string name. Returns the value 0 if the parameter does not exist. Example
Interface_Static::IVal("write.step.schema"); which could return: 3.Parameters (1)name
- RVal(name: string): number
Returns the value of a static translation parameter identified by the string name. Returns the value 0.0 if the parameter does not exist.
Parameters (1)name
- SetCVal(name: string, val: string): boolean
Modifies the value of the parameter identified by name. The modification is specified by the string val. false is returned if the parameter does not exist. Example
Interface_Static::SetCVal("write.step.schema","AP203") This syntax specifies a switch from the default STEP 214 mode to STEP 203 mode.Parameters (2)nameval
- SetIVal(name: string, val: number): boolean
Modifies the value of the parameter identified by name. The modification is specified by the integer value val. false is returned if the parameter does not exist. Example
Interface_Static::SetIVal("write.step.schema", 3) This syntax specifies a switch from the default STEP 214 mode to STEP 203 mode.S.Parameters (2)nameval
- SetRVal(name: string, val: number): boolean
Modifies the value of a translation parameter. false is returned if the parameter does not exist. The modification is specified by the real number value val.
Parameters (2)nameval
- Update(name: string): boolean
Sets a Static to be "uptodate" Returns False if <name> is not present This status can be used by a reinitialisation procedure to rerun if a value has been changed.
Parameters (1)name
- IsUpdated(name: string): boolean
Returns the status "uptodate" from a Static Returns False if <name> is not present.
Parameters (1)name
- Items(mode?: number, criter?: string): NCollection_HSequence_handle_TCollection_HAsciiString
Returns a list of names of statics : <mode> = 0 (D) : criter is for family <mode> = 1 : criter is regexp on names, takes final items (ignore wild cards) <mode> = 2 : idem but take only wilded, not final items <mode> = 3 : idem, take all items matching criter idem + 100 : takes only non-updated items idem + 200 : takes only updated items criter empty (D) : returns all names else returns names which match the given criter Remark : families beginning by '$' are not listed by criter "" they are listed only by criter "$".
This allows for instance to set new values after having loaded or reloaded a resource, then to update them as requiredParameters (2)modecriter
- Standards(): void
Initializes all standard static parameters, which can be used by every function. statics specific of a norm or a function must be defined around it.
Fills given string-to-string map with all static data.
Parameters (1)theMap—Mutated in place; read the updated value from this argument after the call.
- get_type_name(): string
Instance methods(6)
- Family(): string
Returns the family. It can be : a resource name for applis, an internal name between : $e (environment variables), $l (other, purely local).
- SetWild(wildcard: Interface_Static): void
Sets a "wild-card" static : its value will be considered if <me> is not properly set. (reset by set a null one).
Parameters (1)wildcard
Returns the wildcard static, which can be (is most often) null.
- SetUptodate(): void
Records a Static has "uptodate", i.e. its value has been taken into account by a reinitialisation procedure This flag is reset at each successful SetValue.
- UpdatedStatus(): boolean
Returns the status "uptodate".
Interface_TypedValue
Now strictly equivalent to TypedValue from MoniTool, except for ParamType which remains for compatibility reasons.
This class allows to dynamically manage .. typed values, i.e. values which have an alphanumeric expression, but with controls. Such as "must be an Integer" or "Enumerative Text" etc
Hence, a TypedValue brings a specification (type + constraints if any) and a value. Its basic form is a string, it can be specified as integer or real or enumerative string, then queried as such. Its string content, which is a occ::handle<HAsciiString> can be shared by other data structures, hence gives a direct on line access to its value.
Constructors(1)
- constructor(name: string, type_?: Interface_ParamType, init?: string): Interface_TypedValue
Creates a TypedValue, with a name.
type gives the type of the parameter, default is free text Also available : Integer, Real, Enum, Entity (i.e. Object) More precise specifications, titles, can be given to the TypedValue once created
init gives an initial value. If it is not given, the TypedValue begins as "not set", its value is emptyParameters (3)nametype_init
Static methods(4)
Correspondence ParamType from Interface to ValueType from MoniTool.
Parameters (1)typ
Correspondence ParamType from Interface to ValueType from MoniTool.
Parameters (1)typ
- get_type_name(): string
Instance methods(2)
Returns the type I.E. calls ValueType then makes correspondence between ParamType from Interface (which remains for compatibility reasons) and ValueType from MoniTool.