|
The Pedigree Project
0.1
|
A key/value dictionary. More...
#include <Tree.h>
Inheritance diagram for Tree< K, E >:
Collaboration diagram for Tree< K, E >:Classes | |
| class | IteratorNode |
| struct | Node |
Public Types | |
| typedef ::TreeIterator< E, IteratorNode,&IteratorNode::previous,&IteratorNode::next, K > | Iterator |
| typedef E const * | ConstIterator |
Public Member Functions | |
| Tree () | |
| Tree (const Tree &x) | |
| ~Tree () | |
| Tree & | operator= (const Tree &x) |
| size_t | count () const |
| void | insert (const K &key, const E &value) |
| void | insert (const K &key, E &&value) |
| E | lookup (const K &key) const |
| const E & | lookupRef (const K &key, const E &failed=E()) const |
| bool | contains (const K &key) const |
| void | remove (const K &key) |
| void | clear () |
| void | erase (Iterator iter) |
| Iterator | begin () |
| ConstIterator | begin () const |
| Iterator | end () |
| ConstIterator | end () const |
Private Member Functions | |
| void | copyFrom (const Tree &other) |
| void | rotateLeft (Node *n) |
| void | rotateRight (Node *n) |
| size_t | height (Node *n) |
| int | balanceFactor (Node *n) |
| void | rebalanceNode (Node *n) |
| void | traverseNode_Insert (Node *n) |
| void | traverseNode_Remove (Node *n) |
| Node * | createInsertionNode (const K &key) |
Private Attributes | |
| Node * | root |
| size_t | nItems |
| IteratorNode * | m_Begin |
A key/value dictionary.
Dictionary class, aka Map. This is implemented as an AVL self-balancing binary search tree.
| typedef E const* Tree< K, E >::ConstIterator |
Get an iterator pointing to the beginning of the Vector
Definition at line 326 of file Tree.h.
Referenced by PosixSubsystem::copyDescriptors(), PosixSubsystem::freeMultipleFds(), UserManager::getGroup(), UserManager::getUser(), SymbolTable::lookup(), PosixSubsystem::PosixSubsystem(), PosixSubsystem::~PosixSubsystem(), and VFS::~VFS().
Here is the caller graph for this function:
|
inline |
|
inline |
Clear the Vector
Definition at line 305 of file Tree.h.
Referenced by PosixSubsystem::freeMultipleFds(), and PosixSubsystem::~PosixSubsystem().
Here is the caller graph for this function:
|
inline |
|
inline |
Get an iterator pointing to the last element + 1
Definition at line 348 of file Tree.h.
Referenced by PosixSubsystem::copyDescriptors(), PosixSubsystem::freeMultipleFds(), UserManager::getGroup(), UserManager::getUser(), SymbolTable::lookup(), PosixSubsystem::PosixSubsystem(), PosixSubsystem::~PosixSubsystem(), and VFS::~VFS().
Here is the caller graph for this function:
|
inline |
|
inline |
Add an element to the Tree.
| [in] | key | the key |
| [in] | value | the element |
Definition at line 173 of file Tree.h.
Referenced by VFS::addAlias(), PosixSubsystem::addFileDescriptor(), PosixSubsystem::PosixThread::addThreadData(), PosixSubsystem::copyDescriptors(), UserManager::getGroup(), SymbolTable::getOrInsertTree(), NetworkFilter::installCallback(), VFS::mount(), PosixSubsystem::PosixSubsystem(), and PosixSyscallManager::syscall().
Here is the caller graph for this function:
|
inline |
|
inline |
Attempts to find an element with the given key.
Definition at line 192 of file Tree.h.
Referenced by VFS::addAlias(), PosixSubsystem::PosixThread::addThreadData(), NetworkFilter::filter(), PosixSubsystem::freeFd(), PosixSubsystem::getFileDescriptor(), UserManager::getGroup(), PosixSubsystem::PosixThread::getThreadData(), UserManager::getUser(), NetworkFilter::installCallback(), VFS::mount(), VFS::removeAllAliases(), and PosixSyscallManager::syscall().
Here is the caller graph for this function:
|
inline |
Attempts to find an element with the given key.
Definition at line 209 of file Tree.h.
Referenced by SymbolTable::getOrInsertTree(), and SymbolTable::lookup().
Here is the caller graph for this function:
|
inline |
Attempts to remove an element with the given key.
Definition at line 242 of file Tree.h.
Referenced by PosixSubsystem::freeFd(), PosixSubsystem::freeMultipleFds(), SymbolTable::insertShared(), VFS::removeAllAliases(), and PosixSubsystem::PosixThread::removeThreadData().
Here is the caller graph for this function:
1.8.11