creaImageIO::TreeHandler Class Reference
[Model]

Abstract class which 'handles' a Tree structure. More...

#include <creaImageIOTreeHandler.h>

Inheritance diagram for creaImageIO::TreeHandler:

Inheritance graph
[legend]
Collaboration diagram for creaImageIO::TreeHandler:

Collaboration graph
[legend]

List of all members.

Public Types

typedef
tree::Node::AttributeMapType 
AttributeMapType
 ====================================================================

Public Member Functions

 TreeHandler ()
 Ctor.
virtual ~TreeHandler ()
 Virtual dtor.
tree::TreeGetTree ()
 Returns the Tree handled.
const tree::TreeGetTree () 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.


Detailed Description

Abstract class which 'handles' a Tree structure.

Definition at line 19 of file creaImageIOTreeHandler.h.


Member Typedef Documentation

typedef tree::Node::AttributeMapType creaImageIO::TreeHandler::AttributeMapType

====================================================================

Definition at line 123 of file creaImageIOTreeHandler.h.


Constructor & Destructor Documentation

creaImageIO::TreeHandler::TreeHandler (  )  [inline]

Ctor.

Definition at line 29 of file creaImageIOTreeHandler.h.

00029 {}

virtual creaImageIO::TreeHandler::~TreeHandler (  )  [inline, virtual]

Virtual dtor.

Definition at line 31 of file creaImageIOTreeHandler.h.

00031 {}


Member Function Documentation

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.

00044 { return false; }

virtual bool creaImageIO::TreeHandler::IsWritable (  )  [inline, virtual]

Is the 'source' writable ?

Reimplemented in creaImageIO::SQLiteTreeHandler.

Definition at line 46 of file creaImageIOTreeHandler.h.

00046 { return false; }

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.

00058 { return false; }

virtual bool creaImageIO::TreeHandler::Close (  )  [inline, virtual]

Closes the 'source'.

Reimplemented in creaImageIO::SQLiteTreeHandler.

Definition at line 60 of file creaImageIOTreeHandler.h.

00060 { return false; }

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.

00064 { return false; }

virtual bool creaImageIO::TreeHandler::Destroy (  )  [inline, virtual]

Destroys the 'source'.

Reimplemented in creaImageIO::SQLiteTreeHandler.

Definition at line 66 of file creaImageIOTreeHandler.h.

00066 { return false; }

virtual void creaImageIO::TreeHandler::BeginTransaction (  )  [inline, virtual]

Begins a transaction.

Reimplemented in creaImageIO::SQLiteTreeHandler.

Definition at line 68 of file creaImageIOTreeHandler.h.

00068 {}

virtual void creaImageIO::TreeHandler::EndTransaction (  )  [inline, virtual]

Commits results and ends transaction.

Reimplemented in creaImageIO::SQLiteTreeHandler.

Definition at line 70 of file creaImageIOTreeHandler.h.

00070 {}

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.

00083 { return 0; }

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.

00092                                                                                              {}

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.

00103     { return 0; }

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.

00109 { return; }

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.

00116                                                                                                              { return; }

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.

00128 { return -1; }

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.

00130 { return false; }

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.

00134                                                       { return false; }

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.

00140                                                              {}

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.

00142 {}

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.

00147                                       {}


Member Data Documentation

tree::Tree creaImageIO::TreeHandler::mTree [private]

The handled tree.

Definition at line 154 of file creaImageIOTreeHandler.h.

Referenced by GetTree().


The documentation for this class was generated from the following file:
Generated on Mon Jun 22 10:50:01 2009 for CreaImageIO by  doxygen 1.5.3