ModelString

ModelString — a ModelObject containing a string

Description

ModelString is a simple ModelObject subclass containing an immutable non-NULL string.

Details

ModelString

typedef struct _ModelString ModelString;

This is an opaque structure; it may not be accessed directly.


model_string_get ()

gchar *             model_string_get                    (ModelString *object);

Gets the string value of object.

It is appropriate for the caller to call g_free() on the return value.

object :

a ModelString

Returns :

the string value of object, owned by the caller

model_string_peek ()

const gchar *       model_string_peek                   (ModelString *object);

Peeks the string value of object. The result is owned by object and must not be modified or freed.

object :

a ModelString

Returns :

the string value of object, owned by object

model_string_new ()

ModelObject *       model_string_new                    (const gchar *value);

Creates a ModelString, containing value.

This function should only be called by model implementations.

value :

a string, non-NULL

Returns :

a new ModelObject