forked from microsoft/xlang
-
Notifications
You must be signed in to change notification settings - Fork 2
GenericTypeInstSig
Raymond Chen edited this page Mar 30, 2019
·
1 revision
A xlang::meta::reader::GenericTypeInstSig
structure represents an instantiation of a generic type.
Example:
Windows.Foundation.Collections.IVector<Windows.System.User>
is represented as follows:
-
ClassOrValueType()
isElementType::Class
-
GenericType()
isTypeRef
(Windows.Foundation.Collections.IVector`2
). Note that the type name is followed by a backtick and the number of generic arguments. -
GenericArgCount()
is 1. -
GenericArgs()
has only one element:TypeSig
(Windows.System.User
).
xlang::meta::reader::ElementType ClassOrValueType() const noexcept;
Returns an ElementType
that identifies whether the generic type is of class or value type. It will be either ElementType::ValueType
or ElementType::Class
.
Complexity: O(1)
xlang::meta::reader::coded_index<TypeDefOrRef> GenericType() const noexcept;
Returns a coded_index<TypeDefOrRef>
that identifies the generic type itself.
Complexity: O(1)
uint32_t GenericArgCount() const noexcept;
Returns the number of generic arguments. This is the same number that is suffixed to the GenericType
name.
Complexity: O(1)
std::pair<std::vector<xlang::meta::reader::TypeSig>::const_iterator,
std::vector<xlang::meta::reader::TypeSig>::const_iterator>
GenericArgs() const noexcept;
Returns a range (pair of iterators) representing the types that form the generic arguments. The size of the range is equal to GenericArgCount()
.
Complexity: O(1).