Horizon Official Technical Documentation
s_segment_storage< Key, Value > Struct Template Reference

#include <Server.hpp>

Public Types

using key_type = Key
 
using value_type = Value
 

Public Member Functions

 s_segment_storage ()
 
 ~s_segment_storage ()
 
void add (Key key, Value value)
 
void remove (Key key)
 
Value get (Key key, Value const &default_value=Value())
 
int size ()
 
void clear ()
 

Public Attributes

LockedLookupTable< Key, Value > _table
 

Member Typedef Documentation

◆ key_type

template<typename Key , typename Value >
using s_segment_storage< Key, Value >::key_type = Key

◆ value_type

template<typename Key , typename Value >
using s_segment_storage< Key, Value >::value_type = Value

Constructor & Destructor Documentation

◆ s_segment_storage()

template<typename Key , typename Value >
s_segment_storage< Key, Value >::s_segment_storage ( )
inline
97{ }

◆ ~s_segment_storage()

template<typename Key , typename Value >
s_segment_storage< Key, Value >::~s_segment_storage ( )
inline
98{ }

Member Function Documentation

◆ add()

template<typename Key , typename Value >
void s_segment_storage< Key, Value >::add ( Key  key,
Value  value 
)
inline
100{ _table.insert(key, value); }
LockedLookupTable< Key, Value > _table
Definition: Server.hpp:96

References s_segment_storage< Key, Value >::_table.

◆ clear()

template<typename Key , typename Value >
void s_segment_storage< Key, Value >::clear ( )
inline
108{ _table.clear(); }

References s_segment_storage< Key, Value >::_table.

◆ get()

template<typename Key , typename Value >
Value s_segment_storage< Key, Value >::get ( Key  key,
Value const &  default_value = Value() 
)
inline
104{ return _table.at(key, default_value); }

References s_segment_storage< Key, Value >::_table.

◆ remove()

template<typename Key , typename Value >
void s_segment_storage< Key, Value >::remove ( Key  key)
inline
102{ _table.erase(key); }

References s_segment_storage< Key, Value >::_table.

◆ size()

template<typename Key , typename Value >
int s_segment_storage< Key, Value >::size ( )
inline
106{ return _table.size(); }

References s_segment_storage< Key, Value >::_table.

Member Data Documentation

◆ _table


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