entities
Class Module

java.lang.Object
  extended byentities.NameSpace
      extended byentities.Module
All Implemented Interfaces:
ScopeManager

public class Module
extends NameSpace

The Module class represents the information regarding a C++ Module.


Field Summary
 
Fields inherited from class entities.NameSpace
fBody, fClasses, fClassMapToHeaderFile, fEnumerators, fExternalFields, fExternalMethods, fFunctions, fGlobalVariables, fName, fNestedNameSpaces, fParentScope, fTypeTable, fUserTypeTable
 
Constructor Summary
Module(java.lang.String preprocessedFile, java.lang.String sourceFilePath)
          Construct a Module object
 
Method Summary
 void addClassMap(java.util.Hashtable completeMapTOLimitedClass)
           
 void addEnumeratorMapToHeader(java.util.Hashtable enumeratorMapToHeaderFile)
           
 void addHeaderFile(HeaderFile headerFile)
           
 void addInfo(java.util.Hashtable keyToObject)
           
 void addTypeMapToHeader(java.util.Hashtable typeMapToHeaderFile)
           
 boolean areExceptionUsed()
           
 boolean areTemplateUsed()
           
static void createTable(java.sql.Connection dbConnection)
           
static void delete(java.sql.Connection dbConnection, java.lang.String moduleName)
           
 java.util.Hashtable getCompleteMapTOLimitedClass()
           
 java.util.Hashtable getEnumeratorMapToHeaderFile()
           
 java.util.Vector getHeaderFiles()
           
 ImplementationFile getImplementationFile()
           
 java.util.Hashtable getKeyToObjectTable()
           
 LimitedClassEntity getLimitedClassEntity(java.lang.String fullyScopedName, java.lang.String superClassName)
           
 java.lang.String getPreprocessedFile()
           
 java.lang.String getSourceFilePath()
           
 java.lang.String getStrippedFile()
           
 java.util.Hashtable getTypeMapToHeaderFile()
           
 void insert(java.sql.Connection dbConnection)
           
 void print(java.lang.String indentation)
          Print all information
 void setExceptionFlag(boolean exceptionFlag)
          Deprecated.  
 void setImplementationFile(ImplementationFile implementationFile)
           
 void setTemplateFlag(boolean templateFlag)
          Deprecated.  
 
Methods inherited from class entities.NameSpace
addClass, addClassHeaderFile, addEnumerator, addExpression, addExternalField, addExternalMethod, addField, addFriendClass, addFriendFunction, addFriendMethod, addFunction, addGeneralization, addMethod, addNameSpace, addType, addUserType, addVariable, delete, findVariableType, getBody, getClasses, getClassMapToHeaderFile, getCurrentMethod, getEnumerators, getExternalFields, getExternalMethods, getFunctions, getGlobalVariables, getName, getNameSpaces, getParent, getTypeTable, getUserTypeTable, insert
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Module

public Module(java.lang.String preprocessedFile,
              java.lang.String sourceFilePath)
Construct a Module object

Parameters:
preprocessedFile - Name of the preprocessed file (with the path)
sourceFilePath - Directory containing the source files
Method Detail

getPreprocessedFile

public java.lang.String getPreprocessedFile()
Returns:
the string corresponding to the preprocessed file name (.i)

getStrippedFile

public java.lang.String getStrippedFile()
Returns:
the String corresponding to the stripped file name (.i)

getSourceFilePath

public java.lang.String getSourceFilePath()
Returns:
the string corresponding to the path of the source code

getImplementationFile

public ImplementationFile getImplementationFile()
Returns:
the object (of type ImplementationFile) containing all information about the implementation file

getHeaderFiles

public java.util.Vector getHeaderFiles()
Returns:
a Vector of objects (of type headerFile) corresponding to the header files required by the module

getKeyToObjectTable

public java.util.Hashtable getKeyToObjectTable()
Returns:
the Hashtable which associates a number (of type String) with an entity

getTypeMapToHeaderFile

public java.util.Hashtable getTypeMapToHeaderFile()
Returns:
the Hashtable which associates a class name with the file in which it is declared

getEnumeratorMapToHeaderFile

public java.util.Hashtable getEnumeratorMapToHeaderFile()
Returns:
the Hashtable which associates a enumerator with the file in which it is declared

getCompleteMapTOLimitedClass

public java.util.Hashtable getCompleteMapTOLimitedClass()
Returns:
the Hashtable which associates a class name to the corresponding LimitedClassEntity object

getLimitedClassEntity

public LimitedClassEntity getLimitedClassEntity(java.lang.String fullyScopedName,
                                                java.lang.String superClassName)
Returns:
the LimitedClassEntity object which name is className if it exists, null otherwise

areExceptionUsed

public boolean areExceptionUsed()
Returns:
true is exceptions are used

areTemplateUsed

public boolean areTemplateUsed()
Returns:
true is templates are used

addClassMap

public void addClassMap(java.util.Hashtable completeMapTOLimitedClass)
Parameters:
completeMapTOLimitedClass - It associates the class name with the corresponding LimitedClassEntity

addTypeMapToHeader

public void addTypeMapToHeader(java.util.Hashtable typeMapToHeaderFile)

addEnumeratorMapToHeader

public void addEnumeratorMapToHeader(java.util.Hashtable enumeratorMapToHeaderFile)

addInfo

public void addInfo(java.util.Hashtable keyToObject)
Parameters:
keyToObject - is used to create a link from numbers (as String) to the entities created by the CPPParser. This link is then used by the CPPParserExpression to add the expressions to the correct entity

setImplementationFile

public void setImplementationFile(ImplementationFile implementationFile)
Parameters:
implementationFile - contains all information about the implementation file associated to the module

addHeaderFile

public void addHeaderFile(HeaderFile headerFile)
Parameters:
headerFile - contains information about a header file associated to the module

setExceptionFlag

public void setExceptionFlag(boolean exceptionFlag)
Deprecated.  

Parameters:
exceptionFlag - is true if exceptions are used inside the module

setTemplateFlag

public void setTemplateFlag(boolean templateFlag)
Deprecated.  

Parameters:
templateFlag - is true if templates are used inside the module

print

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

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

delete

public static void delete(java.sql.Connection dbConnection,
                          java.lang.String moduleName)
                   throws java.sql.SQLException
Throws:
java.sql.SQLException

createTable

public static void createTable(java.sql.Connection dbConnection)
                        throws java.sql.SQLException
Throws:
java.sql.SQLException

insert

public void insert(java.sql.Connection dbConnection)
            throws java.sql.SQLException
Throws:
java.sql.SQLException