Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

DbXML Class Reference

#include <DbXML.hpp>

Inheritance diagram for DbXML::

DB List of all members.

Public Methods

 DbXML ()
 DbXML (string &database, string &user_name, string &password)
 ~DbXML ()
void connect (const string &database, const string &user_name, const string &password)
virtual void disconnect ()
FoldergetRoot ()
vector< Node *> & getChildren (Folder &parent)
NodegetNode (const string &path)
FoldergetFolder (const string &path)
BookmarkgetBookmark (const string &path)
void remove (Node *node, bool recurse=false)
void save (Node *node)

Detailed Description

Represents a database connection to an XBel file.

Constructor & Destructor Documentation


Default constructor. Initialize the SAX XML parser.

DbXML::DbXML string &    database,
string &    user_name,
string &    password

Constructor. Connect to the given database.


Destructor. Write all data back to the XBel file.

Member Function Documentation

void DbXML::connect const string &    database,
const string &    user_name,
const string &    password

Open the XBel file and load all items into memory for fast access.

database  Filename of the XBel file to load.
user_name  Ignored.
password  Ignored.

Reimplemented from DB.

void DbXML::disconnect   [virtual]

Write all data back to the XBel file.

Reimplemented from DB.

Bookmark * DbXML::getBookmark const string &    path [virtual]

This implementation is very unsafe

Reimplemented from DB.

vector< Node *> & DbXML::getChildren Folder   parent [virtual]

Return all direct children of a specified node.

Use iterators

This is not really a good approach because a Folder should be expected to have the children stored internally.

Reimplemented from DB.

Folder * DbXML::getFolder const string &    path [virtual]

Reimplemented from DB.

Node * DbXML::getNode const string &    path [virtual]

Return a node by path. The path must start with a slash.

returns null if no node with that path is found

Reimplemented from DB.

Folder * DbXML::getRoot   [virtual]

Return the root folder.

This method may disappear in the future because this approach requires that the whole tree gets extracted from the database and that a tree is constructed in memory.

Reimplemented from DB.

void DbXML::remove Node   node,
bool    recurse = false

Implement deleting from XBel database.

Reimplemented from DB.

void DbXML::save Node   node [virtual]

Implement saving changes back to the database.

Reimplemented from DB.

The documentation for this class was generated from the following files:
Generated on Sun Jan 20 20:59:59 2002 for bkmd by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001