OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
TTAProgram::DataAddressDef Class Reference

#include <DataAddressDef.hh>

Inheritance diagram for TTAProgram::DataAddressDef:
Inheritance graph
Collaboration diagram for TTAProgram::DataAddressDef:
Collaboration graph

Public Member Functions

 DataAddressDef (Address start, int size, Address dest, bool littleEndian)
 
virtual ~DataAddressDef ()
 
virtual bool isInitialized () const
 
virtual bool isAddress () const
 
virtual Address destinationAddress () const
 
virtual void setDestinationAddress (Address dest)
 
DataDefinitioncopy () const
 
- Public Member Functions inherited from TTAProgram::DataDefinition
 DataDefinition (Address start, int size, bool littleEndian, MinimumAddressableUnit *initData=NULL, bool allZeros=false)
 
 DataDefinition (Address start, const std::vector< MinimumAddressableUnit > &initData, bool littleEndian)
 
virtual ~DataDefinition ()
 
virtual Address startAddress () const
 
virtual void setStartAddress (Address start)
 
virtual MinimumAddressableUnit MAU (int index) const
 
virtual int size () const
 
virtual bool isInstructionAddress () const
 
bool isLittleEndian () const
 

Private Attributes

Address dest_
 Destination address of a data area. More...
 

Detailed Description

Describes characteristics of a memory area containing an address.

Definition at line 45 of file DataAddressDef.hh.

Constructor & Destructor Documentation

◆ DataAddressDef()

TTAProgram::DataAddressDef::DataAddressDef ( Address  start,
int  size,
Address  dest,
bool  littleEndian 
)

Creates data area definition containing address.

Parameters
startStarting address of definition.
sizeNumber of MAUs that area represents.
destAddress where to data definition refers.

Definition at line 44 of file DataAddressDef.cc.

45  :
46  DataDefinition(start, size, littleEndian), dest_(dest) {
47 
48 }

Referenced by copy().

◆ ~DataAddressDef()

TTAProgram::DataAddressDef::~DataAddressDef ( )
virtual

Nothing to free.

Definition at line 53 of file DataAddressDef.cc.

53  {
54 }

Member Function Documentation

◆ copy()

DataDefinition * TTAProgram::DataAddressDef::copy ( ) const
virtual

POM style copy constructor, which supports dynamic binding.

Returns
Copy of the object.

Reimplemented from TTAProgram::DataDefinition.

Definition at line 102 of file DataAddressDef.cc.

102  {
103  DataAddressDef* newDef = new DataAddressDef(
105 
106  return newDef;
107 }

References DataAddressDef(), destinationAddress(), TTAProgram::DataDefinition::isLittleEndian(), TTAProgram::DataDefinition::size(), and TTAProgram::DataDefinition::startAddress().

Here is the call graph for this function:

◆ destinationAddress()

Address TTAProgram::DataAddressDef::destinationAddress ( ) const
virtual

Returns destination address, where to intialization value refers.

Returns
Destination address of initialized data area.

Reimplemented from TTAProgram::DataDefinition.

Definition at line 82 of file DataAddressDef.cc.

82  {
83  return dest_;
84 }

References dest_.

Referenced by copy().

◆ isAddress()

bool TTAProgram::DataAddressDef::isAddress ( ) const
virtual

Returns true, class contains always address reference.

Returns
Always true.

Reimplemented from TTAProgram::DataDefinition.

Definition at line 72 of file DataAddressDef.cc.

72  {
73  return true;
74 }

◆ isInitialized()

bool TTAProgram::DataAddressDef::isInitialized ( ) const
virtual

Returns true, class defines always initialized data area.

Returns
Always true.

Reimplemented from TTAProgram::DataDefinition.

Definition at line 62 of file DataAddressDef.cc.

62  {
63  return true;
64 }

◆ setDestinationAddress()

void TTAProgram::DataAddressDef::setDestinationAddress ( Address  dest)
virtual

Set new destination address for the data definition.

Parameters
destNew destination address.

Reimplemented from TTAProgram::DataDefinition.

Definition at line 92 of file DataAddressDef.cc.

92  {
93  dest_ = dest;
94 }

References dest_.

Member Data Documentation

◆ dest_

Address TTAProgram::DataAddressDef::dest_
private

Destination address of a data area.

Definition at line 60 of file DataAddressDef.hh.

Referenced by destinationAddress(), and setDestinationAddress().


The documentation for this class was generated from the following files:
TTAProgram::DataDefinition::DataDefinition
DataDefinition(Address start, int size, bool littleEndian, MinimumAddressableUnit *initData=NULL, bool allZeros=false)
Definition: DataDefinition.cc:52
TTAProgram::DataAddressDef::destinationAddress
virtual Address destinationAddress() const
Definition: DataAddressDef.cc:82
TTAProgram::DataAddressDef::DataAddressDef
DataAddressDef(Address start, int size, Address dest, bool littleEndian)
Definition: DataAddressDef.cc:44
TTAProgram::DataDefinition::startAddress
virtual Address startAddress() const
Definition: DataDefinition.cc:129
TTAProgram::DataDefinition::size
virtual int size() const
Definition: DataDefinition.cc:211
TTAProgram::DataAddressDef::dest_
Address dest_
Destination address of a data area.
Definition: DataAddressDef.hh:60
TTAProgram::DataDefinition::isLittleEndian
bool isLittleEndian() const
Definition: DataDefinition.hh:78