OpenASIP  2.0
Protected Member Functions | Private Member Functions | Static Private Attributes | List of all members
TPEF::TPEFNullSectionWriter Class Reference

#include <TPEFNullSectionWriter.hh>

Inheritance diagram for TPEF::TPEFNullSectionWriter:
Inheritance graph
Collaboration diagram for TPEF::TPEFNullSectionWriter:
Collaboration graph

Protected Member Functions

 TPEFNullSectionWriter ()
 
virtual ~TPEFNullSectionWriter ()
 
virtual Section::SectionType type () const
 
virtual Word elementSize (const Section *section) const
 
virtual SectionId getSectionId () const
 
virtual void writeSize (BinaryStream &stream, const Section *sect) const
 
- Protected Member Functions inherited from TPEF::TPEFSectionWriter
 TPEFSectionWriter ()
 
virtual ~TPEFSectionWriter ()
 
virtual const BinaryWriterparent () const
 
virtual void actualWriteHeader (BinaryStream &stream, const Section *sect) const
 
virtual void actualWriteData (BinaryStream &stream, const Section *sect) const
 
virtual void createKeys (const Section *sect) const
 
virtual void writeInfo (BinaryStream &stream, const Section *sect) const
 
- Protected Member Functions inherited from TPEF::SectionWriter
 SectionWriter ()
 
virtual ~SectionWriter ()
 
virtual void finalize (BinaryStream &stream, Section *section) const
 

Private Member Functions

 TPEFNullSectionWriter (const TPEFNullSectionWriter &)
 Copying not allowed. More...
 
TPEFNullSectionWriter operator= (const TPEFNullSectionWriter &)
 Assignment not allowed. More...
 

Static Private Attributes

static const TPEFNullSectionWriter instance_
 Unique instance of a class. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from TPEF::SectionWriter
static void writeHeader (BinaryStream &stream, const Section *sect, const BinaryWriter *writer)
 
static void writeData (BinaryStream &stream, const Section *sect, const BinaryWriter *writer)
 
static void finalizeBinary (BinaryStream &stream, const Binary *binaryToFinalize, const BinaryWriter *writer)
 
- Static Protected Member Functions inherited from TPEF::SectionWriter
static void registerSectionWriter (const SectionWriter *sWriter)
 
static SectionId getUniqueSectionId ()
 

Detailed Description

Writes Null section in to stream.

Definition at line 45 of file TPEFNullSectionWriter.hh.

Constructor & Destructor Documentation

◆ TPEFNullSectionWriter() [1/2]

TPEF::TPEFNullSectionWriter::TPEFNullSectionWriter ( )
protected

Constructor.

Registers itself to SectionWriter.

Definition at line 54 of file TPEFNullSectionWriter.cc.

54  : TPEFSectionWriter() {
56 }

References TPEF::SectionWriter::registerSectionWriter().

Here is the call graph for this function:

◆ ~TPEFNullSectionWriter()

TPEF::TPEFNullSectionWriter::~TPEFNullSectionWriter ( )
protectedvirtual

Destructor.

Definition at line 61 of file TPEFNullSectionWriter.cc.

61  {
62 }

◆ TPEFNullSectionWriter() [2/2]

TPEF::TPEFNullSectionWriter::TPEFNullSectionWriter ( const TPEFNullSectionWriter )
private

Copying not allowed.

Member Function Documentation

◆ elementSize()

Word TPEF::TPEFNullSectionWriter::elementSize ( const Section section) const
protectedvirtual

Returns the size of section elements. The null section has no elements, so the size of elements is undefined. Returns always zero.

Parameters
sectionSection whose element size is to be written out (not used).
Returns
Zero.

Reimplemented from TPEF::TPEFSectionWriter.

Definition at line 82 of file TPEFNullSectionWriter.cc.

82  {
83  return 0;
84 }

◆ getSectionId()

SectionId TPEF::TPEFNullSectionWriter::getSectionId ( ) const
protectedvirtual

Returns the identification code of the section.

Zero is the numeric code reserved for identifying null sections.

Returns
Zero.

Reimplemented from TPEF::TPEFSectionWriter.

Definition at line 94 of file TPEFNullSectionWriter.cc.

94  {
95  return 0;
96 }

◆ operator=()

TPEFNullSectionWriter TPEF::TPEFNullSectionWriter::operator= ( const TPEFNullSectionWriter )
private

Assignment not allowed.

◆ type()

Section::SectionType TPEF::TPEFNullSectionWriter::type ( ) const
protectedvirtual

Returns which type of sections can be written out by this writer.

Returns
The type of section that writer can write out.

Implements TPEF::TPEFSectionWriter.

Definition at line 70 of file TPEFNullSectionWriter.cc.

70  {
71  return Section::ST_NULL;
72 }

References TPEF::Section::ST_NULL.

◆ writeSize()

void TPEF::TPEFNullSectionWriter::writeSize ( BinaryStream stream,
const Section sect 
) const
protectedvirtual

Writes the size of a null section into an output stream.

The size of a null section is always zero.

Parameters
streamOutput stream.
sectSection whose size has to be written out (not used).

Reimplemented from TPEF::TPEFSectionWriter.

Definition at line 107 of file TPEFNullSectionWriter.cc.

108  {
109 
110  stream.writeWord(0);
111 }

References TPEF::BinaryStream::writeWord().

Here is the call graph for this function:

Member Data Documentation

◆ instance_

const TPEFNullSectionWriter TPEF::TPEFNullSectionWriter::instance_
staticprivate

Unique instance of a class.

Definition at line 65 of file TPEFNullSectionWriter.hh.


The documentation for this class was generated from the following files:
TPEF::SectionWriter::registerSectionWriter
static void registerSectionWriter(const SectionWriter *sWriter)
Definition: SectionWriter.cc:148
TPEF::Section::ST_NULL
@ ST_NULL
NULL Section.
Definition: Section.hh:70
TPEF::TPEFSectionWriter::TPEFSectionWriter
TPEFSectionWriter()
Definition: TPEFSectionWriter.cc:63