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

#include <UDataSection.hh>

Inheritance diagram for TPEF::UDataSection:
Inheritance graph
Collaboration diagram for TPEF::UDataSection:
Collaboration graph

Public Member Functions

virtual ~UDataSection ()
 
virtual SectionType type () const
 
virtual Byte byte (const Chunk *chunk) const
 
- Public Member Functions inherited from TPEF::RawSection
virtual bool isChunkable () const
 
virtual Chunkchunk (SectionOffset offset) const
 
virtual void assureInSection (SectionOffset offset) const
 
virtual ~RawSection ()
 
bool empty () const
 
virtual void setLengthInMAUs (Word length)
 
virtual Word lengthInMAUs () const
 
virtual void setDataLength (Word length)
 
virtual Word length () const
 
virtual Word bytesToMAUs (Word byteCount) const
 
virtual Word MAUsToBytes (Word mauCount) const
 
virtual Word chunkToMAUIndex (const Chunk *chunk) const
 
Word referredChunkCount () const
 
ChunkreferredChunk (Word index) const
 
bool belongsToSection (const Chunk *chunk) const
 
- Public Member Functions inherited from TPEF::Section
virtual ~Section ()
 
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

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

Static Private Attributes

static UDataSection proto_
 Protorype 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

Uninitilized data section.

Definition at line 47 of file UDataSection.hh.

Constructor & Destructor Documentation

◆ ~UDataSection()

TPEF::UDataSection::~UDataSection ( )
virtual

Destructor.

Definition at line 60 of file UDataSection.cc.

60  {
61 }

◆ UDataSection()

TPEF::UDataSection::UDataSection ( bool  init)
protected

Constructor.

Parameters
initTrue if instance should register itself to base class.

Definition at line 46 of file UDataSection.cc.

46  : RawSection() {
47 
48  if (init) {
50  }
51 
52  unsetFlagVLen();
53  setFlagNoBits();
55 }

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

◆ byte()

Byte TPEF::UDataSection::byte ( const Chunk chunk) const
virtual

Returns byte from section.

In this case section contains only zeros.

Parameters
chunkThe chunk in which offset byte is wanted.
Returns
Byte from the offset of the chunk.

Reimplemented in TPEF::DataSection.

Definition at line 92 of file UDataSection.cc.

92  {
93  return 0x00;
94 }

◆ clone()

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

Creates an instance of section.

Returns
Newly created section.

Implements TPEF::Section.

Reimplemented in TPEF::DataSection, TPEF::LEDataSection, and TPEF::StringSection.

Definition at line 79 of file UDataSection.cc.

79  {
80  return new UDataSection(false);
81 }

References UDataSection().

Here is the call graph for this function:

◆ type()

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

Returns section's type.

Returns
Type of section.

Implements TPEF::Section.

Reimplemented in TPEF::DataSection, TPEF::LEDataSection, and TPEF::StringSection.

Definition at line 69 of file UDataSection.cc.

69  {
70  return ST_UDATA;
71 }

References TPEF::Section::ST_UDATA.

Referenced by TTAProgram::ProgramWriter::createBinary(), and TTAProgram::TPEFProgramFactory::createDataMemories().

Member Data Documentation

◆ proto_

UDataSection TPEF::UDataSection::proto_
staticprivate

Protorype instance of section.

Definition at line 61 of file UDataSection.hh.


The documentation for this class was generated from the following files:
TPEF::Section::unsetFlagVLen
void unsetFlagVLen()
TPEF::Section::setFlagNoBits
void setFlagNoBits()
TPEF::Section::setStartingAddress
void setStartingAddress(AddressImage address)
TPEF::Section::ST_UDATA
@ ST_UDATA
Uninitialized data section.
Definition: Section.hh:81
TPEF::Section::registerSection
static void registerSection(const Section *section)
Definition: Section.cc:114
TPEF::UDataSection::UDataSection
UDataSection(bool init)
Definition: UDataSection.cc:46
TPEF::RawSection::RawSection
RawSection()
Definition: Section.cc:180