TupleDataType Class Reference

#include <datatypelib.h>

Inheritance diagram for TupleDataType:

Detailed Description

TupleDataType represents a custom tuple type created at runtime with ParametricTypes::Tuple. If a DataType is of the kind VALUEKIND::TUPLE or VALUEKIND::NAMED_TUPLE, you can safely cast it to TupleDataType. The memory layout of a TupleDataType is compatible with the corresponding C++ layout of standard-layout classes.

Public Member Functions

Int GetMemberOffset (Int index) const
 DataType ()=default
 DataType (const DataTypeImpl *ptr)
 DataType (std::nullptr_t)=delete
- Public Member Functions inherited from DataType
 DataType ()=default
 DataType (const DataTypeImpl *ptr)
 DataType (std::nullptr_t)=delete
 operator Bool () const
Bool operator== (const DataType &other) const
Bool operator!= (const DataType &other) const
HashInt GetHashCode () const
UniqueHash GetUniqueHashCode () const
const DataTypeImploperator-> () const
const IdGetId () const
String ToString (const FormatStatement *formatStatement=nullptr) const
Int GetSize () const
Int GetAlignment () const
VALUEKIND GetValueKind () const
Bool CheckValueKind (VALUEKIND test) const
const DataTypeGetUnqualifiedType () const
const DataTypeResolveRecursiveType () const
const DataTypeGetUnderlyingType () const
const DataTypeGetElementType () const
const DataTypeGetDecayedType () const
Bool HasTypeArguments () const
const TypeArgumentsGetTypeArguments () const
const ParametricTypeInterfaceGetParametricType () const
const TupleDataTypeGetTupleType () const
Result< void > AddConversion (const DataType &src, CONVERSION_FLAGS kind, Conversion &&func) const
Result< void > Convert (Generic &dest, const ConstDataPtr &src, CONVERSION_FLAGS ignore=CONVERSION_FLAGS::NONE) const
template<typename T >
void AssertType () const
template<typename T >
Bool Is () const
Bool IsCastableFrom (const DataType &other) const
template<typename T >
Bool IsCastableFrom () const
template<typename T >
Bool IsCastableTo () const
Bool IsBaseOfOrSame (const DataType &other, BASE_OF_MODE mode=BASE_OF_MODE::NONE) const
Bool IsSimilar (const DataType &other) const
ConstDataPtr GetNullValue () const
void Reset ()
const DataTypeImplPrivateGetPointer () const
template<typename DEST , typename SRC >
Result< void > AddConversion (CONVERSION_FLAGS kind, Result< void >(*conversion)(DEST &, const SRC &))

Additional Inherited Members

- Public Types inherited from DataType
enum class  BASE_OF_MODE {
  NONE ,
using Conversion = Delegate< Result< void >(const DataPtr &dest, const ConstDataPtr &src)>
- Static Public Member Functions inherited from DataType
static MAXON_ATTRIBUTE_FORCE_INLINE const DataTypeNullValue ()
static Result< DataTypeGet (const Id &typeId)
template<typename DEST , typename SRC >
static Result< void > AddConversion (CONVERSION_FLAGS kind, Result< void >(*conversion)(DEST &dest, const SRC &src))

Member Function Documentation

◆ GetMemberOffset()

Int GetMemberOffset ( Int  index) const

Returns the byte offset of the tuple member at the given index. I.e., if s is a TupleValue*, the member at index will be found at the returned offset from s. Members with higher index have a higher offset. The memory layout of a TupleDataType is compatible with the C++ layout of standard-layout classes.

[in]indexIndex of the member.
Byte offset of the member value.

◆ DataType() [1/3]


◆ DataType() [2/3]


◆ DataType() [3/3]