OnixS ICE iMpact Multicast Feed Handler for C++  3.13.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Optional< T > Class Template Reference

Public Member Functions

 Optional ()
 Uninitialized instance.
 
 Optional (const T &val)
 Constructs the optional object.
 
 Optional (const Optional< T > &opt)
 Initializes the contained value by copying the contained value of other, but only if other is engaged. More...
 
Optional & operator= (const Optional< T > &opt)
 Assigns contents.
 
Optional & operator= (const T &val)
 Assigns contents.
 
 ~Optional ()
 If engaged, destroys the contained value.
 
 operator bool () const
 Checks whether the object is in engaged state.
 
T & operator* ()
 Returns a reference to the contained value.
 
const T & operator* () const
 Returns a const reference to the contained value.
 
T & value ()
 A reference to the contained value.
 
const T & value () const
 A const reference to the contained value.
 
void reset ()
 Reset stored value and set state to Uninitialized.
 

Protected Member Functions

void * storage ()
 
const void * storage () const
 
T & get ()
 
const T & get () const
 
void destruct ()
 
void construct (const T &data)
 

Protected Attributes

char data_ [sizeof(T)]
 
bool init_
 

Constructor & Destructor Documentation

Optional ( const Optional< T > &  opt)
inline

Initializes the contained value by copying the contained value of other, but only if other is engaged.

other is still in engaged state if it was in engaged state before the call.