orbtree
Public Member Functions | Protected Attributes | Friends | List of all members
orbtree::NodeAllocatorPtr< KeyValueT, NVTypeT, simple >::Node Struct Reference

node class More...

#include <orbtree_node.h>

Collaboration diagram for orbtree::NodeAllocatorPtr< KeyValueT, NVTypeT, simple >::Node:
Collaboration graph
[legend]

Public Member Functions

 Node (const KeyValue &kv_)
 
 Node (KeyValue &&kv_)
 
template<class... T>
 Node (T &&... args)
 
template<bool simple_ = simple>
void do_delete (typename std::enable_if< simple_, void *>::type=0)
 
template<bool simple_ = simple>
void do_delete (typename std::enable_if<!simple_, void *>::type=0)
 
KeyValue & get_key_value ()
 
const KeyValue & get_key_value () const
 
bool is_red () const
 test if this node is red
 
bool is_black () const
 test if this node is black
 
void set_red ()
 set this node red
 
void set_black ()
 set this node black
 
const Nodeget_parent () const
 get handle for parent
 
const Nodeget_left () const
 get handle for left child
 
const Nodeget_right () const
 get handle for right child
 
void set_parent (const Node *p)
 set handle for parent
 
void set_left (const Node *x)
 set handle for left child
 
void set_right (const Node *x)
 set handle for right child
 

Protected Attributes

KeyValue kv
 key and (optionally) value stored
 
std::conditional< simple, NVType, NVType * >::type partialsum
 partial sum (sum of this node's children's weight + this node's weight)
 
Nodeparent
 
Nodeleft
 
Noderight
 
bool red
 

Friends

class NodeAllocatorPtr< KeyValueT, NVTypeT, simple >
 

Detailed Description

template<class KeyValueT, class NVTypeT, bool simple = false>
struct orbtree::NodeAllocatorPtr< KeyValueT, NVTypeT, simple >::Node

node class

All properties are protected and should be accessed via getters / setters. This way, the tree class doesn't depend on implementation details of nodes.


The documentation for this struct was generated from the following file: