OpenASIP
2.0
|
#include <AsciiImageWriter.hh>
Public Member Functions | |
AsciiImageWriter (const BitVector &bits, int rowLength) | |
virtual | ~AsciiImageWriter () |
virtual void | writeImage (std::ostream &stream) const |
Public Member Functions inherited from BitImageWriter | |
virtual | ~BitImageWriter () |
Protected Member Functions | |
const BitVector & | bits () const |
int | rowLength () const |
void | writeSequence (std::ostream &stream, int length, bool padEnd=false) const |
void | writeHexSequence (std::ostream &stream, int length, bool padEnd=false) const |
Private Attributes | |
const BitVector & | bits_ |
The bits to be written. More... | |
int | rowLength_ |
The length of a row in the output. More... | |
unsigned int | nextBitIndex_ |
The index of the next bit to be written. More... | |
Writes the bit image with ASCII 1's and 0's.
Definition at line 45 of file AsciiImageWriter.hh.
AsciiImageWriter::AsciiImageWriter | ( | const BitVector & | bits, |
int | rowLength | ||
) |
The constructor.
bits | The bits to be written. |
rowLength | The length of the row in the output stream. |
Definition at line 55 of file AsciiImageWriter.cc.
|
virtual |
|
protected |
Returns the bit vector to be written by this writer.
Definition at line 101 of file AsciiImageWriter.cc.
References bits_.
Referenced by MifImageWriter::writeHeader(), MifImageWriter::writeImage(), CoeImageWriter::writeImage(), ArrayImageWriter::writeImage(), AsciiProgramImageWriter::writeImage(), ArrayProgramImageWriter::writeImage(), and HexImageWriter::writeImage().
|
protected |
Returns the row length.
Definition at line 112 of file AsciiImageWriter.cc.
References rowLength_.
Referenced by MifImageWriter::writeHeader(), VhdlImageWriter::writeHeader(), MifImageWriter::writeImage(), CoeImageWriter::writeImage(), ArrayImageWriter::writeImage(), and HexImageWriter::writeImage().
|
protected |
Writes a sequence of bits in hex format to the given stream.
When this method is called sequentially, the first bit to be written is the next bit to the last bit written in the previous method call.
stream | The output stream. |
length | The length of the sequence to be written. |
OutOfRange | If the bit vector does not contain enough bits for the row. |
Definition at line 160 of file AsciiImageWriter.cc.
References __func__, bits_, and nextBitIndex_.
Referenced by HexImageWriter::writeImage().
|
virtual |
Writes the bits to the given stream.
stream | The output stream. |
Implements BitImageWriter.
Reimplemented in HexImageWriter, VhdlImageWriter, ArrayProgramImageWriter, VhdlProgramImageWriter, ArrayImageWriter, AsciiProgramImageWriter, CoeImageWriter, and MifImageWriter.
Definition at line 73 of file AsciiImageWriter.cc.
References bits_, and rowLength_.
Referenced by InstructionDictionary::generateDecompressor(), and MoveSlotDictionary::generateDictionaryVhdl().
|
protected |
Writes a sequence of bits to the given stream.
When this method is called sequentially, the first bit to be written is the next bit to the last bit written in the previous method call.
stream | The output stream. |
length | The length of the sequence to be written. |
OutOfRange | If the bit vector does not contain enough bits for the row. |
Definition at line 129 of file AsciiImageWriter.cc.
References bits_, and nextBitIndex_.
Referenced by MifImageWriter::writeImage(), CoeImageWriter::writeImage(), ArrayImageWriter::writeImage(), AsciiProgramImageWriter::writeImage(), and ArrayProgramImageWriter::writeImage().
|
private |
The bits to be written.
Definition at line 64 of file AsciiImageWriter.hh.
Referenced by bits(), writeHexSequence(), writeImage(), and writeSequence().
|
mutableprivate |
The index of the next bit to be written.
Definition at line 68 of file AsciiImageWriter.hh.
Referenced by writeHexSequence(), and writeSequence().
|
private |
The length of a row in the output.
Definition at line 66 of file AsciiImageWriter.hh.
Referenced by rowLength(), and writeImage().