orbtree
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
orbtree::KeyValue< Key, Value, pair_type > Struct Template Reference

wrapper class for a key-value pair More...

#include <orbtree_node.h>

Public Types

typedef Key KeyType
 
typedef Value MappedType
 
typedef pair_type< Key, Value > ValueType
 

Public Member Functions

 KeyValue (const std::pair< Key, Value > &kv)
 
 KeyValue (pair_type< Key, Value > &&kv)
 
 KeyValue (const pair_type< Key, Value > &kv)
 
const Key & key () const
 access key – only const access is possible, key should not change
 
Value & value ()
 access value
 
const Value & value () const
 access value
 
ValueType & keyvalue ()
 universal access to key / key-value pair
 
const ValueType & keyvalue () const
 universal access to key / key-value pair
 
void swap (KeyValue &k_)
 

Static Public Member Functions

static const Key & key (const ValueType &kv)
 helper to extract only the key from ValueType
 

Static Public Attributes

static const bool keyonly = false
 flag to signal tree if this is key-value pair or just key – used when defining iterators
 

Protected Attributes

pair_type< Key, Value > p
 key and value, key should not change – not const to allow swapping / moving nodes
 

Detailed Description

template<class Key, class Value, template< class, class > class pair_type = trivial_pair>
struct orbtree::KeyValue< Key, Value, pair_type >

wrapper class for a key-value pair


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