AST_FILE_IO Class Reference

#include <AST_FILE_IO.h>

List of all members.


Detailed Description

Class holding stat ic data and functions supporting File I/O.

Todo:
Consider making this a namespace.
Todo:
For the general file IO we should consider a special file name, similar to "rose_..."
Test of the AST File I/O mechanism include:


Public Types

typedef AstAttribute *(AstAttribute::*) CONSTRUCTOR (void)

Static Public Member Functions

static void startUp (SgProject *root)
static unsigned long getSizeOfMemoryPool (const int position)
static unsigned long getSizeOfMemoryPoolUpToAst (AstData *astInPool, const int position)
static unsigned long getAccumulatedPoolSizeOfNewAst (const int position)
static unsigned long getAccumulatedPoolSizeOfAst (AstData *astInPool, const int position)
static unsigned long getPoolSizeOfNewAst (const int sgVariant)
static unsigned long getTotalNumberOfNodesOfAstInMemoryPool ()
static unsigned long getTotalNumberOfNodesOfNewAst ()
static bool areFreepointersContainingGlobalIndices ()
static unsigned long getGlobalIndexFromSgClassPointer (SgNode *pointer)
static SgNodegetSgClassPointerFromGlobalIndex (unsigned long globalIndex)
static void compressAstInMemoryPool ()
static void resetValidAstAfterWriting ()
static void clearAllMemoryPools ()
static void deleteStaticData ()
static void deleteStoredAsts ()
static void setStaticDataOfAst (AstData *astInPool)
static int getNumberOfAsts ()
static void addNewAst (AstData *newAst)
static void extendMemoryPoolsForRebuildingAST ()
static void writeASTToStream (std::ostream &out)
static void writeASTToFile (std::string fileName)
static std::string writeASTToString ()
static SgProjectreadASTFromStream (std::istream &in)
static SgProjectreadASTFromFile (std::string fileName)
static SgProjectreadASTFromString (const std::string &s)
static void printFileMaps ()
static void printListOfPoolSizes ()
static void printListOfPoolSizesOfAst (int index)
static AstDatagetAst (int index)
static AstDatagetAstWithRoot (SgProject *root)
template<class TYPE>
static void registerAttribute ()
static const std::map< std::string,
CONSTRUCTOR > & 
getRegisteredAttributes ()
static void reset ()
static void display (const std::string &label)

Private Types

 totalNumberOfIRNodes = 712
enum  { totalNumberOfIRNodes = 712 }

Static Private Member Functions

static unsigned long binarySearch (unsigned long globalIndex, int start=0, int end=totalNumberOfIRNodes)
static unsigned long linearSearch (unsigned long globalIndex)
static SgNodegetPointerFromGlobalIndex (unsigned long globalIndex)

Static Private Attributes

static std::map< std::string,
CONSTRUCTOR
registeredAttributes
static bool freepointersOfCurrentAstAreSetToGlobalIndices
static unsigned long listOfMemoryPoolSizes [totalNumberOfIRNodes+1]
static std::vector< AstData * > vectorOfASTs
static AstDataactualRebuildAst

Classes

class  MemoryCheckingTraversalForAstFileIO


Member Typedef Documentation

typedef AstAttribute*(AstAttribute::*) AST_FILE_IO::CONSTRUCTOR(void)


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
totalNumberOfIRNodes 


Member Function Documentation

static unsigned long AST_FILE_IO::binarySearch ( unsigned long  globalIndex,
int  start = 0,
int  end = totalNumberOfIRNodes 
) [static, private]

static unsigned long AST_FILE_IO::linearSearch ( unsigned long  globalIndex  )  [static, private]

static SgNode* AST_FILE_IO::getPointerFromGlobalIndex ( unsigned long  globalIndex  )  [static, private]

static void AST_FILE_IO::startUp ( SgProject root  )  [static]

static unsigned long AST_FILE_IO::getSizeOfMemoryPool ( const int  position  )  [static]

static unsigned long AST_FILE_IO::getSizeOfMemoryPoolUpToAst ( AstData astInPool,
const int  position 
) [static]

static unsigned long AST_FILE_IO::getAccumulatedPoolSizeOfNewAst ( const int  position  )  [static]

static unsigned long AST_FILE_IO::getAccumulatedPoolSizeOfAst ( AstData astInPool,
const int  position 
) [static]

static unsigned long AST_FILE_IO::getPoolSizeOfNewAst ( const int  sgVariant  )  [static]

static unsigned long AST_FILE_IO::getTotalNumberOfNodesOfAstInMemoryPool (  )  [static]

static unsigned long AST_FILE_IO::getTotalNumberOfNodesOfNewAst (  )  [static]

static bool AST_FILE_IO::areFreepointersContainingGlobalIndices (  )  [static]

static unsigned long AST_FILE_IO::getGlobalIndexFromSgClassPointer ( SgNode pointer  )  [static]

static SgNode* AST_FILE_IO::getSgClassPointerFromGlobalIndex ( unsigned long  globalIndex  )  [static]

static void AST_FILE_IO::compressAstInMemoryPool (  )  [static]

static void AST_FILE_IO::resetValidAstAfterWriting (  )  [static]

static void AST_FILE_IO::clearAllMemoryPools (  )  [static]

static void AST_FILE_IO::deleteStaticData (  )  [static]

static void AST_FILE_IO::deleteStoredAsts (  )  [static]

static void AST_FILE_IO::setStaticDataOfAst ( AstData astInPool  )  [static]

static int AST_FILE_IO::getNumberOfAsts (  )  [static]

static void AST_FILE_IO::addNewAst ( AstData newAst  )  [static]

static void AST_FILE_IO::extendMemoryPoolsForRebuildingAST (  )  [static]

static void AST_FILE_IO::writeASTToStream ( std::ostream &  out  )  [static]

static void AST_FILE_IO::writeASTToFile ( std::string  fileName  )  [static]

static std::string AST_FILE_IO::writeASTToString (  )  [static]

static SgProject* AST_FILE_IO::readASTFromStream ( std::istream &  in  )  [static]

static SgProject* AST_FILE_IO::readASTFromFile ( std::string  fileName  )  [static]

static SgProject* AST_FILE_IO::readASTFromString ( const std::string &  s  )  [static]

static void AST_FILE_IO::printFileMaps (  )  [static]

static void AST_FILE_IO::printListOfPoolSizes (  )  [static]

static void AST_FILE_IO::printListOfPoolSizesOfAst ( int  index  )  [static]

static AstData* AST_FILE_IO::getAst ( int  index  )  [static]

static AstData* AST_FILE_IO::getAstWithRoot ( SgProject root  )  [static]

template<class TYPE>
void AST_FILE_IO::registerAttribute (  )  [inline, static]

const std::map< std::string, AST_FILE_IO::CONSTRUCTOR > & AST_FILE_IO::getRegisteredAttributes (  )  [inline, static]

static void AST_FILE_IO::reset (  )  [static]

static void AST_FILE_IO::display ( const std::string &  label  )  [static]


Member Data Documentation

std :: map< std::string, CONSTRUCTOR > AST_FILE_IO::registeredAttributes [static, private]

bool AST_FILE_IO::freepointersOfCurrentAstAreSetToGlobalIndices [static, private]

unsigned long AST_FILE_IO::listOfMemoryPoolSizes[totalNumberOfIRNodes+1] [static, private]

std::vector<AstData*> AST_FILE_IO::vectorOfASTs [static, private]

AstData* AST_FILE_IO::actualRebuildAst [static, private]


The documentation for this class was generated from the following file:
Generated on Tue Jan 31 05:33:22 2012 for ROSE by  doxygen 1.4.7