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.

Ancestors

Constructors

ncm_model_ctrl_new

Creates a NcmModelCtrl recording the state of model, or empty when model is NULL.

Functions

ncm_model_ctrl_clear

If ctrl is not NULL, decrements its reference count and sets ctrl to NULL.

Instance methods

ncm_model_ctrl_force_update

Empties ctrl, so the next ncm_model_ctrl_update() reports a change.

ncm_model_ctrl_free

Decreases the reference count of ctrl. If the reference count reaches zero, ctrl is freed.

ncm_model_ctrl_get_model
No description available.

ncm_model_ctrl_model_has_submodel

Aborts when ctrl is empty.

ncm_model_ctrl_model_last_update
No description available.

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.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

NumCosmoMath.ModelCtrl:model

The model whose state is recorded, held through a weak reference.

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.

Class structure

struct NumCosmoMathModelCtrlClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.