CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer > Class Template Reference

Typed container adapter that wraps column. More...

Inheritance diagram for catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer >:
Collaboration diagram for catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer >:

Classes

class  const_iterator
 Typed container iterator that adds descriptor-based deserialization. More...
 

Public Types

using KeyType = typename TDescriptor::KeyType
 
using ValueType = typename TDescriptor::ValueType
 
using StorageType = typename TDescriptor::StorageType
 

Public Member Functions

template<typename TDatabase = RocksDatabase>
 RdbTypedColumnContainer (TDatabase &database, size_t columnId)
 Creates a container around database and columnId. More...
 
bool empty () const
 Returns true if container is empty. More...
 
void insert (const StorageType &element)
 Inserts element into container. More...
 
const_iterator find (const KeyType &key) const
 Finds element with key. Returns cend() if key has not been found. More...
 
size_t prune (const KeyType &key)
 Prunes elements with keys smaller than key. Returns number of pruned elements. More...
 
void remove (const KeyType &key)
 Removes element with key. More...
 
const_iterator cend () const
 Returns iterator that represents non-existing element. More...
 

Detailed Description

template<typename TDescriptor, typename TContainer = RdbColumnContainer>
class catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer >

Typed container adapter that wraps column.

Member Typedef Documentation

◆ KeyType

template<typename TDescriptor, typename TContainer = RdbColumnContainer>
using catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer >::KeyType = typename TDescriptor::KeyType

◆ StorageType

template<typename TDescriptor, typename TContainer = RdbColumnContainer>
using catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer >::StorageType = typename TDescriptor::StorageType

◆ ValueType

template<typename TDescriptor, typename TContainer = RdbColumnContainer>
using catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer >::ValueType = typename TDescriptor::ValueType

Constructor & Destructor Documentation

◆ RdbTypedColumnContainer()

template<typename TDescriptor, typename TContainer = RdbColumnContainer>
template<typename TDatabase = RocksDatabase>
catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer >::RdbTypedColumnContainer ( TDatabase &  database,
size_t  columnId 
)
inline

Creates a container around database and columnId.

Member Function Documentation

◆ cend()

template<typename TDescriptor, typename TContainer = RdbColumnContainer>
const_iterator catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer >::cend ( ) const
inline

Returns iterator that represents non-existing element.

Here is the caller graph for this function:

◆ empty()

template<typename TDescriptor, typename TContainer = RdbColumnContainer>
bool catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer >::empty ( ) const
inline

Returns true if container is empty.

◆ find()

template<typename TDescriptor, typename TContainer = RdbColumnContainer>
const_iterator catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer >::find ( const KeyType key) const
inline

Finds element with key. Returns cend() if key has not been found.

Here is the caller graph for this function:

◆ insert()

template<typename TDescriptor, typename TContainer = RdbColumnContainer>
void catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer >::insert ( const StorageType element)
inline

Inserts element into container.

Here is the caller graph for this function:

◆ prune()

template<typename TDescriptor, typename TContainer = RdbColumnContainer>
size_t catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer >::prune ( const KeyType key)
inline

Prunes elements with keys smaller than key. Returns number of pruned elements.

Here is the caller graph for this function:

◆ remove()

template<typename TDescriptor, typename TContainer = RdbColumnContainer>
void catapult::cache::RdbTypedColumnContainer< TDescriptor, TContainer >::remove ( const KeyType key)
inline

Removes element with key.

Here is the caller graph for this function:

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