#include <creaImageIOTreeHandler.h>
Public Types | |
typedef tree::Node::AttributeMapType | AttributeMapType |
==================================================================== | |
Public Member Functions | |
TreeHandler () | |
Ctor. | |
virtual | ~TreeHandler () |
Virtual dtor. | |
tree::Tree & | GetTree () |
Returns the Tree handled. | |
const tree::Tree & | GetTree () const |
Returns the Tree handled (const). | |
virtual bool | IsReadable () |
Is the 'source' readable ? | |
virtual bool | IsWritable () |
Is the 'source' writable ? | |
virtual bool | Open (bool writable=false) |
Opens an existing 'source'. | |
virtual bool | Close () |
Closes the 'source'. | |
virtual bool | Create (bool writable=false) |
Creates a new 'source'. | |
virtual bool | Destroy () |
Destroys the 'source'. | |
virtual void | BeginTransaction () |
Begins a transaction. | |
virtual void | EndTransaction () |
Commits results and ends transaction. | |
virtual unsigned int | GetNumberOfChildren (tree::Node *n) |
Returns the number of children of the Node *WITHOUT LOADING THEM*. | |
virtual void | GetAttribute (std::string levelDescriptor, std::string searchParam, std::string searchVal, std::string key, std::string &result) |
Returns the attribute requested. Useful for synchronization. | |
virtual int | LoadChildren (tree::Node *parent, int maxlevel) |
Recursively loads the children of node 'parent' until maxlevel. | |
virtual void | UnLoad (tree::Node *n) |
Unloads the Node and its descendants. | |
virtual void | GetTopLevelNodeId (const std::string &searchParam, const std::string &searchValue, std::string &parent_id) |
Returns the top level node id for the given search param and search value. | |
virtual int | AddBranch (const AttributeMapType &) |
Adds a branch in the tree with the attributes provided. | |
virtual bool | Remove (tree::Node *) |
Removes the node and its descendants. | |
virtual bool | SetAttribute (tree::Node *, const std::string &key, const std::string &value) |
Sets an attribute of a Node. | |
virtual void | SetAttribute (const std::string &levelDescriptor, const std::string &key, const std::string &value, const std::string &searchParam, const std::string &searchVal) |
virtual void | DeleteTuple (std::string levelDescriptor, std::string key, std::string value) |
virtual void | RemoveEntries (const std::string i_table, const std::string i_attribute, const std::string i_operand, const std::string i_val) |
Private Attributes | |
tree::Tree | mTree |
The handled tree. |
Definition at line 19 of file creaImageIOTreeHandler.h.
====================================================================
Definition at line 123 of file creaImageIOTreeHandler.h.
creaImageIO::TreeHandler::TreeHandler | ( | ) | [inline] |
virtual creaImageIO::TreeHandler::~TreeHandler | ( | ) | [inline, virtual] |
tree::Tree& creaImageIO::TreeHandler::GetTree | ( | ) | [inline] |
Returns the Tree handled.
Definition at line 36 of file creaImageIOTreeHandler.h.
References mTree.
00036 { return mTree; }
const tree::Tree& creaImageIO::TreeHandler::GetTree | ( | ) | const [inline] |
Returns the Tree handled (const).
Definition at line 38 of file creaImageIOTreeHandler.h.
References mTree.
00038 { return mTree; }
virtual bool creaImageIO::TreeHandler::IsReadable | ( | ) | [inline, virtual] |
Is the 'source' readable ?
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 44 of file creaImageIOTreeHandler.h.
virtual bool creaImageIO::TreeHandler::IsWritable | ( | ) | [inline, virtual] |
Is the 'source' writable ?
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 46 of file creaImageIOTreeHandler.h.
virtual bool creaImageIO::TreeHandler::Open | ( | bool | writable = false |
) | [inline, virtual] |
Opens an existing 'source'.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 58 of file creaImageIOTreeHandler.h.
virtual bool creaImageIO::TreeHandler::Close | ( | ) | [inline, virtual] |
Closes the 'source'.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 60 of file creaImageIOTreeHandler.h.
virtual bool creaImageIO::TreeHandler::Create | ( | bool | writable = false |
) | [inline, virtual] |
Creates a new 'source'.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 64 of file creaImageIOTreeHandler.h.
virtual bool creaImageIO::TreeHandler::Destroy | ( | ) | [inline, virtual] |
Destroys the 'source'.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 66 of file creaImageIOTreeHandler.h.
virtual void creaImageIO::TreeHandler::BeginTransaction | ( | ) | [inline, virtual] |
Begins a transaction.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 68 of file creaImageIOTreeHandler.h.
virtual void creaImageIO::TreeHandler::EndTransaction | ( | ) | [inline, virtual] |
Commits results and ends transaction.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 70 of file creaImageIOTreeHandler.h.
virtual unsigned int creaImageIO::TreeHandler::GetNumberOfChildren | ( | tree::Node * | n | ) | [inline, virtual] |
Returns the number of children of the Node *WITHOUT LOADING THEM*.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 83 of file creaImageIOTreeHandler.h.
virtual void creaImageIO::TreeHandler::GetAttribute | ( | std::string | levelDescriptor, | |
std::string | searchParam, | |||
std::string | searchVal, | |||
std::string | key, | |||
std::string & | result | |||
) | [inline, virtual] |
Returns the attribute requested. Useful for synchronization.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 88 of file creaImageIOTreeHandler.h.
virtual int creaImageIO::TreeHandler::LoadChildren | ( | tree::Node * | parent, | |
int | maxlevel | |||
) | [inline, virtual] |
Recursively loads the children of node 'parent' until maxlevel.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 102 of file creaImageIOTreeHandler.h.
virtual void creaImageIO::TreeHandler::UnLoad | ( | tree::Node * | n | ) | [inline, virtual] |
Unloads the Node and its descendants.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 109 of file creaImageIOTreeHandler.h.
virtual void creaImageIO::TreeHandler::GetTopLevelNodeId | ( | const std::string & | searchParam, | |
const std::string & | searchValue, | |||
std::string & | parent_id | |||
) | [inline, virtual] |
Returns the top level node id for the given search param and search value.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 114 of file creaImageIOTreeHandler.h.
virtual int creaImageIO::TreeHandler::AddBranch | ( | const AttributeMapType & | ) | [inline, virtual] |
Adds a branch in the tree with the attributes provided.
Definition at line 128 of file creaImageIOTreeHandler.h.
virtual bool creaImageIO::TreeHandler::Remove | ( | tree::Node * | ) | [inline, virtual] |
Removes the node and its descendants.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 130 of file creaImageIOTreeHandler.h.
virtual bool creaImageIO::TreeHandler::SetAttribute | ( | tree::Node * | , | |
const std::string & | key, | |||
const std::string & | value | |||
) | [inline, virtual] |
Sets an attribute of a Node.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 132 of file creaImageIOTreeHandler.h.
virtual void creaImageIO::TreeHandler::SetAttribute | ( | const std::string & | levelDescriptor, | |
const std::string & | key, | |||
const std::string & | value, | |||
const std::string & | searchParam, | |||
const std::string & | searchVal | |||
) | [inline, virtual] |
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 136 of file creaImageIOTreeHandler.h.
virtual void creaImageIO::TreeHandler::DeleteTuple | ( | std::string | levelDescriptor, | |
std::string | key, | |||
std::string | value | |||
) | [inline, virtual] |
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 142 of file creaImageIOTreeHandler.h.
virtual void creaImageIO::TreeHandler::RemoveEntries | ( | const std::string | i_table, | |
const std::string | i_attribute, | |||
const std::string | i_operand, | |||
const std::string | i_val | |||
) | [inline, virtual] |
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 144 of file creaImageIOTreeHandler.h.
tree::Tree creaImageIO::TreeHandler::mTree [private] |