pub enum TypeData<'t> {
Primitive {
primitive_type: PrimitiveType,
indirection: Indirection,
},
Class {
kind: ClassKind,
count: u16,
properties: TypeProperties,
fields: Option<TypeIndex>,
derived_from: Option<TypeIndex>,
vtable_shape: Option<TypeIndex>,
size: u16,
name: RawString<'t>,
},
Member {
attributes: FieldAttributes,
field_type: TypeIndex,
offset: u16,
name: RawString<'t>,
},
MemberFunction {
return_type: TypeIndex,
class_type: TypeIndex,
this_pointer_type: TypeIndex,
attributes: FunctionAttributes,
parameter_count: u16,
argument_list: TypeIndex,
this_adjustment: u32,
},
OverloadedMethod {
count: u16,
method_list: TypeIndex,
name: RawString<'t>,
},
Method {
attributes: FieldAttributes,
method_type: TypeIndex,
vtable_offset: Option<u32>,
name: RawString<'t>,
},
StaticMember {
attributes: FieldAttributes,
field_type: TypeIndex,
name: RawString<'t>,
},
NestedType {
attributes: FieldAttributes,
nested_type: TypeIndex,
name: RawString<'t>,
},
BaseClass {
kind: ClassKind,
attributes: FieldAttributes,
base_class: TypeIndex,
offset: u32,
},
VirtualBaseClass {
direct: bool,
attributes: FieldAttributes,
base_class: TypeIndex,
base_pointer: TypeIndex,
base_pointer_offset: u32,
virtual_base_offset: u32,
},
VirtualFunctionTable {
table: TypeIndex,
},
Procedure {
return_type: TypeIndex,
attributes: FunctionAttributes,
parameter_count: u16,
argument_list: TypeIndex,
},
Pointer {
underlying_type: TypeIndex,
attributes: PointerAttributes,
},
Modifier {
underlying_type: TypeIndex,
constant: bool,
volatile: bool,
unaligned: bool,
},
Enumeration {
count: u16,
properties: TypeProperties,
underlying_type: TypeIndex,
fields: TypeIndex,
name: RawString<'t>,
},
Enumerate {
attributes: FieldAttributes,
value: EnumValue,
name: RawString<'t>,
},
Array {
element_type: TypeIndex,
indexing_type: TypeIndex,
stride: Option<u32>,
dimensions: Vec<u32>,
},
Union {
count: u16,
properties: TypeProperties,
fields: TypeIndex,
size: u32,
name: RawString<'t>,
},
Bitfield {
underlying_type: TypeIndex,
length: u8,
position: u8,
},
FieldList {
fields: Vec<TypeData<'t>>,
continuation: Option<TypeIndex>,
},
ArgumentList {
arguments: Vec<TypeIndex>,
},
MethodList {
method_list: Vec<MethodListEntry>,
},
}
Encapsulates parsed data about a Type
.
Variants
Primitive
Represents a primitive type like void
or char *
.
Fields of Primitive
primitive_type: PrimitiveType | The primitive type described by this TypeIndex
|
indirection: Indirection | What kind of indirection was applied to the underlying type
|
Class
Class
represents a class
, struct,
or interface
.
Fields of Class
Member
Fields of Member
MemberFunction
Fields of MemberFunction
OverloadedMethod
Fields of OverloadedMethod
Method
Fields of Method
StaticMember
Fields of StaticMember
NestedType
Fields of NestedType
BaseClass
Fields of BaseClass
VirtualBaseClass
Fields of VirtualBaseClass
VirtualFunctionTable
Fields of VirtualFunctionTable
Procedure
Fields of Procedure
Pointer
Fields of Pointer
underlying_type: TypeIndex | |
attributes: PointerAttributes | |
Modifier
Fields of Modifier
Enumeration
Fields of Enumeration
Enumerate
Fields of Enumerate
Array
Fields of Array
element_type: TypeIndex | |
indexing_type: TypeIndex | |
stride: Option<u32> | |
dimensions: Vec<u32> | Contains array dimensions as specified in the PDB. This is not what you expect:
- Dimensions are specified in terms of byte sizes, not element counts.
- Multidimensional arrays aggregate the lower dimensions into the sizes of the higher
dimensions.
Thus a float[4][4] has dimensions: [16, 64] . Determining array dimensions in terms
of element counts requires determining the size of the element_type and iteratively
dividing.
|
Union
Fields of Union
Bitfield
Fields of Bitfield
FieldList
Fields of FieldList
fields: Vec<TypeData<'t>> | |
continuation: Option<TypeIndex> | Sometimes fields can't all fit in a single FieldList, in which case the FieldList
refers to another FieldList in a chain.
|
ArgumentList
Fields of ArgumentList
MethodList
Fields of MethodList
Methods
Return the name of this TypeData, if any
Trait Implementations
Formats the value using the given formatter.
fn eq(&self, __arg_0: &TypeData<'t>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &TypeData<'t>) -> bool
This method tests for !=
.