TableFile Class Reference

#include <TableFile.h>

List of all members.

Public Types

enum  eStatusInd { eCLEAR_STATUS = 0x0000, eDUPLICATE_BLOCKS = 0x0001, eUNNAMED_BLOCKS = 0x0002 }

Public Member Functions

 TableFile (const StringCompare::eCompareType caseSense=StringCompare::eCASE_SENSITIVE)
 TableFile (const eFileMode fileMode, const string &fileName, const StringCompare::eCompareType caseSense=StringCompare::eCASE_SENSITIVE)
virtual ~TableFile ()
string GetFileName (void)
eFileMode GetFileMode (void)
StringCompare::eCompareType GetCaseSensitivity (void)
unsigned int GetStatusInd (void)
string AddBlock (const string &blockName)
 Adds a new block. Returns the name of a newly created block.
bool IsBlockPresent (const string &blockName)
unsigned int GetNumBlocks ()
string GetFirstBlockName ()
void GetBlockNames (vector< string > &blockNames)
void GetBlockNames (mapped_vector< string > &blockNames)
void RenameBlock (const string &oldBlockName, const string &newBlockName)
void RenameFirstBlock (const string &newBlockName)
BlockGetBlock (const string &blockName)
void Flush ()
void Serialize (const string &fileName)
void Close ()
void PrintHeaderInfo ()
void DumpFile (void)
void PrintIndex (void)
void PrintIndexPosition (int position)

Protected Member Functions

void _SetStatusInd (const string &blockName)
void _AddBlock (const string &blockName, FileNavigator *fileNav)
void _GetNumTablesInBlocks (vector< Word > &numTablesInBlocks)
ISTable_GetTablePtr (const unsigned int blockIndex, const unsigned int tableIndex)
void _GetAllTables ()
unsigned int GetTotalNumTables ()
void GetTableNames (vector< string > &tableNames)
void GetTablesIndices (vector< unsigned int > &tablesIndices)
void GetSortedTablesIndices (vector< unsigned int > &tablesIndices)
int _ReadFileIndex ()
int _ReadFileIndexVersion0 ()
int _ReadFileIndexVersion1 ()
int _WriteFileIndex (FileNavigator *fileNav, const vector< int > &tableLocs)

Protected Attributes

string _fileName
eFileMode _fileMode
StringCompare::eCompareType _caseSense
unsigned int _statusInd
mapped_ptr_vector< Block,
StringCompare > 
_blocks
FileNavigator * _f

Private Member Functions

void Init ()
int Open (const string &fileName, const eFileMode fileMode)

Static Private Attributes

static const string _version


Detailed Description

TableFile class represents a file composed of data blocks.


Member Enumeration Documentation

enum TableFile::eStatusInd

Enumerator:
eCLEAR_STATUS 
eDUPLICATE_BLOCKS 
eUNNAMED_BLOCKS 


Constructor & Destructor Documentation

TableFile::TableFile ( const StringCompare::eCompareType  caseSense = StringCompare::eCASE_SENSITIVE  ) 

TableFile::TableFile ( const eFileMode  fileMode,
const string &  fileName,
const StringCompare::eCompareType  caseSense = StringCompare::eCASE_SENSITIVE 
)

TableFile::~TableFile (  )  [virtual]


Member Function Documentation

void TableFile::Init (  )  [private]

int TableFile::Open ( const string &  fileName,
const eFileMode  fileMode 
) [private]

void TableFile::_SetStatusInd ( const string &  blockName  )  [protected]

void TableFile::_AddBlock ( const string &  blockName,
FileNavigator *  fileNav 
) [protected]

void TableFile::_GetNumTablesInBlocks ( vector< Word > &  numTablesInBlocks  )  [protected]

ISTable * TableFile::_GetTablePtr ( const unsigned int  blockIndex,
const unsigned int  tableIndex 
) [protected]

void TableFile::_GetAllTables (  )  [protected]

unsigned int TableFile::GetTotalNumTables (  )  [protected]

void TableFile::GetTableNames ( vector< string > &  tableNames  )  [protected]

void TableFile::GetTablesIndices ( vector< unsigned int > &  tablesIndices  )  [protected]

void TableFile::GetSortedTablesIndices ( vector< unsigned int > &  tablesIndices  )  [protected]

int TableFile::_ReadFileIndex (  )  [protected]

int TableFile::_ReadFileIndexVersion0 (  )  [protected]

int TableFile::_ReadFileIndexVersion1 (  )  [protected]

int TableFile::_WriteFileIndex ( FileNavigator *  fileNav,
const vector< int > &  tableLocs 
) [protected]

string TableFile::GetFileName ( void   )  [inline]

eFileMode TableFile::GetFileMode ( void   )  [inline]

StringCompare::eCompareType TableFile::GetCaseSensitivity ( void   )  [inline]

unsigned int TableFile::GetStatusInd ( void   )  [inline]

string TableFile::AddBlock ( const string &  blockName  ) 

Adds a new block. Returns the name of a newly created block.

bool TableFile::IsBlockPresent ( const string &  blockName  ) 

unsigned int TableFile::GetNumBlocks (  )  [inline]

string TableFile::GetFirstBlockName (  ) 

void TableFile::GetBlockNames ( vector< string > &  blockNames  ) 

void TableFile::GetBlockNames ( mapped_vector< string > &  blockNames  ) 

void TableFile::RenameBlock ( const string &  oldBlockName,
const string &  newBlockName 
)

void TableFile::RenameFirstBlock ( const string &  newBlockName  )  [inline]

Block & TableFile::GetBlock ( const string &  blockName  ) 

void TableFile::Flush (  ) 

void TableFile::Serialize ( const string &  fileName  ) 

void TableFile::Close (  ) 

void TableFile::PrintHeaderInfo (  ) 

void TableFile::DumpFile ( void   )  [inline]

void TableFile::PrintIndex ( void   )  [inline]

void TableFile::PrintIndexPosition ( int  position  )  [inline]


Member Data Documentation

const string TableFile::_version [static, private]

string TableFile::_fileName [protected]

eFileMode TableFile::_fileMode [protected]

StringCompare::eCompareType TableFile::_caseSense [protected]

unsigned int TableFile::_statusInd [protected]

mapped_ptr_vector<Block, StringCompare> TableFile::_blocks [protected]

FileNavigator* TableFile::_f [protected]


The documentation for this class was generated from the following files:
Generated on Mon Apr 2 09:28:51 2007 for cif-table-obj-v7.0 by  doxygen 1.5.1