iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::OptionalBase< T, false > Class Template Reference

#include <nrt/Core/Design/details/OptionalHelpers.H>

template<class T>
class nrt::OptionalBase< T, false >

Value template specialization for OptionalBase.

Template Parameters
TThe type to hold, stripped of any reference

Definition at line 202 of file OptionalHelpers.H.

Public Types

typedef T ActualType
 The actual type we hold.
 
typedef
std::add_lvalue_reference
< typename std::add_const< T >
::type >::type 
ArgumentTypeCopy
 The type we expect for copy construction.
 
typedef
std::add_rvalue_reference< T >
::type 
ArgumentTypeMove
 The type we expect for move construction.
 

Public Member Functions

 OptionalBase ()
 Default construction.
 
 OptionalBase (OptionalBase const &other)
 Copy construction.
 
 OptionalBase (OptionalBase &&other)
 Move construction. More...
 
 OptionalBase (ArgumentTypeCopy otherT)
 Copy construction from the type we hold.
 
 OptionalBase (ArgumentTypeMove otherT)
 Move construction from the type we hold.
 
 ~OptionalBase ()
 Destructor.
 
OptionalBaseoperator= (OptionalBase const &other)
 Copy assignment.
 
OptionalBaseoperator= (OptionalBase &&other)
 Move assignment. More...
 
OptionalBaseoperator= (ArgumentTypeCopy other)
 Copy assignment from the type we hold.
 
OptionalBaseoperator= (ArgumentTypeMove other)
 Move assignment from the type we hold.
 
void clear ()
 Marks this as having no valid data.
 
bool isSet () const
 Checks whether we have data.
 
 operator bool () const
 Returns the result of isSet.
 
T & inferType ()
 Used to get the type we hold at compile time with decltype.
 
T const & inferType () const
 Used to get the type we hold at compile time with decltype.
 
T * get ()
 Gets a pointer to the data.
 
T const * get () const
 Gets a pointer to the const data.
 
T * operator-> ()
 Gets a pointer to the data.
 
T const * operator-> () const
 Gets a pointer to the const data.
 
T & operator* ()
 Gets a reference to the data.
 
T const & operator* () const
 Gets a const reference to the data.
 

Constructor & Destructor Documentation

template<class T >
nrt::OptionalBase< T, false >::OptionalBase ( OptionalBase< T, false > &&  other)

Move construction.

Move construction will invalidate the other OptionalBase

Member Function Documentation

template<class T >
OptionalBase& nrt::OptionalBase< T, false >::operator= ( OptionalBase< T, false > &&  other)

Move assignment.

Move assignment will invalidate the other OptionalBase


The documentation for this class was generated from the following file: