class
WinMD::Ecma335Importer
- WinMD::Ecma335Importer
- Reference
- Object
Overview
Converts the Ecma335::ApiModel of a parsed .winmd into the win32json
document shape that WinMD::File already consumes, one document per
namespace. Keeping the JSON contract as the boundary means every template,
override and alias mechanism of the JSON pipeline applies unchanged, and the
intermediate documents can be dumped for diffing against real win32json.
Defined in:
winmd/ecma335_importer.crConstant Summary
-
ARCHITECTURES =
{1 => "X86", 2 => "X64", 4 => "Arm64"} -
Windows.Win32.Foundation.Metadata.Architecture flag bits.
-
CONSTANT_VALUE_TYPES =
{"bool" => "Boolean", "char" => "Char", "int8" => "SByte", "uint8" => "Byte", "int16" => "Int16", "uint16" => "UInt16", "int32" => "Int32", "uint32" => "UInt32", "int64" => "Int64", "uint64" => "UInt64", "float32" => "Single", "float64" => "Double", "string" => "String"} -
Constant element types (from the Constant table) to win32json ValueType.
-
PRIMITIVES =
{"void" => "Void", "bool" => "Boolean", "char" => "Char", "int8" => "SByte", "uint8" => "Byte", "int16" => "Int16", "uint16" => "UInt16", "int32" => "Int32", "uint32" => "UInt32", "int64" => "Int64", "uint64" => "UInt64", "float32" => "Single", "float64" => "Double", "nativeint" => "IntPtr", "nativeuint" => "UIntPtr"} -
ECMA-335 primitive element names to the .NET names win32json uses.
-
UNLINKABLE_MODULES =
{"forceinline", "ntdllk"} -
Import modules that no user-mode program can link against: FORCEINLINE marks header-only inline functions with no export anywhere, and ntdllk is the kernel-mode ntdll. Emitting these would add unresolvable @[Link] libraries.
-
WIN32_PREFIX =
"Windows.Win32."
Constructors
Class Method Summary
-
.api_name(namespace : String) : String
win32json file/API name: the namespace without the Windows.Win32 prefix.
Instance Method Summary
-
#associated_enums=(associated_enums : Bool)
When true, integer parameters and fields that carry an AssociatedEnum attribute are typed as that enum, the way older metadata declared them.
-
#associated_enums? : Bool
When true, integer parameters and fields that carry an AssociatedEnum attribute are typed as that enum, the way older metadata declared them.
-
#dump(dir : Path) : Nil
Writes one
<Api>.jsondocument per namespace intodir. - #files : Array(WinMD::File)
- #import : Array(WinMD::File)
- #namespace_json(namespace : String, pretty : Bool = false) : String
-
#namespaces : Array(String)
Namespaces that produce an output file, sorted.
Constructor Detail
Class Method Detail
win32json file/API name: the namespace without the Windows.Win32 prefix.
Instance Method Detail
When true, integer parameters and fields that carry an AssociatedEnum attribute are typed as that enum, the way older metadata declared them.
When true, integer parameters and fields that carry an AssociatedEnum attribute are typed as that enum, the way older metadata declared them.
Namespaces that produce an output file, sorted. The namespace holding the metadata attribute definitions themselves is not part of the API surface.