OnixS ICE iMpact Multicast Price Feed Handler C++ library 8.20.0
Users' manual and API documentation
Loading...
Searching...
No Matches
Optional< T > Class Template Reference

#include <Optional.h>

Public Member Functions

 Optional ()
 Optional (const T &val)
 Optional (const Optional< T > &opt)
Optionaloperator= (const Optional< T > &opt)
Optionaloperator= (const T &val)
 ~Optional ()
 operator bool () const
T & operator* ()
const T & operator* () const
T & value ()
const T & value () const
void reset ()

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_

Detailed Description

template<typename T>
class OnixS::ICE::iMpact::MarketData::Optional< T >

Definition at line 31 of file Optional.h.

Constructor & Destructor Documentation

◆ Optional() [1/3]

template<typename T>
Optional ( )
inline

Uninitialized instance.

Definition at line 35 of file Optional.h.

◆ Optional() [2/3]

template<typename T>
Optional ( const T & val)
inline

Constructs the optional object.

Definition at line 41 of file Optional.h.

◆ Optional() [3/3]

template<typename T>
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.

Definition at line 52 of file Optional.h.

◆ ~Optional()

template<typename T>
~Optional ( )
inline

If engaged, destroys the contained value.

Definition at line 109 of file Optional.h.

Member Function Documentation

◆ construct()

template<typename T>
void construct ( const T & data)
inlineprotected

Definition at line 185 of file Optional.h.

◆ destruct()

template<typename T>
void destruct ( )
inlineprotected

Definition at line 176 of file Optional.h.

◆ get() [1/2]

template<typename T>
T & get ( )
inlineprotected

Definition at line 166 of file Optional.h.

◆ get() [2/2]

template<typename T>
const T & get ( ) const
inlineprotected

Definition at line 171 of file Optional.h.

◆ operator bool()

template<typename T>
operator bool ( ) const
inline

Checks whether the object is in engaged state.

Definition at line 115 of file Optional.h.

◆ operator*() [1/2]

template<typename T>
T & operator* ( )
inline

Returns a reference to the contained value.

Definition at line 121 of file Optional.h.

◆ operator*() [2/2]

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

Returns a const reference to the contained value.

Definition at line 127 of file Optional.h.

◆ operator=() [1/2]

template<typename T>
Optional & operator= ( const Optional< T > & opt)
inline

Assigns contents.

Definition at line 62 of file Optional.h.

◆ operator=() [2/2]

template<typename T>
Optional & operator= ( const T & val)
inline

Assigns contents.

Definition at line 88 of file Optional.h.

◆ reset()

template<typename T>
void reset ( )
inline

Reset stored value and set state to Uninitialized.

Definition at line 145 of file Optional.h.

◆ storage() [1/2]

template<typename T>
void * storage ( )
inlineprotected

Definition at line 153 of file Optional.h.

◆ storage() [2/2]

template<typename T>
const void * storage ( ) const
inlineprotected

Definition at line 158 of file Optional.h.

◆ value() [1/2]

template<typename T>
T & value ( )
inline

A reference to the contained value.

Definition at line 133 of file Optional.h.

◆ value() [2/2]

template<typename T>
const T & value ( ) const
inline

A const reference to the contained value.

Definition at line 139 of file Optional.h.

Member Data Documentation

◆ data_

template<typename T>
char data_[sizeof(T)]
protected

Definition at line 193 of file Optional.h.

◆ init_

template<typename T>
bool init_
protected

Definition at line 194 of file Optional.h.