OpenASIP
2.0
|
#include <SectionIndexReplacer.hh>
Public Member Functions | |
SectionIndexReplacer (const SafePointable *obj, Byte fieldSize) | |
virtual | ~SectionIndexReplacer () |
![]() | |
void | resolve () |
Protected Member Functions | |
virtual bool | tryToReplace () |
virtual ValueReplacer * | clone () |
![]() | |
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. More... | |
Additional Inherited Members | |
![]() | |
static void | finalize () |
static void | initialize (BinaryStream &stream) |
![]() | |
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 | ||
) |
|
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.
References SectionIndexReplacer().
|
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().