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 44 of file thread_safe_map.hpp.

Member Typedef Documentation

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

Definition at line 101 of file thread_safe_map.hpp.

Constructor & Destructor Documentation

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

Definition at line 47 of file thread_safe_map.hpp.

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

Definition at line 53 of file thread_safe_map.hpp.

Member Function Documentation

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

Definition at line 57 of file thread_safe_map.hpp.

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

Definition at line 68 of file thread_safe_map.hpp.

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

Definition at line 93 of file thread_safe_map.hpp.

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

Definition at line 81 of file thread_safe_map.hpp.

Member Data Documentation

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

Definition at line 106 of file thread_safe_map.hpp.

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

Definition at line 99 of file thread_safe_map.hpp.

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

Definition at line 103 of file thread_safe_map.hpp.

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

Definition at line 105 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 Tue Oct 13 2020 03:55:49