decompiler
1.0.0
|
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. | |
Datatype * | type |
Data-type of subfield. | |
A field within a structure or union.
ghidra::TypeField::TypeField | ( | Decoder & | decoder, |
TypeFactory & | typegrp | ||
) |
Restore this field from a stream.
Construct from a <field> element.
decoder | is the stream decoder |
typegrp | is 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().
void ghidra::TypeField::encode | ( | Encoder & | encoder | ) | const |
Encode this field to a stream.
Encode a formal description of this as a <field> element.
encoder | is the stream encoder |
References ghidra::Encoder::closeElement(), ghidra::Datatype::name, ghidra::Encoder::openElement(), ghidra::Encoder::writeSignedInteger(), and ghidra::Encoder::writeString().