Generic Value Optional management

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

Typedefs | Functions | Variables
Generic Value Optional management
Eina » Data Types » Containers » Generic Value Storage

## Typedefs
typedef Eina_Value_Union | Eina_Value_Optional
typedef struct _Eina_Value_Struct | Eina_Value_Struct
| Value type for EINA_VALUE_TYPE_STRUCT. More...

## Functions
static Eina_Value * | eina_value_optional_empty_new (void)
| Create an empty optional. More...
Eina_Value * | eina_value_optional_new (const Eina_Value_Type *subtype, const void *value)
| Create an optional eina value with the passed value. More...
static Eina_Bool | eina_value_optional_empty_is (const Eina_Value *value, Eina_Bool *is_empty)
| Function to know if an eina optional is empty or not. More...
Eina_Bool | eina_value_optional_pset (Eina_Value *value, Eina_Value_Type const *subtype, const void *subvalue)
| Set the optional with a value. More...
Eina_Bool | eina_value_optional_pget (Eina_Value *value, void *subvalue)
| Get the value from an optional. More...
Eina_Bool | eina_value_optional_reset (Eina_Value *value)
| Resets eina optional to empty. More...
static const Eina_Value_Type * | eina_value_optional_type_get (Eina_Value *value)
| Get type from value that is stored on Eina Value Optional. More...

## Variables
const Eina_Value_Type * | EINA_VALUE_TYPE_OPTIONAL
| manages optional type. More...
const Eina_Value_Type * | EINA_VALUE_TYPE_OPTIONAL = NULL
| manages optional type. More...

## Detailed Description

## Typedef Documentation

Eina_Value_Optional type to be used with Eina_Value_Struct

Value type for EINA_VALUE_TYPE_STRUCT.

See also
  _Eina_Value_Struct explains fields.

Since
  1.2
  1.17

## Function Documentation

static Eina_Value* eina_value_optional_empty_new | ( | void |  | ) |
| inlinestatic

Create an empty optional.

This is the same as eina_value_new(EINA_VALUE_TYPE_OPTIONAL).

Returns
  returns an empty optional eina value.

Since
  1.17

Eina_Value* eina_value_optional_new | ( | const Eina_Value_Type * | subtype,
|  | const void * | value
| ) |  |

Create an optional eina value with the passed value.

Parameters

  subtype | Eina_Value_Type of parameter value
  value | The value to be used to construct optional eina value

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

Since
  1.17

static Eina_Bool eina_value_optional_empty_is | ( | const Eina_Value * | value,
|  | Eina_Bool * | is_empty
| ) |  |
| inlinestatic

Function to know if an eina optional is empty or not.

Parameters

  value | Eina Value Optional
  is_empty | EINA_TRUE if optional is empty, EINA_FALSE otherwise.

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

Since
  1.17

Eina_Bool eina_value_optional_pset | ( | Eina_Value * | value,
|  | Eina_Value_Type const * | subtype,
|  | const void * | subvalue
| ) |  |

Set the optional with a value.

Parameters

  value | Eina Value Optional to be set with subvalue
  subtype | Type of subvalue
  subvalue | Value to be set in optional

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

Since
  1.17

Eina_Bool eina_value_optional_pget | ( | Eina_Value * | value,
|  | void * | subvalue
| ) |  |

Get the value from an optional.

Parameters

  value | Eina Value Optional to get value from
  subvalue | Pointer to where value is to be copied to. You must use the correct type according to eina_value_optional_type_get

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

Since
  1.17

Eina_Bool eina_value_optional_reset | ( | Eina_Value * | value | ) |

Resets eina optional to empty.

Parameters

  value | Eina Value Optional

Returns
  EINA_TRUE on success, EINA_FALSE otherwise.

Since
  1.17

static const Eina_Value_Type* eina_value_optional_type_get | ( | Eina_Value * | value | ) |
| inlinestatic

Get type from value that is stored on Eina Value Optional.

Parameters

  value | Eina Value Optional

Returns
  The optional sub-type.

Since
  1.17

## Variable Documentation

const Eina_Value_Type* EINA_VALUE_TYPE_OPTIONAL

manages optional type.

Since
  1.17

EINA_VALUE_TYPE_OPTIONAL = NULL

manages optional type.

Since
  1.17