de.upb.hni.vmagic.object
Class Signal

java.lang.Object
  extended by de.upb.hni.vmagic.VhdlElement
      extended by de.upb.hni.vmagic.expression.Expression
          extended by de.upb.hni.vmagic.expression.Primary
              extended by de.upb.hni.vmagic.expression.VhdlObject<T>
                  extended by de.upb.hni.vmagic.object.Signal
All Implemented Interfaces:
Choice, NamedEntity, Target<Signal>, VhdlObjectProvider<Signal>

public class Signal
extends VhdlObject<T>
implements Target<Signal>

Signal.


Nested Class Summary
static class Signal.Kind
          Signal kind.
 
Nested classes/interfaces inherited from class de.upb.hni.vmagic.expression.VhdlObject
VhdlObject.Mode, VhdlObject.ObjectClass
 
Constructor Summary
Signal(java.lang.String identifier, SubtypeIndication type)
          Creates a signal.
Signal(java.lang.String identifier, SubtypeIndication type, Expression defaultValue)
          Creates a signal with a default value.
Signal(java.lang.String identifier, VhdlObject.Mode mode, SubtypeIndication type)
          Creates a signal with a mode.
Signal(java.lang.String identifier, VhdlObject.Mode mode, SubtypeIndication type, Expression defaultValue)
          Creates a signal with a mode and a default value.
 
Method Summary
 ArrayElement<T> getArrayElement(Expression... indices)
          Returns an array element of this object.
 ArrayElement<T> getArrayElement(Expression index)
          Returns an array element of this object.
 ArrayElement<T> getArrayElement(int index)
          Returns an array element of this object.
 ArrayElement<T> getArrayElement(java.util.List<Expression> indices)
          Returns an array element of this object.
 AttributeExpression<T> getAttributeExpression(Attribute attribute)
          Returns a attribute expression of this object.
 AttributeExpression<T> getAttributeExpression(Attribute attribute, Expression parameter)
          Returns a attribute expression of this object.
 Expression getDefaultValue()
          Returns the default value of this signal.
 java.lang.String getIdentifier()
          Returns the identifier of this object.
 Signal.Kind getKind()
          Returns the kind of this signal.
 VhdlObject.Mode getMode()
          Returns the mode of this vhdl object.
 VhdlObject.ObjectClass getObjectClass()
          Returns the type of this VhdlObject.
 RecordElement<T> getRecordElement(java.lang.String element)
          Returns a record element of this object.
 Slice<T> getSlice(DiscreteRange range)
          Returns a slice of this vhdl object.
 SubtypeIndication getType()
          Returns the type of this object.
 java.util.List<Signal> getVhdlObjects()
          Returns a list of VhdlObject that are contained in this VhdlObjectProvider.
 void setDefaultValue(Expression defaultValue)
          Sets the default value of this signal.
 void setIdentifier(java.lang.String identifier)
          Sets the identifier of this object.
 void setKind(Signal.Kind kind)
          Sets the kind of this signal.
 void setMode(VhdlObject.Mode mode)
          Sets the mode of this vhdl object.
 void setType(SubtypeIndication type)
          Sets the type of this object.
 
Methods inherited from class de.upb.hni.vmagic.expression.Primary
getPrecedence
 
Methods inherited from class de.upb.hni.vmagic.VhdlElement
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Signal

public Signal(java.lang.String identifier,
              SubtypeIndication type)
Creates a signal.

Parameters:
identifier - the identifier of the signal
type - the type of the signal

Signal

public Signal(java.lang.String identifier,
              VhdlObject.Mode mode,
              SubtypeIndication type)
Creates a signal with a mode.

Parameters:
identifier - the identifier of the signal
mode - the mode of the signal
type - the type of the signal

Signal

public Signal(java.lang.String identifier,
              SubtypeIndication type,
              Expression defaultValue)
Creates a signal with a default value.

Parameters:
identifier - the identifier of the signal
type - the type of the signal
defaultValue - the default value of the signal

Signal

public Signal(java.lang.String identifier,
              VhdlObject.Mode mode,
              SubtypeIndication type,
              Expression defaultValue)
Creates a signal with a mode and a default value.

Parameters:
identifier - the identifier of the signal
mode - the mode of the signal
type - the type of the signal
defaultValue - the default value of the signal
Method Detail

getKind

public Signal.Kind getKind()
Returns the kind of this signal.

Returns:
the signal kind

setKind

public void setKind(Signal.Kind kind)
Sets the kind of this signal.

Parameters:
kind - the signal kind

getDefaultValue

public Expression getDefaultValue()
Returns the default value of this signal.

Returns:
the default value

setDefaultValue

public void setDefaultValue(Expression defaultValue)
Sets the default value of this signal.

Parameters:
defaultValue - the default value

getVhdlObjects

public java.util.List<Signal> getVhdlObjects()
Description copied from interface: VhdlObjectProvider
Returns a list of VhdlObject that are contained in this VhdlObjectProvider.

Specified by:
getVhdlObjects in interface VhdlObjectProvider<Signal>
Returns:
list of VhdlObjects

getObjectClass

public VhdlObject.ObjectClass getObjectClass()
Description copied from class: VhdlObject
Returns the type of this VhdlObject.

Specified by:
getObjectClass in class VhdlObject<Signal>
Returns:
the object class

getIdentifier

public java.lang.String getIdentifier()
Returns the identifier of this object.

Specified by:
getIdentifier in interface NamedEntity
Specified by:
getIdentifier in class VhdlObject<T extends VhdlObject>
Returns:
the identifier

setIdentifier

public void setIdentifier(java.lang.String identifier)
Sets the identifier of this object.

Specified by:
setIdentifier in class VhdlObject<T extends VhdlObject>
Parameters:
identifier - the identifier

getType

public SubtypeIndication getType()
Returns the type of this object.

Specified by:
getType in class VhdlObject<T extends VhdlObject>
Returns:
the type

setType

public void setType(SubtypeIndication type)
Sets the type of this object.

Specified by:
setType in class VhdlObject<T extends VhdlObject>
Parameters:
type - the type

getMode

public VhdlObject.Mode getMode()
Returns the mode of this vhdl object.

Specified by:
getMode in class VhdlObject<T extends VhdlObject>
Returns:
the mode

setMode

public void setMode(VhdlObject.Mode mode)
Sets the mode of this vhdl object.

Specified by:
setMode in class VhdlObject<T extends VhdlObject>
Parameters:
mode - the mode

getSlice

public Slice<T> getSlice(DiscreteRange range)
Returns a slice of this vhdl object.

Specified by:
getSlice in class VhdlObject<T extends VhdlObject>
Parameters:
range - the slice range.
Returns:
the slice

getArrayElement

public ArrayElement<T> getArrayElement(Expression index)
Returns an array element of this object.

Specified by:
getArrayElement in class VhdlObject<T extends VhdlObject>
Parameters:
index - the index of the array element
Returns:
the array element

getArrayElement

public ArrayElement<T> getArrayElement(int index)
Returns an array element of this object.

Specified by:
getArrayElement in class VhdlObject<T extends VhdlObject>
Parameters:
index - the index of the array element
Returns:
the array element

getArrayElement

public ArrayElement<T> getArrayElement(java.util.List<Expression> indices)
Returns an array element of this object.

Specified by:
getArrayElement in class VhdlObject<T extends VhdlObject>
Parameters:
indices - the indices of the array element
Returns:
the array element

getArrayElement

public ArrayElement<T> getArrayElement(Expression... indices)
Returns an array element of this object.

Specified by:
getArrayElement in class VhdlObject<T extends VhdlObject>
Parameters:
indices - the indices of the array element
Returns:
the array element

getRecordElement

public RecordElement<T> getRecordElement(java.lang.String element)
Returns a record element of this object.

Specified by:
getRecordElement in class VhdlObject<T extends VhdlObject>
Parameters:
element - the identifier of the record element
Returns:
the record element

getAttributeExpression

public AttributeExpression<T> getAttributeExpression(Attribute attribute)
Returns a attribute expression of this object.

Specified by:
getAttributeExpression in class VhdlObject<T extends VhdlObject>
Parameters:
attribute - the attribute
Returns:
the record element

getAttributeExpression

public AttributeExpression<T> getAttributeExpression(Attribute attribute,
                                                     Expression parameter)
Returns a attribute expression of this object.

Specified by:
getAttributeExpression in class VhdlObject<T extends VhdlObject>
Parameters:
attribute - the attribute
parameter - the parameter
Returns:
the record element