The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Private Attributes | List of all members
optional_config_impl< T > Class Template Reference

#include <config.hpp>

Public Member Functions

 optional_config_impl ()=default
 
 optional_config_impl (T &ref)
 
 optional_config_impl (utils::nullopt_t)
 
T & value () const
 
optional_config_impl< T > & operator= (T &new_ref)
 
bool has_value () const
 
 operator bool () const
 
 operator optional_config_impl< const T > () const
 
T * ptr () const
 Returns a pointer to the referenced object or nullptr if no reference is held. More...
 
T * operator-> () const
 
T & operator* () const
 
utils::const_clone_t< config_attribute_value, T > & operator[] (config_key_type key)
 
 operator utils::optional_reference< T > () const
 
bool tested () const
 

Private Attributes

T * opt_
 

Detailed Description

template<class T>
class optional_config_impl< T >

Definition at line 68 of file config.hpp.

Constructor & Destructor Documentation

◆ optional_config_impl() [1/3]

template<class T >
optional_config_impl< T >::optional_config_impl ( )
default

◆ optional_config_impl() [2/3]

template<class T >
optional_config_impl< T >::optional_config_impl ( T &  ref)
inline

Definition at line 73 of file config.hpp.

◆ optional_config_impl() [3/3]

template<class T >
optional_config_impl< T >::optional_config_impl ( utils::nullopt_t  )
inline

Definition at line 78 of file config.hpp.

Member Function Documentation

◆ has_value()

template<class T >
bool optional_config_impl< T >::has_value ( ) const
inline

◆ operator bool()

template<class T >
optional_config_impl< T >::operator bool ( ) const
inlineexplicit

Definition at line 109 of file config.hpp.

References optional_config_impl< T >::has_value().

◆ operator optional_config_impl< const T >()

template<class T >
optional_config_impl< T >::operator optional_config_impl< const T > ( ) const
inline

Definition at line 114 of file config.hpp.

◆ operator utils::optional_reference< T >()

template<class T >
optional_config_impl< T >::operator utils::optional_reference< T > ( ) const
inline

Definition at line 147 of file config.hpp.

◆ operator*()

template<class T >
T& optional_config_impl< T >::operator* ( ) const
inline

◆ operator->()

template<class T >
T* optional_config_impl< T >::operator-> ( ) const
inline

◆ operator=()

template<class T >
optional_config_impl<T>& optional_config_impl< T >::operator= ( T &  new_ref)
inline

Definition at line 94 of file config.hpp.

◆ operator[]()

template<class T >
utils::const_clone_t<config_attribute_value, T>& optional_config_impl< T >::operator[] ( config_key_type  key)
inline

◆ ptr()

template<class T >
T* optional_config_impl< T >::ptr ( ) const
inline

Returns a pointer to the referenced object or nullptr if no reference is held.

Definition at line 120 of file config.hpp.

References optional_config_impl< T >::value().

◆ tested()

template<class T >
bool optional_config_impl< T >::tested ( ) const
inline

◆ value()

template<class T >
T& optional_config_impl< T >::value ( ) const
inline

Member Data Documentation

◆ opt_

template<class T >
T* optional_config_impl< T >::opt_
private

Definition at line 160 of file config.hpp.

Referenced by optional_config_impl< T >::value().


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