|
Ghidra 11.4.2
Ghidra internal decompiler documentation.
|
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. | |
| 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. | |
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(), ident, name, offset, ghidra::Decoder::openElement(), ghidra::Decoder::readSignedInteger(), ghidra::Decoder::readString(), and type.
| 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::encodeRef(), ident, name, offset, ghidra::Encoder::openElement(), type, ghidra::Encoder::writeSignedInteger(), and ghidra::Encoder::writeString().