| Data Model API (libmodel) | ||||
|---|---|---|---|---|
| Top | Description | ||||
ModelSimpleReferenceModelSimpleReference — a very simple implementation of ModelReference |
ModelSimpleReference;
ModelSimpleReference * model_simple_reference_new (ModelObject *value);
void model_simple_reference_set (ModelSimpleReference *simple,
ModelObject *value);
ModelSimpleReference * model_simple_reference_new_string
(const gchar *value);
ModelSimpleReference * model_simple_reference_new_integer
(gint value);
ModelSimpleReference * model_simple_reference_new_float (gdouble value);
ModelSimpleReference * model_simple_reference_new_boolean
(gboolean value);
void model_simple_reference_set_string (ModelSimpleReference *simple,
const gchar *value);
void model_simple_reference_set_integer (ModelSimpleReference *simple,
gint value);
void model_simple_reference_set_float (ModelSimpleReference *simple,
gdouble value);
void model_simple_reference_set_boolean (ModelSimpleReference *simple,
gboolean value);
ModelSimpleReference is a ModelReference implementation. It stores
a ModelObject as the value of the reference.
model_simple_reference_set() can be used to change the value of the
reference, and when the value is changed, the "changed" signal is
emitted.
The core API of ModelSimpleReference consists of
model_simple_reference_new() and model_simple_reference_set().
Additionally, there are helper functions to set and construct from
one of the basic value types without requiring the manual
construction of a corresponding ModelObject instance.
typedef struct _ModelSimpleReference ModelSimpleReference;
This is an opaque structure; it may not be accessed directly.
ModelSimpleReference * model_simple_reference_new (ModelObject *value);
Creates a ModelSimpleReference, using value as the initial value.
|
a ModelObject to use as the initial value, or NULL
|
|
a new ModelSimpleReference |
void model_simple_reference_set (ModelSimpleReference *simple, ModelObject *value);
Changes the value held by simple to value and emits the "changed"
signal.
|
a ModelSimpleReference |
|
the ModelObject to use as the new value, or NULL
|
ModelSimpleReference * model_simple_reference_new_string (const gchar *value);
Creates a new ModelSimpleReference holding a string.
This is a convenience wrapper around model_simple_reference_new() and
model_string_new().
|
a string |
|
a new ModelSimpleReference |
ModelSimpleReference * model_simple_reference_new_integer (gint value);
Creates a new ModelSimpleReference holding an integer.
This is a convenience wrapper around model_simple_reference_new() and
model_integer_new().
|
an integer |
|
a new ModelSimpleReference |
ModelSimpleReference * model_simple_reference_new_float (gdouble value);
Creates a new ModelSimpleReference holding a floating point value.
This is a convenience wrapper around model_simple_reference_new() and
model_float_new().
|
a double precision floating point value |
|
a new ModelSimpleReference |
ModelSimpleReference * model_simple_reference_new_boolean (gboolean value);
Creates a new ModelSimpleReference holding a boolean value.
This is a convenience wrapper around model_simple_reference_new() and
model_boolean_new().
|
a boolean value |
|
a new ModelSimpleReference |
void model_simple_reference_set_string (ModelSimpleReference *simple, const gchar *value);
Updates the value of simple to the given string.
This is a convenience wrapper around model_simple_reference_set() and
model_string_new().
|
a ModelSimpleReference |
|
a string |
void model_simple_reference_set_integer (ModelSimpleReference *simple, gint value);
Updates the value of simple to the given integer.
This is a convenience wrapper around model_simple_reference_set() and
model_integer_new().
|
a ModelSimpleReference |
|
an integer |
void model_simple_reference_set_float (ModelSimpleReference *simple, gdouble value);
Updates the value of simple to the given floating point value.
This is a convenience wrapper around model_simple_reference_set() and
model_float_new().
|
a ModelSimpleReference |
|
a double precision floating point value |
void model_simple_reference_set_boolean (ModelSimpleReference *simple, gboolean value);
Updates the value of simple to the given boolean value.
This is a convenience wrapper around model_simple_reference_set() and
model_boolean_new().
|
a ModelSimpleReference |
|
a boolean value |