Transfer
OCCT package Transfer: Transfer_ActorDispatch, Transfer_ActorOfFinderProcess, Transfer_ActorOfProcessForFinder, Transfer_ActorOfProcessForTransient, and…
Transfer_ActorDispatch
This class allows to work with a TransferDispatch, i.e. to transfer entities from a data set to another one defined by the same interface norm, with the following features :
- ActorDispatch itself acts as a default actor, i.e. it copies entities with the general service Copy, as CopyTool does
- it allows to add other actors for specific ways of transfer, which may include data modifications, conversions ...
- and other features from TransferDispatch (such as mapping other than one-one)
Constructors(3)
Same as above, but works with the Active Protocol.
Parameters (1)amodel
Creates an ActorDispatch from a Model. Works with a General Service Library, given as an Argument This causes TransferDispatch and its TransientProcess to be created, with default actor <me>.
Parameters (2)amodellib
- constructor(amodel: Interface_InterfaceModel, protocol: Interface_Protocol): Transfer_ActorDispatch
Same as above, but Library is defined through a Protocol.
Parameters (2)amodelprotocol
Static methods(2)
- get_type_name(): string
Instance methods(4)
- AddActor(actor: Transfer_ActorOfTransientProcess): void
Utility which adds an actor to the default <me> (it calls SetActor from the TransientProcess).
Parameters (1)actor
Returns the TransferDispatch, which does the work, records the intermediate data, etc... See TransferDispatch & CopyTool, to see the available methods.
- Transfer(start: Standard_Transient, TP: Transfer_TransientProcess, theProgress?: Message_ProgressRange): Transfer_Binder
Specific action : it calls the method Transfer from CopyTool i.e. the general service Copy, then returns the Binder produced by the TransientProcess.
Parameters (3)startTPtheProgress
Transfer_ActorOfFinderProcess
The original class was renamed. Compatibility only.
ModeTrans : a simple way of transmitting a transfer mode from a user. To be interpreted for each norm
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(8)
- Transferring(start: Transfer_Finder, TP: Transfer_ProcessForFinder, theProgress?: Message_ProgressRange): Transfer_Binder
Specific action of Transfer. The Result is stored in the returned Binder, or a Null Handle for "No result" (Default defined as doing nothing; should be deferred) "mutable" allows the Actor to record intermediate information, in addition to those of TransferProcess.
Parameters (3)startTPtheProgress
- Transfer(start: Transfer_Finder, TP: Transfer_FinderProcess, theProgress?: Message_ProgressRange): Transfer_BinderParameters (3)
startTPtheProgress
- TransferTransient(start: Standard_Transient, TP: Transfer_FinderProcess, theProgress?: Message_ProgressRange): Standard_TransientParameters (3)
startTPtheProgress
- SetShapeFixParameters(theParameters: NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString): void
Sets parameters for shape processing.
Parameters (1)theParameters—the parameters for shape processing.
Returns parameters for shape processing that was set by SetParameters() method.
Returnsthe parameters for shape processing. Empty map if no parameters were set.
- SetShapeProcessFlags(theFlags: any): void
Sets flags defining operations to be performed on shapes.
Parameters (1)theFlags—The flags defining operations to be performed on shapes.
- GetShapeProcessFlags(): [any, boolean]
Returns flags defining operations to be performed on shapes.
ReturnsPair of values defining operations to be performed on shapes and a boolean value that indicates whether the flags were set.
Transfer_ActorOfProcessForFinder
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(9)
- Recognize(start: Transfer_Finder): boolean
Prerequisite for Transfer : the method Transfer is called on a starting object only if Recognize has returned True on it This allows to define a list of Actors, each one processing a definite kind of data TransferProcess calls Recognize on each one before calling Transfer. But even if Recognize has returned True, Transfer can reject by returning a Null Binder (afterwards rejection), the next actor is then invoked.
The provided default returns True, can be redefinedParameters (1)start
- Transferring(start: Transfer_Finder, TP: Transfer_ProcessForFinder, theProgress?: Message_ProgressRange): Transfer_Binder
Specific action of Transfer. The Result is stored in the returned Binder, or a Null Handle for "No result" (Default defined as doing nothing; should be deferred) "mutable" allows the Actor to record intermediate information, in addition to those of TransferProcess.
Parameters (3)startTPtheProgress
Prepares and Returns a Binder for a Transient Result Returns a Null Handle if <res> is itself Null.
Parameters (1)res
Returns a Binder for No Result, i.e. a Null Handle.
- SetLast(mode?: boolean): void
If <mode> is True, commands an Actor to be set at the end of the list of Actors (see SetNext) If it is False (creation default), each add Actor is set at the beginning of the list This allows to define default Actors (which are Last).
Parameters (1)mode
- IsLast(): boolean
Returns the Last status (see SetLast).
- SetNext(next: Transfer_ActorOfProcessForFinder): void
Defines a Next Actor : it can then be asked to work if <me> produces no result for a given type of Object. If Next is already set and is not "Last", calls SetNext on it. If Next defined and "Last", the new actor is added before it in the list.
Parameters (1)next
Returns the Actor defined as Next, or a Null Handle.
Transfer_ActorOfProcessForTransient
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(9)
- Recognize(start: Standard_Transient): boolean
Prerequisite for Transfer : the method Transfer is called on a starting object only if Recognize has returned True on it This allows to define a list of Actors, each one processing a definite kind of data TransferProcess calls Recognize on each one before calling Transfer. But even if Recognize has returned True, Transfer can reject by returning a Null Binder (afterwards rejection), the next actor is then invoked.
The provided default returns True, can be redefinedParameters (1)start
- Transferring(start: Standard_Transient, TP: Transfer_ProcessForTransient, theProgress?: Message_ProgressRange): Transfer_Binder
Specific action of Transfer. The Result is stored in the returned Binder, or a Null Handle for "No result" (Default defined as doing nothing; should be deferred) "mutable" allows the Actor to record intermediate information, in addition to those of TransferProcess.
Parameters (3)startTPtheProgress
Prepares and Returns a Binder for a Transient Result Returns a Null Handle if <res> is itself Null.
Parameters (1)res
Returns a Binder for No Result, i.e. a Null Handle.
- SetLast(mode?: boolean): void
If <mode> is True, commands an Actor to be set at the end of the list of Actors (see SetNext) If it is False (creation default), each add Actor is set at the beginning of the list This allows to define default Actors (which are Last).
Parameters (1)mode
- IsLast(): boolean
Returns the Last status (see SetLast).
- SetNext(next: Transfer_ActorOfProcessForTransient): void
Defines a Next Actor : it can then be asked to work if <me> produces no result for a given type of Object. If Next is already set and is not "Last", calls SetNext on it. If Next defined and "Last", the new actor is added before it in the list.
Parameters (1)next
Returns the Actor defined as Next, or a Null Handle.
Transfer_ActorOfTransientProcess
The original class was renamed. Compatibility only.
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(7)
- Transfer(start: Standard_Transient, TP: Transfer_TransientProcess, theProgress?: Message_ProgressRange): Transfer_BinderParameters (3)
startTPtheProgress
- TransferTransient(start: Standard_Transient, TP: Transfer_TransientProcess, theProgress?: Message_ProgressRange): Standard_TransientParameters (3)
startTPtheProgress
- SetShapeFixParameters(theParameters: NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString): void
Sets parameters for shape processing.
Parameters (1)theParameters—the parameters for shape processing.
Returns parameters for shape processing that was set by SetParameters() method.
Returnsthe parameters for shape processing. Empty map if no parameters were set.
- SetProcessingFlags(theFlags: any): void
Sets flags defining operations to be performed on shapes.
Parameters (1)theFlags—The flags defining operations to be performed on shapes.
- GetProcessingFlags(): [any, boolean]
Returns flags defining operations to be performed on shapes.
ReturnsPair: the flags defining operations to be performed on shapes and a boolean value that indicates whether the flags were set.
Transfer_Binder
A Binder is an auxiliary object to Map the Result of the Transfer of a given Object : it records the Result of the Unitary Transfer (Resulting Object), status of progress and error (if any) of the Process.
The class Binder itself makes no definition for the Result : it is defined by sub-classes : it can be either Simple (and has to be typed : see generic class SimpleBinder) or Multiple (see class MultipleBinder).
In principle, for a Transfer in progress, Result cannot be accessed : this would cause an exception raising. This is controlled by the value if StatusResult : if it is "Used", the Result cannot be changed. This status is normally controlled by TransferProcess but can be directly (see method SetAlreadyUsed)
Checks can be completed by a record of cases, as string which can be used as codes, but not to be printed
In addition to the Result, a Binder can bring a list of Attributes, which are additional data, each of them has a name
Static methods(2)
- get_type_name(): string
Instance methods(16)
- Merge(other: Transfer_Binder): void
Merges basic data (Check, ExecStatus) from another Binder but keeps its result. Used when a binder is replaced by another one, this allows to keep messages.
Parameters (1)other
- IsMultiple(): boolean
Returns True if a Binder has several results, either by itself or because it has next results Can be defined by sub-classes.
Returns the Type which characterizes the Result (if known).
- ResultTypeName(): string
Returns the Name of the Type which characterizes the Result Can be returned even if ResultType itself is unknown.
- AddResult(next: Transfer_Binder): void
Adds a next result (at the end of the list) Remark : this information is not processed by Merge.
Parameters (1)next
Returns the next result, Null if none.
- HasResult(): boolean
Returns True if a Result is available (StatusResult = Defined) A Unique Result will be gotten by Result (which must be defined in each sub-class according to result type) For a Multiple Result, see class MultipleBinder For other case, specific access has to be forecast.
- SetAlreadyUsed(): void
Declares that result is now used by another one, it means that it cannot be modified (by Rebind).
Returns status, which can be Initial (not yet done), Made (a result is recorded, not yet shared), Used (it is shared and cannot be modified).
Returns execution status.
- SetStatusExec(stat: Transfer_StatusExec): void
Modifies execution status; called by TransferProcess only (for StatusError, rather use SetError, below).
Parameters (1)stat
- AddFail(mess: string, orig?: string): void
Used to declare an individual transfer as being erroneous (Status is set to Void, StatusExec is set to Error, <errmess> is added to Check's list of Fails) It is possible to record several messages of error.
It has same effect for TransferProcess as raising an exception during the operation of Transfer, except the Transfer tries to continue (as if ErrorHandle had been set)Parameters (2)messorig
- AddWarning(mess: string, orig?: string): void
Used to attach a Warning
Messageto an individual Transfer It has no effect on the Status.Parameters (2)messorig
Returns Check which stores Fail messages Note that no Entity is associated in this Check.
Returns Check which stores Fail messages, in order to modify it (adding messages, or replacing it).
Transfer_BinderOfTransientInteger
This type of Binder allows to attach as result, besides a Transient Object, an Integer Value, which can be an Index in the Object if it defines a List, for instance.
This Binder is otherwise a kind of SimpleBinderOfTransient, i.e. its basic result (for iterators, etc) is the Transient
Constructors(1)
Creates an empty BinderOfTransientInteger; Default value for the integer part is zero.
Static methods(2)
- get_type_name(): string
Instance methods(3)
- SetInteger(value: number): void
Sets a value for the integer part.
Parameters (1)value
- Integer(): number
Returns the value set for the integer part.
Transfer_DataInfo
Gives information on an object Used as template to instantiate Mapper and SimpleBinder This class is for Transient.
Constructors(1)
Static methods(2)
- Type(ent: Standard_Transient): Standard_Type
Returns the Type attached to an object Here, the Dynamic Type of a Transient. Null Type if unknown.
Parameters (1)ent
- TypeName(ent: Standard_Transient): string
Returns Type Name (string) Allows to name type of non-handled objects.
Parameters (1)ent
Transfer_DispatchControl
This is an auxiliary class for TransferDispatch, which allows to record simple copies, as CopyControl from Interface, but based on a TransientProcess. Hence, it allows in addition more actions (such as recording results of adaptations).
Constructors(1)
- constructor(model: Interface_InterfaceModel, TP: Transfer_TransientProcess): Transfer_DispatchControl
Creates the DispatchControl, ready for use.
Parameters (2)modelTP
Static methods(2)
- get_type_name(): string
Instance methods(6)
Returns the content of the DispatchControl : it can be used for a direct call, if the basic methods do not suffice.
Returns the Model from which the transfer is to be done.
- Clear(): void
Clears the List of Copied Results.
- Bind(ent: Standard_Transient, res: Standard_Transient): void
Binds a (Transient) Result to a (Transient) Starting Entity.
Parameters (2)entres
- Search(ent: Standard_Transient): { returnValue: boolean; res: Standard_Transient; [Symbol.dispose](): void }
Searches for the Result bound to a Starting Entity 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.
Transfer_Finder
a Finder allows to map any kind of object as a Key for a Map. This works by defining, for a Hash Code, that of the real Key, not of the Finder which acts only as an intermediate. When a Map asks for the HashCode of a Finder, this one returns the code it has determined at creation time
Static methods(2)
- get_type_name(): string
Instance methods(21)
- GetHashCode(): number
Returns the HashCode which has been stored by SetHashCode (remark that HashCode could be deferred then be defined by sub-classes, the result is the same).
- Equates(other: Transfer_Finder): boolean
Specific testof equality : to be defined by each sub-class, must be False if Finders have not the same true Type, else their contents must be compared.
Parameters (1)other
Returns the Type of the Value. By default, returns the DynamicType of <me>, but can be redefined.
- ValueTypeName(): string
Returns the name of the Type of the Value. Default is name of ValueType, unless it is for a non-handled object.
- SetAttribute(name: string, val: Standard_Transient): void
Adds an attribute with a given name (replaces the former one with the same name if already exists).
Parameters (2)nameval
- RemoveAttribute(name: string): boolean
Removes an attribute Returns True when done, False if this attribute did not exist.
Parameters (1)name
- GetAttribute(name: string, type_: Standard_Type): { returnValue: boolean; val: Standard_Transient; [Symbol.dispose](): void }
Returns an attribute from its name, filtered by a type If no attribute has this name, or if it is not kind of this type, <val> is Null and returned value is False Else, it is True.
Parameters (2)nametype_
ReturnsA result object with fields:
returnValue: the C++ return valueval: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- Attribute(name: string): Standard_Transient
Returns an attribute from its name. Null Handle if not recorded (whatever Transient, Integer, Real ...).
Parameters (1)name
- AttributeType(name: string): Interface_ParamType
Returns the type of an attribute : ParamInt , ParamReal , ParamText (String) , ParamIdent (any) or ParamVoid (not recorded).
Parameters (1)name
- SetIntegerAttribute(name: string, val: number): void
Adds an integer value for an attribute.
Parameters (2)nameval
- GetIntegerAttribute(name: string, val: number): { returnValue: boolean; val: number }
Returns an attribute from its name, as integer If no attribute has this name, or not an integer, <val> is 0 and returned value is False Else, it is True.
Parameters (2)nameval
ReturnsA result object with fields:
returnValue: the C++ return valueval: updated value from the call.
- IntegerAttribute(name: string): number
Returns an integer attribute from its name. 0 if not recorded.
Parameters (1)name
- SetRealAttribute(name: string, val: number): void
Adds a real value for an attribute.
Parameters (2)nameval
- GetRealAttribute(name: string, val: number): { returnValue: boolean; val: number }
Returns an attribute from its name, as real If no attribute has this name, or not a real <val> is 0.0 and returned value is False Else, it is True.
Parameters (2)nameval
ReturnsA result object with fields:
returnValue: the C++ return valueval: updated value from the call.
- RealAttribute(name: string): number
Returns a real attribute from its name. 0.0 if not recorded.
Parameters (1)name
- SetStringAttribute(name: string, val: string): void
Adds a String value for an attribute.
Parameters (2)nameval
- StringAttribute(name: string): string
Returns a String attribute from its name. "" if not recorded.
Parameters (1)name
Returns the exhaustive list of attributes.
- SameAttributes(other: Transfer_Finder): void
Gets the list of attributes from <other>, as such, i.e. not copied : attributes are shared, any attribute edited, added, or removed in <other> is also in <me> and vice versa The former list of attributes of <me> is dropped.
Parameters (1)other
- GetAttributes(other: Transfer_Finder, fromname?: string, copied?: boolean): void
Gets the list of attributes from <other>, by copying it By default, considers all the attributes from <other> If <fromname> is given, considers only the attributes with name beginning by <fromname>.
For each attribute, if <copied> is True (D), its value is also copied if it is a basic type (Integer,Real,String), else it remains shared between <other> and <me>
These new attributes are added to the existing ones in <me>, in case of same name, they replace the existing onesParameters (3)otherfromnamecopied
Transfer_FinderProcess
Adds specific features to the generic definition : PrintTrace is adapted.
Constructors(1)
- constructor(nb?: number): Transfer_FinderProcess
Sets FinderProcess at initial state, with an initial size.
Parameters (1)nb
Static methods(2)
- get_type_name(): string
Instance methods(5)
- SetModel(model: Interface_InterfaceModel): void
Sets an InterfaceModel, which can be used during transfer for instance if a context must be managed, it is in the Model.
Parameters (1)model
Returns the Model which can be used for context.
- NextMappedWithAttribute(name: string, num0: number): number
In the list of mapped items (between 1 and NbMapped), searches for the first mapped item which follows <num0> (not included) and which has an attribute named <name> The considered Attributes are those brought by Finders,i.e. by Input data. While NextItemWithAttribute works on Result data (Binders).
Hence, allows such an iteration
for (num = FP->NextMappedWithAttribute(name,0); num > 0; num = FP->NextMappedWithAttribute(name,num) { .. process mapped item <num> }Parameters (2)namenum0
Returns a TransientMapper for a given Transient Object Either <obj> is already mapped, then its Mapper is returned Or it is not, then a new one is created then returned, BUT it is not mapped here (use Bind or FindElseBind to do this).
Parameters (1)obj
Transfer_FindHasher
FindHasher defines HashCode for Finder, which is : ask a Finder its HashCode! Because this is the Finder itself which brings the HashCode for its Key.
This class complies to the template given in TCollection by MapHasher itself
Constructors(1)
Transfer_IteratorOfProcessForFinder
Constructors(1)
- constructor(withstarts: boolean): Transfer_IteratorOfProcessForFinder
Creates an empty
Iteratorif withstarts is True, each Binder to be iterated will be associated to its corresponding Starting Object.Parameters (1)withstarts
Instance methods(5)
- Add(binder: Transfer_Binder): void
Adds a Binder to the iteration list (construction) with no corresponding Starting Object (note that Result is brought by Binder).
Parameters (1)binder
- Add(binder: Transfer_Binder, start: Transfer_Finder): void
Adds a Binder to the iteration list, associated with its corresponding Starting Object "start" Starting Object is ignored if not required at Creation time.
Parameters (2)binderstart
- Filter(list: NCollection_HSequence_handle_Transfer_Finder, keep?: boolean): void
After having added all items, keeps or rejects items which are attached to starting data given by <only> <keep> = True (D) : keeps. <keep> = False : rejects Does nothing if <withstarts> was False.
Parameters (2)listkeep
- HasStarting(): boolean
Returns True if Starting Object is available (defined at Creation Time).
Returns corresponding Starting Object.
Transfer_IteratorOfProcessForTransient
Constructors(1)
- constructor(withstarts: boolean): Transfer_IteratorOfProcessForTransient
Creates an empty
Iteratorif withstarts is True, each Binder to be iterated will be associated to its corresponding Starting Object.Parameters (1)withstarts
Instance methods(5)
- Add(binder: Transfer_Binder): void
Adds a Binder to the iteration list (construction) with no corresponding Starting Object (note that Result is brought by Binder).
Parameters (1)binder
- Add(binder: Transfer_Binder, start: Standard_Transient): void
Adds a Binder to the iteration list, associated with its corresponding Starting Object "start" Starting Object is ignored if not required at Creation time.
Parameters (2)binderstart
- Filter(list: NCollection_HSequence_handle_Standard_Transient, keep?: boolean): void
After having added all items, keeps or rejects items which are attached to starting data given by <only> <keep> = True (D) : keeps. <keep> = False : rejects Does nothing if <withstarts> was False.
Parameters (2)listkeep
- HasStarting(): boolean
Returns True if Starting Object is available (defined at Creation Time).
Returns corresponding Starting Object.
Transfer_MapContainer
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(3)
- SetMapObjects(theMapObjects: NCollection_DataMap_handle_Standard_Transient_handle_Standard_Transient): void
Set map already translated geometry objects.
Parameters (1)theMapObjects—Mutated in place; read the updated value from this argument after the call.
Get map already translated geometry objects.
Transfer_MultipleBinder
Allows direct binding between a starting Object and the Result of its transfer, when it can be made of several Transient Objects. Compared to a Transcriptor, it has no Transfer Action.
Result is a list of Transient Results. Unique Result is not available : SetResult is redefined to start the list on the first call, and refuse the other times.
rr
Remark : MultipleBinder itself is intended to be created and filled by TransferProcess itself (method Bind). In particular, conflicts between Unique (Standard) result and Multiple result are avoided through management made by TransferProcess.
Also, a Transcriptor (with an effective Transfer Method) which can produce a Multiple Result, may be defined as a sub-class of MultipleBinder by redefining method Transfer.
Constructors(1)
normal standard constructor, creates an empty MultipleBinder
Static methods(2)
- get_type_name(): string
Instance methods(10)
- IsMultiple(): boolean
Returns True if a starting object is bound with SEVERAL results : Here, returns always True.
Returns the Type permitted for Results, i.e. here Transient.
- ResultTypeName(): string
Returns the Name of the Type which characterizes the Result Here, returns "(list)".
- AddResult(res: Standard_Transient): void
Adds a new Item to the Multiple Result.
Parameters (1)res
- AddResult(next: Transfer_Binder): void
Adds a new Item to the Multiple Result.
Parameters (1)next
- NbResults(): number
Returns the actual count of recorded (Transient) results.
- ResultValue(num: number): Standard_Transient
Returns the value of the recorded result n0 <num>.
Parameters (1)num
Returns the Multiple Result, if it is defined (at least one Item). Else, returns a Null Handle.
- SetMultipleResult(mulres: NCollection_HSequence_handle_Standard_Transient): void
Defines a Binding with a Multiple Result, given as a Sequence Error if a Unique Result has yet been defined.
Parameters (1)mulres
Transfer_ProcessForFinder
Constructors(1)
- constructor(nb?: number): Transfer_ProcessForFinder
Sets TransferProcess at initial state. Gives an Initial size (indicative) for the Map when known (default is 10000). Sets default trace file as a printer and default trace level (see Message_TraceFile).
Parameters (1)nb
Static methods(2)
- get_type_name(): string
Instance methods(52)
- Clean(): void
Rebuilds the Map and the roots to really remove Unbound items Because Unbind keeps the entity in place, even if not bound Hence, working by checking new items is meaningless if a formerly unbound item is rebound.
- Resize(nb: number): void
Resizes the Map as required (if a new reliable value has been determined). Acts only if <nb> is greater than actual NbMapped.
Parameters (1)nb
- SetActor(actor: Transfer_ActorOfProcessForFinder): void
Defines an Actor, which is used for automatic Transfer If already defined, the new Actor is cumulated (see SetNext from Actor).
Parameters (1)actor
Returns the defined Actor. Returns a Null Handle if not set.
- Find(start: Transfer_Finder): Transfer_Binder
Returns the Binder which is linked with a starting Object It can either bring a Result (Transfer done) or none (for a pre-binding). If no Binder is linked with <start>, returns a Null Handle Considers a category number, by default 0.
Parameters (1)start
- IsBound(start: Transfer_Finder): boolean
Returns True if a Result (whatever its form) is Bound with a starting Object. I.e., if a Binder with a Result set, is linked with it Considers a category number, by default 0.
Parameters (1)start
- IsAlreadyUsed(start: Transfer_Finder): boolean
Returns True if the result of the transfer of an object is already used in other ones. If it is, Rebind cannot change it. Considers a category number, by default 0.
Parameters (1)start
- Bind(start: Transfer_Finder, binder: Transfer_Binder): void
Creates a Link a starting Object with a Binder. This Binder can either bring a Result (effective Binding) or none (it can be set later : pre-binding). Considers a category number, by default 0.
Parameters (2)startbinder
- Rebind(start: Transfer_Finder, binder: Transfer_Binder): void
Changes the Binder linked with a starting Object for its unitary transfer. This it can be useful when the exact form of the result is known once the transfer is widely engaged. This can be done only on first transfer. Considers a category number, by default 0.
Parameters (2)startbinder
- Unbind(start: Transfer_Finder): boolean
Removes the Binder linked with a starting object If this Binder brings a non-empty Check, it is replaced by a VoidBinder. Also removes from the list of Roots as required. Returns True if done, False if <start> was not bound Considers a category number, by default 0.
Parameters (1)start
- FindElseBind(start: Transfer_Finder): Transfer_Binder
Returns a Binder for a starting entity, as follows : Tries to Find the already bound one If none found, creates a VoidBinder and Binds it.
Parameters (1)start
- SetTraceLevel(tracelev: number): void
Sets trace level used for outputting messages: <trace> = 0 : no trace at all <trace> = 1 : handled exceptions and calls to AddError <trace> = 2 : also calls to AddWarning <trace> = 3 : also traces new Roots (uses method ErrorTrace). Default is 1 : Errors traced.
Parameters (1)tracelev
- TraceLevel(): number
Returns trace level used for outputting messages.
- SendFail(start: Transfer_Finder, amsg: Message_Msg): void
New name for AddFail (Msg).
Parameters (2)startamsg
- SendWarning(start: Transfer_Finder, amsg: Message_Msg): void
New name for AddWarning (Msg).
Parameters (2)startamsg
- SendMsg(start: Transfer_Finder, amsg: Message_Msg): void
Adds an information message Trace is filled if trace level is at least 3.
Parameters (2)startamsg
- AddFail(start: Transfer_Finder, mess: string, orig: string): void
Adds an Error message to a starting entity (to the check of its Binder of category 0, as a Fail).
Parameters (3)startmessorig
- AddFail(start: Transfer_Finder, amsg: Message_Msg): void
Adds an Error
Messageto a starting entity from the definition of a Msg (Original+Value).Parameters (2)startamsg
- AddError(start: Transfer_Finder, mess: string, orig?: string): void
(other name of AddFail, maintained for compatibility)
Parameters (3)startmessorig
- AddWarning(start: Transfer_Finder, mess: string, orig: string): void
Adds a Warning message to a starting entity (to the check of its Binder of category 0).
Parameters (3)startmessorig
- AddWarning(start: Transfer_Finder, amsg: Message_Msg): void
Adds a Warning
Messageto a starting entity from the definition of a Msg (Original+Value).Parameters (2)startamsg
- Mend(start: Transfer_Finder, pref?: string): voidParameters (2)
startpref
- Check(start: Transfer_Finder): Interface_Check
Returns the Check attached to a starting entity. If <start> is unknown, returns an empty Check Adds a case name to a starting entity Adds a case value to a starting entity Returns the complete case list for an entity. Null Handle if empty In the list of mapped items (between 1 and NbMapped), searches for the first item which follows <num0>(not included) and which has an attribute named <name> Attributes are brought by Binders Hence, allows such an iteration.
for (num = TP->NextItemWithAttribute(name,0); num > 0; num = TP->NextItemWithAttribute(name,num) { .. process mapped item <num> } Returns the type of an Attribute attached to binders If this name gives no Attribute, returns ParamVoid If this name gives several different types, returns ParamMisc Else, returns the effective type (ParamInteger, ParamReal, ParamIdent, or ParamText) Returns the list of recorded Attribute Names, as a Dictionary of Integer : each value gives the count of items which bring this attribute name By default, considers all the attribute names If <rootname> is given, considers only the attribute names which begin by <rootname>Parameters (1)start
- BindTransient(start: Transfer_Finder, res: Standard_Transient): void
Binds a starting object with a Transient Result. Uses a SimpleBinderOfTransient to work. If there is already one but with no Result set, sets its Result. Considers a category number, by default 0.
Parameters (2)startres
Returns the Result of the Transfer of an object <start> as a Transient Result. Returns a Null Handle if there is no Transient Result Considers a category number, by default 0 Warning : Supposes that Binding is done with a SimpleBinderOfTransient.
Parameters (1)start
- BindMultiple(start: Transfer_Finder): void
Prepares an object <start> to be bound with several results. If no Binder is yet attached to <obj>, a MultipleBinder is created, empty. If a Binder is already set, it must accept Multiple Binding. Considers a category number, by default 0.
Parameters (1)start
- AddMultiple(start: Transfer_Finder, res: Standard_Transient): void
Adds an item to a list of results bound to a starting object. Considers a category number, by default 0, for all results.
Parameters (2)startres
- FindTypedTransient(start: Transfer_Finder, atype: Standard_Type): { returnValue: boolean; val: Standard_Transient; [Symbol.dispose](): void }
Searches for a transient result attached to a starting object, according to its type, by criterium IsKind(atype).
In case of multiple result, explores the list and gives in <val> the first transient result IsKind(atype) Returns True and fills <val> if found Else, returns False (<val> is not touched, not even nullified)
This syntactic form avoids to do DownCast : if a result is found with the good type, it is loaded in <val> and can be immediately used, well initialisedParameters (2)startatype
ReturnsA result object with fields:
returnValue: the C++ return valueval: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- GetTypedTransient(binder: Transfer_Binder, atype: Standard_Type): { returnValue: boolean; val: Standard_Transient; [Symbol.dispose](): void }
Searches for a transient result recorded in a Binder, whatever this Binder is recorded or not in <me>.
This is strictly equivalent to the class method GetTypedResult from class SimpleBinderOfTransient, but is just lighter to call
Apart from this, works as FindTypedTransientParameters (2)binderatype
ReturnsA result object with fields:
returnValue: the C++ return valueval: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- NbMapped(): number
Returns the maximum possible value for Map Index (no result can be bound with a value greater than it).
- Mapped(num: number): Transfer_Finder
Returns the Starting Object bound to an Index,.
Parameters (1)num
- MapIndex(start: Transfer_Finder): number
Returns the Index value bound to a Starting Object, 0 if none.
Parameters (1)start
- MapItem(num: number): Transfer_Binder
Returns the Binder bound to an Index Considers a category number, by default 0.
Parameters (1)num
- SetRoot(start: Transfer_Finder): void
Declares <obj> (and its Result) as Root. This status will be later exploited by RootResult, see below (Result can be produced at any time).
Parameters (1)start
- SetRootManagement(stat: boolean): void
Enable (if <stat> True) or Disables (if <stat> False) Root Management. If it is set, Transfers are considered as stacked (a first Transfer commands other Transfers, and so on) and the Transfers commanded by an external caller are "Root". Remark : SetRoot can be called whatever this status, on every object. Default is set to True.
Parameters (1)stat
- NbRoots(): number
Returns the count of recorded Roots.
- Root(num: number): Transfer_Finder
Returns a Root Entity given its number in the list (1-NbRoots).
Parameters (1)num
- RootItem(num: number): Transfer_Binder
Returns the Binder bound with a Root Entity given its number Considers a category number, by default 0.
Parameters (1)num
- RootIndex(start: Transfer_Finder): number
Returns the index in the list of roots for a starting item, or 0 if it is not recorded as a root.
Parameters (1)start
- NestingLevel(): number
Returns Nesting Level of Transfers (managed by methods TranscriptWith & Co). Starts to zero. If no automatic Transfer is used, it remains to zero. Zero means Root Level.
- ResetNestingLevel(): void
Resets Nesting Level of Transfers to Zero (Root Level), whatever its current value.
- Recognize(start: Transfer_Finder): boolean
Tells if <start> has been recognized as good candidate for Transfer. i.e. queries the Actor and its Nexts.
Parameters (1)start
- Transferring(start: Transfer_Finder, theProgress?: Message_ProgressRange): Transfer_Binder
Performs the Transfer of a Starting Object, by calling the method TransferProduct (see below). Mapping and Roots are managed : nothing is done if a Result is already Bound, an exception is raised in case of error.
Parameters (2)starttheProgress
- Transfer(start: Transfer_Finder, theProgress?: Message_ProgressRange): boolean
Same as Transferring but does not return the Binder. Simply returns True in case of success (for user call).
Parameters (2)starttheProgress
- SetErrorHandle(err: boolean): void
Allows controls if exceptions will be handled Transfer Operations <err> False : they are not handled with try {} catch {} <err> True : they are Default is False: no handling performed.
Parameters (1)err
- ErrorHandle(): boolean
Returns error handling flag.
- StartTrace(binder: Transfer_Binder, start: Transfer_Finder, level: number, mode: number): void
Method called when trace is asked Calls PrintTrace to display information relevant for starting objects (which can be redefined) <level> is Nesting Level of Transfer (0 = root) <mode> controls the way the trace is done : 0 neutral, 1 for Error, 2 for Warning message, 3 for new Root.
Parameters (4)binderstartlevelmode
- IsLooping(alevel: number): boolean
Returns True if we are surely in a DeadLoop. Evaluation is not exact, it is a "majorant" which must be computed fast. This "majorant" is : <alevel> greater than NbMapped.
Parameters (1)alevel
- IsCheckListEmpty(start: Transfer_Finder, level: number, erronly: boolean): boolean
Returns True if no check message is attached to a starting object. <level> interpreted as by ResultOne If <erronly> is True, checks with Warnings only are ignored.
Parameters (3)startlevelerronly
- RemoveResult(start: Transfer_Finder, level: number, compute?: boolean): void
Removes Results attached to (== Unbinds) a given object and, according <level> : <level> = 0 : only it <level> = 1 : it plus its immediately owned sub-results(scope) <level> = 2 : it plus all its owned sub-results(scope).
Parameters (3)startlevelcompute
- CheckNum(start: Transfer_Finder): number
Computes a number to be associated to a starting object in a check or a check-list By default, returns 0; can be redefined.
Parameters (1)start
Transfer_ProcessForTransient
Manages Transfer of Transient Objects. Produces also ActorOfTransientProcess (deferred class), IteratorOfTransientProcess (for Results), TransferMapOfTransientProcess (internally used) Normally uses as TransientProcess, which adds some specifics.
Constructors(1)
- constructor(nb?: number): Transfer_ProcessForTransient
Sets TransferProcess at initial state. Gives an Initial size (indicative) for the Map when known (default is 10000). Sets default trace file as a printer and default trace level (see Message_TraceFile).
Parameters (1)nb
Static methods(2)
- get_type_name(): string
Instance methods(52)
- Clean(): void
Rebuilds the Map and the roots to really remove Unbound items Because Unbind keeps the entity in place, even if not bound Hence, working by checking new items is meaningless if a formerly unbound item is rebound.
- Resize(nb: number): void
Resizes the Map as required (if a new reliable value has been determined). Acts only if <nb> is greater than actual NbMapped.
Parameters (1)nb
- SetActor(actor: Transfer_ActorOfProcessForTransient): void
Defines an Actor, which is used for automatic Transfer If already defined, the new Actor is cumulated (see SetNext from Actor).
Parameters (1)actor
Returns the defined Actor. Returns a Null Handle if not set.
- Find(start: Standard_Transient): Transfer_Binder
Returns the Binder which is linked with a starting Object It can either bring a Result (Transfer done) or none (for a pre-binding). If no Binder is linked with <start>, returns a Null Handle Considers a category number, by default 0.
Parameters (1)start
- IsBound(start: Standard_Transient): boolean
Returns True if a Result (whatever its form) is Bound with a starting Object. I.e., if a Binder with a Result set, is linked with it Considers a category number, by default 0.
Parameters (1)start
- IsAlreadyUsed(start: Standard_Transient): boolean
Returns True if the result of the transfer of an object is already used in other ones. If it is, Rebind cannot change it. Considers a category number, by default 0.
Parameters (1)start
- Bind(start: Standard_Transient, binder: Transfer_Binder): void
Creates a Link a starting Object with a Binder. This Binder can either bring a Result (effective Binding) or none (it can be set later : pre-binding). Considers a category number, by default 0.
Parameters (2)startbinder
- Rebind(start: Standard_Transient, binder: Transfer_Binder): void
Changes the Binder linked with a starting Object for its unitary transfer. This it can be useful when the exact form of the result is known once the transfer is widely engaged. This can be done only on first transfer. Considers a category number, by default 0.
Parameters (2)startbinder
- Unbind(start: Standard_Transient): boolean
Removes the Binder linked with a starting object If this Binder brings a non-empty Check, it is replaced by a VoidBinder. Also removes from the list of Roots as required. Returns True if done, False if <start> was not bound Considers a category number, by default 0.
Parameters (1)start
Returns a Binder for a starting entity, as follows : Tries to Find the already bound one If none found, creates a VoidBinder and Binds it.
Parameters (1)start
- SetTraceLevel(tracelev: number): void
Sets trace level used for outputting messages: <trace> = 0 : no trace at all <trace> = 1 : handled exceptions and calls to AddError <trace> = 2 : also calls to AddWarning <trace> = 3 : also traces new Roots (uses method ErrorTrace). Default is 1 : Errors traced.
Parameters (1)tracelev
- TraceLevel(): number
Returns trace level used for outputting messages.
- SendFail(start: Standard_Transient, amsg: Message_Msg): void
New name for AddFail (Msg).
Parameters (2)startamsg
- SendWarning(start: Standard_Transient, amsg: Message_Msg): void
New name for AddWarning (Msg).
Parameters (2)startamsg
- SendMsg(start: Standard_Transient, amsg: Message_Msg): void
Adds an information message Trace is filled if trace level is at least 3.
Parameters (2)startamsg
- AddFail(start: Standard_Transient, mess: string, orig: string): void
Adds an Error message to a starting entity (to the check of its Binder of category 0, as a Fail).
Parameters (3)startmessorig
- AddFail(start: Standard_Transient, amsg: Message_Msg): void
Adds an Error
Messageto a starting entity from the definition of a Msg (Original+Value).Parameters (2)startamsg
- AddError(start: Standard_Transient, mess: string, orig?: string): void
(other name of AddFail, maintained for compatibility)
Parameters (3)startmessorig
- AddWarning(start: Standard_Transient, mess: string, orig: string): void
Adds a Warning message to a starting entity (to the check of its Binder of category 0).
Parameters (3)startmessorig
- AddWarning(start: Standard_Transient, amsg: Message_Msg): void
Adds a Warning
Messageto a starting entity from the definition of a Msg (Original+Value).Parameters (2)startamsg
- Mend(start: Standard_Transient, pref?: string): voidParameters (2)
startpref
- Check(start: Standard_Transient): Interface_Check
Returns the Check attached to a starting entity. If <start> is unknown, returns an empty Check Adds a case name to a starting entity Adds a case value to a starting entity Returns the complete case list for an entity. Null Handle if empty In the list of mapped items (between 1 and NbMapped), searches for the first item which follows <num0>(not included) and which has an attribute named <name> Attributes are brought by Binders Hence, allows such an iteration.
for (num = TP->NextItemWithAttribute(name,0); num > 0; num = TP->NextItemWithAttribute(name,num) { .. process mapped item <num> } Returns the type of an Attribute attached to binders If this name gives no Attribute, returns ParamVoid If this name gives several different types, returns ParamMisc Else, returns the effective type (ParamInteger, ParamReal, ParamIdent, or ParamText) Returns the list of recorded Attribute Names, as a Dictionary of Integer : each value gives the count of items which bring this attribute name By default, considers all the attribute names If <rootname> is given, considers only the attribute names which begin by <rootname>Parameters (1)start
- BindTransient(start: Standard_Transient, res: Standard_Transient): void
Binds a starting object with a Transient Result. Uses a SimpleBinderOfTransient to work. If there is already one but with no Result set, sets its Result. Considers a category number, by default 0.
Parameters (2)startres
Returns the Result of the Transfer of an object <start> as a Transient Result. Returns a Null Handle if there is no Transient Result Considers a category number, by default 0 Warning : Supposes that Binding is done with a SimpleBinderOfTransient.
Parameters (1)start
- BindMultiple(start: Standard_Transient): void
Prepares an object <start> to be bound with several results. If no Binder is yet attached to <obj>, a MultipleBinder is created, empty. If a Binder is already set, it must accept Multiple Binding. Considers a category number, by default 0.
Parameters (1)start
- AddMultiple(start: Standard_Transient, res: Standard_Transient): void
Adds an item to a list of results bound to a starting object. Considers a category number, by default 0, for all results.
Parameters (2)startres
- FindTypedTransient(start: Standard_Transient, atype: Standard_Type): { returnValue: boolean; val: Standard_Transient; [Symbol.dispose](): void }
Searches for a transient result attached to a starting object, according to its type, by criterium IsKind(atype).
In case of multiple result, explores the list and gives in <val> the first transient result IsKind(atype) Returns True and fills <val> if found Else, returns False (<val> is not touched, not even nullified)
This syntactic form avoids to do DownCast : if a result is found with the good type, it is loaded in <val> and can be immediately used, well initialisedParameters (2)startatype
ReturnsA result object with fields:
returnValue: the C++ return valueval: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- GetTypedTransient(binder: Transfer_Binder, atype: Standard_Type): { returnValue: boolean; val: Standard_Transient; [Symbol.dispose](): void }
Searches for a transient result recorded in a Binder, whatever this Binder is recorded or not in <me>.
This is strictly equivalent to the class method GetTypedResult from class SimpleBinderOfTransient, but is just lighter to call
Apart from this, works as FindTypedTransientParameters (2)binderatype
ReturnsA result object with fields:
returnValue: the C++ return valueval: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- NbMapped(): number
Returns the maximum possible value for Map Index (no result can be bound with a value greater than it).
- Mapped(num: number): Standard_Transient
Returns the Starting Object bound to an Index,.
Parameters (1)num
- MapIndex(start: Standard_Transient): number
Returns the Index value bound to a Starting Object, 0 if none.
Parameters (1)start
- MapItem(num: number): Transfer_Binder
Returns the Binder bound to an Index Considers a category number, by default 0.
Parameters (1)num
- SetRoot(start: Standard_Transient): void
Declares <obj> (and its Result) as Root. This status will be later exploited by RootResult, see below (Result can be produced at any time).
Parameters (1)start
- SetRootManagement(stat: boolean): void
Enable (if <stat> True) or Disables (if <stat> False) Root Management. If it is set, Transfers are considered as stacked (a first Transfer commands other Transfers, and so on) and the Transfers commanded by an external caller are "Root". Remark : SetRoot can be called whatever this status, on every object. Default is set to True.
Parameters (1)stat
- NbRoots(): number
Returns the count of recorded Roots.
- Root(num: number): Standard_Transient
Returns a Root Entity given its number in the list (1-NbRoots).
Parameters (1)num
- RootItem(num: number): Transfer_Binder
Returns the Binder bound with a Root Entity given its number Considers a category number, by default 0.
Parameters (1)num
- RootIndex(start: Standard_Transient): number
Returns the index in the list of roots for a starting item, or 0 if it is not recorded as a root.
Parameters (1)start
- NestingLevel(): number
Returns Nesting Level of Transfers (managed by methods TranscriptWith & Co). Starts to zero. If no automatic Transfer is used, it remains to zero. Zero means Root Level.
- ResetNestingLevel(): void
Resets Nesting Level of Transfers to Zero (Root Level), whatever its current value.
- Recognize(start: Standard_Transient): boolean
Tells if <start> has been recognized as good candidate for Transfer. i.e. queries the Actor and its Nexts.
Parameters (1)start
- Transferring(start: Standard_Transient, theProgress?: Message_ProgressRange): Transfer_Binder
Performs the Transfer of a Starting Object, by calling the method TransferProduct (see below). Mapping and Roots are managed : nothing is done if a Result is already Bound, an exception is raised in case of error.
Parameters (2)starttheProgress
- Transfer(start: Standard_Transient, theProgress?: Message_ProgressRange): boolean
Same as Transferring but does not return the Binder. Simply returns True in case of success (for user call).
Parameters (2)starttheProgress
- SetErrorHandle(err: boolean): void
Allows controls if exceptions will be handled Transfer Operations <err> False : they are not handled with try {} catch {} <err> True : they are Default is False: no handling performed.
Parameters (1)err
- ErrorHandle(): boolean
Returns error handling flag.
- StartTrace(binder: Transfer_Binder, start: Standard_Transient, level: number, mode: number): void
Method called when trace is asked Calls PrintTrace to display information relevant for starting objects (which can be redefined) <level> is Nesting Level of Transfer (0 = root) <mode> controls the way the trace is done : 0 neutral, 1 for Error, 2 for Warning message, 3 for new Root.
Parameters (4)binderstartlevelmode
- IsLooping(alevel: number): boolean
Returns True if we are surely in a DeadLoop. Evaluation is not exact, it is a "majorant" which must be computed fast. This "majorant" is : <alevel> greater than NbMapped.
Parameters (1)alevel
- IsCheckListEmpty(start: Standard_Transient, level: number, erronly: boolean): boolean
Returns True if no check message is attached to a starting object. <level> interpreted as by ResultOne If <erronly> is True, checks with Warnings only are ignored.
Parameters (3)startlevelerronly
- RemoveResult(start: Standard_Transient, level: number, compute?: boolean): void
Removes Results attached to (== Unbinds) a given object and, according <level> : <level> = 0 : only it <level> = 1 : it plus its immediately owned sub-results(scope) <level> = 2 : it plus all its owned sub-results(scope).
Parameters (3)startlevelcompute
- CheckNum(start: Standard_Transient): number
Computes a number to be associated to a starting object in a check or a check-list By default, returns 0; can be redefined.
Parameters (1)start
Transfer_ResultFromModel
ResultFromModel is used to store a final result stored in a TransientProcess, respectfully to its structuration in scopes by using a set of ResultFromTransient Hence, it can be regarded as a passive equivalent of the stored data in the TransientProcess, while an Iterator gives a flat view of it.
A ResultFromModel is intended to be attached to the transfer of one entity (typically root entity but it is not mandatory)
It is then possible to :
- Create and fill a ResultFromModel from a TransientProcess, by designating a starting entity
- Fill back the TransientProcess from a ResultFromModel, as it were filled by the operation which filled it the first time
Constructors(1)
Creates a ResultFromModel, empty.
Static methods(2)
- get_type_name(): string
Instance methods(19)
- SetModel(model: Interface_InterfaceModel): void
Sets starting Model.
Parameters (1)model
- SetFileName(filename: string): void
Sets starting File Name.
Parameters (1)filename
Returns starting Model (null if not set).
- FileName(): string
Returns starting File Name (empty if not set).
- Fill(TP: Transfer_TransientProcess, ent: Standard_Transient): boolean
Fills from a TransientProcess, with the result attached to a starting entity. Considers its Model if it is set. This action produces a structured set of ResultFromTransient, considering scopes, starting by that of <ent>. If <ent> has no recorded result, it remains empty Returns True if a result is recorded, False else.
Parameters (2)TPent
- Strip(mode: number): void
Clears some data attached to binders used by TransientProcess, which become useless once the transfer has been done, by calling Strip on its ResultFromTransient.
mode = 0 : minimum, clears data remaining from TransferProcess mode = 10 : just keeps file name, label, check status ..., and MainResult but only the result (Binder) mode = 11 : also clears MainResult (status and names remain)Parameters (1)mode
- FillBack(TP: Transfer_TransientProcess): void
Fills back a TransientProcess from the structured set of binders. Also sets the Model.
Parameters (1)TP
- HasResult(): boolean
Returns True if a Result is recorded.
Returns the main recorded ResultFromTransient, or a null.
- SetMainResult(amain: Transfer_ResultFromTransient): void
Sets a new value for the main recorded ResultFromTransient.
Parameters (1)amain
- MainLabel(): string
Returns the label in starting model attached to main entity (updated by Fill or SetMainResult, if Model is known).
- MainNumber(): number
Returns the label in starting model attached to main entity.
Searches for a key (starting entity) and returns its result Returns a null handle if not found.
Parameters (1)start
- Results(level: number): NCollection_HSequence_handle_Standard_Transient
Internal method which returns the list of ResultFromTransient, according level (2:complete; 1:sub-level 1; 0:main only).
Parameters (1)level
- TransferredList(level?: number): NCollection_HSequence_handle_Standard_Transient
Returns the list of recorded starting entities, ending by the root. Entities with check but no transfer result are ignored <level> = 2 (D), considers the complete list <level> = 1 considers the main result plus immediate subs <level> = 0 just the main result.
Parameters (1)level
- CheckedList(check: Interface_CheckStatus, result: boolean): NCollection_HSequence_handle_Standard_Transient
Returns the list of starting entities to which a check status is attached. <check> = -2 all entities whatever the check (see result) <check> = -1 entities with no fail (warning allowed) <check> = 0 entities with no check at all <check> = 1 entities with warning but no fail <check> = 2 entities with fail <result> : if True, only entities with an attached result Remark : result True and check=0 will give an empty list.
Parameters (2)checkresult
Returns the check status with corresponds to the content of this ResultFromModel; considers all levels of transfer (worst status). Returns CheckAny if not yet computed Reads it from recorded status if already computed, else recomputes one.
- ComputeCheckStatus(enforce: boolean): Interface_CheckStatus
Computes and records check status (see CheckStatus) Does not computes it if already done and <enforce> False.
Parameters (1)enforce
Transfer_ResultFromTransient
This class, in conjunction with ResultFromModel, allows to record the result of a transfer initially stored in a TransientProcess.
A ResultFromTransient records a couple (Transient,Binder for the result and checks) plus a list of "sub-results", which have been recorded in the TrabsientProcess, under scope attached to the starting transient.
Constructors(1)
Creates a ResultFromTransient, empty.
Static methods(2)
- get_type_name(): string
Instance methods(17)
- SetStart(start: Standard_Transient): void
Sets starting entity.
Parameters (1)start
- SetBinder(binder: Transfer_Binder): void
Sets Binder (for result plus individual check).
Parameters (1)binder
Returns the starting entity.
Returns the binder.
- HasResult(): boolean
Returns True if a result is recorded.
Returns the check (or an empty one if no binder).
Returns the check status.
- ClearSubs(): void
Clears the list of (immediate) sub-results.
- AddSubResult(sub: Transfer_ResultFromTransient): void
Adds a sub-result.
Parameters (1)sub
- NbSubResults(): number
Returns the count of recorded sub-results.
- SubResult(num: number): Transfer_ResultFromTransient
Returns a sub-result, given its rank.
Parameters (1)num
Returns the ResultFromTransient attached to a given starting entity (the key). Returns a null handle if not found.
Parameters (1)key
This method is used by ResultFromModel to collate the list of ResultFromTransient, avoiding duplications with a map Remark : <me> is already in the map and has not to be bound.
Parameters (1)map—Mutated in place; read the updated value from this argument after the call.
- Fill(TP: Transfer_TransientProcess): void
Fills from a TransientProcess, with the starting entity which must have been set before. It works with scopes, calls Fill on each of its sub-results.
Parameters (1)TP
- Strip(): void
Clears some data attached to binders used by TransientProcess, which become useless once the transfer has been done : the list of sub-scoped binders, which is now recorded as sub-results.
- FillBack(TP: Transfer_TransientProcess): void
Fills back a TransientProcess with definition of a ResultFromTransient, respectfully to its structuration in scopes.
Parameters (1)TP
Transfer_SimpleBinderOfTransient
An adapted instantiation of SimpleBinder for Transient Result, i.e. ResultType can be computed from the Result itself, instead of being static.
Constructors(1)
Creates an empty SimpleBinderOfTransient Returns True if a starting object is bound with SEVERAL results : Here, returns always False See Binder itself.
Static methods(3)
- GetTypedResult(bnd: Transfer_Binder, atype: Standard_Type): { returnValue: boolean; res: Standard_Transient; [Symbol.dispose](): void }
Returns a transient result according to its type (IsKind) i.e. the result itself if IsKind(atype), else searches in NextResult, until first found, then returns True If not found, returns False (res is NOT touched).
This syntactic form avoids to do DownCast : if a result is found with the good type, it is loaded in <res> and can be immediately used, well initialisedParameters (2)bndatype
ReturnsA result object with fields:
returnValue: the C++ return valueres: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- get_type_name(): string
Instance methods(5)
Returns the Effective (Dynamic) Type of the Result (
Standard_Transientif no Result is defined).- ResultTypeName(): string
Returns the Effective Name of (Dynamic) Type of the Result (void) if no result is defined.
- SetResult(res: Standard_Transient): void
Defines the Result.
Parameters (1)res
Returns the defined Result, if there is one.
Transfer_StatusExec
Properties(5)
Transfer_StatusResult
Properties(3)
Transfer_TransferDeadLoop
Constructors(2)
- constructor(theMessage: string): Transfer_TransferDeadLoopParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Transfer_TransferDeadLoopParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Transfer_TransferDispatch
A TransferDispatch is aimed to dispatch Entities between two Interface Models, by default by copying them, as CopyTool, but with more capabilities of adapting : Copy is redefined to firstly pass the hand to a TransferProcess. If this gives no result, standard Copy is called.
This allow, for instance, to modify the copied Entity (such as changing a Name for a VDA Entity), or to do a deeper work (such as Substituting a kind of Entity to another one).
For these reasons, TransferDispatch is basically a CopyTool, but uses a more sophiscated control, which is TransferProcess, and its method Copy is redefined
Constructors(3)
Same as above, but works with the Active Protocol.
Parameters (1)amodel
Creates a TransferDispatch from a Model. Works with a General Service Library, given as an Argument A TransferDispatch is created as a CopyTool in which the Control is set to TransientProcess.
Parameters (2)amodellib
- constructor(amodel: Interface_InterfaceModel, protocol: Interface_Protocol): Transfer_TransferDispatch
Same as above, but Library is defined through a Protocol.
Parameters (2)amodelprotocol
Instance methods(2)
Returns the content of Control Object, as a TransientProcess.
- Copy(entfrom: Standard_Transient, mapped: boolean, errstat: boolean): { returnValue: boolean; entto: Standard_Transient; [Symbol.dispose](): void }
Copies an Entity by calling the method Transferring from the TransferProcess. If this called produces a Null Binder, then the standard, inherited Copy is called.
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.
Transfer_TransferFailure
Constructors(2)
- constructor(theMessage: string): Transfer_TransferFailureParameters (1)
theMessage
- constructor(theMessage: string, theStackTrace: string): Transfer_TransferFailureParameters (2)
theMessagetheStackTrace
Instance methods(1)
- ExceptionType(): string
Transfer_TransferInput
A TransferInput is a Tool which fills an InterfaceModel with the result of the Transfer of CasCade Objects, once determined The Result comes from a TransferProcess, either from Transient (the Complete Result is considered, it must contain only Transient Objects).
Constructors(1)
Creates a TransferInput ready to use.
Instance methods(4)
- FillModel(proc: Transfer_TransientProcess, amodel: Interface_InterfaceModel): void
Fills an InterfaceModel with the Complete Result of a Transfer stored in a TransientProcess (Starting Objects are Transient) The complete result is exactly added to the model.
Parameters (2)procamodel
- FillModel(proc: Transfer_FinderProcess, amodel: Interface_InterfaceModel): void
Fills an InterfaceModel with the Complete Result of a Transfer stored in a TransientProcess (Starting Objects are Transient) The complete result is exactly added to the model.
Parameters (2)procamodel
- FillModel(proc: Transfer_TransientProcess, amodel: Interface_InterfaceModel, proto: Interface_Protocol, roots: boolean): void
Fills an InterfaceModel with results of the Transfer recorded in a TransientProcess (Starting Objects are Transient) : Root Result if <roots> is True (Default), Complete Result else The entities added to the model are determined from the result by by adding the referenced entities.
Parameters (4)procamodelprotoroots
- FillModel(proc: Transfer_FinderProcess, amodel: Interface_InterfaceModel, proto: Interface_Protocol, roots: boolean): void
Fills an InterfaceModel with results of the Transfer recorded in a TransientProcess (Starting Objects are Transient) : Root Result if <roots> is True (Default), Complete Result else The entities added to the model are determined from the result by by adding the referenced entities.
Parameters (4)procamodelprotoroots
Transfer_TransferIterator
Defines an Iterator on the result of a Transfer Available for Normal Results or not (Erroneous Transfer) It gives several kinds of Information, and allows to consider various criteria (criteria are cumulative).
Constructors(1)
Creates an empty
Iterator.
Instance methods(19)
- AddItem(atr: Transfer_Binder): void
Adds a Binder to the iteration list (construction).
Parameters (1)atr
- SelectBinder(atype: Standard_Type, keep: boolean): void
Selects Items on the Type of Binder : keep only Binders which are of a given Type (if keep is True) or reject only them (if keep is False).
Parameters (2)atypekeep
- SelectResult(atype: Standard_Type, keep: boolean): void
Selects Items on the Type of Result. Considers only Unique Results. Considers Dynamic Type for Transient Result, Static Type (the one given to define the Binder) else.
Results which are of a given Type (if keep is True) or reject only them (if keep is False)Parameters (2)atypekeep
- SelectUnique(keep: boolean): void
Select Items according Unicity : keep only Unique Results (if keep is True) or keep only Multiple Results (if keep is False).
Parameters (1)keep
- SelectItem(num: number, keep: boolean): void
Selects/Unselect (according to <keep> an item designated by its rank <num> in the list Used by sub-classes which have specific criteria.
Parameters (2)numkeep
- Number(): number
Returns count of Binders to be iterated.
- Start(): void
Clears Iteration in progress, to allow it to be restarted.
- More(): boolean
Returns True if there are other Items to iterate.
- Next(): void
Sets Iteration to the next Item.
Returns the current Binder.
- HasResult(): boolean
Returns True if current Item brings a Result, Transient (Handle) or not or Multiple. That is to say, if it corresponds to a normally achieved Transfer, Transient Result is read by specific TransientResult below. Other kind of Result must be read specifically from its Binder.
- HasUniqueResult(): boolean
Returns True if Current Item has a Unique Result.
Returns the Type of the Result of the current Item, if Unique. If No Unique Result (Error Transfer or Multiple Result), returns a Null Handle The Type is : the Dynamic Type for a Transient Result, the Type defined by the Binder Class else.
- HasTransientResult(): boolean
Returns True if the current Item has a Transient Unique Result (if yes, use TransientResult to get it).
Returns the Transient Result of the current Item if there is (else, returns a null Handle) Supposes that Binding is done by a SimpleBinderOfTransient.
Returns Execution Status of current Binder Normal transfer corresponds to StatusDone.
- HasFails(): boolean
Returns True if Fail Messages are recorded with the current Binder. They can then be read through Check (see below).
- HasWarnings(): boolean
Returns True if Warning Messages are recorded with the current Binder. They can then be read through Check (see below).
Returns Check associated to current Binder (in case of error, it brings Fail messages) (in case of warnings, it brings Warning messages).
Transfer_TransferOutput
A TransferOutput is a Tool which manages the transfer of entities created by an Interface, stored in an InterfaceModel, into a set of Objects suitable for an Application Objects to be transferred are given, by method Transfer (which calls Transfer from TransientProcess) A default action is available to get all roots of the Model Result is given as a TransferIterator (see TransferProcess) Also, it is possible to pilot directly the TransientProcess.
Constructors(2)
- constructor(actor: Transfer_ActorOfTransientProcess, amodel: Interface_InterfaceModel): Transfer_TransferOutput
Creates a TransferOutput ready to use, with a TransientProcess.
Parameters (2)actoramodel
- constructor(proc: Transfer_TransientProcess, amodel: Interface_InterfaceModel): Transfer_TransferOutput
Creates a TransferOutput from an already existing TransientProcess, and a Model Returns (by Reference, hence can be changed) the Mode for Scope Management. False (D) means Scope is ignored. True means that each individual Transfer (direct or through TransferRoots) is regarded as one Scope.
Parameters (2)procamodel
Instance methods(5)
Returns the TransientProcess used to work.
- Transfer(obj: Standard_Transient, theProgress?: Message_ProgressRange): void
Transfer checks that all taken Entities come from the same Model, then calls Transfer from TransientProcess.
Parameters (2)objtheProgress
- TransferRoots(protocol: Interface_Protocol, theProgress: Message_ProgressRange): void
Runs transfer on the roots of the Interface Model The Roots are computed with a ShareFlags created from a Protocol given as Argument.
Parameters (2)protocoltheProgress
- TransferRoots(theProgress: Message_ProgressRange): void
Runs transfer on the roots of the Interface Model Remark : the Roots are computed with a ShareFlags created from the Active Protocol.
Parameters (1)theProgress
- ModelForStatus(protocol: Interface_Protocol, normal: boolean, roots?: boolean): Interface_InterfaceModel
Fills a Model with the list determined by ListForStatus This model starts from scratch (made by NewEmptyModel from the current Model), then is filled by AddWithRefs.
Useful to get separately from a transfer, the entities which have caused problem, in order to furtherly analyse them (with normal = False), or the "good" entities, to obtain a data set "which works well" (with normal = True)Parameters (3)protocolnormalroots
Transfer_TransientListBinder
This binder binds several (a list of) Transients with a starting entity, when this entity itself corresponds to a simple list of Transients. Each part is not seen as a sub-result of an independent component, but as an item of a built-in list.
Constructors(2)
- Parameters (1)
list
Static methods(2)
- get_type_name(): string
Instance methods(10)
- IsMultiple(): boolean
Returns True if a Binder has several results, either by itself or because it has next results Can be defined by sub-classes.
Returns the Type which characterizes the Result (if known).
- ResultTypeName(): string
Returns the Name of the Type which characterizes the Result Can be returned even if ResultType itself is unknown.
- AddResult(res: Standard_Transient): void
Adds an item to the result list.
Parameters (1)res
- AddResult(next: Transfer_Binder): void
Adds an item to the result list.
Parameters (1)next
- SetResult(num: number, res: Standard_Transient): void
Changes an already defined sub-result.
Parameters (2)numres
- NbTransients(): number
- Transient(num: number): Standard_TransientParameters (1)
num
Transfer_TransientMapper
Constructors(1)
Creates a Mapper with a Value. This Value can then not be changed. It is used by the Hasher to compute the HashCode, which will then be stored for an immediate reading.
Parameters (1)akey
Static methods(2)
- get_type_name(): string
Instance methods(5)
Returns the contained value.
- Equates(other: Transfer_Finder): boolean
Specific testof equality : defined as False if <other> has not the same true Type, else contents are compared (by C++ operator ==).
Parameters (1)other
Returns the Type of the Value. By default, returns the DynamicType of <me>, but can be redefined.
- ValueTypeName(): string
Returns the name of the Type of the Value. Default is name of ValueType, unless it is for a non-handled object.
Transfer_TransientProcess
Adds specific features to the generic definition : TransientProcess is intended to work from an InterfaceModel to a set of application objects.
Hence, some information about starting entities can be gotten from the model : for Trace, CheckList, Integrity Status
Constructors(1)
- constructor(nb?: number): Transfer_TransientProcess
Sets TransientProcess at initial state, with an initial size.
Parameters (1)nb
Static methods(2)
- get_type_name(): string
Instance methods(10)
Returns the Model used for StartTrace.
- HasGraph(): boolean
- SetContext(name: string, ctx: Standard_Transient): void
Sets a Context : according to receiving appli, to be interpreted by the Actor.
Parameters (2)namectx
- GetContext(name: string, type_: Standard_Type): { returnValue: boolean; ctx: Standard_Transient; [Symbol.dispose](): void }
Returns the Context attached to a name, if set and if it is Kind of the type, else a Null Handle Returns True if OK, False if no Context.
Parameters (2)nametype_
ReturnsA result object with fields:
returnValue: the C++ return valuectx: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
Returns (modifiable) the whole definition of Context Rather for internal use (ex.: preparing and setting in once).
- CheckNum(start: Standard_Transient): number
Specific number of a starting object for check-list : Number in model.
Parameters (1)start
- IsDataLoaded(ent: Standard_Transient): boolean
Tells if an entity is well loaded from file (even if its data fail on checking, they are present). Mostly often, answers True. Else, there was a syntactic error in the file. A non-loaded entity MAY NOT BE transferred, unless its Report (in the model) is interpreted.
Parameters (1)ent
- IsDataFail(ent: Standard_Transient): boolean
Tells if an entity fails on data checking (load time, syntactic, or semantic check). Normally, should answer False. It is not prudent to try transferring an entity which fails on data checking.
Parameters (1)ent
Transfer_UndefMode
Properties(4)
Transfer_VoidBinder
a VoidBinder is used to bind a starting item with a status, error or warning messages, but no result It is interpreted by TransferProcess, which admits a VoidBinder to be over-written, and copies its check to the new Binder
Constructors(1)
a VoidBinder is not Multiple (Remark : it is not Simple too) But it can bring next results ...
Static methods(2)
- get_type_name(): string
Instance methods(3)
while a VoidBinder admits no Result, its ResultType returns the type of <me>
- ResultTypeName(): string
Returns "(void)".