GATE
|
Native data object wrapper interface. More...
Data Structures | |
struct | gate_wrapper_type_info_class |
Carries data about a wrapped data type. More... | |
Macros | |
#define | gate_wrapper_get_type(obj) |
See gate_wrapper_t::get_type. | |
#define | gate_wrapper_is_type(obj, cmp_with) |
See gate_wrapper_t::is_type. | |
Typedefs | |
typedef struct gate_wrapper_type_info_class | gate_wrapper_type_info_t |
Carries data about a wrapped data type. | |
Functions | |
GATE_CORE_API gate_wrapper_t * | gate_wrapper_create_new (gate_size_t obj_size, void const *type, gate_mem_dtor_t dtor) |
creates a wrapper for a new allocated raw memory block | |
GATE_CORE_API gate_wrapper_t * | gate_wrapper_create (void *obj, gate_size_t obj_size, void const *type, gate_mem_dtor_t dtor_obj, gate_mem_dtor_t dtor_mem) |
creates a wrapper to a native pointer and type information | |
GATE_CORE_API gate_wrapper_t * | gate_wrapper_create_type (gate_wrapper_type_info_t const *type_info, void const *src) |
creates a wrapper for a new allocated copy of a given data type instance | |
GATE_CORE_API gate_variant_t * | gate_variant_create (gate_wrapper_type_info_t const *ptr_types, gate_size_t types_count) |
creates a variant of different defined types | |
Native data object wrapper interface.
Puts native data in a gate-object interface including native type information. Can be used to pack and unpack C and C++ constructs to move them between GATE components without directly touching the content or raw pointers.
GATE_CORE_API gate_wrapper_t * gate_wrapper_create_new | ( | gate_size_t | obj_size, |
void const * | type, | ||
gate_mem_dtor_t | dtor ) |
creates a wrapper for a new allocated raw memory block
[in] | obj_size | size of data block for object type in bytes |
[in] | type | pointer to native type information (e.g. C++ std::type_info) |
[in] | dtor | pointer to destructor function |
GATE_CORE_API gate_wrapper_t * gate_wrapper_create | ( | void * | obj, |
gate_size_t | obj_size, | ||
void const * | type, | ||
gate_mem_dtor_t | dtor_obj, | ||
gate_mem_dtor_t | dtor_mem ) |
creates a wrapper to a native pointer and type information
[in] | obj | pointer to object to be embedded |
[in] | obj_size | size of object type in bytes |
[in] | type | pointer to native type information (e.g. C++ std::type_info) |
[in] | dtor_obj | pointer to object data destructor function (e.g. C++ destructor) |
[in] | dtor_mem | pointer to object memory release function (e.g. free() ) |
GATE_CORE_API gate_wrapper_t * gate_wrapper_create_type | ( | gate_wrapper_type_info_t const * | type_info, |
void const * | src ) |
creates a wrapper for a new allocated copy of a given data type instance
[in] | type_info | pointer to type info descriptor |
[in] | src | pointer to source instance to be copied into the new wrapped content |
GATE_CORE_API gate_variant_t * gate_variant_create | ( | gate_wrapper_type_info_t const * | ptr_types, |
gate_size_t | types_count ) |
creates a variant of different defined types
A "variant" can store on instance of a set of defined types
[in] | ptr_types | pointer to first item in array of type-infos |
[in] | types_count | amount of type-info items in array |