ConstData Class Reference

#include <constdata.h>

Inheritance diagram for ConstData:

Detailed Description

ConstData derives from ConstDataPtr and behaves the same way if it holds no ownership over any data. It also contains a Data object that may be used to hold ownership of generic data. In that case the pointer in ConstDataPtr will target the generic data in the Data member. The type of the object is only known at run-time.

Public Member Functions

 ConstData ()
 
 ConstData (ConstData &&src)
 
 ConstData (const ConstDataPtr &src)
 
 ConstData (ConstDataPtr &&src)
 
 ConstData (const Data &src)
 
template<typename T >
 ConstData (T &&value)
 
 ConstData (const DataType &typeInfo, const Generic *dataPtr)
 
ConstDataoperator= (ConstData &&src)
 
Result< void > CopyFrom (const ConstData &src)
 
Result< void > CopyFrom (const Data &src)
 
template<typename T >
Result< void > MoveFrom (T &&src)
 
Result< void > MoveFrom (Data &src)
 
- Public Member Functions inherited from ConstDataPtr
 ConstDataPtr ()=default
 
 ConstDataPtr (const Data &value)
 
 ConstDataPtr (const DataType &typeInfo, const Generic *dataPtr)
 
template<typename T >
 ConstDataPtr (const T &value)
 
Bool IsEmpty () const
 
Bool IsPopulated () const
 
const DataTypeGetType () const
 
DataType && ResetType ()
 
const Generic * PrivateGetPtr () const
 
void Set (const DataType &typeInfo, const Generic *dataPtr)
 
template<typename T >
void Set (const T &value)
 
void Set (const Data &value)
 
void Set (Data &value)
 
void Set (Data &&value)
 
const Generic * GetPtr (const DataType &type) const
 
template<typename T >
const T * GetPtr () const
 
template<typename T >
Result< typename std::conditional< STD_IS_REPLACEMENT(same, T, Data)||(GetCollectionKind< T >::value==COLLECTION_KIND::ARRAY), T, typename ByValueParam< T >::type >::typeGet () const
 
template<typename T >
ByValueParam< T >::type GetOrNull () const
 
template<typename T >
ByValueParam< T >::type Get (const T &defaultValue) const
 
COMPARERESULT Compare (const ConstDataPtr &c) const
 
COMPARERESULT Compare (const Data &c) const
 
HashInt GetHashCode () const
 
UniqueHash GetUniqueHashCode () const
 
Bool operator== (const ConstDataPtr &c) const
 
Bool operator!= (const ConstDataPtr &c) const
 
Bool operator< (const ConstDataPtr &c) const
 
Bool operator<= (const ConstDataPtr &c) const
 
Bool operator> (const ConstDataPtr &c) const
 
Bool operator>= (const ConstDataPtr &c) const
 
String ToString (const FormatStatement *formatStatement=nullptr) const
 
template<>
Result< void > Get () const
 
template<>
Result< DataGet () const
 

Private Member Functions

 MAXON_DISALLOW_COPY_AND_ASSIGN (ConstData)
 

Private Attributes

Data _ownedData
 

Additional Inherited Members

- Static Public Member Functions inherited from ConstDataPtr
static MAXON_ATTRIBUTE_FORCE_INLINE const ConstDataPtrNullValue ()
 
- Protected Member Functions inherited from ConstDataPtr
template<typename T >
Result< typename ByValueParam< T >::typeGetImpl (OverloadRank0) const
 
template<typename T >
std::enable_if< GetCollectionKind< T >::value==COLLECTION_KIND::ARRAY, Result< T > >::type GetImpl (OverloadRank1) const
 
- Protected Attributes inherited from ConstDataPtr
DataType _typeInfo
 
const Generic * _dataPtr
 

Constructor & Destructor Documentation

◆ ConstData() [1/7]

ConstData ( )

◆ ConstData() [2/7]

ConstData ( ConstData &&  src)

◆ ConstData() [3/7]

ConstData ( const ConstDataPtr src)

◆ ConstData() [4/7]

ConstData ( ConstDataPtr &&  src)

◆ ConstData() [5/7]

ConstData ( const Data src)
explicit

◆ ConstData() [6/7]

ConstData ( T &&  value)
explicit

◆ ConstData() [7/7]

ConstData ( const DataType typeInfo,
const Generic *  dataPtr 
)

Member Function Documentation

◆ MAXON_DISALLOW_COPY_AND_ASSIGN()

MAXON_DISALLOW_COPY_AND_ASSIGN ( ConstData  )
private

◆ operator=()

ConstData& operator= ( ConstData &&  src)

◆ CopyFrom() [1/2]

Result<void> CopyFrom ( const ConstData src)

◆ CopyFrom() [2/2]

Result<void> CopyFrom ( const Data src)

◆ MoveFrom() [1/2]

Result<void> MoveFrom ( T &&  src)

◆ MoveFrom() [2/2]

Result<void> MoveFrom ( Data src)

Member Data Documentation

◆ _ownedData

Data _ownedData
private