decompiler
1.0.0
|
A cheap (efficient) placeholder for a reference to a constant pool record. More...
Public Member Functions | |
CheapSorter (void) | |
Construct a zero reference. | |
CheapSorter (const CheapSorter &op2) | |
Copy constructor. | |
CheapSorter (const vector< uintb > &refs) | |
Construct from an array of integers. | |
bool | operator< (const CheapSorter &op2) const |
Lexicographic comparison. More... | |
void | apply (vector< uintb > &refs) const |
Convert the reference back to a formal array of integers. More... | |
void | saveXml (ostream &s) const |
Serialize the reference to an XML element. More... | |
void | restoreXml (const Element *el) |
Deserialize the reference from an XML element. More... | |
Public Attributes | |
uintb | a |
The first integer in a reference. | |
uintb | b |
The second integer in a reference (or zero) | |
A cheap (efficient) placeholder for a reference to a constant pool record.
A reference can be an open-ended number of (1 or more) integers. In practice, the most integers we see in a reference is two. So this is a slightly more efficient container than an open-ended vector. The field a is the first integer, the field b is the second integer, or zero if there is no second integer. The references are ordered lexicographically. The class also serves to serialize/deserialize references from XML
|
inline |
Convert the reference back to a formal array of integers.
refs | is the provided container of integers |
References CPoolRecord::restoreXml(), and CPoolRecord::saveXml().
Referenced by ConstantPoolInternal::restoreXml().
|
inline |
void ConstantPoolInternal::CheapSorter::restoreXml | ( | const Element * | el | ) |
Deserialize the reference from an XML element.
Restore this reference from a <ref> XML tag
el | is the XML element |
References Element::getAttributeValue().
Referenced by ConstantPoolInternal::restoreXml().
void ConstantPoolInternal::CheapSorter::saveXml | ( | ostream & | s | ) | const |
Serialize the reference to an XML element.
The reference is output as a <ref> tag.
s | is the output stream |
References a_v_u().