cwidget  0.5.17
Public Member Functions | List of all members
cwidget::util::slotarg< T > Class Template Reference

Wraps a slot that may not be present. More...

#include <slotarg.h>

Public Member Functions

 slotarg (const T *slot)
 Create a slotarg from an optional slot. More...
 
 slotarg (const T &slot)
 Create a slotarg from an existing slot. More...
 
template<typename S >
 operator slotarg< S > () const
 Convert between compatible slotarg types. More...
 
 operator bool () const
 Return true if this argument stores a slot. More...
 
const T & operator* () const
 Return the encapsulated slot, if any. More...
 
T & operator* ()
 Return the encapsulated slot, if any. More...
 

Detailed Description

template<typename T>
class cwidget::util::slotarg< T >

Wraps a slot that may not be present.

Template Parameters
TThe slot type that is wrapped by this argument.

See also cwidget::util::arg, cwidget::util::slot0arg.

Constructor & Destructor Documentation

◆ slotarg() [1/2]

template<typename T>
cwidget::util::slotarg< T >::slotarg ( const T *  slot)
inline

Create a slotarg from an optional slot.

Parameters
slotThe slot to store, or NULL to store no slot.

◆ slotarg() [2/2]

template<typename T>
cwidget::util::slotarg< T >::slotarg ( const T &  slot)
inline

Create a slotarg from an existing slot.

Member Function Documentation

◆ operator bool()

template<typename T>
cwidget::util::slotarg< T >::operator bool ( ) const
inline

Return true if this argument stores a slot.

◆ operator slotarg< S >()

template<typename T>
template<typename S >
cwidget::util::slotarg< T >::operator slotarg< S > ( ) const
inline

Convert between compatible slotarg types.

◆ operator*() [1/2]

template<typename T>
const T& cwidget::util::slotarg< T >::operator* ( ) const
inline

Return the encapsulated slot, if any.

◆ operator*() [2/2]

template<typename T>
T& cwidget::util::slotarg< T >::operator* ( )
inline

Return the encapsulated slot, if any.


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