forked from microsoft/xlang
-
Notifications
You must be signed in to change notification settings - Fork 2
CustomAttributeSig
Raymond Chen edited this page Apr 1, 2019
·
3 revisions
A xlang::meta::reader::CustomAttributeSig
structure represents a custom attribute.
Example:
[contract(Windows.Foundation.UniversalApiContract, 5)]
is represented as follows:
-
FixedArgs()
is a vector of twoFixedArgSig
elements.- Value is an
ElemSig
whose type is eitherstd::string_view
orSystemType
, and whose value or name isWindows.Foundation.UniversalApiContract
. (Both variations occur in practice.) - Value is an
ElemSig
of typeuint32_t
whose value is 0x00050000. (Major version in high 16 bits, minor version in low 16 bits.)
- Value is an
-
NamedArgs()
is empty.
The std::string_view
case tends to be used for interfaces associated with a runtimeclass.
std::vector<xlang::meta::reader::FixedArgSig> const& FixedArgs() const noexcept;
Returns a vector of FixedArgSig
objects which represent the fixed arguments to the attribute.
The lifetime of this vector is tied to the lifetime of the enclosing CustomAttributeSig
.
Complexity: O(1)
std::vector<xlang::meta::reader::NamedArgSig> const& NamedArgs() const noexcept;
Returns a vector of NamedArgSig
objects which represent the named arguments to the attribute.
The lifetime of this vector is tied to the lifetime of the enclosing CustomAttributeSig
.
Complexity: O(1)