How to manage struct. More...
#include <eina_value.h>
Data Fields | |
| unsigned int | version |
| must be EINA_VALUE_STRUCT_OPERATIONS_VERSION | |
| void *(*) | alloc (const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc) |
| How to allocate struct memory to be managed by the Eina_Value. | |
| void(*) | free (const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc, void *memory) |
| How to release memory managed by the Eina_Value. | |
| void *(*) | copy (const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc, const void *memory) |
| How to copy struct memory from an existing Eina_Value, if not provided alloc() will be used, then every member is copied using eina_value_type_copy() with member's type. | |
| int(*) | compare (const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc, const void *data1, const void *data2) |
| How to compare two struct memories. | |
| const Eina_Value_Struct_Member *(*) | find_member (const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc, const char *name) |
| How to find description for member. | |
How to manage struct.
Any NULL callback is ignored.
| const Eina_Value_Struct_Member *(*) _Eina_Value_Struct_Operations::find_member(const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc, const char *name) |
How to find description for member.
For huge structures consider using binary search, stringshared, hash or gperf. The default function does linear search using strcmp().