creaImageIO_lib
|
Abstract class which 'handles' a Tree structure. More...
#include <creaImageIOTreeHandler.h>
Public Types | |
typedef tree::Node::AttributeMapType | AttributeMapType |
==================================================================== More... | |
Public Member Functions | |
TreeHandler () | |
Ctor. More... | |
virtual | ~TreeHandler () |
Virtual dtor. More... | |
tree::Tree & | GetTree () |
Returns the Tree handled. More... | |
const tree::Tree & | GetTree () const |
Returns the Tree handled (const) More... | |
virtual bool | IsReadable () |
Is the 'source' readable ? More... | |
virtual bool | IsWritable () |
Is the 'source' writable ? More... | |
virtual bool | Open (bool writable=false) |
Opens an existing 'source'. More... | |
virtual bool | Close () |
Closes the 'source'. More... | |
virtual bool | Create (bool writable=false) |
Creates a new 'source'. More... | |
virtual bool | Destroy () |
Destroys the 'source'. More... | |
virtual void | BeginTransaction () |
Begins a transaction. More... | |
virtual void | EndTransaction () |
Commits results and ends transaction. More... | |
virtual unsigned int | GetNumberOfChildren (tree::Node *n) |
Returns the number of children of the Node WITHOUT LOADING THEM More... | |
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. More... | |
virtual int | LoadChildren (tree::Node *parent, int maxlevel) |
Recursively loads the children of node 'parent' until maxlevel. More... | |
virtual void | UnLoad (tree::Node *n) |
Unloads the Node and its descendants. More... | |
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. More... | |
virtual int | AddBranch (const AttributeMapType &) |
Adds a branch in the tree with the attributes provided. More... | |
virtual bool | Remove (tree::Node *) |
Removes the node and its descendants. More... | |
virtual bool | SetAttribute (tree::Node *, const std::string &key, const std::string &value) |
Sets an attribute of a Node. More... | |
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) |
virtual void | getAllAttributes (std::string i_filename, std::map< std::string, std::string > &i_results)=0 |
get all attributes for a file More... | |
Private Attributes | |
tree::Tree | mTree |
The handled tree. More... | |
Abstract class which 'handles' a Tree structure.
Definition at line 46 of file creaImageIOTreeHandler.h.
====================================================================
Definition at line 150 of file creaImageIOTreeHandler.h.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Adds a branch in the tree with the attributes provided.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 155 of file creaImageIOTreeHandler.h.
Referenced by creaImageIO::TreeHandlerImageAdder::AddFile().
|
inlinevirtual |
Begins a transaction.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 95 of file creaImageIOTreeHandler.h.
Referenced by creaImageIO::TreeHandlerImageAdder::AddDirectory().
|
inlinevirtual |
Closes the 'source'.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 87 of file creaImageIOTreeHandler.h.
|
inlinevirtual |
Creates a new 'source'.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 91 of file creaImageIOTreeHandler.h.
|
inlinevirtual |
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 169 of file creaImageIOTreeHandler.h.
Referenced by creaImageIO::Synchronizer::SynchronizeFile().
|
inlinevirtual |
Destroys the 'source'.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 93 of file creaImageIOTreeHandler.h.
|
inlinevirtual |
Commits results and ends transaction.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 97 of file creaImageIOTreeHandler.h.
Referenced by creaImageIO::TreeHandlerImageAdder::AddDirectory().
|
pure virtual |
get all attributes for a file
Implemented in creaImageIO::SQLiteTreeHandler.
Referenced by creaImageIO::Gimmick::GetAttributes().
|
inlinevirtual |
Returns the attribute requested. Useful for synchronization.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 115 of file creaImageIOTreeHandler.h.
Referenced by creaImageIO::Synchronizer::AttributesMatch(), creaImageIO::TreeHandlerImageAdder::CheckAttributes(), creaImageIO::TreeHandlerImageAdder::GetAttributes(), and creaImageIO::Synchronizer::Synchronize().
|
inlinevirtual |
Returns the number of children of the Node WITHOUT LOADING THEM
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 110 of file creaImageIOTreeHandler.h.
|
inlinevirtual |
Returns the top level node id for the given search param and search value.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 141 of file creaImageIOTreeHandler.h.
|
inline |
Returns the Tree handled.
Definition at line 63 of file creaImageIOTreeHandler.h.
References mTree.
Referenced by creaImageIO::TreeHandlerImageAdder::AddFile(), creaImageIO::Synchronizer::AttributesMatch(), creaImageIO::TreeHandlerImageAdder::CheckAttributes(), creaImageIO::WxTreeView::CreateCtrl(), creaImageIO::Gimmick::createDB(), creaImageIO::WxGimmickView::CreateTreeView(), creaImageIO::SQLiteTreeHandler::DBCreate(), creaImageIO::SQLiteTreeHandler::DBGetParent(), creaImageIO::SQLiteTreeHandler::DBGraftToParent(), creaImageIO::SQLiteTreeHandler::DBImportTreeDescription(), creaImageIO::SQLiteTreeHandler::DBInsert(), creaImageIO::SQLiteTreeHandler::DBLoadChildren(), creaImageIO::SQLiteTreeHandler::DBRecursiveRemoveNode(), creaImageIO::SQLiteTreeHandler::DBSetAttribute(), creaImageIO::TreeHandlerImageAdder::DeleteDriveFromMainDB(), creaImageIO::SQLiteTreeHandler::getAllAttributes(), creaImageIO::WxTreeView::GetAttributes(), creaImageIO::SQLiteTreeHandler::GetNumberOfChildren(), creaImageIO::SQLiteTreeHandler::GetTopLevelNodeId(), creaImageIO::SQLiteTreeHandler::GetUpLevelNodeId(), creaImageIO::TreeHandlerImageAdder::isAttributeExist(), creaImageIO::SQLiteTreeHandler::LoadChildren(), creaImageIO::WxTreeView::OnDumpTags(), creaImageIO::WxTreeView::OnEditField(), creaImageIO::WxTreeView::OnLocalCopy(), creaImageIO::Gimmick::Print(), creaImageIO::WxTreeView::RemoveSelected(), creaImageIO::SQLiteTreeHandler::SetAttribute(), creaImageIO::SQLiteTreeHandler::SQLAppendAttributesDefinition(), creaImageIO::TreeHandlerImageAdder::Synchronize(), and creaImageIO::WxTreeView::WxTreeView().
|
inline |
Returns the Tree handled (const)
Definition at line 65 of file creaImageIOTreeHandler.h.
References mTree.
|
inlinevirtual |
Is the 'source' readable ?
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 71 of file creaImageIOTreeHandler.h.
|
inlinevirtual |
Is the 'source' writable ?
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 73 of file creaImageIOTreeHandler.h.
|
inlinevirtual |
Recursively loads the children of node 'parent' until maxlevel.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 129 of file creaImageIOTreeHandler.h.
Referenced by creaImageIO::TreeHandlerImageAdder::DeleteDriveFromMainDB(), creaImageIO::WxTreeView::GetFilenamesAsString(), main(), creaImageIO::WxTreeView::RecursiveUpdateLevel(), creaImageIO::WxTreeView::RemoveSelected(), and creaImageIO::TreeHandlerImageAdder::Synchronize().
|
inlinevirtual |
Opens an existing 'source'.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 85 of file creaImageIOTreeHandler.h.
|
inlinevirtual |
Removes the node and its descendants.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 157 of file creaImageIOTreeHandler.h.
Referenced by creaImageIO::TreeHandlerImageAdder::DeleteDriveFromMainDB(), creaImageIO::WxTreeView::RemoveSelected(), and creaImageIO::TreeHandlerImageAdder::Synchronize().
|
inlinevirtual |
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 171 of file creaImageIOTreeHandler.h.
|
inlinevirtual |
Sets an attribute of a Node.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 159 of file creaImageIOTreeHandler.h.
Referenced by creaImageIO::Synchronizer::AttributesMatch(), creaImageIO::TreeHandlerImageAdder::CheckAttributes(), creaImageIO::TreeHandlerImageAdder::CopyFiles(), and creaImageIO::TreeHandlerImageAdder::EditField().
|
inlinevirtual |
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 163 of file creaImageIOTreeHandler.h.
|
inlinevirtual |
Unloads the Node and its descendants.
Reimplemented in creaImageIO::SQLiteTreeHandler.
Definition at line 136 of file creaImageIOTreeHandler.h.
|
private |