cellml_context::ModelNodeMonitor Interface Reference

cellml_context::ModelNodeMonitor Interface Reference

A monitor for changes to model nodes. More...

Inheritance diagram for cellml_context::ModelNodeMonitor:
Collaboration diagram for cellml_context::ModelNodeMonitor:

Public Member Functions

void modelRenamed (in ModelNode renamedNode, in wstring newName)
 Called whenever the model is renamed.
void modelReplaced (in ModelNode changedNode, in cellml_api::Model newModel)
 Called whenever the model associated with a node gets replaced (this usually happens following reserialisation from XML).
void changesFlushed (in ModelNode changedNode)
 Called whenever a caller has requested that all changes to a model be flushed (usually because the caller will be making changes to the model and replacing changes).
void ownerChanged (in ModelNode changedNode, in XPCOM::IObject newOwner)
 Called when the owner is to be changed.
void modelFrozenStateChanged (in ModelNode changedNode, in boolean newState)
 Called whenever the frozen state of a model is toggled.
- Public Member Functions inherited from XPCOM::IObject
void add_ref ()
 Called to indicate that some code is keeping an owning reference to the object.
oneway void release_ref ()
 Removes a reference to an object which was created by some other means (e.g.
IObject query_interface (in utf8string id)
 Returns an IObject of the same implementation, which supports a specific interface.

Additional Inherited Members

- Public Attributes inherited from XPCOM::IObject
readonly attribute string objid
 Fetches the ID of the object.

Detailed Description

A monitor for changes to model nodes.

Definition at line 216 of file CellML_Context.idl.

Member Function Documentation

void cellml_context::ModelNodeMonitor::changesFlushed ( in ModelNode  changedNode)

Called whenever a caller has requested that all changes to a model be flushed (usually because the caller will be making changes to the model and replacing changes).

Callers should save any changes back to the model before returning as modelReplaced may occur soon.

Parameters
changedNodeThe node which was changed.
void cellml_context::ModelNodeMonitor::modelFrozenStateChanged ( in ModelNode  changedNode,
in boolean  newState 
)

Called whenever the frozen state of a model is toggled.

Parameters
changedNodeThe node on which the frozen state has changed.
newStateThe new frozen state of the model.
void cellml_context::ModelNodeMonitor::modelRenamed ( in ModelNode  renamedNode,
in wstring  newName 
)

Called whenever the model is renamed.

These events go out after the request to rename has been made, but before the name change actually takes effect.

Parameters
renamedNodeThe node which was renamed. Fetching name from the node will return the old name until after modelRenamed has returned.
newNameThe new name of the model.
void cellml_context::ModelNodeMonitor::modelReplaced ( in ModelNode  changedNode,
in cellml_api::Model  newModel 
)

Called whenever the model associated with a node gets replaced (this usually happens following reserialisation from XML).

Parameters
changedNodeThe node which was changed.
newModelThe new model.
void cellml_context::ModelNodeMonitor::ownerChanged ( in ModelNode  changedNode,
in XPCOM::IObject  newOwner 
)

Called when the owner is to be changed.

The current owner can use this notification to flush any changes back into the model.