decompiler  1.0.0
Public Member Functions | Public Attributes | List of all members
ghidra::TypeField Class Reference

A field within a structure or union. More...

#include <type.hh>

Public Member Functions

 TypeField (Decoder &decoder, TypeFactory &typegrp)
 Restore this field from a stream. More...
 
 TypeField (int4 id, int4 off, const string &nm, Datatype *ct)
 Construct from components.
 
bool operator< (const TypeField &op2) const
 Compare based on offset.
 
void encode (Encoder &encoder) const
 Encode this field to a stream. More...
 

Public Attributes

int4 ident
 Id for identifying this within its containing structure or union.
 
int4 offset
 Offset (into containing structure or union) of subfield.
 
string name
 Name of subfield.
 
Datatypetype
 Data-type of subfield.
 

Detailed Description

A field within a structure or union.

Constructor & Destructor Documentation

◆ TypeField()

ghidra::TypeField::TypeField ( Decoder decoder,
TypeFactory typegrp 
)

Restore this field from a stream.

Construct from a <field> element.

Parameters
decoderis the stream decoder
typegrpis the TypeFactory for parsing data-type info

References ghidra::Decoder::closeElement(), ghidra::TypeFactory::decodeType(), ghidra::Decoder::getNextAttributeId(), ghidra::Datatype::name, ghidra::Decoder::openElement(), ghidra::Decoder::readSignedInteger(), and ghidra::Decoder::readString().

Member Function Documentation

◆ encode()

void ghidra::TypeField::encode ( Encoder encoder) const

Encode this field to a stream.

Encode a formal description of this as a <field> element.

Parameters
encoderis the stream encoder

References ghidra::Encoder::closeElement(), ghidra::Datatype::name, ghidra::Encoder::openElement(), ghidra::Encoder::writeSignedInteger(), and ghidra::Encoder::writeString().


The documentation for this class was generated from the following files: