OpenASIP
2.0
|
#include <TPEFLineNumSectionReader.hh>
Protected Member Functions | |
TPEFLineNumSectionReader () | |
virtual | ~TPEFLineNumSectionReader () |
virtual void | readData (BinaryStream &stream, Section *section) const |
virtual Section::SectionType | type () const |
virtual void | readInfo (BinaryStream &stream, Section *sect) const |
Protected Member Functions inherited from TPEF::TPEFSectionReader | |
TPEFSectionReader () | |
virtual BinaryReader * | parent () const |
Protected Member Functions inherited from TPEF::SectionReader | |
SectionReader () | |
virtual void | finalize (Section *section) const |
Private Member Functions | |
TPEFLineNumSectionReader (const TPEFLineNumSectionReader &) | |
Copying not allowed. More... | |
TPEFLineNumSectionReader & | operator= (TPEFLineNumSectionReader &) |
Assignment not allowed. More... | |
Static Private Attributes | |
static TPEFLineNumSectionReader | proto_ |
Prototype instance of TPEFLineNumSectionReader to be registered to SectionReader. More... | |
static SectionId | codeSectionId_ = 0 |
Identification code of text section which is referenced from currently read section. More... | |
Additional Inherited Members | |
Public Types inherited from TPEF::SectionReader | |
typedef BinaryReader::Length | Length |
Public Member Functions inherited from TPEF::TPEFSectionReader | |
virtual | ~TPEFSectionReader () |
Public Member Functions inherited from TPEF::SectionReader | |
virtual | ~SectionReader () |
Static Public Member Functions inherited from TPEF::SectionReader | |
static void | readSection (BinaryStream &stream, Section *section, BinaryReader *reader) |
static void | finalizeBinary (Binary *binaryToFinalize, BinaryReader *reader) |
Static Protected Member Functions inherited from TPEF::TPEFSectionReader | |
static const Header & | header () |
Static Protected Member Functions inherited from TPEF::SectionReader | |
static const SectionReader * | findSectionReader (const Section::SectionType type, const BinaryReader *bReader) |
static void | registerSectionReader (const SectionReader *sReader) |
Reads line number section from TPEF binary file.
Definition at line 47 of file TPEFLineNumSectionReader.hh.
|
protected |
Constructor.
Registers itself to SectionReader.
Definition at line 59 of file TPEFLineNumSectionReader.cc.
References TPEF::SectionReader::registerSectionReader().
|
protectedvirtual |
|
private |
Copying not allowed.
|
private |
Assignment not allowed.
|
protectedvirtual |
Reads section data from TPEF binary file.
stream | Stream to be read from. |
section | Section where the information is to be stored. |
UnreachableStream | If reading of section fails. |
KeyAlreadyExists | Key was in use when trying to register object. |
EndOfFile | If end of file were reached while it shouldn't. |
OutOfRange | Some of read value were out of range. |
WrongSubclass | Some class couldn't do what it was asked for. |
UnexpectedValue | If there was unexpected value when reading. |
Reimplemented from TPEF::TPEFSectionReader.
Definition at line 92 of file TPEFLineNumSectionReader.cc.
References TPEF::Section::addElement(), TPEF::LineNumProcedure::addLine(), assert, TPEF::TPEFSectionReader::Header::bodyOffset, codeSectionId_, TPEF::TPEFSectionReader::Header::elementSize, TPEF::TPEFSectionReader::header(), TPEF::Section::noBits(), TPEF::TPEFSectionReader::readData(), TPEF::BinaryStream::readHalfWord(), TPEF::BinaryStream::readWord(), TPEF::LineNumElement::setInstruction(), TPEF::LineNumElement::setLineNumber(), TPEF::LineNumProcedure::setProcedureSymbol(), and TPEF::BinaryStream::setReadPosition().
|
protectedvirtual |
Reads info field of section header, which contains the identification code of the code section to which the line number section applies.
Read position of stream will be moved 4 bytes forward.
stream | Stream where from info word is read. |
sect | Section whose info field is interpreted. |
Reimplemented from TPEF::TPEFSectionReader.
Definition at line 160 of file TPEFLineNumSectionReader.cc.
References codeSectionId_, TPEF::ReferenceManager::SafePointer::null, and TPEF::BinaryStream::readHalfWord().
|
protectedvirtual |
Returns the type of section it is meant to read.
Implements TPEF::SectionReader.
Definition at line 75 of file TPEFLineNumSectionReader.cc.
References TPEF::Section::ST_LINENO.
|
staticprivate |
Identification code of text section which is referenced from currently read section.
Definition at line 65 of file TPEFLineNumSectionReader.hh.
Referenced by readData(), and readInfo().
|
staticprivate |
Prototype instance of TPEFLineNumSectionReader to be registered to SectionReader.
Definition at line 61 of file TPEFLineNumSectionReader.hh.