NADataBoxed

NADataBoxed

Synopsis

#define             NA_DATA_BOXED_TYPE
typedef             NADataBoxedPrivate;
typedef             NADataBoxedClassPrivate;
                    NADataBoxed;
GParamSpec *        na_data_boxed_get_param_spec        (const NADataDef *def);
NADataBoxed *       na_data_boxed_new                   (const NADataDef *def);
NADataDef *         na_data_boxed_get_data_def          (const NADataBoxed *boxed);
gboolean            na_data_boxed_are_equal             (const NADataBoxed *a,
                                                         const NADataBoxed *b);
gboolean            na_data_boxed_is_default            (const NADataBoxed *boxed);
gboolean            na_data_boxed_is_valid              (const NADataBoxed *boxed);
void                na_data_boxed_dump                  (const NADataBoxed *boxed);
void                na_data_boxed_set_data_def          (NADataBoxed *boxed,
                                                         const NADataDef *def);
gchar *             na_data_boxed_get_as_string         (const NADataBoxed *boxed);
void *              na_data_boxed_get_as_void           (const NADataBoxed *boxed);
void                na_data_boxed_get_as_value          (const NADataBoxed *boxed,
                                                         GValue *value);
void                na_data_boxed_set_from_boxed        (NADataBoxed *boxed,
                                                         const NADataBoxed *value);
void                na_data_boxed_set_from_string       (NADataBoxed *boxed,
                                                         const gchar *value);
void                na_data_boxed_set_from_value        (NADataBoxed *boxed,
                                                         const GValue *value);
void                na_data_boxed_set_from_void         (NADataBoxed *boxed,
                                                         const void *value);

Object Hierarchy

  GObject
   +----NADataBoxed

Description

Details

NA_DATA_BOXED_TYPE

#define NA_DATA_BOXED_TYPE					( na_data_boxed_get_type())


NADataBoxedPrivate

typedef struct NADataBoxedPrivate      NADataBoxedPrivate;


NADataBoxedClassPrivate

typedef struct NADataBoxedClassPrivate NADataBoxedClassPrivate;


NADataBoxed

typedef struct _NADataBoxed NADataBoxed;


na_data_boxed_get_param_spec ()

GParamSpec *        na_data_boxed_get_param_spec        (const NADataDef *def);

def :

a NADataDef definition structure.

Returns :

a GParamSpec structure.

na_data_boxed_new ()

NADataBoxed *       na_data_boxed_new                   (const NADataDef *def);

def :

the NADataDef definition structure for this boxed.

Returns :

a newly allocated NADataBoxed.

na_data_boxed_get_data_def ()

NADataDef *         na_data_boxed_get_data_def          (const NADataBoxed *boxed);

boxed :

this NADataBoxed object.

Returns :

a pointer to the NADataDef structure attached to the object. Should never be NULL.

na_data_boxed_are_equal ()

gboolean            na_data_boxed_are_equal             (const NADataBoxed *a,
                                                         const NADataBoxed *b);

a :

the first NADataBoxed object.

b :

the second NADataBoxed object.

Returns :

TRUE if the two boxeds are equal, FALSE else.

na_data_boxed_is_default ()

gboolean            na_data_boxed_is_default            (const NADataBoxed *boxed);

boxed :

this NADataBoxed object.

Returns :

TRUE if the NADataBoxed holds its default value, FALSE else.

na_data_boxed_is_valid ()

gboolean            na_data_boxed_is_valid              (const NADataBoxed *boxed);

boxed :

the NADataBoxed object whose validity is to be checked.

Returns :

TRUE if the boxed is valid, FALSE else.

na_data_boxed_dump ()

void                na_data_boxed_dump                  (const NADataBoxed *boxed);

Dump the content of boxed.

boxed :

this NADataBoxed object.

na_data_boxed_set_data_def ()

void                na_data_boxed_set_data_def          (NADataBoxed *boxed,
                                                         const NADataDef *def);

Changes the NADataDef a boxed points to: -> the new type must be the same that the previous one. -> value is unchanged.

boxed :

this NADataBoxed object.

def :

the new NADataDef to be set.

na_data_boxed_get_as_string ()

gchar *             na_data_boxed_get_as_string         (const NADataBoxed *boxed);

boxed :

the NADataBoxed whose value is to be set.

Returns :

the value of the boxed, as a newly allocated string which should be g_free() by the caller.

na_data_boxed_get_as_void ()

void *              na_data_boxed_get_as_void           (const NADataBoxed *boxed);

boxed :

the NADataBoxed whose value is to be set.

Returns :

the content of the boxed. If of type NAFD_TYPE_STRING, NAFD_TYPE_LOCALE_STRING OR NAFD_TYPE_STRING_LIST, then the content is returned in a newly allocated value, which should be released by the caller.

na_data_boxed_get_as_value ()

void                na_data_boxed_get_as_value          (const NADataBoxed *boxed,
                                                         GValue *value);

Setup value with the content of the boxed.

boxed :

the NADataBoxed whose value is to be set.

value :

the string to be set.

na_data_boxed_set_from_boxed ()

void                na_data_boxed_set_from_boxed        (NADataBoxed *boxed,
                                                         const NADataBoxed *value);

Copy value from value to boxed.

boxed :

the NADataBoxed whose value is to be set.

value :

the source NADataBoxed.

na_data_boxed_set_from_string ()

void                na_data_boxed_set_from_string       (NADataBoxed *boxed,
                                                         const gchar *value);

Evaluates the value and set it to the boxed.

boxed :

the NADataBoxed whose value is to be set.

value :

the string to be set.

na_data_boxed_set_from_value ()

void                na_data_boxed_set_from_value        (NADataBoxed *boxed,
                                                         const GValue *value);

Evaluates the value and set it to the boxed.

boxed :

the NADataBoxed whose value is to be set.

value :

the value whose content is to be got.

na_data_boxed_set_from_void ()

void                na_data_boxed_set_from_void         (NADataBoxed *boxed,
                                                         const void *value);

Evaluates the value and set it to the boxed.

boxed :

the NADataBoxed whose value is to be set.

value :

the value whose content is to be got.