#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 |
公共成员函数 |
|
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 ValueType = Member |
using ConstIterator = BaseIterator <const TypeArguments , false> |
using IsAllocType = std::true_type |
|
delete |
Block <const Member > ToBlock | ( | ) | const |
Returns the type arguments which are types as a block.
const Member & operator[] | ( | Int | index | ) | const |
Returns the type argument at the given #index.
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).
Int FindIndex | ( | const Id & | 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, -1 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, -1 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 |
BaseArray < Int64 > iargs |
The integral type arguments.
Int count |
The number of type arguments which are types.
Member args[ MAXON_FLEXIBLE_ARRAY_LENGTH ] |
The type arguments which are (optionally named) types.