#include <datatypebase.h>
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 > |
Public Member Functions | |
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 DataType & | GetType () 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 >::type > | Get () const |
template<typename T > | |
ByValueParam< T >::type | GetOrDefault () const |
template<typename T > | |
MAXON_ATTRIBUTE_FORCE_INLINE 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 Data &c) const |
Bool | operator!= (const ConstDataPtr &c) const |
Bool | operator!= (const Data &other) 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< Data > | Get () const |
Static Public Member Functions | |
static MAXON_ATTRIBUTE_FORCE_INLINE const ConstDataPtr & | DefaultValue () |
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 |
|
default |
|
explicit |
ConstDataPtr | ( | const DataType & | typeInfo, |
const Generic * | dataPtr | ||
) |
|
explicit |
Bool IsEmpty | ( | ) | const |
Bool IsPopulated | ( | ) | const |
const DataType& GetType | ( | ) | const |
DataType&& ResetType | ( | ) |
const Generic* PrivateGetPtr | ( | ) | const |
void Set | ( | const DataType & | typeInfo, |
const Generic * | dataPtr | ||
) |
void Set | ( | const Data & | value | ) |
void Set | ( | Data & | value | ) |
void Set | ( | Data && | value | ) |
const Generic* GetPtr | ( | const DataType & | type | ) | const |
const T* GetPtr | ( | ) | const |
Result<typename std::conditional<STD_IS_REPLACEMENT(same, T, Data) || (GetCollectionKind<T>::value == COLLECTION_KIND::ARRAY), T, typename ByValueParam<T>::type>::type> Get | ( | ) | const |
ByValueParam<T>::type GetOrDefault | ( | ) | const |
MAXON_ATTRIBUTE_FORCE_INLINE ByValueParam<T>::type GetOrNull | ( | ) | const |
ByValueParam<T>::type Get | ( | const T & | defaultValue | ) | const |
COMPARERESULT Compare | ( | const ConstDataPtr & | c | ) | const |
COMPARERESULT Compare | ( | const Data & | c | ) | const |
Compares this instance to c
and returns the comparison result.
This largely does not support type abstraction, i.e., you cannot compare an int with a float and expect a result such as GREATER
or EQUAL
in a mathematical sense. When both entities are not of the same type, ObjectInterface
reference entities are treated as greater than all other types. When both entities are not ObjectInterface
types, the entities will be sorted by their type id.
[in] | c | Other object. |
HashInt GetHashCode | ( | ) | const |
Returns the hash code of the wrapped value. If the value's type doesn't provide a hash code function, this function returns DefaultHasher::EMPTY_HASH.
UniqueHash GetUniqueHashCode | ( | ) | const |
Returns the hash code of the wrapped value. If the value's type doesn't provide a hash code function, this function returns a default-constructed UniqueHash.
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 |
|
static |
String ToString | ( | const FormatStatement * | formatStatement = nullptr | ) | const |
|
protected |
|
protected |
|
friend |
|
friend |
|
protected |
|
protected |