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

#include <NullSection.hh>

Inheritance diagram for TPEF::NullSection:
Inheritance graph
Collaboration diagram for TPEF::NullSection:
Collaboration graph

Public Member Functions

virtual ~NullSection ()
 
virtual SectionType type () const
 
- Public Member Functions inherited from TPEF::Section
virtual ~Section ()
 
virtual bool isChunkable () const
 
virtual Chunkchunk (SectionOffset offset) const
 
bool isProgramSection () const
 
bool isAuxSection () const
 
virtual void addElement (SectionElement *element)
 
virtual void setElement (Word index, SectionElement *element)
 
SectionElementelement (Word index) const
 
Word elementCount () const
 
void setFlagNoBits ()
 
void unsetFlagNoBits ()
 
bool noBits () const
 
bool vLen () const
 
Byte flags () const
 
void setFlags (Byte flagByte)
 
void setStartingAddress (AddressImage address)
 
AddressImage startingAddress () const
 
void setLink (const ReferenceManager::SafePointer *aLink)
 
void setLink (Section *aLink)
 
Sectionlink () const
 
void setASpace (const ReferenceManager::SafePointer *addrSpace)
 
void setASpace (ASpaceElement *addrSpace)
 
ASpaceElementaSpace () const
 
void setName (const ReferenceManager::SafePointer *sectionName)
 
void setName (Chunk *sectionName)
 
Chunkname () const
 
virtual bool isDataSection () const
 
virtual bool isCodeSection () const
 
- Public Member Functions inherited from TPEF::SafePointable
virtual ~SafePointable ()
 

Protected Member Functions

 NullSection (bool init)
 
virtual Sectionclone () const
 
- Protected Member Functions inherited from TPEF::Section
 Section ()
 
void setFlagVLen ()
 
void unsetFlagVLen ()
 
- Protected Member Functions inherited from TPEF::SafePointable
 SafePointable ()
 

Static Private Attributes

static NullSection proto_
 Prototype instance of section. More...
 

Additional Inherited Members

- Public Types inherited from TPEF::Section
enum  SectionType {
  ST_NULL = 0x00, ST_STRTAB = 0x01, ST_SYMTAB = 0x02, ST_DEBUG = 0x03,
  ST_RELOC = 0x04, ST_LINENO = 0x05, ST_NOTE = 0x06, ST_ADDRSP = 0x07,
  ST_MR = 0x0A, ST_CODE = 0x81, ST_DATA = 0x82, ST_UDATA = 0x83,
  ST_LEDATA = 0x84, ST_DUMMY = 0xff
}
 
enum  SectionFlag { SF_VLEN = 0x40, SF_NOBITS = 0x80 }
 
- Static Public Member Functions inherited from TPEF::Section
static SectioncreateSection (SectionType type)
 
static bool isProgramSection (SectionType type)
 
- Static Protected Member Functions inherited from TPEF::Section
static void registerSection (const Section *section)
 

Detailed Description

Null section.

Definition at line 46 of file NullSection.hh.

Constructor & Destructor Documentation

◆ ~NullSection()

TPEF::NullSection::~NullSection ( )
virtual

Destructor.

Definition at line 58 of file NullSection.cc.

58  {
59 }

◆ NullSection()

TPEF::NullSection::NullSection ( bool  init)
protected

Constructor.

Parameters
initTrue if instance should register itself to base class.

Definition at line 45 of file NullSection.cc.

45  : Section() {
46  if (init) {
48  }
49  // null section does not contain data.
50  setFlagNoBits();
51  unsetFlagVLen();
53 }

References TPEF::Section::registerSection(), TPEF::Section::setFlagNoBits(), TPEF::Section::setStartingAddress(), and TPEF::Section::unsetFlagVLen().

Referenced by clone().

Here is the call graph for this function:

Member Function Documentation

◆ clone()

Section * TPEF::NullSection::clone ( ) const
protectedvirtual

Creates an instance of section.

Returns
Newly created section.

Implements TPEF::Section.

Definition at line 77 of file NullSection.cc.

77  {
78  return new NullSection(false);
79 }

References NullSection().

Here is the call graph for this function:

◆ type()

Section::SectionType TPEF::NullSection::type ( ) const
virtual

Returns section's type.

Returns
Type of section.

Implements TPEF::Section.

Definition at line 67 of file NullSection.cc.

67  {
68  return ST_NULL;
69 }

References TPEF::Section::ST_NULL.

Member Data Documentation

◆ proto_

NullSection TPEF::NullSection::proto_
staticprivate

Prototype instance of section.

Definition at line 58 of file NullSection.hh.


The documentation for this class was generated from the following files:
TPEF::Section::unsetFlagVLen
void unsetFlagVLen()
TPEF::Section::setFlagNoBits
void setFlagNoBits()
TPEF::Section::Section
Section()
Definition: Section.cc:64
TPEF::Section::setStartingAddress
void setStartingAddress(AddressImage address)
TPEF::Section::registerSection
static void registerSection(const Section *section)
Definition: Section.cc:114
TPEF::NullSection::NullSection
NullSection(bool init)
Definition: NullSection.cc:45
TPEF::Section::ST_NULL
@ ST_NULL
NULL Section.
Definition: Section.hh:70