Adds a listener to an event type.
When an event of the type pType fires, the callback pListener will be called. This function
returns a unique string id that may be used in removeEventListenerById to allow simple
listener removal.
It is possible to add an object that will be included in the callback to avoid creating too many closures.
Calling twice addEventListener with the same parameters results in the second call to be ignored,
only unique pairs callback / object are allowed, in order to avoid calling multiple times the same
thing.
The id of the inserted callback (actually an UUID).
Adds a listener to an event type.
When an event of the type pType fires, the callback pListener will be called. This function
returns a unique string id that may be used in removeEventListenerById to allow simple
listener removal.
The id of the inserted callback (actually an UUID).
Asynchronously gets matrices.
Returns a promise that will be resolved with the reason, and the eventual result when the fetch request is finished or cancelled.
A promise. The promise is resolved with the reason (success, cancelled, disposed, bad input). In case of success, the promise contains the
requested Array
Cancels the computation of the fetch retrieval (if any).
A PartInstanceMatrixGetterInterfaceSignal.MatrixFetchCancelled signal is emitted if the PartInstanceMatrixGetterInterface is retrieving data.
true if the PartInstanceMatrixGetterInterface was running, else false.
Gets rid of this object.
After this call, this object can no longer be used.
If the object is an InfiniteObjectDispatcherInterface, then the InfiniteObjectDispatcherInterfaceSignal.ObjectDisposed signal is emitted.
Further uses of the object (with the exception of isDisposed, getInfiniteObjectType and application id retrieval) will log a message with LogLevel.LL_UsingDisposedObject.
Triggers (an) matrices retrieval request(s).
An event PartInstanceMatrixGetterInterfaceSignal.MatrixFetchReady is fired when the fetch procedure is finished, then getLastError() tells if the retrieval was correctly performed.
Returns true if the matrices fetch procedure is started. If not, just call getLastError to get the reason why the procedure failed.
true if the PartInstanceMatrixGetterInterface has begun running.
Tells the type of the given interface.
The type of the given interface.
Gets the last error returned by the matrix retrieval procedure.
The last error.
Each call to fetchMatrices is assigned a request id.
This call tels the id of the last call to fetchMatrices.
The id of the last call to fetchMatrices.
Gets the list of all matrices from the last call to the fetchMatrices function.
An array of PartInstanceMatrixResultInterface is returned if the PartInstanceMatrixGetterInterface has finished computing. Use addEventListener on the event PartInstanceMatrixGetterInterfaceSignal.MatrixFetchReady to know when the PartInstanceMatrixGetterInterface is ready.
The result is of the size of the array of part instances that was used in the fetchMatrices call.
DO NOT modify this data in place, this results in undefined behavior.
Tells if the EventDispatcher has such a callback registered for the given event type.
true if such a listener is installed for the given type of event.
Tells if a matrix retrieval procedure has been cancelled.
This is generally the case after calling cancelFetch when the PartInstanceMatrixGetterInterface is performing a matrix retrieval procedure.
true if the matrix retrieval procedure is cancelled.
Tells if this object has been gotten rid off.
true if dispose has been called on this object.
Tells if a matrix retrieval procedure is running.
This is the case after calling fetchMatrices.
true if an matrix retrieval procedure request is running.
Removes a listener from an event type.
If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.
The listener function that gets removed.
The listener object that was used when addEventListener was called.
true if the callback was removed else false.
Removes a listener from an event type.
If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.
The listener function that gets removed.
true if the callback was removed else false.
Removes a listener by its id.
If no such listener is found, then the function returns false and does nothing. You must use the return value of addEventListener to actually remove the listener.
true if the callback was removed else false.
The PartInstanceMatrixGetterInterface interface is used to fetch matrices of part instances.
The PartInstanceMatrixGetterInterface interfaces are created through the DataSessionInterface.createPartInstanceMatrixGetter method.
The list of signals the PartInstanceMatrixGetterInterface may trigger is available in the PartInstanceMatrixGetterInterfaceSignal enumeration.
The matrix retrieval request is triggered through the fetchMatrices method. The result is not available right away, but the event PartInstanceMatrixGetterInterfaceSignal.MatrixFetchReady is triggered when the result of the PartInstanceMatrixGetterInterface is available. The result is available through the getMatricesResult function.
Warning : there may be cases when the getMatricesResult is not available such as when the PartInstanceMatrixGetterInterface is fetching data, i.e. when isRunning returns true, or when the PartInstanceMatrixGetterInterface has been cancelled, i.e. when isCancelled returns true.
An PartInstanceMatrixGetterInterface may be interrupted (cancelled) when the PartInstanceMatrixGetterInterface is running and cancelFetch is called. In such cases, the PartInstanceMatrixGetterInterfaceSignal.MatrixFetchCancelled signal is fired, and shortly after, PartInstanceMatrixGetterInterfaceSignal.MatrixFetchReady signal is fired, but getMatricesResult will return undefined. Just call fetchMatrices with another (or the same) array of part instances to trigger a new fetch request.
If you call multiple times fetchMatrices before receiving the PartInstanceMatrixGetterInterfaceSignal.MatrixFetchReady, only one PartInstanceMatrixGetterInterfaceSignal.MatrixFetchReady will be sent with the content of the last call to fetchMatrices.
Or with async calls :
Please make sure the destination browser supports promises before using async calls.
See