Public Member Functions | Static Public Member Functions | Protected Attributes

wibble::Maybe< T > Struct Template Reference

#include <maybe.h>

Inheritance diagram for wibble::Maybe< T >:
Inheritance graph
[legend]
Collaboration diagram for wibble::Maybe< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool nothing () const
T & value ()
const T & value () const
 Maybe (bool n, const T &v)
 Maybe (const T &df=T())
 operator T () const
bool operator<= (const Maybe< T > &o) const

Static Public Member Functions

static Maybe Just (const T &t)
static Maybe Nothing (const T &df=T())

Protected Attributes

bool m_nothing:1
m_value

template<typename T>
struct wibble::Maybe< T >


Constructor & Destructor Documentation

template<typename T >
wibble::Maybe< T >::Maybe ( bool  n,
const T &  v 
) [inline]
template<typename T >
wibble::Maybe< T >::Maybe ( const T &  df = T()  )  [inline]

Member Function Documentation

template<typename T >
static Maybe wibble::Maybe< T >::Just ( const T &  t  )  [inline, static]
template<typename T >
bool wibble::Maybe< T >::nothing (  )  const [inline]
template<typename T >
static Maybe wibble::Maybe< T >::Nothing ( const T &  df = T()  )  [inline, static]
template<typename T >
wibble::Maybe< T >::operator T (  )  const [inline]
template<typename T >
bool wibble::Maybe< T >::operator<= ( const Maybe< T > &  o  )  const [inline]
template<typename T >
const T& wibble::Maybe< T >::value (  )  const [inline]
template<typename T >
T& wibble::Maybe< T >::value (  )  [inline]

Member Data Documentation

template<typename T >
bool wibble::Maybe< T >::m_nothing [protected]
template<typename T >
T wibble::Maybe< T >::m_value [protected]

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