|
OpenASIP 2.2
|
#include <SectionIndexReplacer.hh>


Public Member Functions | |
| SectionIndexReplacer (const SafePointable *obj, Byte fieldSize) | |
| virtual | ~SectionIndexReplacer () |
Public Member Functions inherited from TPEF::ValueReplacer | |
| void | resolve () |
Protected Member Functions | |
| virtual bool | tryToReplace () |
| virtual ValueReplacer * | clone () |
Protected Member Functions inherited from TPEF::ValueReplacer | |
| ValueReplacer (const SafePointable *obj) | |
| ValueReplacer (const ValueReplacer &replacer) | |
| virtual | ~ValueReplacer () |
| const SafePointable * | reference () const |
| unsigned int | streamPosition () const |
Private Member Functions | |
| SectionIndexReplacer (const SectionIndexReplacer &replacer) | |
| SectionIndexReplacer | operator= (const SectionIndexReplacer &) |
| void | writeReplacement (Word value) |
Private Attributes | |
| const Byte | fieldSize_ |
| Field how many bytes of stream are replaced with section index. | |
Additional Inherited Members | |
Static Public Member Functions inherited from TPEF::ValueReplacer | |
| static void | finalize () |
| static void | initialize (BinaryStream &stream) |
Static Protected Member Functions inherited from TPEF::ValueReplacer | |
| static BinaryStream & | stream () |
Replaces object reference with section index. Section index key must be stored in reference manager for that object whose section index is written.
Definition at line 48 of file SectionIndexReplacer.hh.
| TPEF::SectionIndexReplacer::SectionIndexReplacer | ( | const SafePointable * | obj, |
| Byte | size | ||
| ) |
Constructor.
Definition at line 46 of file SectionIndexReplacer.cc.
|
virtual |
|
private |
Copy constructor.
Definition at line 54 of file SectionIndexReplacer.cc.
|
protectedvirtual |
Creates dynamically allocated copy of replacer.
Implements TPEF::ValueReplacer.
Definition at line 92 of file SectionIndexReplacer.cc.
|
private |
|
protectedvirtual |
Tries to do replacement in to the stream.
Implements TPEF::ValueReplacer.
Definition at line 71 of file SectionIndexReplacer.cc.
References TPEF::ReferenceManager::SectionIndexKey::index(), TPEF::ValueReplacer::reference(), TPEF::ReferenceManager::SafePointer::sectionIndexKeyFor(), TPEF::BinaryStream::setWritePosition(), TPEF::ValueReplacer::stream(), TPEF::ValueReplacer::streamPosition(), and writeReplacement().

|
private |
Writes value with one, two or four bytes wide.
| value | Value to be written. |
Definition at line 102 of file SectionIndexReplacer.cc.
References assert, fieldSize_, HALFWORD_BITWIDTH, TPEF::ValueReplacer::stream(), TPEF::BinaryStream::writeByte(), TPEF::BinaryStream::writeHalfWord(), and TPEF::BinaryStream::writeWord().
Referenced by tryToReplace().

|
private |
Field how many bytes of stream are replaced with section index.
Definition at line 65 of file SectionIndexReplacer.hh.
Referenced by writeReplacement().