Generic Value Struct management
Eina » Data Types » Containers » Generic Value Storage

## Data Structures

struct | _Eina_Value_Struct_Operations
| How to manage struct. More...
struct | _Eina_Value_Struct_Member
| Describes a single member of struct. More...
struct | _Eina_Value_Struct_Desc
| Describes the struct by listing its size, members and operations. More...
struct | _Eina_Value_Struct
| Used to store the memory and its description. More...

## Macros

#define | EINA_VALUE_STRUCT_OPERATIONS_VERSION (1)
| Current API version, used to validate _Eina_Value_Struct_Operations.
#define | EINA_VALUE_STRUCT_DESC_VERSION (1)
| Current API version, used to validate _Eina_Value_Struct_Desc.
#define | EINA_VALUE_STRUCT_MEMBER(eina_value_type, type, member)
| Helper to define Eina_Value_Struct_Member fields, uses offsetof() with type and member.
#define | EINA_VALUE_STRUCT_MEMBER_SENTINEL {NULL, NULL, 0}
| Helper to define Eina_Value_Struct_Member fields for sentinel (last item), useful if you did not define `member_count`.
#define | EINA_VALUE_STRUCT_DESC_DEFINE(Name, Ops, Size, ...)

## Typedefs

typedef struct _Eina_Value_Struct_Operations | Eina_Value_Struct_Operations
| How to manage struct.
typedef struct _Eina_Value_Struct_Member | Eina_Value_Struct_Member
| Describes a single member of struct.
typedef struct _Eina_Value_Struct_Desc | Eina_Value_Struct_Desc
| Describes the struct by listing its size, members and operations.
typedef struct _Eina_Value_Struct | Eina_Value_Struct
| Value type for EINA_VALUE_TYPE_STRUCT.

## Functions

EINA_API Eina_Value * | eina_value_struct_new (const Eina_Value_Struct_Desc *desc)
| Creates generic value storage of type struct.
static Eina_Bool | eina_value_struct_setup (Eina_Value *value, const Eina_Value_Struct_Desc *desc)
| Initializes generic value storage of type struct.
static const Eina_Value_Struct_Desc * | eina_value_struct_desc_get (const Eina_Value *value)
| Checks for a struct and get its description.
static Eina_Bool | eina_value_struct_set (Eina_Value *value, const char *name,...)
| Sets the generic value in a struct member.
static Eina_Bool | eina_value_struct_get (const Eina_Value *value, const char *name,...)
| Gets the generic value from a struct member.
static Eina_Bool | eina_value_struct_vset (Eina_Value *value, const char *name, va_list args)
| Sets the generic value in a struct member.
static Eina_Bool | eina_value_struct_vget (const Eina_Value *value, const char *name, va_list args)
| Gets the generic value from a struct member.
static Eina_Bool | eina_value_struct_pset (Eina_Value *value, const char *name, const void *ptr)
| Sets the generic value in a struct member from pointer.
static Eina_Bool | eina_value_struct_pget (const Eina_Value *value, const char *name, void *ptr)
| Gets the generic value to pointer from a struct member.
static Eina_Bool | eina_value_struct_value_get (const Eina_Value *src, const char *name, Eina_Value *dst)
| Gets the member as Eina_Value copy.
static Eina_Bool | eina_value_struct_value_set (Eina_Value *dst, const char *name, const Eina_Value *src)
| Sets the member from Eina_Value source.
static Eina_Bool | eina_value_struct_member_value_get (const Eina_Value *src, const Eina_Value_Struct_Member *member, Eina_Value *dst)
| Gets the member as Eina_Value copy given its member description.
static Eina_Bool | eina_value_struct_member_value_set (Eina_Value *dst, const Eina_Value_Struct_Member *member, const Eina_Value *src)
| Sets the member from Eina_Value source.

## Variables

EINA_API const Eina_Value_Struct_Operations * | EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH
| Assumes `members` is sorted by name and applies binary search for names.
EINA_API const Eina_Value_Struct_Operations * | EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE
| Assumes `members` name are stringshared and can be compared for equality without using its contents (simple pointer comparison).
EINA_API const Eina_Value_Struct_Operations * | EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH = NULL
| Assumes `members` is sorted by name and applies binary search for names.
EINA_API const Eina_Value_Struct_Operations * | EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE = NULL
| Assumes `members` name are stringshared and can be compared for equality without using its contents (simple pointer comparison).

## Detailed Description

## Macro Definition Documentation

## EINA_VALUE_STRUCT_MEMBER

#define EINA_VALUE_STRUCT_MEMBER | ( |  | eina_value_type,
|  |  | type,
|  |  | member )

Value:
{#member, eina_value_type, offsetof(type, member)}

Helper to define Eina_Value_Struct_Member fields, uses offsetof() with type and member.

Since
  1.2

Examples
  complex-types-client-eina-value.c, and eina_value_02.c.

## EINA_VALUE_STRUCT_MEMBER_SENTINEL

#define EINA_VALUE_STRUCT_MEMBER_SENTINEL {NULL, NULL, 0}

Helper to define Eina_Value_Struct_Member fields for sentinel (last item), useful if you did not define `member_count`.

Since
  1.2

## EINA_VALUE_STRUCT_DESC_DEFINE

#define EINA_VALUE_STRUCT_DESC_DEFINE | ( |  | Name,
|  |  | Ops,
|  |  | Size,
|  |  | ... )

Value:
static inline Eina_Value_Struct_Desc * \
Name(void) \
{ \
Eina_Value_Struct_Member tmp[] = { __VA_ARGS__ }; \
static Eina_Value_Struct_Member members[EINA_C_ARRAY_LENGTH(tmp) + 1] = { { "", NULL, 0 } }; \
static Eina_Value_Struct_Desc r = { \
EINA_VALUE_STRUCT_DESC_VERSION, \
NULL, \
members, \
EINA_C_ARRAY_LENGTH(tmp), \
Size \
}; \
\
if (members[0].name) \
{ \
r.ops = Ops; \
memcpy(members, tmp, sizeof(tmp)); \
} \
return &r; \
}
EINA_C_ARRAY_LENGTH
#define EINA_C_ARRAY_LENGTH(arr)
Macro to return the array length of a standard c array.
Definition eina_types.h:621
Eina_Value_Struct_Desc
struct _Eina_Value_Struct_Desc Eina_Value_Struct_Desc
Describes the struct by listing its size, members and operations.
Definition eina_value.h:3041
Eina_Value_Struct_Member
struct _Eina_Value_Struct_Member Eina_Value_Struct_Member
Describes a single member of struct.
Definition eina_value.h:3032
EINA_VALUE_STRUCT_DESC_VERSION
#define EINA_VALUE_STRUCT_DESC_VERSION
Current API version, used to validate _Eina_Value_Struct_Desc.
Definition eina_value.h:3131

## Typedef Documentation

## Eina_Value_Struct_Operations

typedef struct _Eina_Value_Struct_Operations Eina_Value_Struct_Operations

How to manage struct.

Any `NULL` callback is ignored.

A structure can specify alternative methods to allocate, free and copy itself. See structure definition for all methods.

See also
  _Eina_Value_Struct_Operations explains fields.

Since
  1.2

## Eina_Value_Struct_Member

typedef struct _Eina_Value_Struct_Member Eina_Value_Struct_Member

Describes a single member of struct.

The member holds a name, type and its byte offset within the struct memory. Most Eina_Value_Struct functions takes the member name as parameter, as in eina_value_struct_set().

See also
  _Eina_Value_Struct_Member explains fields.

Since
  1.2

Examples
  complex-types-client-eina-value.c, and eina_value_02.c.

## Eina_Value_Struct_Desc

typedef struct _Eina_Value_Struct_Desc Eina_Value_Struct_Desc

Describes the struct by listing its size, members and operations.

See also
  _Eina_Value_Struct_Desc explains fields.

Since
  1.2

Examples
  complex-types-client-eina-value.c, and eina_value_02.c.

## Eina_Value_Struct

typedef struct _Eina_Value_Struct Eina_Value_Struct

Value type for EINA_VALUE_TYPE_STRUCT.

See also
  _Eina_Value_Struct explains fields.

Since
  1.2

Examples
  complex-types-client-eina-value.c.

## Function Documentation

## eina_value_struct_new()

EINA_API Eina_Value * eina_value_struct_new | ( | const Eina_Value_Struct_Desc * | desc | ) |

Creates generic value storage of type struct.

Parameters

  [in] | desc | How to manage this struct members.

Returns
  The new value, or `NULL` on failure.

Create a new generic value storage of type struct. The members are managed using the description specified by desc.

On failure, `NULL` is returned.

Note
  this creates from mempool and then uses eina_value_struct_setup().

See also
  eina_value_free()
  eina_value_struct_setup()

Since
  1.2

## eina_value_struct_setup()

Eina_Bool eina_value_struct_setup | ( | Eina_Value * | value,
|  | const Eina_Value_Struct_Desc * | desc )

inline static

Initializes generic value storage of type struct.

Parameters

  [out] | value | Value object
  [in] | desc | How to manage this struct members.

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

Initializes new generic value storage of type struct with the given desc.

This is the same as calling eina_value_set() with EINA_VALUE_TYPE_STRUCT followed by eina_value_pset() with the Eina_Value_Struct description configured.

Note
  Existing contents are ignored! If the value was previously used, then use eina_value_flush() first.

On failure, EINA_FALSE is returned.

See also
  eina_value_flush()

Since
  1.2

## eina_value_struct_desc_get()

const Eina_Value_Struct_Desc * eina_value_struct_desc_get | ( | const Eina_Value * | value | ) |

inline static

Checks for a struct and get its description.

Parameters

  [in] | value | Value object

Returns
  structure description, with all members and size. on failure, `NULL` is returned.

Since
  1.21

References EINA_WARN_UNUSED_RESULT.

## eina_value_struct_set()

Eina_Bool eina_value_struct_set | ( | Eina_Value * | value,
|  | const char * | name,
|  |  | ... )

inline static

Sets the generic value in a struct member.

Parameters

  [in,out] | value | Source value object
  [in] | name | Name to find the member
  [in] | ... | Variable arguments

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

The variable argument is dependent on chosen member type. The list for basic types:

- EINA_VALUE_TYPE_VALUE: Eina_Value
- EINA_VALUE_TYPE_ERROR: Eina_Error
- EINA_VALUE_TYPE_UCHAR: unsigned char
- EINA_VALUE_TYPE_USHORT: unsigned short
- EINA_VALUE_TYPE_UINT: unsigned int
- EINA_VALUE_TYPE_ULONG: unsigned long
- EINA_VALUE_TYPE_UINT64: uint64_t
- EINA_VALUE_TYPE_CHAR: char
- EINA_VALUE_TYPE_SHORT: short
- EINA_VALUE_TYPE_INT: int
- EINA_VALUE_TYPE_LONG: long
- EINA_VALUE_TYPE_INT64: int64_t
- EINA_VALUE_TYPE_FLOAT: float
- EINA_VALUE_TYPE_DOUBLE: double
- EINA_VALUE_TYPE_STRINGSHARE: const char *
- EINA_VALUE_TYPE_STRING: const char *
- EINA_VALUE_TYPE_HASH: Eina_Value_Hash
- EINA_VALUE_TYPE_TIMEVAL: struct timeval*
- EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
- EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
- EINA_VALUE_TYPE_TM: struct tm*

struct myst {
int i;
char c;
};
const Eina_Value_Struct_Member myst_members[] = {
{"i", EINA_VALUE_TYPE_INT, 0},
{"c", EINA_VALUE_TYPE_CHAR, 4},
{NULL, NULL, 0}
};
const Eina_Value_Struct_Desc myst_desc = {
EINA_VALUE_STRUCT_DESC_VERSION,
NULL, myst_members, 2, sizeof(struct myst)
};
Eina_Value *value = eina_value_struct_new(&my_desc);
int x;
char y;
eina_value_struct_set(value, "i", 5678);
eina_value_struct_get(value, "i", &x);
eina_value_struct_set(value, "c", 0xf);
eina_value_struct_get(value, "c", &y);
eina_value_free(value);
EINA_VALUE_TYPE_CHAR
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_CHAR
manages char type.
Definition eina_value.c:5600
Eina_Value
struct _Eina_Value Eina_Value
Store generic values.
Definition eina_value.h:307
EINA_VALUE_TYPE_INT
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_INT
manages int type.
Definition eina_value.c:5602
eina_value_struct_new
EINA_API Eina_Value * eina_value_struct_new(const Eina_Value_Struct_Desc *desc)
Creates generic value storage of type struct.
Definition eina_value.c:5823
eina_value_free
EINA_API void eina_value_free(Eina_Value *value)
Frees value and its data.
Definition eina_value.c:5645

See also
  eina_value_struct_get()
  eina_value_struct_vset()
  eina_value_struct_pset()

Since
  1.2

References EINA_ARG_NONNULL.

## eina_value_struct_get()

Eina_Bool eina_value_struct_get | ( | const Eina_Value * | value,
|  | const char * | name,
|  |  | ... )

inline static

Gets the generic value from a struct member.

Parameters

  [in] | value | Source value object
  [in] | name | Name to find the member
  [out] | ... | Variable arguments

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

The value is returned in the variable argument parameter, the actual value is type-dependent, but usually it will be what is stored inside the object. There shouldn't be any memory allocation, thus the contents should not be freed.

The variable argument is dependent on chosen member type. The list for basic types:

- EINA_VALUE_TYPE_VALUE: Eina_Value*
- EINA_VALUE_TYPE_ERROR: Eina_Error*
- EINA_VALUE_TYPE_UCHAR: unsigned char*
- EINA_VALUE_TYPE_USHORT: unsigned short*
- EINA_VALUE_TYPE_UINT: unsigned int*
- EINA_VALUE_TYPE_ULONG: unsigned long*
- EINA_VALUE_TYPE_UINT64: uint64_t*
- EINA_VALUE_TYPE_CHAR: char*
- EINA_VALUE_TYPE_SHORT: short*
- EINA_VALUE_TYPE_INT: int*
- EINA_VALUE_TYPE_LONG: long*
- EINA_VALUE_TYPE_INT64: int64_t*
- EINA_VALUE_TYPE_FLOAT: float*
- EINA_VALUE_TYPE_DOUBLE: double*
- EINA_VALUE_TYPE_STRINGSHARE: const char **
- EINA_VALUE_TYPE_STRING: const char **
- EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
- EINA_VALUE_TYPE_TIMEVAL: struct timeval*
- EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
- EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
- EINA_VALUE_TYPE_TM: struct tm*

struct myst {
int i;
char c;
};
const Eina_Value_Struct_Member myst_members[] = {
{"i", EINA_VALUE_TYPE_INT, 0},
{"c", EINA_VALUE_TYPE_CHAR, 4},
{NULL, NULL, 0}
};
const Eina_Value_Struct_Desc myst_desc = {
EINA_VALUE_STRUCT_DESC_VERSION,
NULL, myst_members, 2, sizeof(struct myst)
};
Eina_Value *value = eina_value_struct_new(&my_desc);
int x;
char y;
eina_value_struct_set(value, "i", 5678);
eina_value_struct_get(value, "i", &x);
eina_value_struct_set(value, "c", 0xf);
eina_value_struct_get(value, "c", &y);
eina_value_free(value);

See also
  eina_value_struct_set()
  eina_value_struct_vset()
  eina_value_struct_pset()

Since
  1.2

References EINA_ARG_NONNULL.

## eina_value_struct_vset()

Eina_Bool eina_value_struct_vset | ( | Eina_Value * | value,
|  | const char * | name,
|  | va_list | args )

inline static

Sets the generic value in a struct member.

Parameters

  [in,out] | value | Source value object
  [in] | name | Name to find the member
  [in] | args | Variable argument

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

See also
  eina_value_struct_set()
  eina_value_struct_get()
  eina_value_struct_pset()

Since
  1.2

References EINA_ARG_NONNULL.

## eina_value_struct_vget()

Eina_Bool eina_value_struct_vget | ( | const Eina_Value * | value,
|  | const char * | name,
|  | va_list | args )

inline static

Gets the generic value from a struct member.

Parameters

  [in] | value | Source value object
  [in] | name | Name to find the member
  [in,out] | args | Variable argument

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

The value is returned in the variable argument parameter, the actual value is type-dependent, but usually it will be what is stored inside the object. There shouldn't be any memory allocation, thus the contents should not be freed.

See also
  eina_value_struct_vset()
  eina_value_struct_get()
  eina_value_struct_pget()

Since
  1.2

References EINA_ARG_NONNULL.

## eina_value_struct_pset()

Eina_Bool eina_value_struct_pset | ( | Eina_Value * | value,
|  | const char * | name,
|  | const void * | ptr )

inline static

Sets the generic value in a struct member from pointer.

Parameters

  [in,out] | value | Source value object
  [in] | name | Name to find the member
  [in] | ptr | Pointer to specify the contents.

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

The pointer type is dependent on chosen value type. The list for basic types:

- EINA_VALUE_TYPE_VALUE: Eina_Value*
- EINA_VALUE_TYPE_ERROR: Eina_Error*
- EINA_VALUE_TYPE_UCHAR: unsigned char*
- EINA_VALUE_TYPE_USHORT: unsigned short*
- EINA_VALUE_TYPE_UINT: unsigned int*
- EINA_VALUE_TYPE_ULONG: unsigned long*
- EINA_VALUE_TYPE_UINT64: uint64_t*
- EINA_VALUE_TYPE_CHAR: char*
- EINA_VALUE_TYPE_SHORT: short*
- EINA_VALUE_TYPE_INT: int*
- EINA_VALUE_TYPE_LONG: long*
- EINA_VALUE_TYPE_INT64: int64_t*
- EINA_VALUE_TYPE_FLOAT: float*
- EINA_VALUE_TYPE_DOUBLE: double*
- EINA_VALUE_TYPE_STRINGSHARE: const char **
- EINA_VALUE_TYPE_STRING: const char **
- EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
- EINA_VALUE_TYPE_TIMEVAL: struct timeval*
- EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
- EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
- EINA_VALUE_TYPE_TM: struct tm*

Note
  the pointer contents are written using the size defined by type. It can be larger than void* or uint64_t.

struct myst {
int i;
char c;
};
const Eina_Value_Struct_Member myst_members[] = {
{"i", EINA_VALUE_TYPE_INT, 0},
{"c", EINA_VALUE_TYPE_CHAR, 4},
{NULL, NULL, 0}
};
const Eina_Value_Struct_Desc myst_desc = {
EINA_VALUE_STRUCT_DESC_VERSION,
NULL, myst_members, 2, sizeof(struct myst)
};
Eina_Value *value = eina_value_struct_new(&my_desc);
int x = 5678;
char y = 0xf;
eina_value_struct_pset(value, "i", &x);
eina_value_struct_pget(value, "i", &x);
eina_value_struct_pset(value, "c", &y);
eina_value_struct_pget(value, "c", &y);
eina_value_free(value);
eina_value_struct_pset
static Eina_Bool eina_value_struct_pset(Eina_Value *value, const char *name, const void *ptr)
Sets the generic value in a struct member from pointer.

See also
  eina_value_struct_set()
  eina_value_struct_get()
  eina_value_struct_vset()

Since
  1.2

References EINA_ARG_NONNULL.

## eina_value_struct_pget()

Eina_Bool eina_value_struct_pget | ( | const Eina_Value * | value,
|  | const char * | name,
|  | void * | ptr )

inline static

Gets the generic value to pointer from a struct member.

Parameters

  [in] | value | Source value object
  [in] | name | Name to find the member
  [out] | ptr | Pointer to receive the contents.

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

The value is returned in pointer contents, the actual value is type-dependent, but usually it will be what is stored inside the object. There shouldn't be any memory allocation, thus the contents should not be freed.

The pointer type is dependent on chosen value type. The list for basic types:

- EINA_VALUE_TYPE_VALUE: Eina_Value*
- EINA_VALUE_TYPE_ERROR: Eina_Error*
- EINA_VALUE_TYPE_UCHAR: unsigned char*
- EINA_VALUE_TYPE_USHORT: unsigned short*
- EINA_VALUE_TYPE_UINT: unsigned int*
- EINA_VALUE_TYPE_ULONG: unsigned long*
- EINA_VALUE_TYPE_UINT64: uint64_t*
- EINA_VALUE_TYPE_CHAR: char*
- EINA_VALUE_TYPE_SHORT: short*
- EINA_VALUE_TYPE_INT: int*
- EINA_VALUE_TYPE_LONG: long*
- EINA_VALUE_TYPE_INT64: int64_t*
- EINA_VALUE_TYPE_FLOAT: float*
- EINA_VALUE_TYPE_DOUBLE: double*
- EINA_VALUE_TYPE_STRINGSHARE: const char **
- EINA_VALUE_TYPE_STRING: const char **
- EINA_VALUE_TYPE_HASH: Eina_Value_Hash*
- EINA_VALUE_TYPE_TIMEVAL: struct timeval*
- EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
- EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
- EINA_VALUE_TYPE_TM: struct tm*

struct myst {
int i;
char c;
};
const Eina_Value_Struct_Member myst_members[] = {
{"i", EINA_VALUE_TYPE_INT, 0},
{"c", EINA_VALUE_TYPE_CHAR, 4},
{NULL, NULL, 0}
};
const Eina_Value_Struct_Desc myst_desc = {
EINA_VALUE_STRUCT_DESC_VERSION,
NULL, myst_members, 2, sizeof(struct myst)
};
Eina_Value *value = eina_value_struct_new(&my_desc);
int x = 5678;
char y = 0xf;
eina_value_struct_pset(value, "i", &);
eina_value_struct_pget(value, "i", &x);
eina_value_struct_pset(value, "c", &y);
eina_value_struct_pget(value, "c", &y);
eina_value_free(value);

See also
  eina_value_struct_set()
  eina_value_struct_vset()
  eina_value_struct_pset()

Since
  1.2

References EINA_ARG_NONNULL.

## eina_value_struct_value_get()

Eina_Bool eina_value_struct_value_get | ( | const Eina_Value * | src,
|  | const char * | name,
|  | Eina_Value * | dst )

inline static

Gets the member as Eina_Value copy.

Parameters

  [in] | src | Source value object
  [in] | name | Name to find the member
  [out] | dst | Where to return the member value.

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

The argument dst is considered uninitialized and it's setup to the type of the member.

Since
  1.2

References EINA_ARG_NONNULL.

## eina_value_struct_value_set()

Eina_Bool eina_value_struct_value_set | ( | Eina_Value * | dst,
|  | const char * | name,
|  | const Eina_Value * | src )

inline static

Sets the member from Eina_Value source.

Parameters

  [in,out] | dst | destination value object
  [in] | name | name to find the member
  [in] | src | source value

Returns
  EINA_TRUE on success, EINA_FALSE on failure.

Since
  1.2

References EINA_ARG_NONNULL.

## eina_value_struct_member_value_get()

Eina_Bool eina_value_struct_member_value_get | ( | const Eina_Value * | src,
|  | const Eina_Value_Struct_Member * | member,
|  | Eina_Value * | dst )

inline static

Gets the member as Eina_Value copy given its member description.

Parameters

  [in] | src | Source value object
  [in] | member | The member description to use
  [out] | dst | Where to return the member value.

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

The argument dst is considered uninitialized and it's setup to the type of the member.

Since
  1.2

References EINA_ARG_NONNULL.

## eina_value_struct_member_value_set()

Eina_Bool eina_value_struct_member_value_set | ( | Eina_Value * | dst,
|  | const Eina_Value_Struct_Member * | member,
|  | const Eina_Value * | src )

inline static

Sets the member from Eina_Value source.

Parameters

  [out] | dst | destination value object
  [in] | member | the member description to use
  [in] | src | source value

Returns
  EINA_TRUE on success, EINA_FALSE on failure.

Since
  1.2

References EINA_ARG_NONNULL.

## Variable Documentation

## EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH [1/2]

EINA_API const Eina_Value_Struct_Operations* EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH

extern

Assumes `members` is sorted by name and applies binary search for names.

Ideally the `member_count` field is set to speed it up.

No other methods are set (alloc, free, copy, compare), then it uses the default operations.

## EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE [1/2]

EINA_API const Eina_Value_Struct_Operations* EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE

extern

Assumes `members` name are stringshared and can be compared for equality without using its contents (simple pointer comparison).

Ideally the search `name` will be stringshared as well, but it will do a second loop with a forced stringshare if it did not find the member.

No other methods are set (alloc, free, copy, compare), then it uses the default operations.

## EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH [2/2]

EINA_API const Eina_Value_Struct_Operations* EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH = NULL

Assumes `members` is sorted by name and applies binary search for names.

Ideally the `member_count` field is set to speed it up.

No other methods are set (alloc, free, copy, compare), then it uses the default operations.

## EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE [2/2]

EINA_API const Eina_Value_Struct_Operations* EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE = NULL

Assumes `members` name are stringshared and can be compared for equality without using its contents (simple pointer comparison).

Ideally the search `name` will be stringshared as well, but it will do a second loop with a forced stringshare if it did not find the member.

No other methods are set (alloc, free, copy, compare), then it uses the default operations.