winmd

package
v0.0.0-...-c45669f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttributeTypeGUID                 = "Windows.Foundation.Metadata.GuidAttribute"
	AttributeTypeExclusiveTo          = "Windows.Foundation.Metadata.ExclusiveToAttribute"
	AttributeTypeStaticAttribute      = "Windows.Foundation.Metadata.StaticAttribute"
	AttributeTypeActivatableAttribute = "Windows.Foundation.Metadata.ActivatableAttribute"
	AttributeTypeDefaultAttribute     = "Windows.Foundation.Metadata.DefaultAttribute"
	AttributeTypeOverloadAttribute    = "Windows.Foundation.Metadata.OverloadAttribute"
)

Custom Attributes

Variables

This section is empty.

Functions

func GetMethodOverloadName

func GetMethodOverloadName(ctx *types.Context, methodDef *types.MethodDef) string

GetMethodOverloadName finds and returns the overload attribute for the given method

Types

type ClassNotFoundError

type ClassNotFoundError struct {
	Class string
}

ClassNotFoundError is returned when a class is not found.

func (*ClassNotFoundError) Error

func (e *ClassNotFoundError) Error() string

type HasContext

type HasContext struct {
	// contains filtered or unexported fields
}

HasContext is a helper struct that holds the original context of a metadata element.

func (*HasContext) Ctx

func (hctx *HasContext) Ctx() *types.Context

Ctx return the original context of the element.

type QualifiedID

type QualifiedID struct {
	Namespace string
	Name      string
}

QualifiedID holds the namespace and the name of a qualified element. This may be a type, a static function or a field

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store holds the windows metadata contexts. It can be used to get the metadata across multiple files.

func NewStore

func NewStore(logger log.Logger) (*Store, error)

NewStore loads all windows metadata files and returns a new Store.

func (*Store) TypeDefByName

func (mds *Store) TypeDefByName(class string) (*TypeDef, error)

TypeDefByName returns a type definition that matches the given name.

type TypeDef

type TypeDef struct {
	types.TypeDef
	HasContext
	// contains filtered or unexported fields
}

TypeDef is a helper struct that wraps types.TypeDef and stores the original context of the typeDef.

func (*TypeDef) Extends

func (typeDef *TypeDef) Extends(class string) (bool, error)

Extends returns true if the type extends the given class

func (*TypeDef) GUID

func (typeDef *TypeDef) GUID() (string, error)

GUID returns the GUID of the type.

func (*TypeDef) GetAttributeWithType

func (typeDef *TypeDef) GetAttributeWithType(lookupAttrTypeClass string) ([]byte, error)

GetAttributeWithType returns the value of the given attribute type and fails if not found.

func (*TypeDef) GetGenericParams

func (typeDef *TypeDef) GetGenericParams() ([]*types.GenericParam, error)

GetGenericParams returns the generic parameters of the type.

func (*TypeDef) GetImplementedInterfaces

func (typeDef *TypeDef) GetImplementedInterfaces() ([]QualifiedID, error)

GetImplementedInterfaces returns the interfaces implemented by the type.

func (*TypeDef) GetTypeDefAttributesWithType

func (typeDef *TypeDef) GetTypeDefAttributesWithType(lookupAttrTypeClass string) [][]byte

GetTypeDefAttributesWithType returns the values of all the attributes that match the given type.

func (*TypeDef) GetValueForEnumField

func (typeDef *TypeDef) GetValueForEnumField(fieldIndex uint32) (string, error)

GetValueForEnumField returns the value of the requested enum field.

func (*TypeDef) IsDelegate

func (typeDef *TypeDef) IsDelegate() bool

IsDelegate returns true if the type is a delegate

func (*TypeDef) IsEnum

func (typeDef *TypeDef) IsEnum() bool

IsEnum returns true if the type is an enum

func (*TypeDef) IsInterface

func (typeDef *TypeDef) IsInterface() bool

IsInterface returns true if the type is an interface

func (*TypeDef) IsRuntimeClass

func (typeDef *TypeDef) IsRuntimeClass() bool

IsRuntimeClass returns true if the type is a runtime class

func (*TypeDef) IsStruct

func (typeDef *TypeDef) IsStruct() bool

IsStruct returns true if the type is a struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL