wibble::Maybe< T > Struct Template Reference

`#include <maybe.h>`

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

## 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
Public Member Functions inherited from wibble::mixin::Comparable< Maybe< T > >
const Maybe< T > & | cmpSelf () const
bool | operator!= (const Maybe< T > &o) const
bool | operator== (const Maybe< T > &o) const
bool | operator< (const Maybe< T > &o) const
bool | operator> (const Maybe< T > &o) 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
T | m_value

## Constructor & Destructor Documentation

## Maybe() [1/2]

template<typename T >

wibble::Maybe< T >::Maybe | ( | bool | n,
|  | const T & | v
| ) |  |

inline

Referenced by wibble::Maybe< void >::Just(), wibble::Maybe< T >::Just(), wibble::Maybe< void >::Nothing(), and wibble::Maybe< T >::Nothing().

## Maybe() [2/2]

template<typename T >

wibble::Maybe< T >::Maybe | ( | const T & | df = `T()` | ) |

inline

## Member Function Documentation

## Just()

template<typename T >

static Maybe wibble::Maybe< T >::Just | ( | const T & | t | ) |

inline static

References wibble::Maybe< T >::Maybe().

## nothing()

template<typename T >

bool wibble::Maybe< T >::nothing | ( |  | ) | const

inline

References wibble::Maybe< T >::m_nothing.

Referenced by wibble::Maybe< T >::operator<=().

## Nothing()

template<typename T >

static Maybe wibble::Maybe< T >::Nothing | ( | const T & | df = `T()` | ) |

inline static

References wibble::Maybe< T >::Maybe().

## operator T()

template<typename T >

wibble::Maybe< T >::operator T | ( |  | ) | const

inline

References wibble::Maybe< T >::value().

## operator<=()

template<typename T >

bool wibble::Maybe< T >::operator<= | ( | const Maybe< T > & | o | ) | const

inline

References wibble::Maybe< T >::nothing(), and wibble::Maybe< T >::value().

## value() [1/2]

template<typename T >

T& wibble::Maybe< T >::value | ( |  | ) |

inline

References wibble::Maybe< T >::m_value.

Referenced by wibble::Maybe< T >::operator T(), and wibble::Maybe< T >::operator<=().

## value() [2/2]

template<typename T >

const T& wibble::Maybe< T >::value | ( |  | ) | const

inline

References wibble::Maybe< T >::m_value.

## Member Data Documentation

## m_nothing

template<typename T >

bool wibble::Maybe< T >::m_nothing

protected

Referenced by wibble::Maybe< T >::nothing().

## m_value

template<typename T >

T wibble::Maybe< T >::m_value

protected

Referenced by wibble::Maybe< T >::value().

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

- maybe.h