ConstDataPtr Class Reference Data Types

#include <datatypebase.h>

Inheritance diagram for ConstDataPtr:

详细描述

ConstDataPtr contains type info and a pointer to an arbitrary generic const object. The type of the object is only known at run-time.

Classes

class   Wrapper
class   Wrapper< T, typename std::enable_if< GetCollectionKind< T >::value==COLLECTION_KIND::ARRAY >::type >

公共成员函数

  ConstDataPtr ()=default
  ConstDataPtr (const 数据 &value)
  ConstDataPtr (const DataType &typeInfo, const Generic *dataPtr)
template<typename T >
  ConstDataPtr (const T &value)
Bool   IsEmpty () const
Bool   IsPopulated () const
const DataType GetType () const
const Generic *  PrivateGetPtr () const
void  Set (const DataType &typeInfo, const Generic *dataPtr)
template<typename T >
void  Set (const T &value)
void  Set (const 数据 &value)
void  Set ( 数据 &value)
void  Set ( 数据 &&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, 数据 )||( GetCollectionKind < T >::value== COLLECTION_KIND::ARRAY ), T, typename ByValueParam < T >::type >::type >  Get () const
template<typename T >
ByValueParam < T >::type  GetOrNull () const
template<typename T >
ByValueParam < T >::type  Get (const T &defaultValue) const
COMPARERESULT   比较 (const ConstDataPtr &c) const
COMPARERESULT   比较 (const 数据 &c) const
HashInt   GetHashCode () 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 < 数据 Get () const

静态公共成员函数

static const ConstDataPtr NullValue ()

Protected Member Functions

template<typename T >
Result < typename ByValueParam < T >::type >  GetImpl ( OverloadRank0 ) const
template<typename T >
std::enable_if< GetCollectionKind < T >::value== COLLECTION_KIND::ARRAY , Result < T > >::type  GetImpl ( OverloadRank1 ) const

Protected Attributes

DataType   _typeInfo
const Generic *  _dataPtr

Friends

struct  ViewIteratorMember
class  ContainerViewTypeImpl

构造函数 & 析构函数文档编制

◆  ConstDataPtr() [1/4]

ConstDataPtr ( )
default

◆  ConstDataPtr() [2/4]

ConstDataPtr ( const 数据 value )
explicit

◆  ConstDataPtr() [3/4]

ConstDataPtr ( const DataType typeInfo ,
const Generic *  dataPtr  
)

◆  ConstDataPtr() [4/4]

ConstDataPtr ( const T &  value )
explicit

成员函数文档编制

◆  IsEmpty()

Bool IsEmpty ( ) const

◆  IsPopulated()

Bool IsPopulated ( ) const

◆  GetType()

const DataType & GetType ( ) const

◆  PrivateGetPtr()

const Generic* PrivateGetPtr ( ) const

◆  Set() [1/4]

void Set ( const DataType typeInfo ,
const Generic *  dataPtr  
)

◆  Set() [2/4]

void Set ( const 数据 value )

◆  Set() [3/4]

void Set ( 数据 value )

◆  Set() [4/4]

void Set ( 数据 &&  value )

◆  GetPtr() [1/2]

const Generic* GetPtr ( const DataType type ) const

◆  GetPtr() [2/2]

const T* GetPtr ( ) const

◆  Get() [1/3]

Result <typename std::conditional< STD_IS_REPLACEMENT (same, T, 数据 ) || ( GetCollectionKind <T>::value == COLLECTION_KIND::ARRAY ), T, typename ByValueParam <T>::type>::type> Get ( ) const

Returns the value of type T of this 数据 . if <void> or <Data> is given the result value is not a reference.

Template Parameters
T The expected type of the value.
返回
The value stored in this 数据 , or an error if this 数据 doesn't store a value of type T.

◆  GetOrNull()

ByValueParam <T>::type GetOrNull ( ) const

◆  Get() [2/3]

ByValueParam <T>::type Get ( const T &  defaultValue ) const

◆  Compare() [1/2]

COMPARERESULT 比较 ( const ConstDataPtr c ) const

Compares this object to a ConstDataPtr .

参数
[in] c Other object.
返回
See COMPARERESULT.

◆  Compare() [2/2]

COMPARERESULT 比较 ( const 数据 c ) const

Compares this object to a 数据 .

参数
[in] c Other object.
返回
See COMPARERESULT.

◆  GetHashCode()

HashInt GetHashCode ( ) const

Returns the hash code of the data elements. If no hash code could be calculated the value is 0.

◆  operator==()

Bool operator== ( const ConstDataPtr c ) const

◆  operator!=()

Bool operator!= ( const ConstDataPtr c ) const

◆  operator<()

Bool operator< ( const ConstDataPtr c ) const

◆  operator<=()

Bool operator<= ( const ConstDataPtr c ) const

◆  operator>()

Bool operator> ( const ConstDataPtr c ) const

◆  operator>=()

Bool operator>= ( const ConstDataPtr c ) const

◆  NullValue()

static const ConstDataPtr & NullValue ( )
static

◆  ToString()

String ToString ( const FormatStatement formatStatement = nullptr ) const

◆  GetImpl() [1/2]

Result <typename ByValueParam <T>::type> GetImpl ( OverloadRank0   ) const
protected

◆  GetImpl() [2/2]

std::enable_if< GetCollectionKind < T >::value== COLLECTION_KIND::ARRAY , Result < T > >::type GetImpl ( OverloadRank1   ) const
protected

◆  Get() [3/3]

Result < 数据 > Get ( ) const

Friends And Related Function Documentation

◆  ViewIteratorMember

friend struct ViewIteratorMember
friend

◆  ContainerViewTypeImpl

friend class ContainerViewTypeImpl friend

Member Data Documentation

◆  _typeInfo

DataType _typeInfo
protected

◆  _dataPtr

const Generic* _dataPtr protected