Tizen Native API
5.0
|
Functions | |
Eina_Value * | eina_value_hash_new (const Eina_Value_Type *subtype, unsigned int buckets_power_size) |
Creates generic value storage of type hash. | |
static Eina_Bool | eina_value_hash_setup (Eina_Value *value, const Eina_Value_Type *subtype, unsigned int buckets_power_size) |
Initializes generic value storage of type hash. | |
static unsigned int | eina_value_hash_population (const Eina_Value *value) |
Queries number of elements in value of hash type. | |
static Eina_Bool | eina_value_hash_del (Eina_Value *value, const char *key) |
Removes element at given position in value of hash type. | |
static Eina_Bool | eina_value_hash_set (Eina_Value *value, const char *key,...) |
Sets the generic value in an hash member. | |
static Eina_Bool | eina_value_hash_get (const Eina_Value *value, const char *key,...) |
Gets the generic value from an hash member. | |
static Eina_Bool | eina_value_hash_vset (Eina_Value *value, const char *key, va_list args) |
Sets the generic value in an hash member. | |
static Eina_Bool | eina_value_hash_vget (const Eina_Value *value, const char *key, va_list args) |
Gets the generic value from an hash member. | |
static Eina_Bool | eina_value_hash_pset (Eina_Value *value, const char *key, const void *ptr) |
Sets the generic value in an hash member from pointer. | |
static Eina_Bool | eina_value_hash_pget (const Eina_Value *value, const char *key, void *ptr) |
Gets the generic value to pointer from an hash member. | |
Typedefs | |
typedef struct _Eina_Value_Hash | Eina_Value_Hash |
static Eina_Bool eina_value_hash_del | ( | Eina_Value * | value, |
const char * | key | ||
) | [static] |
Removes element at given position in value of hash type.
value | value object. |
key | key to find the member |
static Eina_Bool eina_value_hash_get | ( | const Eina_Value * | value, |
const char * | key, | ||
... | |||
) | [static] |
Gets the generic value from an hash member.
value | Source value object |
key | Key to find the member |
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 subtype. The list for basic types:
Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0); int x; eina_value_hash_set(value, "abc", 1234); eina_value_hash_get(value, "abc", &x); eina_value_free(value);
Eina_Value* eina_value_hash_new | ( | const Eina_Value_Type * | subtype, |
unsigned int | buckets_power_size | ||
) |
Creates generic value storage of type hash.
subtype | How to manage this hash members. |
buckets_power_size | How to allocate hash buckets (2 ^ buckets_power_size), if zero then a sane value is chosen. |
NULL
on failure.Create a new generic value storage of type hash. The members are managed using the description specified by subtype.
On failure, NULL
is returned.
static Eina_Bool eina_value_hash_pget | ( | const Eina_Value * | value, |
const char * | key, | ||
void * | ptr | ||
) | [static] |
Gets the generic value to pointer from an hash member.
value | Source value object |
key | Key to find the member |
ptr | Pointer to receive the contents. |
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 *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0); int x; eina_value_hash_set(value, "abc", 1234); eina_value_hash_pget(value, "abc", &x); eina_value_free(value);
static unsigned int eina_value_hash_population | ( | const Eina_Value * | value | ) | [static] |
Queries number of elements in value of hash type.
value | value object. |
static Eina_Bool eina_value_hash_pset | ( | Eina_Value * | value, |
const char * | key, | ||
const void * | ptr | ||
) | [static] |
Sets the generic value in an hash member from pointer.
value | Source value object |
key | Key to find the member |
ptr | Pointer to specify the contents. |
The pointer type is dependent on chosen value type. The list for basic types:
Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0); int x = 1234; eina_value_hash_pset(value, "abc", &x); eina_value_hash_pget(value, "abc", &x); eina_value_free(value);
static Eina_Bool eina_value_hash_set | ( | Eina_Value * | value, |
const char * | key, | ||
... | |||
) | [static] |
Sets the generic value in an hash member.
value | Source value object |
key | Key to find the member |
The variable argument is dependent on chosen subtype. The list for basic types:
Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0); int x; eina_value_hash_set(value, "abc", 5678); eina_value_hash_get(value, "abc", &x); eina_value_free(value);
static Eina_Bool eina_value_hash_setup | ( | Eina_Value * | value, |
const Eina_Value_Type * | subtype, | ||
unsigned int | buckets_power_size | ||
) | [static] |
Initializes generic value storage of type hash.
value | Value object |
subtype | How to manage this hash members. |
buckets_power_size | How to allocate hash buckets (2 ^ buckets_power_size), if zero then a sane value is chosen. |
Initializes new generic value storage of type hash with the given subtype.
This is the same as calling eina_value_set() with EINA_VALUE_TYPE_HASH followed by eina_value_pset() with the Eina_Value_Hash description configured.
On failure, EINA_FALSE is returned.
static Eina_Bool eina_value_hash_vget | ( | const Eina_Value * | value, |
const char * | key, | ||
va_list | args | ||
) | [static] |
Gets the generic value from an hash member.
value | Source value object |
key | Key to find the member |
args | Variable argument |
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.
static Eina_Bool eina_value_hash_vset | ( | Eina_Value * | value, |
const char * | key, | ||
va_list | args | ||
) | [static] |
Sets the generic value in an hash member.
value | Source value object |
key | Key to find the member |
args | Variable argument |