Data Structures | Functions
Generic Value Storage

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_view
 Store generic value. More...
 
struct  efl::eina::value
 Store generic value. More...
 

Functions

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

◆ get()

template<typename T >
T efl::eina::get ( value_view const &  v)
Parameters
veina::value object.
TType 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.

◆ swap()

void efl::eina::swap ( value_view lhs,
value_view rhs 
)
inline

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

Parameters
lhsFirst eina::value object.
rhsSecond eina::value object.

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

Referenced by efl::eina::value::operator=(), and efl::eina::value_view::swap().

◆ operator==()

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

Compare if the stored values are equal.

Parameters
lhseina::value object at the left side of the expression.
rhseina::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_view::type_info().

◆ operator<()

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

Less than comparison between two eina::value objects.

Parameters
lhseina::value object at the left side of the expression.
rhseina::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_view::type_info().

◆ operator>()

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

More than comparison between two eina::value_view objects.

Parameters
lhseina::value_view object at the left side of the expression.
rhseina::value_view 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_view::type_info().

◆ operator<=()

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

Less than or equal comparison between two eina::value_view objects.

Parameters
lhseina::value_view object at the left side of the expression.
rhseina::value_view 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.

◆ operator>=()

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

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

Parameters
lhseina::value object at the left side of the expression.
rhseina::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.

◆ operator!=()

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

Compare if the stored values are different.

Parameters
lhseina::value object at the left side of the expression.
rhseina::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.