Class
NumCosmoMathModelCtrl
Description [src]
final class NumCosmoMath.ModelCtrl : GObject.Object
{
/* No available fields */
}
Records the state of a NcmModel, so a calculation that depends on it can tell
whether it changed.
The state is the model object, held through a weak reference, and its parameter key
(ncm_model_state_get_pkey()); each submodel is recorded by its own NcmModelCtrl.
ncm_model_ctrl_update() compares the recorded state with a model and records the
model’s; ncm_model_ctrl_model_last_update() and
ncm_model_ctrl_submodel_last_update() then tell which parts changed. A different
object, or a submodel object seen for the first time, counts as changed.
Constructors
ncm_model_ctrl_new
Creates a NcmModelCtrl recording the state of model, or empty when model is
NULL.
Instance methods
ncm_model_ctrl_free
Decreases the reference count of ctrl. If the reference count
reaches zero, ctrl is freed.
ncm_model_ctrl_model_update
Same as ncm_model_ctrl_update(), comparing only the objects and not the pkeys.
ncm_model_ctrl_set_model
Records the state of model, with its submodels, without setting the flags of
ncm_model_ctrl_model_last_update() and ncm_model_ctrl_submodel_last_update().
ncm_model_ctrl_submodel_last_update
Aborts when ctrl is empty, when the recorded model has no submodel mid, and when
no update recorded it.
ncm_model_ctrl_update
Compares the state recorded in ctrl with model and records the state of model.
The model changed when it is another object or its pkey differs, and each submodel
likewise; a submodel without a recorded state also counts as changed.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.