TrivialDataPtr Class Reference

#include <datatypebase.h>

Detailed Description

Trivial class layout-compatible with ConstDataPtr, DataPtr and MoveDataPtr.

Public Member Functions

 TrivialDataPtr ()=default
 
 TrivialDataPtr (const ConstDataPtr &src)
 
 TrivialDataPtr (ConstDataPtr &&src)=delete
 
 TrivialDataPtr (const Data &src)
 
 TrivialDataPtr (const DataType &type, const Generic *value)
 
const DataTypeGetType () const
 
const Generic * PrivateGetPtr () const
 
const Generic * GetPtr (const DataType &type) const
 
template<typename T >
const T * GetPtr () const
 
template<typename T >
Opt< const T & > Get () const
 
const ConstDataPtrToConstDataPtr () const
 
const DataPtrToDataPtr () const
 
Bool IsEmpty () const
 
Bool IsPopulated () const
 

Public Attributes

const DataTypeImpl_typeInfo
 
const Generic * _dataPtr
 

Constructor & Destructor Documentation

◆ TrivialDataPtr() [1/5]

TrivialDataPtr ( )
default

◆ TrivialDataPtr() [2/5]

TrivialDataPtr ( const ConstDataPtr src)
explicit

◆ TrivialDataPtr() [3/5]

TrivialDataPtr ( ConstDataPtr &&  src)
explicitdelete

◆ TrivialDataPtr() [4/5]

TrivialDataPtr ( const Data src)
explicit

◆ TrivialDataPtr() [5/5]

TrivialDataPtr ( const DataType type,
const Generic *  value 
)

Member Function Documentation

◆ GetType()

const DataType& GetType ( void  ) const

◆ PrivateGetPtr()

const Generic* PrivateGetPtr ( ) const

◆ GetPtr() [1/2]

const Generic* GetPtr ( const DataType type) const

◆ GetPtr() [2/2]

const T* GetPtr ( void  ) const

◆ Get()

Opt<const T&> Get ( void  ) const

◆ ToConstDataPtr()

const ConstDataPtr& ToConstDataPtr ( ) const

◆ ToDataPtr()

const DataPtr& ToDataPtr ( ) const

◆ IsEmpty()

Bool IsEmpty ( ) const

◆ IsPopulated()

Bool IsPopulated ( void  ) const

Member Data Documentation

◆ _typeInfo

const DataTypeImpl* _typeInfo

◆ _dataPtr

const Generic* _dataPtr