Module - Data

Module - Data — A container class for Extension module data.

Synopsis

lt_ext_module_data_t * lt_ext_module_data_new           (size_t size,
                                                         lt_destroy_func_t finalizer);
lt_ext_module_data_t * lt_ext_module_data_ref           (lt_ext_module_data_t *data);
                    lt_ext_module_data_t;
void                lt_ext_module_data_unref            (lt_ext_module_data_t *data);

Description

This container class provides a data access for a specific data of extension subtag.

Details

lt_ext_module_data_new ()

lt_ext_module_data_t * lt_ext_module_data_new           (size_t size,
                                                         lt_destroy_func_t finalizer);

Create a new instance of lt_ext_module_data_t. this function allows to create an inherited instance like:

1
2
3
4
struct _my_module_data_t {
lt_ext_module_data_t  parent;
...own members...
};

size :

real size to allocate memory for the object.

finalizer :

a callback function to destroy the content. [scope async]

Returns :

a lt_ext_module_data_t. [transfer full]

lt_ext_module_data_ref ()

lt_ext_module_data_t * lt_ext_module_data_ref           (lt_ext_module_data_t *data);

Increases the reference count of data.

data :

a lt_ext_module_data_t.

Returns :

the same data object. [transfer none]

lt_ext_module_data_t

typedef struct {
	lt_pointer_t dummy[8];
} lt_ext_module_data_t;

All the fields in the lt_ext_module_data_t structure are private to the lt_ext_module_data_t implementation.

lt_pointer_t dummy[8];

a dummy pointer for alignment.

lt_ext_module_data_unref ()

void                lt_ext_module_data_unref            (lt_ext_module_data_t *data);

Decreases the reference count of data. when its reference count drops to 0, the object is finalized (i.e. its memory is freed).