OpenASIP  2.0
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
TTAMachine::NullAddressSpace Class Reference

#include <NullAddressSpace.hh>

Inheritance diagram for TTAMachine::NullAddressSpace:
Inheritance graph
Collaboration diagram for TTAMachine::NullAddressSpace:
Collaboration graph

Public Member Functions

virtual int width () const
 
virtual ULongWord start () const
 
virtual ULongWord end () const
 
virtual TCEString name () const override
 
virtual void setName (const std::string &name) override
 
virtual void setWidth (int width) override
 
virtual void setAddressBounds (ULongWord start, ULongWord end) override
 
virtual void setMachine (Machine &mach) override
 
virtual void unsetMachine ()
 
virtual Machinemachine () const
 
virtual void ensureRegistration (const Component &component) const
 
virtual bool isRegistered () const
 
virtual ObjectStatesaveState () const
 
virtual void loadState (const ObjectState *state)
 
- Public Member Functions inherited from TTAMachine::AddressSpace
 AddressSpace (const std::string &name, int width, ULongWord minAddress, ULongWord maxAddress, Machine &owner)
 
 AddressSpace (const ObjectState *state, Machine &owner)
 
virtual ~AddressSpace ()
 
virtual void addNumericalId (unsigned id)
 
virtual bool hasNumericalId (unsigned id) const
 
std::set< unsigned > numericalIds () const
 
bool setNumericalIds (const std::set< unsigned > &ids)
 
virtual void setShared (bool shared)
 
virtual bool isShared () const
 
bool operator== (const AddressSpace &other) const
 
bool operator!= (const AddressSpace &other) const
 
- Public Member Functions inherited from TTAMachine::Component
virtual ~Component ()
 
- Public Member Functions inherited from Serializable
virtual ~Serializable ()
 

Static Public Member Functions

static NullAddressSpaceinstance ()
 

Private Member Functions

 NullAddressSpace ()
 
virtual ~NullAddressSpace ()
 

Static Private Attributes

static NullAddressSpace instance_
 The only instance of NullAddressSpace. More...
 
static Machine machine_
 Machine to which the null address space is registered. More...
 

Additional Inherited Members

- Static Public Attributes inherited from TTAMachine::AddressSpace
static const std::string OSNAME_ADDRESS_SPACE = "adress_space"
 ObjectState name for AddressSpace. More...
 
static const std::string OSKEY_WIDTH = "width"
 ObjectState attribute key for the bit width. More...
 
static const std::string OSKEY_MIN_ADDRESS = "min_a"
 ObjectState attribute key for minimum address. More...
 
static const std::string OSKEY_MAX_ADDRESS = "max_a"
 ObjectState attribute key for maximum address. More...
 
static const std::string OSKEY_SHARED_MEMORY = "shared-memory"
 
static const std::string OSKEY_NUMERICAL_ID = "numerical-id"
 
- Static Public Attributes inherited from TTAMachine::Component
static const std::string OSNAME_COMPONENT = "component"
 ObjectState name for component. More...
 
static const std::string OSKEY_NAME = "name"
 ObjectState attribute key for the name of the component. More...
 
- Protected Member Functions inherited from TTAMachine::Component
 Component (const std::string &name)
 
 Component (const ObjectState *state)
 
void internalSetMachine (Machine &machine)
 
void internalUnsetMachine ()
 
- Protected Member Functions inherited from TTAMachine::MachinePart
 MachinePart ()
 
virtual ~MachinePart ()
 

Detailed Description

A singleton class which represents a null AddressSpace.

All the methods abort the program.

Definition at line 45 of file NullAddressSpace.hh.

Constructor & Destructor Documentation

◆ NullAddressSpace()

TTAMachine::NullAddressSpace::NullAddressSpace ( )
private

The constructor.

Definition at line 44 of file NullAddressSpace.cc.

44  :
45  AddressSpace("NULL", 1, 0, 1, machine_) {
46 }

◆ ~NullAddressSpace()

TTAMachine::NullAddressSpace::~NullAddressSpace ( )
privatevirtual

The destructor.

Definition at line 52 of file NullAddressSpace.cc.

52  {
53 }

Member Function Documentation

◆ end()

ULongWord TTAMachine::NullAddressSpace::end ( ) const
virtual

Aborts the program with error message.

Returns
Never returns.

Reimplemented from TTAMachine::AddressSpace.

Definition at line 97 of file NullAddressSpace.cc.

97  {
98  abortWithError("end()");
99  return 0;
100 }

References abortWithError.

◆ ensureRegistration()

void TTAMachine::NullAddressSpace::ensureRegistration ( const Component component) const
virtual

Aborts the program with error message.

Exceptions
IllegalRegistrationNever thrown.

Reimplemented from TTAMachine::Component.

Definition at line 183 of file NullAddressSpace.cc.

183  {
184  abortWithError("ensureRegistration()");
185 }

References abortWithError.

◆ instance()

NullAddressSpace & TTAMachine::NullAddressSpace::instance ( )
static

Returns the only instance of NullAddressSpace.

Returns
The only instance of NullAddressSpace.

Definition at line 62 of file NullAddressSpace.cc.

62  {
63  return instance_;
64 }

References instance_.

Referenced by SimControlLanguageCommand::parseDataAddressExpression(), and SimControlLanguageCommand::setMemoryAddress().

◆ isRegistered()

bool TTAMachine::NullAddressSpace::isRegistered ( ) const
virtual

Aborts the program with error message.

Returns
Never returns.

Reimplemented from TTAMachine::Component.

Definition at line 193 of file NullAddressSpace.cc.

193  {
194  abortWithError("isRegistered()");
195  return false;
196 }

References abortWithError.

◆ loadState()

void TTAMachine::NullAddressSpace::loadState ( const ObjectState state)
virtual

Aborts the program with error message.

Exceptions
ObjectStateLoadingExceptionNever thrown.

Reimplemented from TTAMachine::AddressSpace.

Definition at line 217 of file NullAddressSpace.cc.

217  {
218  abortWithError("loadState()");
219 }

References abortWithError.

◆ machine()

Machine * TTAMachine::NullAddressSpace::machine ( ) const
virtual

Aborts the program with error message.

Returns
Never returns.

Reimplemented from TTAMachine::Component.

Definition at line 171 of file NullAddressSpace.cc.

171  {
172  abortWithError("machine()");
173  return NULL;
174 }

References abortWithError.

◆ name()

TCEString TTAMachine::NullAddressSpace::name ( ) const
overridevirtual

Aborts the program with error message.

Returns
Never returns.

Reimplemented from TTAMachine::Component.

Definition at line 109 of file NullAddressSpace.cc.

109  {
110  abortWithError("name()");
111  return "";
112 }

References abortWithError.

◆ saveState()

ObjectState * TTAMachine::NullAddressSpace::saveState ( ) const
virtual

Aborts the program with error message.

Returns
Never returns.

Reimplemented from TTAMachine::AddressSpace.

Definition at line 205 of file NullAddressSpace.cc.

205  {
206  abortWithError("saveState()");
207  return NULL;
208 }

References abortWithError.

◆ setAddressBounds()

void TTAMachine::NullAddressSpace::setAddressBounds ( ULongWord  start,
ULongWord  end 
)
overridevirtual

Aborts the program with error message.

Exceptions
OutOfRangeNever thrown.

Reimplemented from TTAMachine::AddressSpace.

Definition at line 142 of file NullAddressSpace.cc.

142  {
143  abortWithError("setAddressBounds()");
144 }

References abortWithError.

◆ setMachine()

void TTAMachine::NullAddressSpace::setMachine ( Machine mach)
overridevirtual

Aborts the program with error message.

Exceptions
ComponentAlreadyExistsNever thrown.

Reimplemented from TTAMachine::AddressSpace.

Definition at line 152 of file NullAddressSpace.cc.

152  {
153  abortWithError("setMachine()");
154 }

References abortWithError.

◆ setName()

void TTAMachine::NullAddressSpace::setName ( const std::string &  name)
overridevirtual

Aborts the program with error message.

Exceptions
ComponentAlreadyExistsNever thrown.
InvalidNameNever thrown.

Reimplemented from TTAMachine::AddressSpace.

Definition at line 122 of file NullAddressSpace.cc.

122  {
123  abortWithError("setName()");
124 }

References abortWithError.

◆ setWidth()

void TTAMachine::NullAddressSpace::setWidth ( int  width)
overridevirtual

Aborts the program with error message.

Exceptions
OutOfRangeNever thrown.

Reimplemented from TTAMachine::AddressSpace.

Definition at line 132 of file NullAddressSpace.cc.

132  {
133  abortWithError("setWidth()");
134 }

References abortWithError.

◆ start()

ULongWord TTAMachine::NullAddressSpace::start ( ) const
virtual

Aborts the program with error message.

Returns
Never returns.

Reimplemented from TTAMachine::AddressSpace.

Definition at line 85 of file NullAddressSpace.cc.

85  {
86  abortWithError("start()");
87  return 0;
88 }

References abortWithError.

◆ unsetMachine()

void TTAMachine::NullAddressSpace::unsetMachine ( )
virtual

Aborts the program with error message.

Reimplemented from TTAMachine::AddressSpace.

Definition at line 160 of file NullAddressSpace.cc.

160  {
161  abortWithError("unsetMachine()");
162 }

References abortWithError.

◆ width()

int TTAMachine::NullAddressSpace::width ( ) const
virtual

Aborts the program with error message.

Returns
Never returns.

Reimplemented from TTAMachine::AddressSpace.

Definition at line 73 of file NullAddressSpace.cc.

73  {
74  abortWithError("width()");
75  return 0;
76 }

References abortWithError.

Member Data Documentation

◆ instance_

NullAddressSpace TTAMachine::NullAddressSpace::instance_
staticprivate

The only instance of NullAddressSpace.

Definition at line 72 of file NullAddressSpace.hh.

Referenced by instance().

◆ machine_

Machine TTAMachine::NullAddressSpace::machine_
staticprivate

Machine to which the null address space is registered.

Definition at line 74 of file NullAddressSpace.hh.


The documentation for this class was generated from the following files:
TTAMachine::NullAddressSpace::machine_
static Machine machine_
Machine to which the null address space is registered.
Definition: NullAddressSpace.hh:74
TTAMachine::NullAddressSpace::instance_
static NullAddressSpace instance_
The only instance of NullAddressSpace.
Definition: NullAddressSpace.hh:72
TTAMachine::AddressSpace::AddressSpace
AddressSpace(const std::string &name, int width, ULongWord minAddress, ULongWord maxAddress, Machine &owner)
Definition: AddressSpace.cc:74
abortWithError
#define abortWithError(message)
Definition: Application.hh:72