Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
fml::AtomicObject< T > Class Template Reference

#include <atomic_object.h>

Public Member Functions

 AtomicObject ()=default
 
 AtomicObject (T object)
 
T Load () const
 
void Store (const T &object)
 

Detailed Description

template<typename T>
class fml::AtomicObject< T >

Definition at line 14 of file atomic_object.h.

Constructor & Destructor Documentation

◆ AtomicObject() [1/2]

template<typename T >
fml::AtomicObject< T >::AtomicObject ( )
default

◆ AtomicObject() [2/2]

template<typename T >
fml::AtomicObject< T >::AtomicObject ( T  object)
inlineexplicit

Definition at line 17 of file atomic_object.h.

17: object_(object) {}

Member Function Documentation

◆ Load()

template<typename T >
T fml::AtomicObject< T >::Load ( ) const
inline

Definition at line 19 of file atomic_object.h.

19 {
20 std::scoped_lock lock(mutex_);
21 return object_;
22 }

◆ Store()

template<typename T >
void fml::AtomicObject< T >::Store ( const T object)
inline

Definition at line 24 of file atomic_object.h.

24 {
25 std::scoped_lock lock(mutex_);
26 object_ = object;
27 }

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