The Battle for Wesnoth  1.15.5+dev
Public Member Functions | Private Attributes | Friends | List of all members
utils::shared_reference< T > Class Template Reference

#include <shared_reference.hpp>

Public Member Functions

template<typename Y >
 shared_reference (const shared_reference< Y > &p)
 
template<typename Y >
 shared_reference (shared_reference< Y > &&p)
 
template<typename Y >
 shared_reference (const std::shared_ptr< Y > &p)
 
template<typename Y >
 shared_reference (std::shared_ptr< Y > &&p)
 
template<typename Y >
shared_referenceoperator= (shared_reference< Y > &&p)
 
template<typename Y >
shared_referenceoperator= (const shared_reference< Y > &p)
 
 ~shared_reference ()=default
 
 operator std::shared_ptr< T > ()
 
T * operator-> ()
 
const T * operator-> () const
 
T & operator* ()
 
const T & operator* () const
 

Private Attributes

std::shared_ptr< T > m_ptr
 

Friends

template<typename XT , typename... XTypes>
shared_reference< XT > make_shared_reference (XTypes &&...args)
 

Detailed Description

template<typename T>
class utils::shared_reference< T >

Definition at line 24 of file shared_reference.hpp.

Constructor & Destructor Documentation

◆ shared_reference() [1/4]

template<typename T>
template<typename Y >
utils::shared_reference< T >::shared_reference ( const shared_reference< Y > &  p)
inline

Definition at line 30 of file shared_reference.hpp.

◆ shared_reference() [2/4]

template<typename T>
template<typename Y >
utils::shared_reference< T >::shared_reference ( shared_reference< Y > &&  p)
inline

Definition at line 34 of file shared_reference.hpp.

◆ shared_reference() [3/4]

template<typename T>
template<typename Y >
utils::shared_reference< T >::shared_reference ( const std::shared_ptr< Y > &  p)
inlineexplicit

Definition at line 38 of file shared_reference.hpp.

◆ shared_reference() [4/4]

template<typename T>
template<typename Y >
utils::shared_reference< T >::shared_reference ( std::shared_ptr< Y > &&  p)
inlineexplicit

Definition at line 46 of file shared_reference.hpp.

References p.

◆ ~shared_reference()

template<typename T>
utils::shared_reference< T >::~shared_reference ( )
default

Member Function Documentation

◆ operator std::shared_ptr< T >()

template<typename T>
utils::shared_reference< T >::operator std::shared_ptr< T > ( )
inline

Definition at line 69 of file shared_reference.hpp.

References utils::shared_reference< T >::m_ptr.

◆ operator*() [1/2]

template<typename T>
T& utils::shared_reference< T >::operator* ( )
inline

Definition at line 75 of file shared_reference.hpp.

◆ operator*() [2/2]

template<typename T>
const T& utils::shared_reference< T >::operator* ( ) const
inline

◆ operator->() [1/2]

template<typename T>
T* utils::shared_reference< T >::operator-> ( )
inline

Definition at line 72 of file shared_reference.hpp.

◆ operator->() [2/2]

template<typename T>
const T* utils::shared_reference< T >::operator-> ( ) const
inline

Definition at line 73 of file shared_reference.hpp.

◆ operator=() [1/2]

template<typename T>
template<typename Y >
shared_reference& utils::shared_reference< T >::operator= ( shared_reference< Y > &&  p)
inline

Definition at line 55 of file shared_reference.hpp.

References p.

◆ operator=() [2/2]

template<typename T>
template<typename Y >
shared_reference& utils::shared_reference< T >::operator= ( const shared_reference< Y > &  p)
inline

Friends And Related Function Documentation

◆ make_shared_reference

template<typename T>
template<typename XT , typename... XTypes>
shared_reference<XT> make_shared_reference ( XTypes &&...  args)
friend

Member Data Documentation

◆ m_ptr

template<typename T>
std::shared_ptr<T> utils::shared_reference< T >::m_ptr
private

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