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

#include <TerminalSymbolReference.hh>

Inheritance diagram for TTAProgram::TerminalSymbolReference:
Inheritance graph
Collaboration diagram for TTAProgram::TerminalSymbolReference:
Collaboration graph

Public Member Functions

 TerminalSymbolReference (const TCEString &symbolName)
 
virtual ~TerminalSymbolReference ()
 
virtual Terminalcopy () const
 
virtual bool equals (const Terminal &other) const
 
virtual SimValue value () const
 
virtual TCEString toString () const
 
virtual bool isCodeSymbolReference () const
 
- Public Member Functions inherited from TTAProgram::TerminalImmediate
 TerminalImmediate (SimValue value)
 
virtual ~TerminalImmediate ()
 
virtual bool isImmediate () const
 
- Public Member Functions inherited from TTAProgram::Terminal
 Terminal ()
 
virtual ~Terminal ()
 
virtual bool isAddress () const
 
virtual bool isInstructionAddress () const
 
virtual bool isImmediateRegister () const
 
virtual bool isGPR () const
 
virtual bool isFUPort () const
 
virtual bool isRA () const
 
virtual bool isBasicBlockReference () const
 
virtual bool isProgramOperationReference () const
 
virtual bool isUniversalMachineRegister () const
 
virtual Address address () const
 
virtual const InstructionReferenceinstructionReference () const
 
virtual InstructionReferenceinstructionReference ()
 
virtual const TTAMachine::RegisterFileregisterFile () const
 
virtual const TTAMachine::ImmediateUnitimmediateUnit () const
 
virtual const TTAMachine::FunctionUnitfunctionUnit () const
 
virtual const BasicBlockbasicBlock () const
 
virtual int index () const
 
virtual bool isOpcodeSetting () const
 
virtual bool isTriggering () const
 
virtual Operationoperation () const
 
virtual OperationhintOperation () const
 
virtual int operationIndex () const
 
virtual const TTAMachine::Portport () const
 
virtual void setIndex (int index)
 
virtual void setInstructionReference (InstructionReference ref)
 
bool operator== (const Terminal &other) const
 
- Public Member Functions inherited from TTAProgram::AnnotatedInstructionElement
 AnnotatedInstructionElement ()
 
 ~AnnotatedInstructionElement ()
 
void addAnnotation (const ProgramAnnotation &annotation)
 
void setAnnotation (const ProgramAnnotation &annotation)
 
ProgramAnnotation annotation (int index, ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
 
int annotationCount (ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
 
void removeAnnotations (ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID)
 
bool hasAnnotations (ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID) const
 
bool hasAnnotation (ProgramAnnotation::Id id, const TCEString &data) const
 
void copyAnnotationsFrom (const AnnotatedInstructionElement &other)
 

Private Attributes

TCEString symbolName_
 

Additional Inherited Members

- Protected Attributes inherited from TTAProgram::TerminalImmediate
SimValue value_
 Value of the inline immediate. More...
 

Detailed Description

Definition at line 42 of file TerminalSymbolReference.hh.

Constructor & Destructor Documentation

◆ TerminalSymbolReference()

TTAProgram::TerminalSymbolReference::TerminalSymbolReference ( const TCEString symbolName)

Definition at line 37 of file TerminalSymbolReference.cc.

38  :
40  symbolName_(symbolName) {}

Referenced by copy().

◆ ~TerminalSymbolReference()

virtual TTAProgram::TerminalSymbolReference::~TerminalSymbolReference ( )
inlinevirtual

Definition at line 45 of file TerminalSymbolReference.hh.

45 {}

Member Function Documentation

◆ copy()

Terminal * TTAProgram::TerminalSymbolReference::copy ( ) const
virtual

Creates an exact copy of the terminal and returns it.

Returns
A copy of the terminal.

Reimplemented from TTAProgram::TerminalImmediate.

Definition at line 43 of file TerminalSymbolReference.cc.

43  {
45 }

References symbolName_, and TerminalSymbolReference().

Here is the call graph for this function:

◆ equals()

bool TTAProgram::TerminalSymbolReference::equals ( const Terminal other) const
virtual

Checks if terminals are equal.

Parameters
otherTerminal to compare.
Returns
true if terminals are equal.

Reimplemented from TTAProgram::TerminalImmediate.

Definition at line 48 of file TerminalSymbolReference.cc.

48  {
49  const TerminalSymbolReference* otherRef =
50  dynamic_cast<const TerminalSymbolReference*>(&other);
51  if (otherRef == NULL) {
52  return false;
53  }
54  return otherRef->symbolName_ == symbolName_;
55 }

References symbolName_.

◆ isCodeSymbolReference()

virtual bool TTAProgram::TerminalSymbolReference::isCodeSymbolReference ( ) const
inlinevirtual

Tells whether the terminal is reference to a code symbol

Returns
True if the terminal is a ref to a code symbol

Reimplemented from TTAProgram::Terminal.

Definition at line 50 of file TerminalSymbolReference.hh.

50 { return true; }

◆ toString()

virtual TCEString TTAProgram::TerminalSymbolReference::toString ( ) const
inlinevirtual

Reimplemented from TTAProgram::TerminalImmediate.

Definition at line 49 of file TerminalSymbolReference.hh.

49 { return symbolName_; }

References symbolName_.

◆ value()

virtual SimValue TTAProgram::TerminalSymbolReference::value ( ) const
inlinevirtual

Returns the value of the inline immediate.

Returns
The value of the inline immediate.
Exceptions
WrongSubclassnever.

Reimplemented from TTAProgram::TerminalImmediate.

Definition at line 48 of file TerminalSymbolReference.hh.

48 { return NullSimValue::instance(); }

References NullSimValue::instance().

Here is the call graph for this function:

Member Data Documentation

◆ symbolName_

TCEString TTAProgram::TerminalSymbolReference::symbolName_
private

Definition at line 52 of file TerminalSymbolReference.hh.

Referenced by copy(), equals(), and toString().


The documentation for this class was generated from the following files:
TTAProgram::TerminalSymbolReference::TerminalSymbolReference
TerminalSymbolReference(const TCEString &symbolName)
Definition: TerminalSymbolReference.cc:37
NullSimValue::instance
static SimValue & instance()
Definition: SimValue.cc:1642
TTAProgram::TerminalSymbolReference::symbolName_
TCEString symbolName_
Definition: TerminalSymbolReference.hh:52
TTAProgram::TerminalImmediate::TerminalImmediate
TerminalImmediate(SimValue value)
Definition: TerminalImmediate.cc:48
SimValue
Definition: SimValue.hh:96
WORD_BITWIDTH
const Byte WORD_BITWIDTH
Definition: BaseType.hh:138