Public Member Functions | Friends
efl::eina::value Struct Reference

Store generic value. More...

Public Member Functions

 value (std::nullptr_t)
 
 value (Eina_Value *raw)
 
 value (Eina_Value const *raw)
 
 ~value ()
 Deallocate stored value.
 
 value (value_view const &other)
 Copy Constructor. More...
 
valueoperator= (value other)
 Assignment operator. More...
 
void swap (value &other)
 
- Public Member Functions inherited from efl::eina::value_view
 value_view ()
 Default constructor. More...
 
template<typename T >
 value_view (T v, typename std::enable_if< _eina_value_traits< T >::is_specialized::value >::type *=0)
 Create an generic value storage holding the given argument. More...
 
 value_view (char v)
 Create an generic value storage holding a char value. More...
 
 value_view (short v)
 Create an generic value storage holding a short value. More...
 
 value_view (int v)
 Create an generic value storage holding a int value. More...
 
 value_view (long v)
 Create an generic value storage holding a long value. More...
 
 value_view (unsigned char v)
 Create an generic value storage holding a unsigned char value. More...
 
 value_view (unsigned short v)
 Create an generic value storage holding a unsigned short value. More...
 
 value_view (unsigned int v)
 Create an generic value storage holding a unsigned int value. More...
 
 value_view (unsigned long v)
 Create an generic value storage holding a unsigned long value. More...
 
 value_view (float v)
 Create an generic value storage holding a float value. More...
 
 value_view (double v)
 Create an generic value storage holding a double value. More...
 
 value_view (Eina_Value *raw)
 
void swap (value_view &other)
 Swap stored values with the given eina::value object. More...
 
native_handle_type native_handle () const
 
type_info_t type_info () const
 Get an identifier for the type of the value currently stored. More...
 

Friends

void swap (value &lhs, value &rhs)
 Swap the stored values between the given eina::value objects. More...
 
bool operator== (value const &lhs, value const &rhs)
 Compare if the stored values are equal. More...
 
bool operator< (value const &lhs, value const &rhs)
 Less than comparison between two eina::value objects. More...
 
bool operator> (value const &lhs, value const &rhs)
 More than comparison between two eina::value objects. More...
 
bool operator<= (value const &lhs, value const &rhs)
 Less than or equal comparison between two eina::value objects. More...
 
bool operator>= (value const &lhs, value const &rhs)
 More than or equal comparison between two eina::value objects. More...
 
bool operator!= (value const &lhs, value const &rhs)
 Compare if the stored values are different. More...
 

Additional Inherited Members

- Public Types inherited from efl::eina::value_view
typedef Eina_Valuenative_handle_type
 Get a handle for the wrapped Eina_Value. More...
 
typedef Eina_Value_Type const * type_info_t
 Type for a constant pointer to an Eina_Value_Type. More...
 
- Protected Attributes inherited from efl::eina::value_view
::Eina_Value_raw
 

Detailed Description

Store generic value.

Constructor & Destructor Documentation

◆ value()

efl::eina::value::value ( value_view const &  other)
inline

Copy Constructor.

Create an generic value storage holding the same value of other.

Parameters
otherAnother eina::value object.

References eina_value_copy(), and eina_value_free().

Member Function Documentation

◆ operator=()

value& efl::eina::value::operator= ( value  other)
inline

Assignment operator.

Replace the current stored value by the value in other.

Parameters
otherAnother eina::value object.

References efl::eina::swap().

Friends And Related Function Documentation

◆ swap

void swap ( value lhs,
value rhs 
)
friend

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

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

◆ operator==

bool operator== ( value const &  lhs,
value const &  rhs 
)
friend

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.

◆ operator<

bool operator< ( value const &  lhs,
value const &  rhs 
)
friend

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.

◆ operator>

bool operator> ( value const &  lhs,
value const &  rhs 
)
friend

More 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 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.

◆ operator<=

bool operator<= ( value const &  lhs,
value const &  rhs 
)
friend

Less 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 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 operator>= ( value const &  lhs,
value const &  rhs 
)
friend

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 operator!= ( value const &  lhs,
value const &  rhs 
)
friend

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.