|
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.
| 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 Decoder::closeElement(), TypeFactory::decodeType(), ELEM_FIELD, Decoder::getNextAttributeId(), ident, name, offset, Decoder::openElement(), Decoder::readSignedInteger(), Decoder::readString(), and type.
| void 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 Encoder::closeElement(), ELEM_FIELD, Datatype::encodeRef(), ident, name, offset, Encoder::openElement(), type, Encoder::writeSignedInteger(), and Encoder::writeString().