entities
Class LimitedClassEntity

java.lang.Object
  extended byentities.LimitedClassEntity
All Implemented Interfaces:
ScopeManager

public class LimitedClassEntity
extends java.lang.Object
implements ScopeManager

The LimitedClassEntity class represents the information regarding a C++ Class. It is used to represent any class in the preprocessed file and not only those defined by the user. It contains only the fields and the the method declaration.


Constructor Summary
LimitedClassEntity(java.lang.String name, java.lang.String file)
          Construct a new LimitedClassEntity
 
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 en)
          Add an Enumerator object
 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 field)
          Add a Variable object to the field
 void addFriendClass(Variable v)
          Add a Variable object that represents a friend class
 void addFriendFunction(Function f)
          Add a friend Function object
 void addFriendMethod(Method m)
          Add a friend Method object
 void addFunction(Function function)
          Add a Function object to Module, NameSpace objects
 void addGeneralization(SuperClass superClass)
          Add a SuperClass object
 void addMethod(Method method)
          Add a Method object
 void addNameSpace(NameSpace namespace)
          Add a NameSpace object to Module or NameSpace object
 void addNewGeneralization(LimitedClassEntity superClass)
          Add a LimitedClassEntity corresponding to a super class
 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 nameToBeFound, java.lang.StringBuffer typeToBeFound, Expression expr)
          Look for the variable declaration whose name is "nameToBeFound" and return the ScopeManager in which it is defined (if found), filling "typeToBeFound" with the variable type.
 Method getCurrentMethod(java.lang.String methodName, java.util.Vector parameters)
           
 Variable getField(java.lang.String fieldName)
           
 java.util.Vector getFields()
           
 java.lang.String getFile()
           
 java.util.Vector getGeneralizations()
           
 java.util.Vector getMethods()
           
 java.lang.String getName()
           
 java.util.Vector getNewGeneralizations()
           
 ScopeManager getParent()
          return null
 boolean isAsubclassOf(java.lang.String name)
           
 void print(java.lang.String indentation)
          Print all information in a LimitedClassEntity objects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LimitedClassEntity

public LimitedClassEntity(java.lang.String name,
                          java.lang.String file)
Construct a new LimitedClassEntity

Parameters:
name - Name of the C++ class
file - Definintion file
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface ScopeManager
Returns:
the string corresponding to the name of the C++ class

getFile

public java.lang.String getFile()
Returns:
the string corresponding to the name of the file in which the class is defined

getFields

public java.util.Vector getFields()
Returns:
a Vector containing objects of type Variable corresponding to the fields of the class

getMethods

public java.util.Vector getMethods()
Returns:
a Vector containing objects of type Method corresponding to the methods of the class

getField

public Variable getField(java.lang.String fieldName)
Returns:
the object of type Variable corresponding to the field called fieldName if it is a field of the class, null otherwise

getCurrentMethod

public Method getCurrentMethod(java.lang.String methodName,
                               java.util.Vector parameters)
Specified by:
getCurrentMethod in interface ScopeManager
Returns:
the Method entity whose name is "methodName" and whose parameters are "parameters" if it exists, null otherwise

getGeneralizations

public java.util.Vector getGeneralizations()
Returns:
a Vector of SuperClass objects

getNewGeneralizations

public java.util.Vector getNewGeneralizations()
Returns:
a Vector of LimitedClassEntity objects

getParent

public ScopeManager getParent()
return null

Specified by:
getParent in interface ScopeManager
Returns:
the parent ScopeManager

isAsubclassOf

public boolean isAsubclassOf(java.lang.String name)

addEnumerator

public void addEnumerator(Enumerator en)
Add an Enumerator object

Specified by:
addEnumerator in interface ScopeManager

addNameSpace

public void addNameSpace(NameSpace namespace)
Description copied from interface: ScopeManager
Add a NameSpace object to Module or NameSpace object

Specified by:
addNameSpace in interface ScopeManager

addExpression

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

Specified by:
addExpression in interface ScopeManager

addClass

public void addClass(ClassEntity cl)
Description copied from interface: ScopeManager
Add a ClassEntity object to Module, NameSpace, ClassEntity objects

Specified by:
addClass in interface ScopeManager

addFunction

public void addFunction(Function function)
Description copied from interface: ScopeManager
Add a Function object to Module, NameSpace objects

Specified by:
addFunction in interface ScopeManager

addMethod

public void addMethod(Method method)
Add a Method object

Specified by:
addMethod in interface ScopeManager

addVariable

public void addVariable(Variable variable)
Description copied from interface: ScopeManager
Add a Variable object corresponding to a local variable to Module, NameSpace, Function, Method, Expression objects

Specified by:
addVariable in interface ScopeManager

addField

public void addField(Variable field)
Add a Variable object to the field

Specified by:
addField in interface ScopeManager

addType

public void addType(java.lang.String name,
                    java.lang.String type)
Description copied from interface: ScopeManager
Add a type to Module objects

Specified by:
addType in interface ScopeManager

addUserType

public void addUserType(java.lang.String name,
                        java.lang.String type)
Description copied from interface: ScopeManager
Add a type to Module, NameSpace, Function, Method, ClassEntity objects

Specified by:
addUserType in interface ScopeManager

addGeneralization

public void addGeneralization(SuperClass superClass)
Add a SuperClass object

Specified by:
addGeneralization in interface ScopeManager

addNewGeneralization

public void addNewGeneralization(LimitedClassEntity superClass)
Add a LimitedClassEntity corresponding to a super class


addExternalMethod

public void addExternalMethod(Method method)
Description copied from interface: ScopeManager
Add an external Method object to Module or NameSpace objects

Specified by:
addExternalMethod in interface ScopeManager

addExternalField

public void addExternalField(Variable variable)
Description copied from interface: ScopeManager
Add an external Field object to Module or NameSpace objects

Specified by:
addExternalField in interface ScopeManager

addFriendFunction

public void addFriendFunction(Function f)
Add a friend Function object

Specified by:
addFriendFunction in interface ScopeManager

addFriendMethod

public void addFriendMethod(Method m)
Add a friend Method object

Specified by:
addFriendMethod in interface ScopeManager

addFriendClass

public void addFriendClass(Variable v)
Add a Variable object that represents a friend class

Specified by:
addFriendClass in interface ScopeManager

addClassHeaderFile

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

Specified by:
addClassHeaderFile in interface ScopeManager

print

public void print(java.lang.String indentation)
Print all information in a LimitedClassEntity objects

Specified by:
print in interface ScopeManager
Parameters:
indentation - String containing blank characters to use as indentation

findVariableType

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

Specified by:
findVariableType in interface ScopeManager