acedia::Either< Left, Right > Class Template Reference

Represents a value of one of two possible types (Left or Right). More...

#include <either.hpp>

List of all members.

Public Member Functions

 Either (const Left &l)
 Creates an Either that is a Left.
 Either (const Right &r)
 Creates an Either that is a Right.
bool isLeft () const throw ()
 Check if this is a Left.
bool isRight () const throw ()
 Check if this is a Right.
Left & left ()
 Get the value of Either if it's a Left.
Right & right ()
 Get the value of Either if it's a Right.

Detailed Description

template<typename Left, typename Right>
class acedia::Either< Left, Right >

Represents a value of one of two possible types (Left or Right).

Definition at line 42 of file either.hpp.


Member Function Documentation

template<typename Left , typename Right >
Left& acedia::Either< Left, Right >::left (  )  [inline]

Get the value of Either if it's a Left.

Exceptions:
ClassCastException if this is not a left

Definition at line 78 of file either.hpp.

template<typename Left , typename Right >
Right& acedia::Either< Left, Right >::right (  )  [inline]

Get the value of Either if it's a Right.

Exceptions:
ClassCastException if this is not a right

Definition at line 87 of file either.hpp.


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

Generated by  doxygen 1.6.2