Github   Telegram
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rcu::ReadablePtr< T > Class Template Reference

#include <userver/rcu/rcu.hpp>

Public Member Functions

 ReadablePtr (const Variable< T > &ptr)
 
 ReadablePtr (ReadablePtr< T > &&other) noexcept
 
ReadablePtroperator= (ReadablePtr< T > &&other) noexcept
 
 ReadablePtr (const ReadablePtr< T > &other)
 
ReadablePtroperator= (const ReadablePtr< T > &other)
 
const T * Get () const &
 
const T * Get () &&
 
const T * operator-> () const &
 
const T * operator-> () &&
 
const T & operator* () const &
 
const T & operator* () &&
 

Detailed Description

template<typename T>
class rcu::ReadablePtr< T >

Reader smart pointer for rcu::Variable<T>. You may use operator*() or operator->() to do something with the stored value. Once created, ReadablePtr references the same immutable value: if Variable's value is changed during ReadablePtr lifetime, it will not affect value referenced by ReadablePtr.

Examples
samples/config_service/config_service.cpp.

Definition at line 80 of file rcu.hpp.

Constructor & Destructor Documentation

◆ ReadablePtr() [1/3]

template<typename T >
rcu::ReadablePtr< T >::ReadablePtr ( const Variable< T > &  ptr)
inlineexplicit

Definition at line 82 of file rcu.hpp.

◆ ReadablePtr() [2/3]

template<typename T >
rcu::ReadablePtr< T >::ReadablePtr ( ReadablePtr< T > &&  other)
inlinenoexcept

Definition at line 96 of file rcu.hpp.

◆ ReadablePtr() [3/3]

template<typename T >
rcu::ReadablePtr< T >::ReadablePtr ( const ReadablePtr< T > &  other)
inline

Definition at line 144 of file rcu.hpp.

◆ ~ReadablePtr()

template<typename T >
rcu::ReadablePtr< T >::~ReadablePtr ( )
inline

Definition at line 152 of file rcu.hpp.

Member Function Documentation

◆ Get() [1/2]

template<typename T >
const T * rcu::ReadablePtr< T >::Get ( ) &&
inline

Definition at line 163 of file rcu.hpp.

◆ Get() [2/2]

template<typename T >
const T * rcu::ReadablePtr< T >::Get ( ) const &
inline

Definition at line 158 of file rcu.hpp.

◆ operator*() [1/2]

template<typename T >
const T & rcu::ReadablePtr< T >::operator* ( ) &&
inline

Definition at line 169 of file rcu.hpp.

◆ operator*() [2/2]

template<typename T >
const T & rcu::ReadablePtr< T >::operator* ( ) const &
inline

Definition at line 168 of file rcu.hpp.

◆ operator->() [1/2]

template<typename T >
const T * rcu::ReadablePtr< T >::operator-> ( ) &&
inline

Definition at line 166 of file rcu.hpp.

◆ operator->() [2/2]

template<typename T >
const T * rcu::ReadablePtr< T >::operator-> ( ) const &
inline

Definition at line 165 of file rcu.hpp.

◆ operator=() [1/2]

template<typename T >
ReadablePtr & rcu::ReadablePtr< T >::operator= ( const ReadablePtr< T > &  other)
inline

Definition at line 147 of file rcu.hpp.

◆ operator=() [2/2]

template<typename T >
ReadablePtr & rcu::ReadablePtr< T >::operator= ( ReadablePtr< T > &&  other)
inlinenoexcept

Definition at line 101 of file rcu.hpp.


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