#include <datatypelib.h>
TypeArguments are usually set for a DataType if it is an instantiation of a ParametricType. For example the type {Tuple<Int, Bool, String>} is an instantiation of the parametric type Tuple with the type arguments {(Int, Bool, String)}, and the type Vector is an instantiation of ParametricTypes::Vec with the type arguments {(Float, 3)}.
There are two kinds of type arguments:
{NamedTuple<Int count, Bool valid>}.Public Types | |
| using | ValueType = Member |
| using | ConstIterator = BaseIterator< const TypeArguments, false > |
| using | IsAllocType = std::true_type |
Public Member Functions | |
| Block< const Member > | ToBlock () const |
| const Member & | operator[] (Int index) const |
| ConstIterator | Begin () const |
| ConstIterator | End () const |
| Int | FindIndex (const Id &name) const |
| Int | FindIndex (const InternedId &name) const |
| Bool | operator== (const TypeArguments &other) const |
| Bool | operator!= (const TypeArguments &other) const |
| HashInt | GetHashCode () const |
| void | RemoveReference () const |
| ~TypeArguments ()=delete | |
Public Attributes | |
| BaseArray< INNERMOST_MEMBER > | toInnermost |
| BaseArray< Tuple< Int32, INNERMOST_MEMBER > > | fromInnermost |
| BaseArray< Int64 > | iargs |
| Int | count |
| Member | args [MAXON_FLEXIBLE_ARRAY_LENGTH] |
| using ConstIterator = BaseIterator<const TypeArguments, false> |
| using IsAllocType = std::true_type |
|
delete |
| ConstIterator Begin | ( | ) | const |
Gets an iterator pointing to the first type argument.
| ConstIterator End | ( | ) | const |
Returns and iterator pointing to the end of the type arguments (one behind last).
Searches for a named type argument which uses the given name and returns its index. If no such argument is found, -1 is returned. The function doesn't check for duplicates.
| [in] | name | Name to search. If this is empty, InvalidArrayIndex is returned. |
| Int FindIndex | ( | const InternedId & | name | ) | const |
Searches for a named type argument which uses the given name and returns its index. If no such argument is found, -1 is returned. The function doesn't check for duplicates.
| [in] | name | Name to search. If this is empty, InvalidArrayIndex is returned. |
| Bool operator== | ( | const TypeArguments & | other | ) | const |
| Bool operator!= | ( | const TypeArguments & | other | ) | const |
| HashInt GetHashCode | ( | ) | const |
| void RemoveReference | ( | ) | const |
| BaseArray<INNERMOST_MEMBER> toInnermost |
| BaseArray<Tuple<Int32, INNERMOST_MEMBER> > fromInnermost |
| Int count |
The number of type arguments which are types.
The type arguments which are (optionally named) types.