entities
Interface ScopeManager

All Known Implementing Classes:
ClassEntity, Expression, Function, LimitedClassEntity, Method, NameSpace

public interface ScopeManager

This interface contains all the operation used to add objects corresponding to C++ entities to other C++ entities that can contain them. Moreover it contains two methods respectively to determine type and name of an entity in a scope.


Method Summary
 void addClass(ClassEntity cl)
          Add a ClassEntity object to Module, NameSpace, ClassEntity objects
 void addClassHeaderFile(java.lang.String className, java.lang.String headerFileName)
          Add the correspondence between a class name and the file in which the class is defined
 void addEnumerator(Enumerator enumerator)
          Add an Enumerator object to Module, NameSpace, Function, Method, ClassEntity objects
 void addExpression(Expression expression, ScopeManager wrapper)
          Add an Expression object to Module, NamesSpace, Function, Method and Expression objects
 void addExternalField(Variable variable)
          Add an external Field object to Module or NameSpace objects
 void addExternalMethod(Method method)
          Add an external Method object to Module or NameSpace objects
 void addField(Variable variable)
          Add a Variable object to a ClassEntity object
 void addFriendClass(Variable variable)
          Add a friend Class object to ClassEntity objects
 void addFriendFunction(Function function)
          Add a friend Function object to ClassEntity objects
 void addFriendMethod(Method method)
          Add a friend Method object to ClassEntity objects
 void addFunction(Function function)
          Add a Function object to Module, NameSpace objects
 void addGeneralization(SuperClass superClass)
          Add a SuperClass object to ClassEntity objects
 void addMethod(Method method)
          Add a Method object to a ClassEntity object
 void addNameSpace(NameSpace namespace)
          Add a NameSpace object to Module or NameSpace object
 void addType(java.lang.String name, java.lang.String type)
          Add a type to Module objects
 void addUserType(java.lang.String name, java.lang.String type)
          Add a type to Module, NameSpace, Function, Method, ClassEntity objects
 void addVariable(Variable variable)
          Add a Variable object corresponding to a local variable to Module, NameSpace, Function, Method, Expression objects
 ScopeManager findVariableType(java.lang.String name, java.lang.StringBuffer type, Expression expr)
          Look for the variable declaration whose name is "name" and return the ScopeManager in which it is defined (if found), filling "type" with the variabl type.
 Method getCurrentMethod(java.lang.String methodName, java.util.Vector parameters)
           
 java.lang.String getName()
           
 ScopeManager getParent()
           
 void print(java.lang.String indentation)
           
 

Method Detail

addEnumerator

public void addEnumerator(Enumerator enumerator)
Add an Enumerator object to Module, NameSpace, Function, Method, ClassEntity objects


addNameSpace

public void addNameSpace(NameSpace namespace)
Add a NameSpace object to Module or NameSpace object


addExpression

public void addExpression(Expression expression,
                          ScopeManager wrapper)
Add an Expression object to Module, NamesSpace, Function, Method and Expression objects


addClass

public void addClass(ClassEntity cl)
Add a ClassEntity object to Module, NameSpace, ClassEntity objects


addFunction

public void addFunction(Function function)
Add a Function object to Module, NameSpace objects


addMethod

public void addMethod(Method method)
Add a Method object to a ClassEntity object


addVariable

public void addVariable(Variable variable)
Add a Variable object corresponding to a local variable to Module, NameSpace, Function, Method, Expression objects


addField

public void addField(Variable variable)
Add a Variable object to a ClassEntity object


addType

public void addType(java.lang.String name,
                    java.lang.String type)
Add a type to Module objects


addUserType

public void addUserType(java.lang.String name,
                        java.lang.String type)
Add a type to Module, NameSpace, Function, Method, ClassEntity objects


addGeneralization

public void addGeneralization(SuperClass superClass)
Add a SuperClass object to ClassEntity objects


addExternalMethod

public void addExternalMethod(Method method)
Add an external Method object to Module or NameSpace objects


addExternalField

public void addExternalField(Variable variable)
Add an external Field object to Module or NameSpace objects


addFriendFunction

public void addFriendFunction(Function function)
Add a friend Function object to ClassEntity objects


addFriendMethod

public void addFriendMethod(Method method)
Add a friend Method object to ClassEntity objects


addFriendClass

public void addFriendClass(Variable variable)
Add a friend Class object to ClassEntity objects


addClassHeaderFile

public void addClassHeaderFile(java.lang.String className,
                               java.lang.String headerFileName)
Add the correspondence between a class name and the file in which the class is defined


getName

public java.lang.String getName()
Returns:
the string corresponding to the name of the object

findVariableType

public ScopeManager findVariableType(java.lang.String name,
                                     java.lang.StringBuffer type,
                                     Expression expr)
Look for the variable declaration whose name is "name" and return the ScopeManager in which it is defined (if found), filling "type" with the variabl type.


getParent

public ScopeManager getParent()
Returns:
the parent ScopeManager

getCurrentMethod

public Method getCurrentMethod(java.lang.String methodName,
                               java.util.Vector parameters)
Returns:
the method to which add the expressions

print

public void print(java.lang.String indentation)