#include <TableFile.h>
Public Member Functions | |
Block (const string &name, FileNavigator *fileNavP, const eFileMode fileMode=READ_MODE, const StringCompare::eCompareType caseSense=StringCompare::eCASE_SENSITIVE) | |
~Block () | |
vector< pair< string, ISTable::eTableDiff > > | operator== (Block &inBlock) |
void | SetName (const string &name) |
string | GetName () const |
void | AddTable (const string &name, const int indexInFile=0, ISTable *isTableP=NULL) |
void | GetTableNames (vector< string > &tableNames) |
bool | IsTablePresent (const string &tableName) |
ISTable * | GetTablePtr (const string &tableName) |
void | DeleteTable (const string &tableName) |
void | WriteTable (ISTable *isTableP) |
void | Print () |
Public Attributes | |
mapped_ptr_vector< ISTable, StringCompare > | _tables |
Private Member Functions | |
Block (const Block &t) | |
Block & | operator= (const Block &inBlock) |
ISTable * | _GetTablePtr (const unsigned int tableIndex) |
Private Attributes | |
string | _name |
eFileMode | _fileMode |
FileNavigator * | _fileNav |
This class represents a data block, that can come from DDL, dictionary or CIF files. Data block is a container of tables. This class provides methods for construction and destruction, tables manipulation (addition, retrieval, deleting, writing), data blocks comparison.
Block::Block | ( | const string & | name, | |
FileNavigator * | fileNavP, | |||
const eFileMode | fileMode = READ_MODE , |
|||
const StringCompare::eCompareType | caseSense = StringCompare::eCASE_SENSITIVE | |||
) |
Utility method, not part of users public API, and will soon be removed.
Constructs a data block.
[in] | name | - the name of the data block |
[in] | fileNavP | - pointer to the File Navigator object |
[in] | fileMode | - optional parameter that indicates data block mode. Possible values are read-only, create, update and virtual. |
[in] | caseSense | - optional parameter that indicates case sensitivity of table names. Possible values are case sensitive and case in-sensitive. If not specified, case sensitive table names are assumed. |
None |
Block::~Block | ( | ) |
Utility method, not part of users public API, and will soon be removed.
Destructs a data block.
Not applicable |
None |
Block::Block | ( | const Block & | t | ) | [private] |
vector< pair< string, ISTable::eTableDiff > > Block::operator== | ( | Block & | inBlock | ) |
Compares a data block to another data block.
[in] | inBlock | - reference to input data block |
None |
void Block::SetName | ( | const string & | name | ) | [inline] |
Utility method, not part of users public API, and will soon be removed.
Sets the name of a data block.
[in] | name | - the name of the data block |
None |
string Block::GetName | ( | ) | const [inline] |
Retrieves data block name.
None |
None |
void Block::AddTable | ( | const string & | name, | |
const int | indexInFile = 0 , |
|||
ISTable * | isTableP = NULL | |||
) |
Utility method, not part of users public API, and will soon be removed.
void Block::GetTableNames | ( | vector< string > & | tableNames | ) |
Retrieves names of all tables in a data block.
[out] | tableNames | - retrieved table names |
None |
bool Block::IsTablePresent | ( | const string & | tableName | ) |
Checks for table presence in the data block.
[in] | tableName | - table name |
false - if table does not exist
None |
ISTable * Block::GetTablePtr | ( | const string & | tableName | ) |
Retrieves a pointer to the table.
[in] | tableName | - table name |
NULL, if table was not found
None |
void Block::DeleteTable | ( | const string & | tableName | ) |
Deletes a table from a data block.
[in] | tableName | - table name |
None |
void Block::WriteTable | ( | ISTable * | isTableP | ) |
Writes a table to the data block. In this context, writing means adding it (if it does not already exist) or updating it (if it already exists).
[in] | isTableP | - pointer to the table |
None |
void Block::Print | ( | ) |
Utility method, not part of users public API, and will soon be removed.
ISTable * Block::_GetTablePtr | ( | const unsigned int | tableIndex | ) | [private] |
mapped_ptr_vector<ISTable, StringCompare> Block::_tables |
string Block::_name [private] |
eFileMode Block::_fileMode [private] |
FileNavigator* Block::_fileNav [private] |