Agora Server Gateway SDK C++ API Reference
Public Types | Public Member Functions | List of all members
agora::Optional< T > Class Template Reference

#include <AgoraOptional.h>

Public Types

typedef T value_type
 

Public Member Functions

CONSTEXPR Optional ()
 
CONSTEXPR Optional (const Optional &other)
 
CONSTEXPR Optional (nullopt_t)
 
template<typename U >
 Optional (const Optional< U > &other)
 
CONSTEXPR Optional (in_place_t, const T &_value)
 
template<class U >
CONSTEXPR Optional (in_place_t, const U il[], const T &_value)
 
template<typename U >
CONSTEXPR Optional (const U &value)
 
 ~Optional ()
 
Optionaloperator= (const Optional &other)
 
Optionaloperator= (nullopt_t)
 
template<typename U >
Optionaloperator= (const U &value)
 
template<typename U >
Optionaloperator= (const Optional< U > &other)
 
const T * operator-> () const
 
T * operator-> ()
 
const T & operator* () const
 
T & operator* ()
 
CONSTEXPR operator bool () const
 
CONSTEXPR bool has_value () const
 
const T & value () const
 
template<class U >
CONSTEXPRvalue_or (const U &default_value) const
 
void swap (Optional &other)
 
void reset ()
 
T & emplace (const T &_value)
 
template<class U >
T & emplace (const U il[], const T &_value)
 

Additional Inherited Members

- Protected Member Functions inherited from agora::internal::OptionalBase< T >
CONSTEXPR OptionalBase ()
 
CONSTEXPR OptionalBase (const OptionalBase &other)
 
CONSTEXPR OptionalBase (in_place_t, const T &_value)
 
template<typename U >
 OptionalBase (const OptionalBase< U > &other)
 
 ~OptionalBase ()
 
OptionalBaseoperator= (const OptionalBase &other)
 
template<typename U >
void CopyAssign (const OptionalBase< U > &other)
 
template<typename U >
void InitOrAssign (const U &value)
 
void FreeIfNeeded ()
 
- Protected Attributes inherited from agora::internal::OptionalBase< T >
OptionalStorage< T > storage_
 

Member Typedef Documentation

◆ value_type

template<typename T >
typedef T agora::Optional< T >::value_type

Constructor & Destructor Documentation

◆ Optional() [1/7]

template<typename T >
CONSTEXPR agora::Optional< T >::Optional ( )
inline

◆ Optional() [2/7]

template<typename T >
CONSTEXPR agora::Optional< T >::Optional ( const Optional< T > &  other)
inline

◆ Optional() [3/7]

template<typename T >
CONSTEXPR agora::Optional< T >::Optional ( nullopt_t  )
inline

◆ Optional() [4/7]

template<typename T >
template<typename U >
agora::Optional< T >::Optional ( const Optional< U > &  other)
inline

◆ Optional() [5/7]

template<typename T >
CONSTEXPR agora::Optional< T >::Optional ( in_place_t  ,
const T &  _value 
)
inlineexplicit

◆ Optional() [6/7]

template<typename T >
template<class U >
CONSTEXPR agora::Optional< T >::Optional ( in_place_t  ,
const U  il[],
const T &  _value 
)
inlineexplicit

◆ Optional() [7/7]

template<typename T >
template<typename U >
CONSTEXPR agora::Optional< T >::Optional ( const U &  value)
inline

◆ ~Optional()

template<typename T >
agora::Optional< T >::~Optional ( )
inline

Member Function Documentation

◆ emplace() [1/2]

template<typename T >
T & agora::Optional< T >::emplace ( const T &  _value)
inline

◆ emplace() [2/2]

template<typename T >
template<class U >
T & agora::Optional< T >::emplace ( const U  il[],
const T &  _value 
)
inline

◆ has_value()

template<typename T >
CONSTEXPR bool agora::Optional< T >::has_value ( ) const
inline

◆ operator bool()

template<typename T >
CONSTEXPR agora::Optional< T >::operator bool ( ) const
inline

◆ operator*() [1/2]

template<typename T >
T & agora::Optional< T >::operator* ( )
inline

◆ operator*() [2/2]

template<typename T >
const T & agora::Optional< T >::operator* ( ) const
inline

◆ operator->() [1/2]

template<typename T >
T * agora::Optional< T >::operator-> ( )
inline

◆ operator->() [2/2]

template<typename T >
const T * agora::Optional< T >::operator-> ( ) const
inline

◆ operator=() [1/4]

template<typename T >
Optional & agora::Optional< T >::operator= ( const Optional< T > &  other)
inline

◆ operator=() [2/4]

template<typename T >
template<typename U >
Optional & agora::Optional< T >::operator= ( const Optional< U > &  other)
inline

◆ operator=() [3/4]

template<typename T >
template<typename U >
Optional & agora::Optional< T >::operator= ( const U &  value)
inline

◆ operator=() [4/4]

template<typename T >
Optional & agora::Optional< T >::operator= ( nullopt_t  )
inline

◆ reset()

template<typename T >
void agora::Optional< T >::reset ( )
inline

◆ swap()

template<typename T >
void agora::Optional< T >::swap ( Optional< T > &  other)
inline

◆ value()

template<typename T >
const T & agora::Optional< T >::value ( ) const
inline

◆ value_or()

template<typename T >
template<class U >
CONSTEXPR T agora::Optional< T >::value_or ( const U &  default_value) const
inline

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