libcfe  0.12.1
some useful C-functions
cfe_value_extra.h File Reference
#include <glib-object.h>
#include <cfe/cfe_value.h>
Include dependency graph for cfe_value_extra.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

gboolean cfe_value_to_GValue (const cfe_value_t *cfe_value, GValue *gvalue)
 
gboolean cfe_value_type_is_compatible (const cfe_value_type_t cfe_type, const GType gtype)
 
GType cfe_value_type_as_gtype (const cfe_value_type_t cfe_type)
 

Function Documentation

◆ cfe_value_to_GValue()

gboolean cfe_value_to_GValue ( const cfe_value_t *  cfe_value,
GValue *  gvalue 
)

Covert a cfe_value to a GValue. Make sure that gvalue is not initialized or has is initialized with a type that is compatible with the cfe_value. For the one-on-one transaltion from cfe_value_type_t to GType see ....

Parameters
[in]cfe_valueThe cfe_value to convert.
[out]gvalueThe GValue to store the value in. Make sure it is uninitialized or initialized with a type compatible with the cfe_value.
Returns
TRUE on success, FALSE otherwise. When FALSE is returned, it is guaranteed that gvalue is not altered.

Definition at line 21 of file cfe_value_extra.c.

Here is the call graph for this function:

◆ cfe_value_type_as_gtype()

GType cfe_value_type_as_gtype ( const cfe_value_type_t  cfe_type)

Get the prefered GType for representing a cfe_type.

Parameters
[in]cfe_typeA cfe_type.
Returns
A corresponding GType. When the cfe_value cannot be represented as a GType G_TYPE_INVALID is returned.

Definition at line 270 of file cfe_value_extra.c.

Here is the caller graph for this function:

◆ cfe_value_type_is_compatible()

gboolean cfe_value_type_is_compatible ( const cfe_value_type_t  cfe_type,
const GType  gtype 
)

Checks if the cfe_type can be represented with the gtype.

Parameters
[in]cfe_typeA cfe_type.
[in]gtypeThe GType to check the compatible with.
Returns
TRUE when the cfe_type can be represented in the given GType, FALSE otherwise.

Definition at line 202 of file cfe_value_extra.c.

Here is the caller graph for this function: