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

#include <set_handle.h>

Inherited by ccf::kv::SetHandle< K, KSerialiser, Unit >.

Public Member Functions

 WriteableSetHandle (ccf::kv::untyped::MapHandle &uh)
 
void insert (const K &key)
 
void remove (const K &key)
 
void clear ()
 

Protected Attributes

ccf::kv::untyped::MapHandlewrite_handle
 

Detailed Description

template<typename K, typename KSerialiser, typename Unit>
class ccf::kv::WriteableSetHandle< K, KSerialiser, Unit >

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

Constructor & Destructor Documentation

◆ WriteableSetHandle()

template<typename K , typename KSerialiser , typename Unit >
ccf::kv::WriteableSetHandle< K, KSerialiser, Unit >::WriteableSetHandle ( ccf::kv::untyped::MapHandle uh)
inline

Member Function Documentation

◆ clear()

template<typename K , typename KSerialiser , typename Unit >
void ccf::kv::WriteableSetHandle< K, KSerialiser, Unit >::clear ( )
inline

Delete every element in this set.

◆ insert()

template<typename K , typename KSerialiser , typename Unit >
void ccf::kv::WriteableSetHandle< K, KSerialiser, Unit >::insert ( const K &  key)
inline

Insert an element into this set.

This will always insert a value, producing a new write and updating future calls to ReadableSetHandle::get_version_of_previous_write, even if this key was already present.

Parameters
keyKey to insert

◆ remove()

template<typename K , typename KSerialiser , typename Unit >
void ccf::kv::WriteableSetHandle< K, KSerialiser, Unit >::remove ( const K &  key)
inline

Delete an element from this set.

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

Parameters
keyKey to delete

Member Data Documentation

◆ write_handle

template<typename K , typename KSerialiser , typename Unit >
ccf::kv::untyped::MapHandle& ccf::kv::WriteableSetHandle< K, KSerialiser, Unit >::write_handle
protected

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