cellml_services::CustomCodeInformation Interface Reference

cellml_services::CustomCodeInformation Interface Reference
Inheritance diagram for cellml_services::CustomCodeInformation:
Collaboration diagram for cellml_services::CustomCodeInformation:

Public Member Functions

ComputationTargetIterator iterateTargets ()
 Iterates through all computation targets.
- 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.

Public Attributes

readonly attribute
ModelConstraintLevel 
constraintLevel
 The constraint level, describing whether or not the model is correctly constrained.
readonly attribute unsigned long indexCount
 The number of variables which were assigned indices in the variables array.
readonly attribute wstring generatedCode
 The actual generated code.
readonly attribute wstring functionsString
 A string containing any supplementary code which is needed to be used out-of-line by the above string.
- Public Attributes inherited from XPCOM::IObject
readonly attribute string objid
 Fetches the ID of the object.

Detailed Description

Definition at line 475 of file CCGS.idl.

Member Function Documentation

ComputationTargetIterator cellml_services::CustomCodeInformation::iterateTargets ( )

Iterates through all computation targets.

Several things to note:

  • The objects retrieved are copied and changed from those fetched from CustomGenerator - so they have different object IDs.
  • The ComputationTarget type is overloaded for a different purpose to those used in non-custom CodeGeneration. The type should be interpreted as follows: VARIABLE_OF_INTEGRATION => Target is independent (markAsKnown called). STATE_VARIABLE => Target was requested, and is available. PSEUDOSTATE_VARIABLE => Target was requested, but could not be computed from the independent variables + model. LOCALLY_BOUND => Target is locally bound in expressions only. ALGEBRAIC => Target is used as an intermediate. FLOATING => Every other target (i.e. unused, not requested).

Member Data Documentation

readonly attribute ModelConstraintLevel cellml_services::CustomCodeInformation::constraintLevel

The constraint level, describing whether or not the model is correctly constrained.

Note that improperly constrained models result in constraintLevel being set, rather than setting an errorMessage. Note: Depending on how you are using the custom code generator, an underconstrained result might be normal (especially if you are generating code in phases, and don't expect to solve for everything in one round).

Definition at line 487 of file CCGS.idl.

readonly attribute wstring cellml_services::CustomCodeInformation::functionsString

A string containing any supplementary code which is needed to be used out-of-line by the above string.

Whether or not supplementary code is used, and exactly what it means depends on the MAL file used with MaLaES, and the options set on the CodeGenerator. Typically, for C, it is used to define extra functions that are passed as arguments to functions being called from expressions.

Definition at line 527 of file CCGS.idl.

readonly attribute wstring cellml_services::CustomCodeInformation::generatedCode

The actual generated code.

It won't have any kind of wrapping around it such as function boilerplate - that is up to the user of the API.

Definition at line 517 of file CCGS.idl.

readonly attribute unsigned long cellml_services::CustomCodeInformation::indexCount

The number of variables which were assigned indices in the variables array.

There can be multiple entries for the same CellML variable - at most one for each degree of integration.

Definition at line 494 of file CCGS.idl.