entities
Class ReturnExpression

java.lang.Object
  extended byentities.Expression
      extended byentities.ReturnExpression
All Implemented Interfaces:
ScopeManager

public class ReturnExpression
extends Expression

The class ReturnExpression represents the C++ return statement


Field Summary
 
Fields inherited from class entities.Expression
fCast, fFile, fLBracketPosition, fOperator, fParentScope, fPosition, fPreviousExpression, fRBracketPosition, fToTrace, fTypeOfCast, SEPARATORS
 
Constructor Summary
ReturnExpression(ScopeManager parent)
           
 
Method Summary
 void addUse(Expression expr)
          Add an used expression
 void computeType(ScopeInfo scopeInfo, java.lang.String indentation)
          This method computes recursively the types on the Expressions contained in the used Expression objects
 java.lang.String getString()
           
 java.util.Vector getUse()
           
 void print(java.lang.String indentation)
          Print all information
 void setUse(java.util.Vector useExpr)
          The parameter "useExpr" is used to represent the expressions in which a more complex expression can be subdivided
 
Methods inherited from class entities.Expression
addClass, addClassHeaderFile, addEnumerator, addExpression, addExternalField, addExternalMethod, addField, addFriendClass, addFriendFunction, addFriendMethod, addFunction, addGeneralization, addMethod, addNameSpace, addType, addUserType, addVariable, cleanType, fillName, fillNameNew, findVariableType, getAllocationType, getCast, getCastType, getClassContext, getContainingMethod, getContext, getContextNew, getCurrentMethod, getFile, getLBracketPosition, getName, getOperator, getOperators, getParent, getParentScope, getPosition, getPreviousExpression, getRBracketPosition, getType, getTypeOfCast, propagateParentScope, resolveType, setCast, setFile, setLBracketPosition, setOperator, setParentScope, setPosition, setPreviousExpression, setRBracketPosition, setTypeOfCast
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReturnExpression

public ReturnExpression(ScopeManager parent)
Method Detail

getUse

public java.util.Vector getUse()
Returns:
a Vector containing objects of type Expression, that represent the expressions which compose the expression

getString

public java.lang.String getString()
Overrides:
getString in class Expression
Returns:
the representation of the Expression as a String (it is not a thorough reconstruction)

addUse

public void addUse(Expression expr)
Add an used expression

See Also:
CompositeExpression.setUse(java.util.Vector)

setUse

public void setUse(java.util.Vector useExpr)
The parameter "useExpr" is used to represent the expressions in which a more complex expression can be subdivided

Ex: a * (b + c);

In this case "useExpr" will contain two expressions: one of type SimpleVariable corresponding to the variable "a" and one of type CompositeExpression corresponding to "(b +c)"


print

public void print(java.lang.String indentation)
Print all information

Specified by:
print in interface ScopeManager
Overrides:
print in class Expression

computeType

public void computeType(ScopeInfo scopeInfo,
                        java.lang.String indentation)
This method computes recursively the types on the Expressions contained in the used Expression objects

Overrides:
computeType in class Expression