_Eet_Data_Descriptor_Class Struct Reference

Instructs Eet about memory management for different needs under serialization and parse process. More...

Data Fields

int version
 ABI version. More...
 
const char * name
 Name of the user data type to be serialized.
 
int size
 Size in bytes of the user data type to be serialized.
 
struct {
   Eet_Descriptor_Mem_Alloc_Callback   mem_alloc
 how to allocate memory (usually malloc())
 
   Eet_Descriptor_Mem_Free_Callback   mem_free
 how to free memory (usually free())
 
   Eet_Descriptor_Str_Alloc_Callback   str_alloc
 how to allocate a string
 
   Eet_Descriptor_Str_Free_Callback   str_free
 how to free a string
 
   Eet_Descriptor_List_Next_Callback   list_next
 how to iterate to the next element of a list. More...
 
   Eet_Descriptor_List_Append_Callback   list_append
 how to append data d to list which head node is l
 
   Eet_Descriptor_List_Data_Callback   list_data
 retrieves the data from node l
 
   Eet_Descriptor_List_Free_Callback   list_free
 free all the nodes from the list which head node is l
 
   Eet_Descriptor_Hash_Foreach_Callback   hash_foreach
 iterates over all elements in the hash h in no specific order
 
   Eet_Descriptor_Hash_Add_Callback   hash_add
 add a new data d with key k in hash h
 
   Eet_Descriptor_Hash_Free_Callback   hash_free
 free all entries from the hash h
 
   Eet_Descriptor_Str_Direct_Alloc_Callback   str_direct_alloc
 how to allocate a string directly from file backed/mmaped region pointed by str
 
   Eet_Descriptor_Str_Direct_Free_Callback   str_direct_free
 how to free a string returned by str_direct_alloc
 
   Eet_Descriptor_Type_Get_Callback   type_get
 get the type, as used in the union or variant mapping, that should be used to store the given data into the eet file. More...
 
   Eet_Descriptor_Type_Set_Callback   type_set
 called when loading a mapped type with the given type used to describe the type in the descriptor
 
   Eet_Descriptor_Array_Alloc_Callback   array_alloc
 how to allocate memory for array (usually malloc())
 
   Eet_Descriptor_Array_Free_Callback   array_free
 how to free memory for array (usually free())
 
} func
 

Detailed Description

Instructs Eet about memory management for different needs under serialization and parse process.

The list and hash methods match the Eina API, so for a more detailed reference on them, look at the Eina_List and Eina_Hash documentation, respectively. For the most part these will be used with the standard Eina functions, so using EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET() and EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET() will set up everything accordingly.

Examples:
eet-data-file_descriptor_01.c, eet-data-file_descriptor_02.c, eet-data-nested.c, and eet-data-simple.c.

Field Documentation

int _Eet_Data_Descriptor_Class::version
Eet_Descriptor_List_Next_Callback _Eet_Data_Descriptor_Class::list_next

how to iterate to the next element of a list.

Receives and should return the list node.

Referenced by eet_data_descriptor_new(), and eet_eina_stream_data_descriptor_class_set().

Eet_Descriptor_Type_Get_Callback _Eet_Data_Descriptor_Class::type_get

get the type, as used in the union or variant mapping, that should be used to store the given data into the eet file.

Examples:
eet-data-file_descriptor_02.c.