|
|
| XmlEncode (ostream &s, bool doFormat=true) |
| | Construct from a stream.
|
| |
| virtual void | openElement (const ElementId &elemId) |
| | Begin a new element in the encoding. More...
|
| |
| virtual void | closeElement (const ElementId &elemId) |
| | End the current element in the encoding. More...
|
| |
| virtual void | writeBool (const AttributeId &attribId, bool val) |
| | Write an annotated boolean value into the encoding. More...
|
| |
| virtual void | writeSignedInteger (const AttributeId &attribId, intb val) |
| | Write an annotated signed integer value into the encoding. More...
|
| |
| virtual void | writeUnsignedInteger (const AttributeId &attribId, uintb val) |
| | Write an annotated unsigned integer value into the encoding. More...
|
| |
| virtual void | writeString (const AttributeId &attribId, const string &val) |
| | Write an annotated string into the encoding. More...
|
| |
| virtual void | writeStringIndexed (const AttributeId &attribId, uint4 index, const string &val) |
| | Write an annotated string, using an indexed attribute, into the encoding. More...
|
| |
| virtual void | writeSpace (const AttributeId &attribId, const AddrSpace *spc) |
| | Write an address space reference into the encoding. More...
|
| |
| virtual void | writeOpcode (const AttributeId &attribId, OpCode opc) |
| | Write a p-code operation opcode into the encoding, associating it with the given annotation. More...
|
| |
|
virtual | ~Encoder (void) |
| | Destructor.
|
| |
| virtual void | openElement (const ElementId &elemId)=0 |
| | Begin a new element in the encoding. More...
|
| |
| virtual void | closeElement (const ElementId &elemId)=0 |
| | End the current element in the encoding. More...
|
| |
| virtual void | writeBool (const AttributeId &attribId, bool val)=0 |
| | Write an annotated boolean value into the encoding. More...
|
| |
| virtual void | writeSignedInteger (const AttributeId &attribId, intb val)=0 |
| | Write an annotated signed integer value into the encoding. More...
|
| |
| virtual void | writeUnsignedInteger (const AttributeId &attribId, uintb val)=0 |
| | Write an annotated unsigned integer value into the encoding. More...
|
| |
| virtual void | writeString (const AttributeId &attribId, const string &val)=0 |
| | Write an annotated string into the encoding. More...
|
| |
| virtual void | writeStringIndexed (const AttributeId &attribId, uint4 index, const string &val)=0 |
| | Write an annotated string, using an indexed attribute, into the encoding. More...
|
| |
| virtual void | writeSpace (const AttributeId &attribId, const AddrSpace *spc)=0 |
| | Write an address space reference into the encoding. More...
|
| |
| virtual void | writeOpcode (const AttributeId &attribId, OpCode opc)=0 |
| | Write a p-code operation opcode into the encoding, associating it with the given annotation. More...
|
| |
An XML based encoder.
The underlying transfer encoding is an XML document. The encoder is initialized with a stream which will receive the XML document as calls are made on the encoder.
| void ghidra::XmlEncode::writeStringIndexed |
( |
const AttributeId & |
attribId, |
|
|
uint4 |
index, |
|
|
const string & |
val |
|
) |
| |
|
virtual |
Write an annotated string, using an indexed attribute, into the encoding.
Multiple attributes with a shared name can be written to the same element by calling this method multiple times with a different index value. The encoding will use attribute ids up to the base id plus the maximum index passed in. Implementors must be careful to not use other attributes with ids bigger than the base id within the element taking the indexed attribute.
- Parameters
-
| attribId | is the shared AttributeId |
| index | is the unique index to associated with the string |
| val | is the string to encode |
Implements ghidra::Encoder.