CCF
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
ccf::kv::WriteableMapHandle< K, V, KSerialiser, VSerialiser > Class Template Reference

#include <map_handle.h>

Inherited by ccf::kv::MapHandle< K, V, KSerialiser, VSerialiser >.

Public Member Functions

 WriteableMapHandle (ccf::kv::untyped::MapHandle &uh)
 
void put (const K &key, const V &value)
 
void remove (const K &key)
 
void clear ()
 

Protected Attributes

ccf::kv::untyped::MapHandlewrite_handle
 

Detailed Description

template<typename K, typename V, typename KSerialiser, typename VSerialiser>
class ccf::kv::WriteableMapHandle< K, V, KSerialiser, VSerialiser >

Grants write access to a ccf::kv::Map, as part of a ccf::kv::Tx.

Constructor & Destructor Documentation

◆ WriteableMapHandle()

template<typename K , typename V , typename KSerialiser , typename VSerialiser >
ccf::kv::WriteableMapHandle< K, V, KSerialiser, VSerialiser >::WriteableMapHandle ( ccf::kv::untyped::MapHandle uh)
inline

Member Function Documentation

◆ clear()

template<typename K , typename V , typename KSerialiser , typename VSerialiser >
void ccf::kv::WriteableMapHandle< K, V, KSerialiser, VSerialiser >::clear ( )
inline

Delete every key-value pair.

◆ put()

template<typename K , typename V , typename KSerialiser , typename VSerialiser >
void ccf::kv::WriteableMapHandle< K, V, KSerialiser, VSerialiser >::put ( const K &  key,
const V &  value 
)
inline

Write value at key.

If the key already exists, the previous value will be replaced with the new value.

Parameters
keyKey at which to insert
valueAssociated value to be inserted

◆ remove()

template<typename K , typename V , typename KSerialiser , typename VSerialiser >
void ccf::kv::WriteableMapHandle< K, V, KSerialiser, VSerialiser >::remove ( const K &  key)
inline

Delete a key-value pair.

It is safe to call this on non-existent keys.

Parameters
keyKey to be removed

Member Data Documentation

◆ write_handle

template<typename K , typename V , typename KSerialiser , typename VSerialiser >
ccf::kv::untyped::MapHandle& ccf::kv::WriteableMapHandle< K, V, KSerialiser, VSerialiser >::write_handle
protected

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