NeuralEngine
A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes.
NeuralEngine::ThreadSafeMap< Key, Value > Class Template Reference
Collaboration diagram for NeuralEngine::ThreadSafeMap< Key, Value >:

Public Member Functions

virtual ~ThreadSafeMap ()
 
bool HasElements () const
 
bool Exists (Key key) const
 
void Insert (Key key, Value value)
 
bool Remove (Key key, Value &value)
 
void RemoveAll ()
 
bool Get (Key key, Value &value) const
 
void GatherAll (std::vector< Value > &values) const
 

Protected Attributes

std::map< Key, Value > mMap
 
std::mutex mMutex
 

Detailed Description

template<typename Key, typename Value>
class NeuralEngine::ThreadSafeMap< Key, Value >

Definition at line 22 of file NeThreadSafeMap.h.

Constructor & Destructor Documentation

◆ ~ThreadSafeMap()

template<typename Key , typename Value >
ThreadSafeMap::~ThreadSafeMap ( )
virtual

File: NECore/Threading/NeThreadSafeMap.inl

Author:
Email:
Site:

Copyright (c) 2016 . All rights reserved.

Definition at line 12 of file NeThreadSafeMap.inl.

◆ ThreadSafeMap()

template<typename Key , typename Value >
ThreadSafeMap::ThreadSafeMap ( )

Definition at line 17 of file NeThreadSafeMap.inl.

Member Function Documentation

◆ HasElements()

template<typename Key , typename Value >
bool ThreadSafeMap::HasElements ( ) const

Definition at line 22 of file NeThreadSafeMap.inl.

◆ Exists()

template<typename Key , typename Value >
bool ThreadSafeMap::Exists ( Key  key) const

Definition at line 34 of file NeThreadSafeMap.inl.

◆ Insert()

template<typename Key , typename Value >
void ThreadSafeMap::Insert ( Key  key,
Value  value 
)

Definition at line 46 of file NeThreadSafeMap.inl.

◆ Remove()

template<typename Key , typename Value >
bool ThreadSafeMap::Remove ( Key  key,
Value &  value 
)

Definition at line 56 of file NeThreadSafeMap.inl.

◆ RemoveAll()

template<typename Key , typename Value >
void ThreadSafeMap::RemoveAll ( )

Definition at line 78 of file NeThreadSafeMap.inl.

◆ Get()

template<typename Key , typename Value >
bool ThreadSafeMap::Get ( Key  key,
Value &  value 
) const

Definition at line 88 of file NeThreadSafeMap.inl.

◆ GatherAll()

template<typename Key , typename Value >
void ThreadSafeMap::GatherAll ( std::vector< Value > &  values) const

Definition at line 109 of file NeThreadSafeMap.inl.

Member Data Documentation

◆ mMap

template<typename Key , typename Value >
std::map<Key, Value> NeuralEngine::ThreadSafeMap< Key, Value >::mMap
protected

Definition at line 39 of file NeThreadSafeMap.h.

◆ mMutex

template<typename Key , typename Value >
std::mutex NeuralEngine::ThreadSafeMap< Key, Value >::mMutex
mutableprotected

Definition at line 40 of file NeThreadSafeMap.h.


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