TTKMusicPlayer  4.2.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
TTKOptional< T > Struct Template Reference

The class of the optional module. More...

#include <ttkoptional.h>

Public Member Functions

 TTKOptional ()
 
 TTKOptional (const TTKOptional< T > &other, typename std::enable_if< std::is_copy_constructible< T >::value, int >::type=0)
 
 TTKOptional (const T &other)
 
 TTKOptional (TTKOptional &&other)
 
TTKOptionaloperator= (TTKOptional &&other)
 
void operator= (const TTKOptional< T > &other)
 
bool operator< (const TTKOptional< T > &other) const
 
bool operator<= (const TTKOptional< T > &other) const
 
bool operator> (const TTKOptional< T > &other) const
 
bool operator>= (const TTKOptional< T > &other) const
 
template<typename... Args>
void emplace (Args &&...args)
 
void reset ()
 
bool has_value () const
 
const Tvalue () const
 
 operator bool () const
 
Toperator-> ()
 
const Toperator-> () const
 
const Toperator* () const
 
Toperator* ()
 
bool operator== (const TTKOptional &other) const
 
bool operator!= (const TTKOptional &other) const
 

Static Public Member Functions

template<typename... Args>
static TTKOptional< Tmake_optional (Args &&...args)
 

Private Attributes

std::unique_ptr< Tm_value
 

Detailed Description

template<typename T>
struct TTKOptional< T >

The class of the optional module.

Author
Greedysky greed.nosp@m.ysky.nosp@m.@163..nosp@m.com

Definition at line 28 of file ttkoptional.h.

Constructor & Destructor Documentation

template<typename T>
TTKOptional< T >::TTKOptional ( )
inline

Definition at line 30 of file ttkoptional.h.

template<typename T>
TTKOptional< T >::TTKOptional ( const TTKOptional< T > &  other,
typename std::enable_if< std::is_copy_constructible< T >::value, int >::type  = 0 
)
inline

Definition at line 44 of file ttkoptional.h.

References TTKOptional< T >::m_value.

template<typename T>
TTKOptional< T >::TTKOptional ( const T other)
inline

Definition at line 53 of file ttkoptional.h.

template<typename T>
TTKOptional< T >::TTKOptional ( TTKOptional< T > &&  other)
inline

Definition at line 59 of file ttkoptional.h.

References TTKOptional< T >::m_value.

Member Function Documentation

template<typename T>
template<typename... Args>
void TTKOptional< T >::emplace ( Args &&...  args)
inline

Definition at line 103 of file ttkoptional.h.

References TTKOptional< T >::m_value.

Referenced by TTKOptional< T >::make_optional().

template<typename T>
bool TTKOptional< T >::has_value ( ) const
inline

Definition at line 109 of file ttkoptional.h.

References TTKOptional< T >::m_value.

Referenced by operator==().

template<typename T>
template<typename... Args>
static TTKOptional<T> TTKOptional< T >::make_optional ( Args &&...  args)
inlinestatic

Definition at line 37 of file ttkoptional.h.

References TTKOptional< T >::emplace().

template<typename T>
TTKOptional< T >::operator bool ( ) const
inline

Definition at line 112 of file ttkoptional.h.

References TTKOptional< T >::m_value.

template<typename T>
bool TTKOptional< T >::operator!= ( const TTKOptional< T > &  other) const
inline

Definition at line 136 of file ttkoptional.h.

References TTKOptional< T >::operator==().

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

Definition at line 116 of file ttkoptional.h.

References TTKOptional< T >::m_value.

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

Definition at line 121 of file ttkoptional.h.

References TTKOptional< T >::m_value.

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

Definition at line 113 of file ttkoptional.h.

References TTKOptional< T >::m_value.

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

Definition at line 114 of file ttkoptional.h.

References TTKOptional< T >::m_value.

template<typename T>
bool TTKOptional< T >::operator< ( const TTKOptional< T > &  other) const
inline

Definition at line 82 of file ttkoptional.h.

References TTKOptional< T >::m_value.

template<typename T>
bool TTKOptional< T >::operator<= ( const TTKOptional< T > &  other) const
inline

Definition at line 87 of file ttkoptional.h.

References TTKOptional< T >::m_value.

template<typename T>
TTKOptional& TTKOptional< T >::operator= ( TTKOptional< T > &&  other)
inline

Definition at line 64 of file ttkoptional.h.

References TTKOptional< T >::m_value.

template<typename T>
void TTKOptional< T >::operator= ( const TTKOptional< T > &  other)
inline

Definition at line 70 of file ttkoptional.h.

References TTKOptional< T >::m_value.

template<typename T>
bool TTKOptional< T >::operator== ( const TTKOptional< T > &  other) const
inline

Definition at line 126 of file ttkoptional.h.

References TTKOptional< T >::m_value.

Referenced by TTKOptional< T >::operator!=().

template<typename T>
bool TTKOptional< T >::operator> ( const TTKOptional< T > &  other) const
inline

Definition at line 92 of file ttkoptional.h.

References TTKOptional< T >::m_value.

template<typename T>
bool TTKOptional< T >::operator>= ( const TTKOptional< T > &  other) const
inline

Definition at line 97 of file ttkoptional.h.

References TTKOptional< T >::m_value.

template<typename T>
void TTKOptional< T >::reset ( )
inline

Definition at line 108 of file ttkoptional.h.

References TTKOptional< T >::m_value.

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

Definition at line 110 of file ttkoptional.h.

References TTKOptional< T >::m_value.

Member Data Documentation

template<typename T>
std::unique_ptr<T> TTKOptional< T >::m_value
private

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