Data Structures | Functions
Optional Value

Data Structures

struct  efl::eina::optional< T >
 This class manages an optional contained value, i.e. More...
 
struct  efl::eina::optional< T & >
 

Functions

template<typename T >
void efl::eina::adl_swap (T &lhs, T &rhs)
 
template<typename T >
constexpr optional< typename std::decay< T >::type > efl::eina::make_optional (T &&value)
 
template<typename T >
void efl::eina::swap (optional< T > &lhs, optional< T > &rhs)
 Swap content with another eina::optional object.
 
template<typename T >
bool efl::eina::operator== (optional< T > const &lhs, optional< T > const &rhs)
 Check if both eina::optional object are equal. More...
 
template<typename T >
bool efl::eina::operator!= (optional< T > const &lhs, optional< T > const &rhs)
 Check if the eina::optional objects are different. More...
 
template<typename T >
bool efl::eina::operator< (optional< T > const &lhs, optional< T > const &rhs)
 Less than comparison between eina::optional objects. More...
 
template<typename T >
bool efl::eina::operator<= (optional< T > const &lhs, optional< T > const &rhs)
 Less than or equal comparison between eina::optional objects. More...
 
template<typename T >
bool efl::eina::operator> (optional< T > const &lhs, optional< T > const &rhs)
 More than comparison between eina::optional objects. More...
 
template<typename T >
bool efl::eina::operator>= (optional< T > const &lhs, optional< T > const &rhs)
 More than or equal comparison between eina::optional objects. More...
 

Detailed Description

Function Documentation

◆ operator==()

template<typename T >
bool efl::eina::operator== ( optional< T > const &  lhs,
optional< T > const &  rhs 
)

Check if both eina::optional object are equal.

Parameters
lhseina::optional object at the left side of the expression.
rhseina::optional object at the right side of the expression.
Returns
true if both are objects are disengaged of if both objects are engaged and contain the same value, false in all other cases.

◆ operator!=()

template<typename T >
bool efl::eina::operator!= ( optional< T > const &  lhs,
optional< T > const &  rhs 
)

Check if the eina::optional objects are different.

Parameters
lhseina::optional object at the left side of the expression.
rhseina::optional object at the right side of the expression.
Returns
The opposite of operator==(optional<T> const& lhs, optional<T> const& rhs).

◆ operator<()

template<typename T >
bool efl::eina::operator< ( optional< T > const &  lhs,
optional< T > const &  rhs 
)

Less than comparison between eina::optional objects.

Parameters
lhseina::optional object at the left side of the expression.
rhseina::optional object at the right side of the expression.
Returns
true if both objects are engaged and the contained value of lhs is less than the contained value of rhs, or if only lhs is disengaged. In all other cases returns false.

◆ operator<=()

template<typename T >
bool efl::eina::operator<= ( optional< T > const &  lhs,
optional< T > const &  rhs 
)

Less than or equal comparison between eina::optional objects.

Parameters
lhseina::optional object at the left side of the expression.
rhseina::optional object at the right side of the expression.
Returns
true if lhs is disengaged or if both objects are engaged and the contained value of lhs is less than or equal to the contained value of rhs. In all other cases returns false.

◆ operator>()

template<typename T >
bool efl::eina::operator> ( optional< T > const &  lhs,
optional< T > const &  rhs 
)

More than comparison between eina::optional objects.

Parameters
lhseina::optional object at the left side of the expression.
rhseina::optional object at the right side of the expression.
Returns
true if both objects are engaged and the contained value of lhs is more than the contained value of rhs, or if only rhs is disengaged. In all other cases returns false.

◆ operator>=()

template<typename T >
bool efl::eina::operator>= ( optional< T > const &  lhs,
optional< T > const &  rhs 
)

More than or equal comparison between eina::optional objects.

Parameters
lhseina::optional object at the left side of the expression.
rhseina::optional object at the right side of the expression.
Returns
true if rhs is disengaged or if both objects are engaged and the contained value of lhs is more than or equal to the contained value of rhs. In all other cases returns false.