chronon::ThreadSafeRegistry
#include <ThreadSafeRegistry.hpp>
Public Functions
| Name | |
|---|---|
| size_t | size() const |
| std::vector< std::string > | keys() const |
| void | insert(const std::string & key, std::unique_ptr< V > value) |
| bool | has(const std::string & key) const |
| template <typename Func > void | forEach(Func && fn) const |
| V * | find(const std::string & key) |
| void | clear() |
Protected Functions
| Name | |
|---|---|
| ~ThreadSafeRegistry() =default | |
| ThreadSafeRegistry & | operator=(const ThreadSafeRegistry & ) =delete |
| ThreadSafeRegistry() =default | |
| ThreadSafeRegistry(const ThreadSafeRegistry & ) =delete |
Protected Attributes
| Name | |
|---|---|
| std::mutex | mutex_ |
| std::unordered_map< std::string, std::unique_ptr< V > > | entries_ |
Detailed Description
template <typename V >
class chronon::ThreadSafeRegistry;
Public Functions Documentation
function size
inline size_t size() const
function keys
inline std::vector< std::string > keys() const
function insert
inline void insert(
const std::string & key,
std::unique_ptr< V > value
)
function has
inline bool has(
const std::string & key
) const
function forEach
template <typename Func >
inline void forEach(
Func && fn
) const
function find
inline V * find(
const std::string & key
)
function clear
inline void clear()
Protected Functions Documentation
function ~ThreadSafeRegistry
~ThreadSafeRegistry() =default
function operator=
ThreadSafeRegistry & operator=(
const ThreadSafeRegistry &
) =delete
function ThreadSafeRegistry
ThreadSafeRegistry() =default
function ThreadSafeRegistry
ThreadSafeRegistry(
const ThreadSafeRegistry &
) =delete
Protected Attributes Documentation
variable mutex_
std::mutex mutex_;
variable entries_
std::unordered_map< std::string, std::unique_ptr< V > > entries_;
Updated on 2026-05-27 at 08:42:21 +0000