|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectentities.NameSpace
The NameSpace class represents the information regarding a C++ NameSpace.
Field Summary | |
protected java.util.Vector |
fBody
Contain all the statements associated with the case. |
protected java.util.Vector |
fClasses
Represent the classes defined in the namespace |
protected java.util.Hashtable |
fClassMapToHeaderFile
Associates a class name with the file in which it is declared |
protected java.util.Vector |
fEnumerators
Represent the enumerators defined in the namespace |
protected java.util.Vector |
fExternalFields
Represent the fields whose class is not defined in the files analyzed. |
protected java.util.Vector |
fExternalMethods
Represent the methods whose class is not defined in the files analyzed. |
protected java.util.Vector |
fFunctions
Represent the functions defined in the namespace |
protected java.util.Vector |
fGlobalVariables
Represent the global variables defined in the namespace |
protected java.lang.String |
fName
Name of the namespace |
protected java.util.Vector |
fNestedNameSpaces
Represent the nested namespaces defined in the namespace |
protected ScopeManager |
fParentScope
Represent the scope in which the namespace is defined. |
protected java.util.Hashtable |
fTypeTable
Contains all the new types defined using the typedef statement (the key is the new name) |
protected java.util.Hashtable |
fUserTypeTable
Contains all the new types defined by the user throught the typedef statement (the key is the new name) |
Constructor Summary | |
NameSpace()
Construct a NameSpace object |
|
NameSpace(ScopeManager parentScope,
java.lang.String name)
Construct a NameSpace object |
Method Summary | |
void |
addClass(ClassEntity c)
Add a Class to NameSpace |
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 e)
Add a global Enumerator to NameSpace |
void |
addExpression(Expression expr,
ScopeManager wrapper)
Add an Expression object to Module, NamesSpace, Function, Method and Expression objects |
void |
addExternalField(Variable f)
Add a external field to NameSpace |
void |
addExternalMethod(Method m)
Add a external method to NameSpace |
void |
addField(Variable variable)
Empty |
void |
addFriendClass(Variable variable)
Empty |
void |
addFriendFunction(Function function)
Empty |
void |
addFriendMethod(Method method)
Empty |
void |
addFunction(Function f)
Add a Function to NameSpace |
void |
addGeneralization(SuperClass superClass)
Empty |
void |
addMethod(Method method)
Empty |
void |
addNameSpace(NameSpace n)
Add a namespace |
void |
addType(java.lang.String newType,
java.lang.String definition)
Add a new type |
void |
addUserType(java.lang.String newType,
java.lang.String definition)
Add a new user type |
void |
addVariable(Variable v)
Add a global Variable to NameSpace |
static void |
createTable(java.sql.Connection dbConnection)
|
static void |
delete(java.sql.Connection dbConnection,
int id)
Add the flow analysis information to the insertion and extraction graphs |
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. |
java.util.Vector |
getBody()
|
java.util.Vector |
getClasses()
|
java.util.Hashtable |
getClassMapToHeaderFile()
|
Method |
getCurrentMethod(java.lang.String methodName,
java.util.Vector parameters)
|
java.util.Vector |
getEnumerators()
|
java.util.Vector |
getExternalFields()
|
java.util.Vector |
getExternalMethods()
|
java.util.Vector |
getFunctions()
|
java.util.Vector |
getGlobalVariables()
|
java.lang.String |
getName()
|
java.util.Vector |
getNameSpaces()
|
ScopeManager |
getParent()
|
java.util.Hashtable |
getTypeTable()
|
java.util.Hashtable |
getUserTypeTable()
|
void |
insert(java.sql.Connection dbConnection,
int sourceId,
int sourceType)
|
void |
print(java.lang.String indentation)
Print all information in a Module object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String fName
protected java.util.Vector fClasses
protected java.util.Vector fFunctions
protected java.util.Vector fGlobalVariables
protected java.util.Vector fEnumerators
protected java.util.Vector fNestedNameSpaces
protected java.util.Vector fExternalMethods
protected java.util.Vector fExternalFields
protected java.util.Hashtable fTypeTable
protected java.util.Hashtable fUserTypeTable
protected ScopeManager fParentScope
protected java.util.Hashtable fClassMapToHeaderFile
protected java.util.Vector fBody
Constructor Detail |
public NameSpace()
public NameSpace(ScopeManager parentScope, java.lang.String name)
parentScope
- ScopeManager corresponding to the entity containing the namespacename
- Name of the namespaceMethod Detail |
public java.lang.String getName()
getName
in interface ScopeManager
public java.util.Vector getClasses()
public java.util.Vector getExternalFields()
public java.util.Vector getExternalMethods()
public java.util.Vector getGlobalVariables()
public java.util.Vector getEnumerators()
public java.util.Vector getFunctions()
public java.util.Hashtable getTypeTable()
public java.util.Hashtable getUserTypeTable()
public java.util.Vector getNameSpaces()
public java.util.Hashtable getClassMapToHeaderFile()
public java.util.Vector getBody()
public ScopeManager getParent()
getParent
in interface ScopeManager
public Method getCurrentMethod(java.lang.String methodName, java.util.Vector parameters)
getCurrentMethod
in interface ScopeManager
public void addEnumerator(Enumerator e)
addEnumerator
in interface ScopeManager
public void addNameSpace(NameSpace n)
addNameSpace
in interface ScopeManager
public void addExpression(Expression expr, ScopeManager wrapper)
ScopeManager
addExpression
in interface ScopeManager
public void addClass(ClassEntity c)
addClass
in interface ScopeManager
public void addFunction(Function f)
addFunction
in interface ScopeManager
public void addMethod(Method method)
addMethod
in interface ScopeManager
public void addVariable(Variable v)
addVariable
in interface ScopeManager
public void addField(Variable variable)
addField
in interface ScopeManager
public void addType(java.lang.String newType, java.lang.String definition)
addType
in interface ScopeManager
public void addUserType(java.lang.String newType, java.lang.String definition)
addUserType
in interface ScopeManager
public void addGeneralization(SuperClass superClass)
addGeneralization
in interface ScopeManager
public void addExternalMethod(Method m)
addExternalMethod
in interface ScopeManager
public void addExternalField(Variable f)
addExternalField
in interface ScopeManager
public void addFriendFunction(Function function)
addFriendFunction
in interface ScopeManager
public void addFriendMethod(Method method)
addFriendMethod
in interface ScopeManager
public void addFriendClass(Variable variable)
addFriendClass
in interface ScopeManager
public void addClassHeaderFile(java.lang.String className, java.lang.String headerFileName)
ScopeManager
addClassHeaderFile
in interface ScopeManager
public void print(java.lang.String indentation)
print
in interface ScopeManager
public ScopeManager findVariableType(java.lang.String nameToBeFound, java.lang.StringBuffer typeToBeFound, Expression expr)
findVariableType
in interface ScopeManager
public static void delete(java.sql.Connection dbConnection, int id) throws java.sql.SQLException
java.sql.SQLException
public static void createTable(java.sql.Connection dbConnection) throws java.sql.SQLException
java.sql.SQLException
public void insert(java.sql.Connection dbConnection, int sourceId, int sourceType) throws java.sql.SQLException
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |