_Eina_Value_Struct_Operations Struct Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Data Fields
_Eina_Value_Struct_Operations Struct Reference
Eina » Data Types » Containers » Generic Value Storage » Generic Value Struct management

How to manage struct. More...

## 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. More...
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. More...

## Detailed Description

How to manage struct.

Any `NULL` callback is ignored.

Since
  1.2

## Field Documentation

void*(* _Eina_Value_Struct_Operations::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.

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().