entities
Class DeleteExpression

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

public class DeleteExpression
extends Expression

The class DeleteExpression represents a C++ delete statement


Field Summary
 
Fields inherited from class entities.Expression
fCast, fFile, fLBracketPosition, fOperator, fParentScope, fPosition, fPreviousExpression, fRBracketPosition, fToTrace, fTypeOfCast, SEPARATORS
 
Constructor Summary
DeleteExpression(ScopeManager parentScope)
           
 
Method Summary
 void computeType(ScopeInfo scopeInfo, java.lang.String indentation)
          This method computes recursively the variable types on the Expression corresponding to the memory
 Expression getMemory()
           
 java.lang.String getString()
           
 void print(java.lang.String indentation)
          Print all information.
 void setMemory(Expression expr)
          The parameter "expr" is used to represent the expression found after the keyword "delete"
 
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

DeleteExpression

public DeleteExpression(ScopeManager parentScope)
Method Detail

getMemory

public Expression getMemory()
Returns:
the Expression corresponding to the memory Expression

 
 Ex: P *p = new P(); 
     .... 
     delete p;
 
In this case it returns the SimpleVariable expression correspondig to "p".

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)

setMemory

public void setMemory(Expression expr)
The parameter "expr" is used to represent the expression found after the keyword "delete"


computeType

public void computeType(ScopeInfo scopeInfo,
                        java.lang.String indentation)
This method computes recursively the variable types on the Expression corresponding to the memory

Overrides:
computeType in class Expression

print

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

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