DataTypeLib declares some static functions needed for the DataType system.
|
static MAXON_METHOD const DataType & | GetDataTypeType () |
|
static MAXON_METHOD const DataType & | GetVoidType () |
|
static MAXON_METHOD const DataType & | GetNullptrType () |
|
static MAXON_METHOD const DataType & | GetGenericType () |
|
static MAXON_METHOD const DataType & | GetGenericArithmeticType () |
|
static MAXON_METHOD const DataType & | GetParametricTypeType () |
|
static MAXON_METHOD const DataType & | GetComponentDescriptorType () |
|
static MAXON_METHOD const DataType & | GetEllipsisType () |
|
static MAXON_METHOD const DataType & | GetInvalidType () |
|
static MAXON_METHOD Result< DataType > | Substitute (const DataType &orig, const Delegate< Result< DataType >(const DataType &)> &replace) |
|
static MAXON_METHOD Result< DataType > | GetRuntimeDataType (const DataType &orig) |
|
static MAXON_METHOD const Block< const Int > & | GetTupleMemberOffsets (const TupleDataType &type) |
|
static MAXON_METHOD const Block< const Int > & | GetMemberOrder (const DataType &bundleOrContainerType) |
|
static MAXON_METHOD Result< DelegateDataType > | GetDelegateType (const DataType &returnType, const Block< const DataType > ¶mTypes, reflection::DelegateFunctionPointer function, void *handlerStub) |
|
static MAXON_METHOD Result< DelegateDataType > | GetDelegateType (const Result< DataType > &returnType, const Block< const Result< DataType >> ¶mTypes, reflection::DelegateFunctionPointer function, void *handlerStub) |
|
static MAXON_METHOD Result< void > | InvokeDelegate (const DelegateDataType &delegateType, const DelegateBase &delegate, void *result, const Block< reflection::Argument > &arguments) |
|
static MAXON_METHOD Result< DelegateBase > | CreateDelegate (const DelegateDataType &delegateType, reflection::DelegateHandler &&handler) |
|
static MAXON_METHOD const DataType & | GetDelegateReturnType (const DelegateDataType &delegateType) |
|
static MAXON_METHOD const Block< const DataType > & | GetDelegateParameterTypes (const DelegateDataType &delegateType) |
|
static MAXON_METHOD Result< EnumDataType > | GetEnumType (const DataType &underlyingType, const Block< const Tuple< Id, Data >> &enumerators) |
|
static MAXON_METHOD const Block< const Tuple< Id, Data > > & | GetEnumerators (const DataType &enumType) |
|
static MAXON_METHOD Result< void > | RegisterEnumType (DataTypeImpl &type, const Id &typeId, Int size, Bool isSigned, Bool flags, const UInt64 *enumValues, const Char *enumValueNames) |
|
static MAXON_METHOD Result< DataType > | GetDataTypeOfInterfaces (const Block< const InterfaceReference *const > &interfaces) |
|
static MAXON_METHOD Result< DataType > | GetReferenceType (const DataType &type, EntityBase::FLAGS refFlags) |
|
static MAXON_METHOD Result< Tuple< DataType, const Char * > > | ParseDataType (const Char *str) |
|
static MAXON_METHOD Result< Tuple< Member, const Char * > > | ParseMember (const Char *str) |
|
static MAXON_METHOD Result< Tuple< Int64, const Char * > > | ParseInt (const Char *str) |
|
static MAXON_METHOD Result< DataType > | GetDataType (const Id &typeId) |
|
static MAXON_METHOD const Id & | GetNumberedId (Int number) |
|
static MAXON_METHOD Result< const MemberMap * > | GetMemberMap (Block< const Int > block) |
|
static MAXON_METHOD Result< const MemberMap * > | GetIdentityMemberMap (Int length) |
|
static MAXON_METHOD Result< const MemberMap * > | ConcatMemberMap (const MemberMap *first, const MemberMap *second) |
|
static MAXON_METHOD Result< const MemberMap * > | GetMemberMap (const DataTypeImpl *containerType, const DataTypeImpl *runtimeType) |
|
static MAXON_METHOD Result< DataType > | GetDataTypeForData (const DataType &valueType) |
|
static MAXON_METHOD Result< void > | ConvertToData (Data &result, const DataType &dataType, const DataType &valueType, const Generic &value) |
|
static MAXON_METHOD Result< void > | MoveFromData (const DataType &valueType, Generic &value, Bool createDefaultPointees, Data &data, BaseArray< Data > &storage) |
|
static MAXON_METHOD Bool | PrivateIsBaseOfOrSame (const DataTypeImpl *type, const DataTypeImpl *other, DataType::BASE_OF_MODE mode) |
|
static MAXON_METHOD Result< StrongRef< TypeArguments > > | CreateTypeArguments (Int cnt) |
|
static MAXON_METHOD Result< StrongRef< TypeArguments > > | CreateTypeArguments (const Block< const Member > &args) |
|
static MAXON_METHOD ResultMem | FinalizeTypeArguments (TypeArguments &args) |
|
static MAXON_METHOD void | PrivateHandleUnreferencedType (DataTypeImpl *type) |
|
static MAXON_METHOD const DataType & | PrivateGetPrimaryDataTypeType () |
|
static MAXON_METHOD void | AddLeakingInstantiatedType (DataTypeImpl *type) |
|
static MAXON_METHOD void | PrivateGetNamedTupleMembers (Binary &binary, NamedTupleMembers *mem, std::add_pointer< Int(void *)>::type constructor) |
|
Applies the substitutions given be replace to orig and its nested types. For example, if replace maps Float to Float64, then Float gets transformed into Float64, but also Tuple<Bool, Float, Vector, BaseArray<Float>> gets transformed into Tuple<Bool, Float64, Vector64, BaseArray<Float64>>.
- Parameters
-
[in] | orig | Original DataType. |
[in] | replace | This delegate is called for each DataType found in orig. It has to return the replacement for the passed DataType, or the passed DataType itself if no immediate replacement shall be done. In both cases, if the returned type is an instance of a parametric type, the substitution recurses into the type parameters and re-instantiates the parametric type for the substituted type arguments. |
- Returns
- DataType where the substitutions given by #replace have been applied.