|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectentities.ClassEntity
The ClassEntity class represents the information regarding a C++ Class.
Field Summary | |
protected java.util.Hashtable |
fTypeTable
|
protected java.util.Hashtable |
fUserTypeTable
|
Constructor Summary | |
ClassEntity(ScopeManager parentScope,
java.lang.String name,
java.lang.String file,
java.lang.String classId,
int position,
boolean nestedFlag,
java.util.Vector enclosingClasses)
Construct a new ClassEntity |
Method Summary | |
void |
addClass(ClassEntity cl)
Add a ClassEntity object to the nested classes |
void |
addClassHeaderFile(java.lang.String className,
java.lang.String headerFileName)
Empty |
void |
addEnumerator(Enumerator en)
Add an Enumerator object to the ClassEntity |
void |
addExpression(Expression expr,
ScopeManager wrapper)
Add an Expression object to the ClassEntity (these expressions correspond to the filed initializations) |
void |
addExternalField(Variable variable)
Empty |
void |
addExternalMethod(Method method)
Empty |
void |
addField(Variable field)
Add a Variable object to the fields of the class |
void |
addFriendClass(Variable v)
Add a Variable object representing a friend class to the friend classes |
void |
addFriendFunction(Function f)
Add a Function object to the friend functions |
void |
addFriendMethod(Method m)
Add a Method object to the friend methods |
void |
addFunction(Function function)
Empty |
void |
addGeneralization(SuperClass superClass)
Add a SuperClass object |
void |
addMethod(Method method)
Add a Method object |
void |
addNameSpace(NameSpace namespace)
Empty |
void |
addType(java.lang.String name,
java.lang.String type)
Empty |
void |
addUserType(java.lang.String name,
java.lang.String type)
Add a new type defined with typedef to the user types. |
void |
addVariable(Variable variable)
Add a Variable object corresponding to a local variable to the current Expression. |
static void |
createTable(java.sql.Connection dbConnection)
|
static void |
delete(java.sql.Connection dbConnection,
int id)
|
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 |
getAccessList()
|
java.util.Vector |
getBody()
|
java.util.Vector |
getClasses()
|
java.lang.String |
getClassId()
|
Method |
getCurrentMethod(java.lang.String methodName,
java.util.Vector parameters)
|
java.util.Vector |
getEnclosingClasses()
Deprecated. |
java.util.Vector |
getEnumerators()
|
Variable |
getField(java.lang.String fieldName)
|
java.util.Vector |
getFields()
|
java.lang.String |
getFile()
|
java.util.Vector |
getFriendClasses()
|
java.util.Vector |
getFriendFunctions()
|
java.util.Vector |
getFriendMethods()
|
java.util.Vector |
getGeneralizations()
|
java.util.Vector |
getMethods()
|
java.lang.String |
getName()
|
ScopeManager |
getParent()
|
int |
getPosition()
|
java.util.Hashtable |
getTypeTable()
|
java.util.Hashtable |
getUserTypeTable()
|
void |
insert(java.sql.Connection dbConnection,
int sourceId,
int sourceType)
|
boolean |
isATemplate()
|
boolean |
isNested()
|
void |
print(java.lang.String indentation)
Print all information in a ClassEntity objects |
void |
setTemplateFlag(boolean templateFlag)
Set the template flag. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Hashtable fTypeTable
protected java.util.Hashtable fUserTypeTable
Constructor Detail |
public ClassEntity(ScopeManager parentScope, java.lang.String name, java.lang.String file, java.lang.String classId, int position, boolean nestedFlag, java.util.Vector enclosingClasses)
parentScope
- The entity containing the classname
- Name of the C++ classfile
- Declaration fileclassId
- The keyword used to define the class ("struct", "union" or "class")position
- Position of the C++ class name in the filenestedFlag
- Flag that says if the class is nested in another classenclosingClasses
- Vector of String objects that represent the enclosing classes from the outer to the innerMethod Detail |
public java.lang.String getName()
getName
in interface ScopeManager
public java.lang.String getFile()
public int getPosition()
public java.util.Vector getMethods()
Method
public java.util.Vector getFields()
Variable
public Variable getField(java.lang.String fieldName)
Variable
public java.util.Vector getEnumerators()
Enumerator
public java.util.Vector getAccessList()
Access
public java.util.Vector getGeneralizations()
SuperClass
public java.util.Vector getFriendClasses()
Variable
public java.util.Vector getFriendMethods()
Method
public java.util.Vector getFriendFunctions()
Function
public java.util.Vector getEnclosingClasses()
public java.util.Vector getBody()
public java.util.Hashtable getTypeTable()
public java.util.Hashtable getUserTypeTable()
public java.util.Vector getClasses()
ClassEntity
public java.lang.String getClassId()
Ex: struct A {}; union B { }; class C {};
Returns respectively the String objects "struct", "union" and "class"
public ScopeManager getParent()
getParent
in interface ScopeManager
public Method getCurrentMethod(java.lang.String methodName, java.util.Vector parameters)
getCurrentMethod
in interface ScopeManager
public boolean isNested()
public boolean isATemplate()
public void addEnumerator(Enumerator en)
addEnumerator
in interface ScopeManager
Enumerator
public void addNameSpace(NameSpace namespace)
addNameSpace
in interface ScopeManager
public void addExpression(Expression expr, ScopeManager wrapper)
addExpression
in interface ScopeManager
public void addClass(ClassEntity cl)
addClass
in interface ScopeManager
public void addFunction(Function function)
addFunction
in interface ScopeManager
public void addMethod(Method method)
addMethod
in interface ScopeManager
Method
public void addVariable(Variable variable)
addVariable
in interface ScopeManager
public void addField(Variable field)
addField
in interface ScopeManager
Variable
public void addType(java.lang.String name, java.lang.String type)
addType
in interface ScopeManager
public void addUserType(java.lang.String name, java.lang.String type)
addUserType
in interface ScopeManager
public void addGeneralization(SuperClass superClass)
addGeneralization
in interface ScopeManager
SuperClass
public void addExternalMethod(Method method)
addExternalMethod
in interface ScopeManager
public void addExternalField(Variable variable)
addExternalField
in interface ScopeManager
public void addFriendFunction(Function f)
addFriendFunction
in interface ScopeManager
Function
public void addFriendMethod(Method m)
addFriendMethod
in interface ScopeManager
Method
public void addFriendClass(Variable v)
addFriendClass
in interface ScopeManager
Variable
public void addClassHeaderFile(java.lang.String className, java.lang.String headerFileName)
addClassHeaderFile
in interface ScopeManager
public void setTemplateFlag(boolean templateFlag)
public void print(java.lang.String indentation)
print
in interface ScopeManager
indentation
- String containing blank characters to use as
indentationpublic 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 |