CellML API
cellml_services::CustomCodeInformation Interface Reference


Public Member Functions | |
ComputationTargetIterator | iterateTargets () |
Iterates through all computation targets. | |
![]() | |
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. | |
![]() | |
readonly attribute string | objid |
Fetches the ID of the object. |
Detailed Description
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).
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.
readonly attribute wstring cellml_services::CustomCodeInformation::generatedCode |
readonly attribute unsigned long cellml_services::CustomCodeInformation::indexCount |