#include <OW_HDB.hpp>
Collaboration diagram for OW_NAMESPACE::HDBHandle:
Public Types | |
typedef HDBHandleDataRef HDBHandle::* | safe_bool |
Public Member Functions | |
HDBHandle (const HDBHandle &x) | |
Create a new HDBHandle object from another (copy ctor). | |
HDBHandle () | |
HDBHandle & | operator= (const HDBHandle &x) |
Assignment operator. | |
void | flush () |
Flush the underlying database and index files. | |
HDBNode | getNode (const String &key) |
Get the HDBNode associated with a key. | |
HDBNode | getParent (HDBNode &node) |
Get the HDBNode that is the parent of another HDBNode. | |
HDBNode | getFirstChild (HDBNode &node) |
Get the HDBNode that is the first child of a given node. | |
HDBNode | getLastChild (HDBNode &node) |
Get the HDBNode that is the last child of a given node. | |
HDBNode | getNextSibling (HDBNode &node) |
Get the HDBNode that is the next sibling of a given node. | |
HDBNode | getPrevSibling (HDBNode &node) |
Get the HDBNode that is the previous sibling of a given node. | |
HDBNode | getFirstRoot () |
bool | addRootNode (HDBNode &node) |
Add a node to the database that has no parent (root node). | |
bool | addChild (HDBNode &parentNode, HDBNode &childNode) |
Add a node as a child to another node. | |
bool | addChild (const String &parentKey, HDBNode &childNode) |
Add a node as a child to another node referenced by a given key. | |
bool | removeNode (HDBNode &node) |
Remove a node and all of its' children. | |
bool | removeNode (const String &key) |
Remove the node associated with a given key and all of its' children. | |
bool | updateNode (HDBNode &node, Int32 dataLen, const unsigned char *data) |
Update the data associated with a node. | |
void | turnFlagsOn (HDBNode &node, UInt32 flags) |
Turn the user defined flags on in this node. | |
void | turnFlagsOff (HDBNode &node, UInt32 flags) |
Turn the user defined flags off in this node. | |
void | setUserValue (Int32 value) |
Set the user value for this handle. | |
Int32 | getUserValue () const |
operator safe_bool () const | |
bool | operator! () const |
Private Types | |
typedef IntrusiveReference< HDBHandleData > | HDBHandleDataRef |
Private Member Functions | |
HDBHandle (HDB *pdb, const File &file) | |
File | getFile () |
HDB * | getHDB () |
Int32 | registerWrite () |
IndexEntry | findFirstIndexEntry (const char *key=NULL) |
IndexEntry | findNextIndexEntry () |
IndexEntry | findPrevIndexEntry () |
IndexEntry | findIndexEntry (const char *key) |
bool | addIndexEntry (const char *key, Int32 offset) |
bool | removeIndexEntry (const char *key) |
bool | updateIndexEntry (const char *key, Int32 newOffset) |
Private Attributes | |
HDBHandleDataRef | m_pdata |
Friends | |
class | HDB |
class | HDBNode |
Classes | |
struct | HDBHandleData |
Definition at line 55 of file OW_HDB.hpp.
|
Definition at line 73 of file OW_HDB.hpp. |
|
Definition at line 221 of file OW_HDB.hpp. |
|
Create a new HDBHandle object from another (copy ctor).
Definition at line 79 of file OW_HDB.hpp. |
|
Definition at line 568 of file OW_HDB.cpp. |
|
Definition at line 573 of file OW_HDB.cpp. |
|
Add a node as a child to another node referenced by a given key.
Definition at line 744 of file OW_HDB.cpp. References OW_NAMESPACE::String::empty(). |
|
Add a node as a child to another node.
Definition at line 717 of file OW_HDB.cpp. References OW_NAMESPACE::HDBNode::getOffset(), and OW_THROW. |
|
Definition at line 877 of file OW_HDB.cpp. References m_pdata. |
|
Add a node to the database that has no parent (root node).
Definition at line 697 of file OW_HDB.cpp. References OW_NAMESPACE::String::c_str(), OW_NAMESPACE::HDBNode::getKey(), OW_NAMESPACE::HDBNode::getOffset(), m_pdata, OW_THROW, and OW_NAMESPACE::HDBNode::write(). |
|
Definition at line 853 of file OW_HDB.cpp. References m_pdata. |
|
Definition at line 871 of file OW_HDB.cpp. References m_pdata. |
|
Definition at line 859 of file OW_HDB.cpp. References m_pdata. |
|
Definition at line 865 of file OW_HDB.cpp. References m_pdata. |
|
Flush the underlying database and index files.
Definition at line 586 of file OW_HDB.cpp. References m_pdata. |
|
Definition at line 231 of file OW_HDB.hpp. |
|
Get the HDBNode that is the first child of a given node.
Definition at line 633 of file OW_HDB.cpp. References OW_NAMESPACE::HDBNode::getFirstChildOffset(), HDBNode, and OW_NAMESPACE::HDBNode::reload(). |
|
Definition at line 597 of file OW_HDB.cpp. |
|
Definition at line 232 of file OW_HDB.hpp. |
|
Get the HDBNode that is the last child of a given node.
Definition at line 649 of file OW_HDB.cpp. References OW_NAMESPACE::HDBNode::getLastChildOffset(), HDBNode, and OW_NAMESPACE::HDBNode::reload(). |
|
Get the HDBNode that is the next sibling of a given node.
Definition at line 665 of file OW_HDB.cpp. References OW_NAMESPACE::HDBNode::getNextSiblingOffset(), HDBNode, and OW_NAMESPACE::HDBNode::reload(). |
|
Get the HDBNode associated with a key.
Definition at line 607 of file OW_HDB.cpp. References OW_NAMESPACE::String::c_str(), OW_NAMESPACE::String::empty(), and HDBNode. |
|
Get the HDBNode that is the parent of another HDBNode.
Definition at line 617 of file OW_HDB.cpp. References OW_NAMESPACE::HDBNode::getParentOffset(), HDBNode, and OW_NAMESPACE::HDBNode::reload(). |
|
Get the HDBNode that is the previous sibling of a given node.
Definition at line 681 of file OW_HDB.cpp. References OW_NAMESPACE::HDBNode::getPrevSiblingOffset(), HDBNode, and OW_NAMESPACE::HDBNode::reload(). |
|
Definition at line 219 of file OW_HDB.hpp. |
|
Definition at line 225 of file OW_HDB.hpp. References m_pdata. |
|
Definition at line 227 of file OW_HDB.hpp. |
|
Assignment operator.
Definition at line 86 of file OW_HDB.hpp. References m_pdata. |
|
Definition at line 579 of file OW_HDB.cpp. References m_pdata. |
|
Definition at line 883 of file OW_HDB.cpp. References m_pdata. |
|
Remove the node associated with a given key and all of its' children.
Definition at line 774 of file OW_HDB.cpp. References OW_NAMESPACE::String::c_str(), and OW_NAMESPACE::String::empty(). |
|
Remove a node and all of its' children.
Definition at line 759 of file OW_HDB.cpp. References OW_NAMESPACE::HDBNode::getOffset(), OW_NAMESPACE::HDBNode::reload(), and OW_NAMESPACE::HDBNode::remove(). |
|
Set the user value for this handle. The user value is not used by the HDBHandle object. It allows the user to store any value for later retrieval. It is being used to help facilitate the caching of HDBHandle object.
Definition at line 214 of file OW_HDB.hpp. |
|
Turn the user defined flags off in this node.
Definition at line 834 of file OW_HDB.cpp. References OW_NAMESPACE::HDBNode::getOffset(), OW_NAMESPACE::HDBNode::reload(), and OW_NAMESPACE::HDBNode::turnFlagsOff(). |
|
Turn the user defined flags on in this node.
Definition at line 815 of file OW_HDB.cpp. References OW_NAMESPACE::HDBNode::getOffset(), OW_NAMESPACE::HDBNode::reload(), and OW_NAMESPACE::HDBNode::turnFlagsOn(). |
|
Definition at line 889 of file OW_HDB.cpp. References m_pdata. |
|
Update the data associated with a node.
Definition at line 790 of file OW_HDB.cpp. References OW_NAMESPACE::HDBNode::getOffset(), OW_NAMESPACE::HDBNode::reload(), and OW_NAMESPACE::HDBNode::updateData(). |
|
Definition at line 241 of file OW_HDB.hpp. |
|
Definition at line 242 of file OW_HDB.hpp. Referenced by getFirstChild(), getFirstRoot(), getLastChild(), getNextSibling(), getNode(), getParent(), and getPrevSibling(). |
|
Definition at line 249 of file OW_HDB.hpp. Referenced by addIndexEntry(), addRootNode(), findFirstIndexEntry(), findIndexEntry(), findNextIndexEntry(), findPrevIndexEntry(), flush(), getFirstRoot(), operator safe_bool(), operator=(), registerWrite(), removeIndexEntry(), and updateIndexEntry(). |