MADARA  3.2.3
ContextGuard.h
Go to the documentation of this file.
1 
2 #ifndef _MADARA_CONTEXT_GUARD_H_
3 #define _MADARA_CONTEXT_GUARD_H_
4 
6 
15 namespace madara
16 {
17  namespace knowledge
18  {
23  class MADARA_EXPORT ContextGuard
24  {
25  public:
31  template<typename... Args>
32  ContextGuard (KnowledgeBase & knowledge, Args&&... args);
33 
39  template<typename... Args>
40  ContextGuard (ThreadSafeContext & context, Args&&... args);
41 
42  private:
43  std::lock_guard<ThreadSafeContext> guard_;
44  };
45 
46  }
47 }
48 
49 #include "ContextGuard.inl"
50 
51 #endif // _MADARA_CONTEXT_GUARD_H_
This class stores variables and their values for use by any entity needing state information in a thr...
A thread-safe guard for a context or knowledge base.
Definition: ContextGuard.h:23
This class provides a distributed knowledge base to users.
Definition: KnowledgeBase.h:45
Provides functions and classes for the distributed knowledge base.
Copyright (c) 2015 Carnegie Mellon University.
std::lock_guard< ThreadSafeContext > guard_
Definition: ContextGuard.h:43