proxygen
folly::settings::detail::SnapshotSettingWrapper< T > Class Template Reference

#include <Settings.h>

Public Member Functions

const Toperator* () const
 
const Toperator-> () const
 
void set (const T &t, StringPiece reason="api")
 

Private Member Functions

 SnapshotSettingWrapper (Snapshot &snapshot, SettingCore< T > &core)
 

Private Attributes

Snapshotsnapshot_
 
SettingCore< T > & core_
 

Friends

class folly::settings::Snapshot
 

Detailed Description

template<class T>
class folly::settings::detail::SnapshotSettingWrapper< T >

Like SettingWrapper, but checks against any values saved/updated in a snapshot.

Definition at line 208 of file Settings.h.

Constructor & Destructor Documentation

template<class T >
folly::settings::detail::SnapshotSettingWrapper< T >::SnapshotSettingWrapper ( Snapshot snapshot,
SettingCore< T > &  core 
)
inlineprivate

Definition at line 233 of file Settings.h.

Member Function Documentation

template<class T >
const T & folly::settings::detail::SnapshotSettingWrapper< T >::operator* ( ) const
inline

The references are only valid for the duration of the snapshot's lifetime or until the setting has been updated in the snapshot, whichever happens earlier.

Definition at line 333 of file Settings.h.

References folly::settings::detail::SettingWrapper< T, TrivialPtr >::core_.

333  {
334  return snapshot_.get(core_).value;
335 }
template<class T >
const T* folly::settings::detail::SnapshotSettingWrapper< T >::operator-> ( ) const
inline

Definition at line 216 of file Settings.h.

References folly::settings::detail::SettingWrapper< T, TrivialPtr >::operator*().

216  {
217  return &operator*();
218  }
template<class T >
void folly::settings::detail::SnapshotSettingWrapper< T >::set ( const T t,
StringPiece  reason = "api" 
)
inline

Update the setting in the snapshot, the effects are not visible in this snapshot.

Definition at line 224 of file Settings.h.

References folly::settings::detail::SettingWrapper< T, TrivialPtr >::core_.

224  {
225  core_.set(t, reason, &snapshot_);
226  }

Friends And Related Function Documentation

template<class T >
friend class folly::settings::Snapshot
friend

Definition at line 231 of file Settings.h.

Member Data Documentation

template<class T >
SettingCore<T>& folly::settings::detail::SnapshotSettingWrapper< T >::core_
private

Definition at line 230 of file Settings.h.

template<class T >
Snapshot& folly::settings::detail::SnapshotSettingWrapper< T >::snapshot_
private

Definition at line 229 of file Settings.h.


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