B2BITS FIX Antenna HFT  1.0.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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_NullableValue.h>

Public Types

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

Public Member Functions

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

Detailed Description

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

Represents entity with two states - initialized and not initialized.

Member Typedef Documentation

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

Self type.

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

Type of the store value.

Constructor & Destructor Documentation

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

Conversion constructor.

Converts value_type to self type.

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

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

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

Initializes object with value and flag.

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

Default constructor.

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

Generic copy constructor.

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

Generic conversion constructor.

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.

Member Function Documentation

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

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

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.

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

Returns true if value WAS assigned.

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

Initializes object with default value.

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

Returns true if value was NOT assigned.

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

Compare operator Compares two emptilies.

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

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

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

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

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

Selector.

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

Const selector.

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

Assign operator.

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

Assign operator.

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

Assign operator.

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

Generic assign operator.

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

Assign operator for "empty" identifier.

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

Generic assign operator for Emptily.

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

Compare operator Compares two emptilies.