DelegateDataType Class Reference

#include <datatypelib.h>

Inheritance diagram for DelegateDataType:

Detailed Description

DelegateDataType represents the data type of a Delegate. You can get the Delegate's return type and its parameter types from a DelegateDataType.

Public Member Functions

const DataTypeGetReturnType () const
 
const Block< const DataType > & GetParameterTypes () const
 
Result< void > Invoke (const DelegateBase &delegate, void *result, const Block< reflection::Argument > &arguments) const
 
Result< DelegateBaseCreate (reflection::DelegateHandler &&handler) 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
 
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
 
enum maxon::DataType::BASE_OF_MODE MAXON_ENUM_FLAGS_CLASS (BASE_OF_MODE)
 
Bool IsBaseOfOrSame (const DataType &other, BASE_OF_MODE mode=BASE_OF_MODE::NONE) const
 
Bool IsSimilar (const DataType &other) 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  BASE_OF_MODE {
  NONE,
  ORDERED_TYPE_ONLY,
  UNORDERED_BY_NAME,
  GENERIC_DOWNCAST
}
 
using Conversion = Delegate< Result< void >(const DataPtr &dest, const ConstDataPtr &src)>
 
- Static Public Member Functions inherited from DataType
static 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

◆ GetReturnType()

const DataType& GetReturnType ( ) const

Returns the return type of the delegate, i.e., for Delegate<RESULT(ARGS...)> this is the data type of RESULT.

Returns
Return type of delegate.

◆ GetParameterTypes()

const Block<const DataType>& GetParameterTypes ( ) const

Returns the parameter types of the delegate, i.e., for Delegate<RESULT(ARGS...)> this is a block consisting of the data types of ARGS... .

Returns
Parameter types of delegate.

◆ Invoke()

Result<void> Invoke ( const DelegateBase delegate,
void *  result,
const Block< reflection::Argument > &  arguments 
) const

◆ Create()

Result<DelegateBase> Create ( reflection::DelegateHandler &&  handler) const

◆ DataType() [1/3]

DataType
default

◆ DataType() [2/3]

DataType
explicit

◆ DataType() [3/3]

DataType
explicitdelete