template <class Fields, class Mutex, class ConstLock>
class BaseProtectedFields
Defined at line 89 of file ../../third_party/cobalt/src/lib/util/protected_fields.h
BaseProtectedFields is a template class and is specialized into ProtectedFields and
RWProtectedFields. (See below).
Template types:
|Fields| can be any type, and is the object that will be protected.
|Mutex| is any type that implements the *Mutex* named requirement. (See:
https://en.cppreference.com/w/cpp/named_req/Mutex)
|ConstLock| is the lock type used for const_lock(). E.g. for ProtectedFields, it will be
std::unique_lock
<std
::mutex>, and for RWProtectedFields it will be
std::shared_lock
<std
::shared_mutex>.
Public Methods
LockedFieldsPtr lock ()
Defined at line 155 of file ../../third_party/cobalt/src/lib/util/protected_fields.h
ConstLockedFieldsPtr const_lock ()
Defined at line 156 of file ../../third_party/cobalt/src/lib/util/protected_fields.h
template <class... Args>
void BaseProtectedFields<Fields, Mutex, ConstLock> (Args &&... args)
Forward whatever arguments passed to BaseProtectedFields onto the constructor for Fields.
Defined at line 165 of file ../../third_party/cobalt/src/lib/util/protected_fields.h
BaseProtectedFields<Fields, Mutex, ConstLock> & operator= (const BaseProtectedFields<Fields, Mutex, ConstLock> & )
Defined at line 167 of file ../../third_party/cobalt/src/lib/util/protected_fields.h
void BaseProtectedFields<Fields, Mutex, ConstLock> (const BaseProtectedFields<Fields, Mutex, ConstLock> & )
Defined at line 168 of file ../../third_party/cobalt/src/lib/util/protected_fields.h
void BaseProtectedFields<Fields, Mutex, ConstLock> ()
Defined at line 169 of file ../../third_party/cobalt/src/lib/util/protected_fields.h
BaseProtectedFields<Fields, Mutex, ConstLock> & operator= (BaseProtectedFields<Fields, Mutex, ConstLock> && other)
Make BaseProtectedFields Move constructible/assignable
Defined at line 172 of file ../../third_party/cobalt/src/lib/util/protected_fields.h
void BaseProtectedFields<Fields, Mutex, ConstLock> (BaseProtectedFields<Fields, Mutex, ConstLock> && other)
Defined at line 177 of file ../../third_party/cobalt/src/lib/util/protected_fields.h