|
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. | |
| TypeField (int4 id, int4 off, const string &nm, Datatype *ct) | |
| Construct from components. | |
| int4 | compare (const TypeField &op2) const |
| Compare this with another TypeField for propagation ordering. | |
| int4 | compareDependency (const TypeField &op2) const |
| Compare this with another TypeField for functional equivalence. | |
| void | encode (Encoder &encoder) const |
| Encode this field to a stream. | |
Static Public Member Functions | |
| static bool | compareMaxByte (int4 off, const TypeField &field) |
Public Attributes | |
| int4 | ident |
| Identifier of 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.
| int4 ghidra::TypeField::compare | ( | const TypeField & | op2 | ) | const |
Compare this with another TypeField for propagation ordering.
Compare meta-data of the two fields for use with TypeStruct::compare
| op2 | is the other TypeField to compare with this |
References ghidra::Datatype::getMetatype(), name, offset, and type.
| int4 ghidra::TypeField::compareDependency | ( | const TypeField & | op2 | ) | const |
Compare this with another TypeField for functional equivalence.
Compare structure of the two fields for use with TypeStruct::compareDependency.
| op2 | is the other TypeField to compare with this |
|
inlinestatic |
< Compare field end-point to the given offset
Referenced by ghidra::TypeStruct::collectBitFields(), and ghidra::TypeStruct::hasBitFieldsInRange().
| 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().