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

Data Structures | Functions
Generic Value Storage
Eina C++ » Data Types

Abstracts generic data storage and access to it in an extensible and efficient way. More...

## Data Structures
struct | efl::eina::_eina_value_traits< T, Enable >
struct | efl::eina::_eina_value_traits_base< T >
struct | efl::eina::_eina_value_traits_aux< T >
struct | efl::eina::_eina_value_traits_aux< uint64_t >
struct | efl::eina::_eina_value_traits< unsigned char >
struct | efl::eina::_eina_value_traits< unsigned short >
struct | efl::eina::_eina_value_traits< unsigned int >
struct | efl::eina::_eina_value_traits< unsigned long >
struct | efl::eina::_eina_value_traits< char >
struct | efl::eina::_eina_value_traits< short >
struct | efl::eina::_eina_value_traits< int >
struct | efl::eina::_eina_value_traits< long >
struct | efl::eina::_eina_value_traits< float >
struct | efl::eina::_eina_value_traits< double >
struct | efl::eina::_eina_value_traits< stringshare >
struct | efl::eina::_eina_value_traits< std::string >
struct | efl::eina::_eina_value_traits< T[], typename eina::enable_if< eina::is_pod< T >::value >::type >
class | efl::eina::value
| Store generic value. More...

## Functions
template<typename T >
T | efl::eina::get (value const &v)
void | efl::eina::swap (value &lhs, value &rhs)
| Swap the stored values between the given `eina::value` objects. More...
bool | efl::eina::operator== (value const &lhs, value const &rhs)
| Compare if the stored values are equal. More...
bool | efl::eina::operator< (value const &lhs, value const &rhs)
| Less than comparison between two `eina::value` objects. More...
bool | efl::eina::operator> (value const &lhs, value const &rhs)
| More than comparison between two `eina::value` objects. More...
bool | efl::eina::operator<= (value const &lhs, value const &rhs)
| Less than or equal comparison between two `eina::value` objects. More...
bool | efl::eina::operator>= (value const &lhs, value const &rhs)
| More than or equal comparison between two `eina::value` objects. More...
bool | efl::eina::operator!= (value const &lhs, value const &rhs)
| Compare if the stored values are different. More...

## Detailed Description

Abstracts generic data storage and access to it in an extensible and efficient way.

It is meant for simple data types, providing uniform access, useful to exchange data preserving their types.

## Function Documentation

template<typename T >

T efl::eina::get | ( | value const & | v | ) |

Parameters

  v | `eina::value` object.
  T | Type of the value stored.

Returns
  Copy of the value stored in `v`.

Exceptions

  <tt>eina::system_error</tt> | with error the code `EINA_ERROR_VALUE_FAILED` if `T` doesn't match the type of the value currently stored. Or `eina::system_error` with an internal Eina error code if the operation fails for another reason.

This function returns the value stored in `v`. The type of the value must be specified via the template parameter `T`, and must match the current stored value type.

void efl::eina::swap | ( | value & | lhs,
|  | value & | rhs
| ) |  |
| inline

Swap the stored values between the given `eina::value` objects.

Parameters

  lhs | First `eina::value` object.
  rhs | Second `eina::value` object.

References efl::eina::value::swap().

Referenced by efl::eina::value::swap().

bool efl::eina::operator== | ( | value const & | lhs,
|  | value const & | rhs
| ) |  |
| inline

Compare if the stored values are equal.

Parameters

  lhs | `eina::value` object at the left side of the expression.
  rhs | `eina::value` object at the right side of the expression.

Returns
  `true` if the stored values are of the same type and equals in content, `false` otherwise.

References eina_value_compare(), and efl::eina::value::type_info().

bool efl::eina::operator< | ( | value const & | lhs,
|  | value const & | rhs
| ) |  |
| inline

Less than comparison between two `eina::value` objects.

Parameters

  lhs | `eina::value` object at the left side of the expression.
  rhs | `eina::value` object at the right side of the expression.

Returns
  For objects holding values of the same type, returns `true` if `lhs` value is less than `rhs` value. For objects holding values of different types, returns `true` if the type identifier of `lhs` comes before the type indentifier of `rhs`. Returns `false` in all other cases.

References eina_value_compare(), and efl::eina::value::type_info().

bool efl::eina::operator> | ( | value const & | lhs,
|  | value const & | rhs
| ) |  |
| inline

More than comparison between two `eina::value` objects.

Parameters

  lhs | `eina::value` object at the left side of the expression.
  rhs | `eina::value` object at the right side of the expression.

Returns
  For objects holding values of the same type, returns `true` if `lhs` value is more than `rhs` value. For objects holding values of different types, returns `true` if the type identifier of `lhs` comes after the type indentifier of `rhs`. Returns `false` in all other cases.

References eina_value_compare(), and efl::eina::value::type_info().

bool efl::eina::operator<= | ( | value const & | lhs,
|  | value const & | rhs
| ) |  |
| inline

Less than or equal comparison between two `eina::value` objects.

Parameters

  lhs | `eina::value` object at the left side of the expression.
  rhs | `eina::value` object at the right side of the expression.

Returns
  For objects holding values of the same type, returns `true` if `lhs` value is less than or equal to `rhs` value. For objects holding values of different types, returns `true` if the type identifier of `lhs` comes before the type indentifier of `rhs`. Returns `false` in all other cases.

bool efl::eina::operator>= | ( | value const & | lhs,
|  | value const & | rhs
| ) |  |
| inline

More than or equal comparison between two `eina::value` objects.

Parameters

  lhs | `eina::value` object at the left side of the expression.
  rhs | `eina::value` object at the right side of the expression.

Returns
  For objects holding values of the same type, returns `true` if `lhs` value is more than or equal to `rhs` value. For objects holding values of different types, returns `true` if the type identifier of `lhs` comes after the type indentifier of `rhs`. Returns `false` in all other cases.

bool efl::eina::operator!= | ( | value const & | lhs,
|  | value const & | rhs
| ) |  |
| inline

Compare if the stored values are different.

Parameters

  lhs | `eina::value` object at the left side of the expression.
  rhs | `eina::value` object at the right side of the expression.

Returns
  `true` if the value types are different or if the value of `lhs` is different from the value of , `false` otherwise.