MoveDataPtr Class Reference Data Types

#include <datatypebase.h>

Inheritance diagram for MoveDataPtr:

详细描述

MoveDataPtr contains type info and a pointer to an arbitrary generic object. The type of the object is only known at run-time. MoveDataPtr is typically used as parameter type of a generic function which accepts any type of object and moves the object to some other location.

公共成员函数

  MoveDataPtr ()=default
  MoveDataPtr (const DataType &typeInfo, Generic *dataPtr)
  MoveDataPtr ( 数据 &&value)
template<typename T >
  MoveDataPtr (T &&value)
template<typename T >
Result < typename std::conditional< STD_IS_REPLACEMENT (void, T), void, typename std::conditional< STD_IS_REPLACEMENT (same, T, 数据 ), 数据 , T && >::type >::type >  Get ()
template<>
Result < 数据 Get ()
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  Get (const T &defaultValue) const
template<>
Result < void >  Get () const
template<>
Result < 数据 Get () const
-  Public Member Functions inherited from DataPtr
  DataPtr ()=default
  DataPtr ( 数据 &value)
  DataPtr (const DataType &typeInfo, Generic *dataPtr)
template<typename T >
  DataPtr (T &value)
Generic *  PrivateGetPtr () const
Generic *  GetPtr (const DataType &type)
template<typename T >
T *  GetPtr ()
Result < void >  MoveFrom ( 数据 && src )
Result < void >  CopyFrom (const 数据 & src )
const Generic *  GetPtr (const DataType &type) const
template<typename T >
const T *  GetPtr () const
-  Public Member Functions inherited from ConstDataPtr
  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 MoveDataPtr NullValue ()
-  Static Public Member Functions inherited from DataPtr
static const DataPtr NullValue ()
-  Static Public Member Functions inherited from ConstDataPtr
static const ConstDataPtr NullValue ()

Additional Inherited Members

-  Protected Member Functions inherited from ConstDataPtr
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 inherited from ConstDataPtr
DataType   _typeInfo
const Generic *  _dataPtr

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

◆  MoveDataPtr() [1/4]

MoveDataPtr ( )
default

◆  MoveDataPtr() [2/4]

MoveDataPtr ( const DataType typeInfo ,
Generic *  dataPtr  
)

◆  MoveDataPtr() [3/4]

MoveDataPtr ( 数据 &&  value )
explicit

◆  MoveDataPtr() [4/4]

MoveDataPtr ( T &&  value )
explicit

成员函数文档编制

◆  Get() [1/5]

Result <typename std::conditional< STD_IS_REPLACEMENT (void, T), void, typename std::conditional< STD_IS_REPLACEMENT (same, T, 数据 ), 数据 , T&&>::type>::type> Get ( )

◆  NullValue()

static const MoveDataPtr & NullValue ( )
static

◆  Get() [2/5]

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

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.

◆  Get() [3/5]

ByValueParam <T>::type Get ( typename T  )

◆  Get() [4/5]

Result <void> Get ( )

◆  Get() [5/5]

Result < 数据 > Get ( )