#include <mrpt/utils/CSimpleDatabase.h>
Public Member Functions | ||||
CSimpleDatabase () | ||||
Default constructor. | ||||
virtual | ~CSimpleDatabase () | |||
Destructor. | ||||
void | clear () | |||
Clears the DB. | ||||
CSimpleDatabaseTable * | createTable (const std::string &name) | |||
Creates a new table in the DB, initially empty. | ||||
CSimpleDatabaseTable * | getTable (const char *tableName) | |||
Returns the table with the indicated name
| ||||
CSimpleDatabaseTable * | getTable (size_t tableIndex) | |||
Returns the table by index. | ||||
size_t | tablesCount () const | |||
Returns the tables count in the DB. | ||||
std::string | tablesName (size_t tableIndex) const | |||
Returns the tables names in the DB. | ||||
bool | saveAsXML (const std::string &fileName) const | |||
Saves this database as a XML file. | ||||
bool | loadFromXML (const std::string &fileName) | |||
Loads the content of this database from a a XML file. | ||||
Private Attributes | ||||
std::vector < CSimpleDatabaseTable * > | tables | |||
The tables of the DB and their names:. | ||||
vector_string | table_names |
A database is a collection of tables, each one being a CSimpleDatabaseTable object. Tables are a rectangular arrrangement of cells, organized as records of fields. There are XML export/import methods in saveAsXML, loadFromXML.
Definition at line 130 of file CSimpleDatabase.h.
mrpt::utils::CSimpleDatabase::CSimpleDatabase | ( | ) |
Default constructor.
virtual mrpt::utils::CSimpleDatabase::~CSimpleDatabase | ( | ) | [virtual] |
Destructor.
void mrpt::utils::CSimpleDatabase::clear | ( | ) |
Clears the DB.
CSimpleDatabaseTable* mrpt::utils::CSimpleDatabase::createTable | ( | const std::string & | name | ) |
Creates a new table in the DB, initially empty.
CSimpleDatabaseTable* mrpt::utils::CSimpleDatabase::getTable | ( | size_t | tableIndex | ) |
Returns the table by index.
std::exception | On index out of bounds |
CSimpleDatabaseTable* mrpt::utils::CSimpleDatabase::getTable | ( | const char * | tableName | ) |
Returns the table with the indicated name
std::exception | On table not found. |
bool mrpt::utils::CSimpleDatabase::loadFromXML | ( | const std::string & | fileName | ) |
Loads the content of this database from a a XML file.
bool mrpt::utils::CSimpleDatabase::saveAsXML | ( | const std::string & | fileName | ) | const |
Saves this database as a XML file.
size_t mrpt::utils::CSimpleDatabase::tablesCount | ( | ) | const |
Returns the tables count in the DB.
std::string mrpt::utils::CSimpleDatabase::tablesName | ( | size_t | tableIndex | ) | const |
Returns the tables names in the DB.
std::exception | On index out of bounds |
Definition at line 188 of file CSimpleDatabase.h.
std::vector<CSimpleDatabaseTable*> mrpt::utils::CSimpleDatabase::tables [private] |
Page generated by Doxygen 1.5.9 for MRPT 0.6.5 SVN:exported at Thu May 21 04:14:55 UTC 2009 |