de.upb.hni.vmagic.declaration
Class FunctionBody

java.lang.Object
  extended by de.upb.hni.vmagic.VhdlElement
      extended by de.upb.hni.vmagic.declaration.DeclarativeItem
          extended by de.upb.hni.vmagic.declaration.SubprogramBody
              extended by de.upb.hni.vmagic.declaration.FunctionBody
All Implemented Interfaces:
BlockDeclarativeItem, DeclarativeItemMarker, EntityDeclarativeItem, Function, PackageBodyDeclarativeItem, ProcessDeclarativeItem, SubprogramDeclarativeItem, DeclarativeRegion

public class FunctionBody
extends SubprogramBody
implements Function

Function body.


Constructor Summary
FunctionBody(FunctionDeclaration declaration)
          Creates a function body based on a function declaration.
FunctionBody(java.lang.String identifier, SubtypeIndication returnType, java.util.List<VhdlObjectProvider> parameters)
          Creates a function body.
FunctionBody(java.lang.String identifier, SubtypeIndication returnType, VhdlObjectProvider... parameters)
          Creates a function body.
 
Method Summary
 java.lang.String getIdentifier()
          Returns the subprogram's identifier.
 java.util.List<VhdlObjectProvider<? extends VhdlObject>> getParameters()
          Returns the parameters of this subprogram.
 SubtypeIndication getReturnType()
          Returns the return type of this function.
 boolean isImpure()
          Returns if this function if impure.
 void setIdentifier(java.lang.String identifier)
          Sets the subprogram's identifier.
 void setImpure(boolean impure)
          Sets if this function should be impure.
 void setReturnType(SubtypeIndication returnType)
          Sets the return type of this function.
 
Methods inherited from class de.upb.hni.vmagic.declaration.SubprogramBody
getDeclarations, getIdentifier, getParameters, getScope, getStatements, setIdentifier
 
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

FunctionBody

public FunctionBody(java.lang.String identifier,
                    SubtypeIndication returnType,
                    java.util.List<VhdlObjectProvider> parameters)
Creates a function body.

Parameters:
identifier - the identifier
returnType - the return type
parameters - the parameters

FunctionBody

public FunctionBody(java.lang.String identifier,
                    SubtypeIndication returnType,
                    VhdlObjectProvider... parameters)
Creates a function body.

Parameters:
identifier - the identifier
returnType - the return type
parameters - the parameters

FunctionBody

public FunctionBody(FunctionDeclaration declaration)
Creates a function body based on a function declaration.

Parameters:
declaration - the base function declaration
Method Detail

isImpure

public boolean isImpure()
Description copied from interface: Function
Returns if this function if impure.

Specified by:
isImpure in interface Function
Returns:
true, if this function is impure

setImpure

public void setImpure(boolean impure)
Description copied from interface: Function
Sets if this function should be impure.

Specified by:
setImpure in interface Function
Parameters:
impure - true, if this function should be impure

getReturnType

public SubtypeIndication getReturnType()
Description copied from interface: Function
Returns the return type of this function.

Specified by:
getReturnType in interface Function
Returns:
the return type

setReturnType

public void setReturnType(SubtypeIndication returnType)
Description copied from interface: Function
Sets the return type of this function.

Specified by:
setReturnType in interface Function
Parameters:
returnType - the return type

getIdentifier

public java.lang.String getIdentifier()
Returns the subprogram's identifier.

Specified by:
getIdentifier in interface NamedEntity
Returns:
the identifier

setIdentifier

public void setIdentifier(java.lang.String identifier)
Sets the subprogram's identifier.

Parameters:
identifier - the identifier

getParameters

public java.util.List<VhdlObjectProvider<? extends VhdlObject>> getParameters()
Returns the parameters of this subprogram.

Returns:
a modifiable list of objects