Function
NumCosmoMathMSetmodel_register_id
Declaration [src]
void
ncm_mset_model_register_id (
NcmModelClass* model_class,
const gchar* ns,
const gchar* desc,
const gchar* long_desc,
gboolean can_stack,
NcmModelID main_model_id
)
Description [src]
Register a model class in the NcmMSet. This function must be used once and only
once in the model class definition. Any subclasse of the model class will inherit
the model id. The same compilation unit must call the macro
NCM_MSET_MODEL_REGISTER_ID() for each model class that will be used in the NcmMSet.
It should also include NCM_MSET_MODEL_DECLARE_ID() in the header file.
If can_stack is TRUE, the models can stack in a NcmMSet. If can_stack is FALSE,
the NcmMSet can contain only one instance of the model class or any of its subclasses.
If main_model_id is NCM_MSET_MODEL_MAIN(), this is a main model. If main_model_id
is not NCM_MSET_MODEL_MAIN(), this must be the id of the main model. This is used
to define an hierarchy of models. For example, the model class NcHIPrim is a
submodel of NcHICosmo. The main model of NcHIPrim is NcHICosmo. Thus, each
instance of NcHICosmo can contain one instance of NcHIPrim.
This function is not directly available to language bindings.
Parameters
model_class-
Type:
NcmModelClassA
NcmModelClass.The data is owned by the caller of the function. ns-
Type:
const gchar*Model namespace.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. desc-
Type:
const gchar*Short description.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. long_desc-
Type:
const gchar*Long description.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. can_stack-
Type:
gbooleanWhether the models can stack in a
NcmMSet. main_model_id-
Type:
NcmModelIDMain model id, use -1 if this is a main model.