_Eina_Value_Struct_Operations Struct Reference

- Main Page
- Related Pages
- Modules
- 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...

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

## Detailed Description

How to manage struct.

Any `NULL` callback is ignored.

Since
  1.2

## Field Documentation

## ◆ find_member

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