OpenASIP
2.0
|
#include <BinaryWriter.hh>
Public Member Functions | |
virtual | ~BinaryWriter () |
void | writeBinary (BinaryStream &stream, const Binary *bin) const |
Protected Member Functions | |
BinaryWriter () | |
virtual void | actualWriteBinary (BinaryStream &stream, const Binary *bin) const =0 |
Does real writing of binary. More... | |
void | setWriter (const BinaryWriter *writer) |
Private Attributes | |
const BinaryWriter * | writerToUse_ |
Contains concrete writer instance that is used for writing binary. More... | |
Interface for actual binary writer classes and for clients to write binary object representation.
Provides a way for calling the concrete writers with better error checking.
Definition at line 50 of file BinaryWriter.hh.
|
virtual |
|
protected |
|
protectedpure virtual |
|
protected |
Sets the concrete binary writer to be used for writing binary program representations to a binary stream.
writer | Writer instance that we use for writing binary. |
Definition at line 131 of file BinaryWriter.cc.
References writerToUse_.
Referenced by TPEF::TPEFWriter::TPEFWriter().
void TPEF::BinaryWriter::writeBinary | ( | BinaryStream & | stream, |
const Binary * | bin | ||
) | const |
Stores a binary program representation to given binary stream.
stream | Stream where to write the program representation. |
bin | Binary class hierarchy to write. |
Definition at line 64 of file BinaryWriter.cc.
References actualWriteBinary(), assert, TPEF::ReferenceManager::SafePointer::cleanupKeyTables(), TPEF::SectionSizeReplacer::clear(), Exception::errorMessage(), TPEF::ValueReplacer::finalize(), TPEF::SectionWriter::finalizeBinary(), TPEF::ValueReplacer::initialize(), Exception::procedureName(), and writerToUse_.
Referenced by TTAProgram::Program::writeToTPEF().
|
private |
Contains concrete writer instance that is used for writing binary.
Definition at line 68 of file BinaryWriter.hh.
Referenced by setWriter(), and writeBinary().