Public Member Functions | Private Types | Private Attributes | Static Private Attributes | List of all members
threadsafe::Map< T > Class Template Reference

#include <thread_safe_map.hpp>

Public Member Functions

find (std::string first)
 
bool insert (const std::string &first, const T &value)
 
std::vector< std::string > keys ()
 
 Map ()
 
bool update (const std::string &first, const T &value)
 
 ~Map ()
 

Private Types

typedef std::map< std::string, T > InternalMap
 

Private Attributes

std::vector< std::string > keys_
 
boost::shared_ptr< InternalMapmap_
 
boost::shared_ptr< boost::shared_mutex > mutex_
 

Static Private Attributes

static const int lock_wait_time = 100
 

Detailed Description

template<class T>
class threadsafe::Map< T >

Definition at line 45 of file thread_safe_map.hpp.

Member Typedef Documentation

◆ InternalMap

template<class T>
typedef std::map<std::string, T> threadsafe::Map< T >::InternalMap
private

Definition at line 102 of file thread_safe_map.hpp.

Constructor & Destructor Documentation

◆ Map()

template<class T>
threadsafe::Map< T >::Map ( )
inline

Definition at line 48 of file thread_safe_map.hpp.

◆ ~Map()

template<class T>
threadsafe::Map< T >::~Map ( )
inline

Definition at line 54 of file thread_safe_map.hpp.

Member Function Documentation

◆ find()

template<class T>
T threadsafe::Map< T >::find ( std::string  first)
inline

Definition at line 58 of file thread_safe_map.hpp.

◆ insert()

template<class T>
bool threadsafe::Map< T >::insert ( const std::string &  first,
const T &  value 
)
inline

Definition at line 69 of file thread_safe_map.hpp.

◆ keys()

template<class T>
std::vector<std::string> threadsafe::Map< T >::keys ( )
inline

Definition at line 94 of file thread_safe_map.hpp.

◆ update()

template<class T>
bool threadsafe::Map< T >::update ( const std::string &  first,
const T &  value 
)
inline

Definition at line 82 of file thread_safe_map.hpp.

Member Data Documentation

◆ keys_

template<class T>
std::vector<std::string> threadsafe::Map< T >::keys_
private

Definition at line 107 of file thread_safe_map.hpp.

◆ lock_wait_time

template<class T>
const int threadsafe::Map< T >::lock_wait_time = 100
staticprivate

Definition at line 100 of file thread_safe_map.hpp.

◆ map_

template<class T>
boost::shared_ptr<InternalMap> threadsafe::Map< T >::map_
private

Definition at line 104 of file thread_safe_map.hpp.

◆ mutex_

template<class T>
boost::shared_ptr<boost::shared_mutex> threadsafe::Map< T >::mutex_
private

Definition at line 106 of file thread_safe_map.hpp.


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


sr_utilities
Author(s): Ugo Cupcic
autogenerated on Mon Feb 28 2022 23:52:19