B2BITS FIX Antenna C++ 2.32.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Utils::Emptily< T > Class Template Reference

Represents entity with two states - initialized and not initialized. More...

#include <B2BITS_Emptily.h>

Public Types

typedef Emptily< value_type_Myt
 Self type.
 
typedef T value_type
 Type of the store value.
 

Public Member Functions

 Emptily ()
 Default constructor.
 
template<typename Other >
 Emptily (const Emptily< Other > &other)
 Generic copy constructor.
 
template<typename Other >
 Emptily (const Other &other)
 Generic conversion constructor.
 
 Emptily (const Utils::NullableValue< T > &value)
 Explicit conversion constructor from NullableValue User cannot pass NullableValue with undefined state.
 
 Emptily (const value_type &value)
 Conversion constructor.
 
 Emptily (const value_type &value, bool aIsEmpty)
 Initializes object with value and flag.
 
 Emptily (Utils::EmptyValue)
 Conversion constructor Allow user to use "empty" identifier instead of Emptily.
 
bool equals (const _Myt &rv) const
 Compares two Emptilies.
 
T * get ()
 Returns pointer to strored value If value was not assigned, std::exception will be raised.
 
const T * get () const
 Returns pointer to strored value If value was not assigned, std::exception will be raised.
 
bool hasValue () const
 Returns true if value WAS assigned.
 
void init ()
 Initializes object with default value.
 
bool isEmpty () const
 Returns true if value was NOT assigned.
 
bool operator!= (const _Myt &rv) const
 Compare operator Compares two emptilies.
 
T & operator* ()
 Returns strored value If value was not assigned, std::exception will be raised.
 
const T & operator* () const
 Returns strored value If value was not assigned, std::exception will be raised.
 
T * operator-> ()
 Selector.
 
const T * operator-> () const
 Const selector.
 
_Mytoperator= (const _Myt &value)
 Assign operator.
 
template<typename Other >
_Mytoperator= (const Emptily< Other > &value)
 Generic assign operator for Emptily.
 
template<typename Other >
_Mytoperator= (const Other &value)
 Generic assign operator.
 
_Mytoperator= (const Utils::NullableValue< T > &value)
 Assign operator.
 
_Mytoperator= (const value_type &value)
 Assign operator.
 
_Mytoperator= (Utils::EmptyValue)
 Assign operator for "empty" identifier.
 
bool operator== (const _Myt &rv) const
 Compare operator Compares two emptilies.
 

Detailed Description

template<typename T>
class Utils::Emptily< T >

Represents entity with two states - initialized and not initialized.

Member Typedef Documentation

◆ _Myt

template<typename T >
typedef Emptily<value_type> Utils::Emptily< T >::_Myt

Self type.

◆ value_type

template<typename T >
typedef T Utils::Emptily< T >::value_type

Type of the store value.

Constructor & Destructor Documentation

◆ Emptily() [1/7]

template<typename T >
Utils::Emptily< T >::Emptily ( const value_type & value)
inline

Conversion constructor.

Converts value_type to self type.

◆ Emptily() [2/7]

template<typename T >
Utils::Emptily< T >::Emptily ( Utils::EmptyValue )
inline

Conversion constructor Allow user to use "empty" identifier instead of Emptily.

◆ Emptily() [3/7]

template<typename T >
Utils::Emptily< T >::Emptily ( const value_type & value,
bool aIsEmpty )
inline

Initializes object with value and flag.

◆ Emptily() [4/7]

template<typename T >
Utils::Emptily< T >::Emptily ( )
inline

Default constructor.

◆ Emptily() [5/7]

template<typename T >
template<typename Other >
Utils::Emptily< T >::Emptily ( const Emptily< Other > & other)
inline

Generic copy constructor.

◆ Emptily() [6/7]

template<typename T >
template<typename Other >
Utils::Emptily< T >::Emptily ( const Other & other)
inline

Generic conversion constructor.

◆ Emptily() [7/7]

template<typename T >
Utils::Emptily< T >::Emptily ( const Utils::NullableValue< T > & value)
inlineexplicit

Explicit conversion constructor from NullableValue User cannot pass NullableValue with undefined state.

References Utils::NullableValue< T >::isDefined().

Member Function Documentation

◆ equals()

template<typename T >
bool Utils::Emptily< T >::equals ( const _Myt & rv) const
inline

Compares two Emptilies.

Referenced by Utils::Emptily< T >::operator!=(), and Utils::Emptily< T >::operator==().

◆ get() [1/2]

template<typename T >
T * Utils::Emptily< T >::get ( )
inline

Returns pointer to strored value If value was not assigned, std::exception will be raised.

Referenced by Utils::Emptily< T >::operator*(), Utils::Emptily< T >::operator*(), Utils::Emptily< T >::operator->(), and Utils::Emptily< T >::operator->().

◆ get() [2/2]

template<typename T >
const T * Utils::Emptily< T >::get ( ) const
inline

Returns pointer to strored value If value was not assigned, std::exception will be raised.

◆ hasValue()

template<typename T >
bool Utils::Emptily< T >::hasValue ( ) const
inline

Returns true if value WAS assigned.

◆ init()

template<typename T >
void Utils::Emptily< T >::init ( )
inline

Initializes object with default value.

◆ isEmpty()

template<typename T >
bool Utils::Emptily< T >::isEmpty ( ) const
inline

Returns true if value was NOT assigned.

Referenced by Utils::operator<<().

◆ operator!=()

template<typename T >
bool Utils::Emptily< T >::operator!= ( const _Myt & rv) const
inline

Compare operator Compares two emptilies.

References Utils::Emptily< T >::equals().

◆ operator*() [1/2]

template<typename T >
T & Utils::Emptily< T >::operator* ( )
inline

Returns strored value If value was not assigned, std::exception will be raised.

References Utils::Emptily< T >::get().

◆ operator*() [2/2]

template<typename T >
const T & Utils::Emptily< T >::operator* ( ) const
inline

Returns strored value If value was not assigned, std::exception will be raised.

References Utils::Emptily< T >::get().

◆ operator->() [1/2]

template<typename T >
T * Utils::Emptily< T >::operator-> ( )
inline

Selector.

References Utils::Emptily< T >::get().

◆ operator->() [2/2]

template<typename T >
const T * Utils::Emptily< T >::operator-> ( ) const
inline

Const selector.

References Utils::Emptily< T >::get().

◆ operator=() [1/6]

template<typename T >
_Myt & Utils::Emptily< T >::operator= ( const _Myt & value)
inline

Assign operator.

◆ operator=() [2/6]

template<typename T >
template<typename Other >
_Myt & Utils::Emptily< T >::operator= ( const Emptily< Other > & value)
inline

Generic assign operator for Emptily.

◆ operator=() [3/6]

template<typename T >
template<typename Other >
_Myt & Utils::Emptily< T >::operator= ( const Other & value)
inline

Generic assign operator.

◆ operator=() [4/6]

template<typename T >
_Myt & Utils::Emptily< T >::operator= ( const Utils::NullableValue< T > & value)
inline

Assign operator.

◆ operator=() [5/6]

template<typename T >
_Myt & Utils::Emptily< T >::operator= ( const value_type & value)
inline

Assign operator.

◆ operator=() [6/6]

template<typename T >
_Myt & Utils::Emptily< T >::operator= ( Utils::EmptyValue )
inline

Assign operator for "empty" identifier.

◆ operator==()

template<typename T >
bool Utils::Emptily< T >::operator== ( const _Myt & rv) const
inline

Compare operator Compares two emptilies.

References Utils::Emptily< T >::equals().