MADARA  3.4.1
madara::knowledge::ContextGuard Class Reference

A thread-safe guard for a context or knowledge base. More...

#include <ContextGuard.h>

Public Member Functions

template<typename... Args>
 ContextGuard (const KnowledgeBase &knowledge, Args &&... args)
 Constructor. More...
 
template<typename... Args>
 ContextGuard (const ThreadSafeContext &context, Args &&... args)
 Constructor. More...
 

Private Attributes

std::lock_guard< const ThreadSafeContextguard_
 

Detailed Description

A thread-safe guard for a context or knowledge base.

Definition at line 23 of file ContextGuard.h.

Constructor & Destructor Documentation

◆ ContextGuard() [1/2]

template<typename... Args>
madara::knowledge::ContextGuard::ContextGuard ( const KnowledgeBase knowledge,
Args &&...  args 
)
inline

Constructor.

Arguments past first forwarded to underlying guard type

Definition at line 8 of file ContextGuard.inl.

◆ ContextGuard() [2/2]

template<typename... Args>
madara::knowledge::ContextGuard::ContextGuard ( const ThreadSafeContext context,
Args &&...  args 
)
inline

Constructor.

Arguments past first forwarded to underlying guard type

Definition at line 15 of file ContextGuard.inl.

Member Data Documentation

◆ guard_

std::lock_guard<const ThreadSafeContext> madara::knowledge::ContextGuard::guard_
private

Definition at line 43 of file ContextGuard.h.


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