16 #ifndef SURGSIM_DATASTRUCTURES_BUFFEREDVALUE_H 17 #define SURGSIM_DATASTRUCTURES_BUFFEREDVALUE_H 21 #include <boost/thread.hpp> 26 namespace DataStructures
56 std::shared_ptr<const T>
safeGet()
const;
59 typedef boost::shared_lock<boost::shared_mutex> SharedLock;
60 typedef boost::unique_lock<boost::shared_mutex> UniqueLock;
66 std::shared_ptr<const T> m_safeValue;
69 mutable boost::shared_mutex m_mutex;
76 #include "SurgSim/DataStructures/BufferedValue-inl.h" Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
~BufferedValue()
Destructor.
Definition: BufferedValue-inl.h:38
BufferedValue is a class to enable a representation of two values for one variable, where both values need to be accessible at the same time, one in a thread safe, single threaded context, the other in a thread unsafe context.
Definition: BufferedValue.h:33
T & unsafeGet()
Get the value.
Definition: BufferedValue-inl.h:53
The header that provides the assertion API.
void publish()
Make the current value the one returned by calls to safeGet.
Definition: BufferedValue-inl.h:43
std::shared_ptr< const T > safeGet() const
Get the buffered value.
Definition: BufferedValue-inl.h:59