|
Eina_Value * | eina_value_array_new (const Eina_Value_Type *subtype, unsigned int step) |
| Creates generic value storage of type array. More...
|
|
static Eina_Bool | eina_value_array_setup (Eina_Value *value, const Eina_Value_Type *subtype, unsigned int step) |
| Initializes generic value storage of type array. More...
|
|
static unsigned int | eina_value_array_count (const Eina_Value *value) |
| Queries number of elements in value of array type. More...
|
|
static Eina_Bool | eina_value_array_remove (Eina_Value *value, unsigned int position) |
| Removes element at given position in value of array type. More...
|
|
static Eina_Bool | eina_value_array_set (Eina_Value *value, unsigned int position,...) |
| Sets the generic value in an array member. More...
|
|
static Eina_Bool | eina_value_array_get (const Eina_Value *value, unsigned int position,...) |
| Gets the generic value from an array member. More...
|
|
static Eina_Bool | eina_value_array_insert (Eina_Value *value, unsigned int position,...) |
| Inserts a generic value in an array member position. More...
|
|
static Eina_Bool | eina_value_array_append (Eina_Value *value,...) |
| Appends a generic value in an array. More...
|
|
static Eina_Bool | eina_value_array_vset (Eina_Value *value, unsigned int position, va_list args) |
| Sets a generic value to an array member. More...
|
|
static Eina_Bool | eina_value_array_vget (const Eina_Value *value, unsigned int position, va_list args) |
| Gets the generic value from an array member. More...
|
|
static Eina_Bool | eina_value_array_vinsert (Eina_Value *value, unsigned int position, va_list args) |
| Inserts a generic value to an array member position. More...
|
|
static Eina_Bool | eina_value_array_vappend (Eina_Value *value, va_list args) |
| Appends a generic value to an array. More...
|
|
static Eina_Bool | eina_value_array_pset (Eina_Value *value, unsigned int position, const void *ptr) |
| Sets a generic value to an array member from a pointer. More...
|
|
static Eina_Bool | eina_value_array_pget (const Eina_Value *value, unsigned int position, void *ptr) |
| Retrieves a generic value into a pointer from an array member. More...
|
|
static Eina_Bool | eina_value_array_pinsert (Eina_Value *value, unsigned int position, const void *ptr) |
| Inserts a generic value to an array member position from a pointer. More...
|
|
static Eina_Bool | eina_value_array_pappend (Eina_Value *value, const void *ptr) |
| Appends a generic value to an array from a pointer. More...
|
|
static Eina_Bool | eina_value_array_value_get (const Eina_Value *src, unsigned int position, Eina_Value *dst) |
| Retrieves a value from the array as an Eina_Value copy. More...
|
|
◆ EINA_VALUE_ARRAY_FOREACH
#define EINA_VALUE_ARRAY_FOREACH |
( |
|
Array, |
|
|
|
Length, |
|
|
|
It, |
|
|
|
Value |
|
) |
| |
Value:
It = 0, \
It < Length; \
It++, \
eina_value_array_get(Array, It, &Value))
Definition for the macro to iterate over an array contained in an Eina_Value.
- Since
- 1.21
- Parameters
-
[in] | array | The list to iterate over. |
[in] | length | Contain the length of the array |
[out] | it | Contain the current position walked over |
[out] | value | Contain the value at the current position. |
This macro iterates over array
from the first element to the last. value
is the data related to the current element.
It can be used like in the following example:
unsigned int i, len;
{
fprintf(stderr,
"Something has gone wrong: %s at index: %i\n",
eina_error_msg_get(err), i);
}
- Warning
array
and v must be a pointer to an Eina_Value
◆ Eina_Value_Array
◆ eina_value_array_new()
◆ eina_value_array_setup()
◆ eina_value_array_count()
static unsigned int eina_value_array_count |
( |
const Eina_Value * |
value | ) |
|
|
inlinestatic |
◆ eina_value_array_remove()
Removes element at given position in value of array type.
- Parameters
-
[in,out] | value | value object. |
[in] | position | index of the member |
- Returns
- EINA_TRUE on success, EINA_FALSE otherwise.
- Since
- 1.2
◆ eina_value_array_set()
Sets the generic value in an array member.
- Parameters
-
[in,out] | value | Source value object |
[in] | position | Index of the member |
- Returns
- EINA_TRUE on success, EINA_FALSE otherwise.
The variable argument is dependent on chosen subtype. 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_ARRAY: Eina_Value_Array
- EINA_VALUE_TYPE_LIST: Eina_Value_List
- 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*
- See also
- eina_value_array_get()
-
eina_value_array_vset()
-
eina_value_array_pset()
-
eina_value_array_insert()
-
eina_value_array_vinsert()
-
eina_value_array_pinsert()
-
eina_value_array_append()
-
eina_value_array_vappend()
-
eina_value_array_pappend()
- Since
- 1.2
◆ eina_value_array_get()
Gets the generic value from an array member.
- Parameters
-
[in] | value | Source value object |
[in] | position | Index of the member |
- Returns
- EINA_TRUE on success, EINA_FALSE otherwise.
The value is returned in the variable argument parameter, and 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 subtype. 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_ARRAY: Eina_Value_Array*
- EINA_VALUE_TYPE_LIST: Eina_Value_List*
- 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*
- See also
- eina_value_array_set()
-
eina_value_array_vset()
-
eina_value_array_pset()
- Since
- 1.2
- Examples
- complex-types-client-eina-value.c.
◆ eina_value_array_insert()
Inserts a generic value in an array member position.
- Parameters
-
[in] | value | Source value object |
[in] | position | Index of the member |
[in] | ... | Variable arguments of data to insert |
- Returns
- EINA_TRUE on success, EINA_FALSE otherwise.
The variable argument is dependent on chosen subtype. 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_ARRAY: Eina_Value_Array
- EINA_VALUE_TYPE_LIST: Eina_Value_List
- 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*
- See also
- eina_value_array_set()
-
eina_value_array_get()
-
eina_value_array_vset()
-
eina_value_array_pset()
-
eina_value_array_vinsert()
-
eina_value_array_pinsert()
-
eina_value_array_append()
-
eina_value_array_vappend()
-
eina_value_array_pappend()
- Since
- 1.2
◆ eina_value_array_append()
◆ eina_value_array_vset()
static Eina_Bool eina_value_array_vset |
( |
Eina_Value * |
value, |
|
|
unsigned int |
position, |
|
|
va_list |
args |
|
) |
| |
|
inlinestatic |
◆ eina_value_array_vget()
static Eina_Bool eina_value_array_vget |
( |
const Eina_Value * |
value, |
|
|
unsigned int |
position, |
|
|
va_list |
args |
|
) |
| |
|
inlinestatic |
Gets the generic value from an array member.
- Parameters
-
[in] | value | Source value object |
[in] | position | Index of the member |
[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_array_vset()
-
eina_value_array_get()
-
eina_value_array_pget()
- Since
- 1.2
◆ eina_value_array_vinsert()
static Eina_Bool eina_value_array_vinsert |
( |
Eina_Value * |
value, |
|
|
unsigned int |
position, |
|
|
va_list |
args |
|
) |
| |
|
inlinestatic |
◆ eina_value_array_vappend()
◆ eina_value_array_pset()
static Eina_Bool eina_value_array_pset |
( |
Eina_Value * |
value, |
|
|
unsigned int |
position, |
|
|
const void * |
ptr |
|
) |
| |
|
inlinestatic |
Sets a generic value to an array member from a pointer.
- Parameters
-
[in,out] | value | Source value object |
[in] | position | Index of 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_ARRAY: Eina_Value_Array*
- EINA_VALUE_TYPE_LIST: Eina_Value_List*
- 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.
- See also
- eina_value_array_set()
-
eina_value_array_get()
-
eina_value_array_vset()
-
eina_value_array_insert()
-
eina_value_array_vinsert()
-
eina_value_array_pinsert()
-
eina_value_array_append()
-
eina_value_array_vappend()
-
eina_value_array_pappend()
- Since
- 1.2
◆ eina_value_array_pget()
static Eina_Bool eina_value_array_pget |
( |
const Eina_Value * |
value, |
|
|
unsigned int |
position, |
|
|
void * |
ptr |
|
) |
| |
|
inlinestatic |
Retrieves a generic value into a pointer from an array member.
- Parameters
-
[in] | value | Source value object |
[in] | position | Index of 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_ARRAY: Eina_Value_Array*
- EINA_VALUE_TYPE_LIST: Eina_Value_List*
- 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*
- See also
- eina_value_array_set()
-
eina_value_array_vset()
-
eina_value_array_pset()
- Since
- 1.2
◆ eina_value_array_pinsert()
static Eina_Bool eina_value_array_pinsert |
( |
Eina_Value * |
value, |
|
|
unsigned int |
position, |
|
|
const void * |
ptr |
|
) |
| |
|
inlinestatic |
Inserts a generic value to an array member position from a pointer.
- Parameters
-
[in,out] | value | Source value object |
[in] | position | Index of 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_ARRAY: Eina_Value_Array*
- EINA_VALUE_TYPE_LIST: Eina_Value_List*
- 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.
- See also
- eina_value_array_set()
-
eina_value_array_get()
-
eina_value_array_vset()
-
eina_value_array_insert()
-
eina_value_array_vinsert()
-
eina_value_array_pinsert()
-
eina_value_array_append()
-
eina_value_array_vappend()
-
eina_value_array_pappend()
- Since
- 1.2
◆ eina_value_array_pappend()
Appends a generic value to an array from a pointer.
- Parameters
-
[in,out] | value | Source value object |
[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_ARRAY: Eina_Value_Array*
- EINA_VALUE_TYPE_LIST: Eina_Value_List*
- 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.
- See also
- eina_value_array_set()
-
eina_value_array_get()
-
eina_value_array_vset()
-
eina_value_array_insert()
-
eina_value_array_vinsert()
-
eina_value_array_pinsert()
-
eina_value_array_append()
-
eina_value_array_vappend()
-
eina_value_array_pappend()
- Since
- 1.2
◆ eina_value_array_value_get()
Retrieves a value from the array as an Eina_Value copy.
- Parameters
-
[in] | src | Source value object |
[in] | position | Index of the member |
[out] | dst | Where to return the array member |
- Returns
- EINA_TRUE on success, EINA_FALSE otherwise.
The argument dst is considered uninitialized and it's set to the type of the member.
- Since
- 1.2
static Eina_Bool eina_value_array_pinsert(Eina_Value *value, unsigned int position, const void *ptr)
Inserts a generic value to an array member position from a pointer.
static Eina_Bool eina_value_array_append(Eina_Value *value,...)
Appends a generic value in an array.
const EAPI Eina_Value_Type * EINA_VALUE_TYPE_INT
Definition: eina_value.c:5599
static Eina_Bool eina_value_array_pset(Eina_Value *value, unsigned int position, const void *ptr)
Sets a generic value to an array member from a pointer.
int Eina_Error
The integer type containing the error type.
Definition: eina_error.h:89
static Eina_Bool eina_value_array_insert(Eina_Value *value, unsigned int position,...)
Inserts a generic value in an array member position.
static Eina_Bool eina_value_array_get(const Eina_Value *value, unsigned int position,...)
Gets the generic value from an array member.
EAPI Eina_Value * eina_value_array_new(const Eina_Value_Type *subtype, unsigned int step)
Creates generic value storage of type array.
Definition: eina_value.c:5767
static Eina_Bool eina_value_get(const Eina_Value *value,...)
Gets the generic value.
const EAPI char * eina_error_msg_get(Eina_Error error)
Returns the description of the given error number.
Definition: eina_error.c:289
static Eina_Bool eina_value_array_set(Eina_Value *value, unsigned int position,...)
Sets the generic value in an array member.
EAPI void eina_value_free(Eina_Value *value)
Frees value and its data.
Definition: eina_value.c:5649
static unsigned int eina_value_array_count(const Eina_Value *value)
Queries number of elements in value of array type.
static Eina_Bool eina_value_array_pappend(Eina_Value *value, const void *ptr)
Appends a generic value to an array from a pointer.
static Eina_Bool eina_value_array_pget(const Eina_Value *value, unsigned int position, void *ptr)
Retrieves a generic value into a pointer from an array member.
Definition: eina_value.h:661
#define EINA_VALUE_ARRAY_FOREACH(Array, Length, It, Value)
Definition for the macro to iterate over an array contained in an Eina_Value.
Definition: eina_value.h:1879