#include <lemon/bits/variant.h>
Public Types | |
| typedef _First | First |
The First type. | |
| typedef _Second | Second |
The Second type. | |
Public Member Functions | |
| BiVariant () | |
| Constructor. | |
| BiVariant (const First &f) | |
| Constructor. | |
| BiVariant (const Second &s) | |
| Constructor. | |
| BiVariant (const BiVariant &bivariant) | |
| Copy constructor. | |
| ~BiVariant () | |
| Destrcutor. | |
| BiVariant & | setFirst () |
Set to the default value of the First type. | |
| BiVariant & | setFirst (const First &f) |
Set to the given value of the First type. | |
| BiVariant & | setSecond () |
Set to the default value of the Second type. | |
| BiVariant & | setSecond (const Second &s) |
Set to the given value of the Second type. | |
| BiVariant & | operator= (const First &f) |
Operator form of the setFirst(). | |
| BiVariant & | operator= (const Second &s) |
Operator form of the setSecond(). | |
| BiVariant & | operator= (const BiVariant &bivariant) |
| Assign operator. | |
| First & | first () |
| Reference to the value. | |
| const First & | first () const |
| Const reference to the value. | |
| operator First & () | |
Operator form of the first(). | |
| operator const First & () const | |
Operator form of the const first(). | |
| Second & | second () |
| Reference to the value. | |
| const Second & | second () const |
| Const reference to the value. | |
| operator Second & () | |
Operator form of the second(). | |
| operator const Second & () const | |
Operator form of the const second(). | |
| bool | firstState () const |
| True when the variant is in the first state | |
| bool | secondState () const |
| True when the variant is in the second state | |
| BiVariant | ( | ) | [inline] |
This constructor initalizes to the default value of the First type.
This constructor initalizes to the given value of the First type.
This constructor initalizes to the given value of the Second type.
| ~BiVariant | ( | ) | [inline] |
Destructor
| BiVariant& setFirst | ( | ) | [inline] |
This function sets the variant to the default value of the First type.
This function sets the variant to the given value of the First type.
| BiVariant& setSecond | ( | ) | [inline] |
This function sets the variant to the default value of the Second type.
This function sets the variant to the given value of the Second type.
| First& first | ( | ) | [inline] |
Reference to the value of the First type.
First type. | const First& first | ( | ) | const [inline] |
Const reference to the value of the First type.
First type. | Second& second | ( | ) | [inline] |
Reference to the value of the Second type.
Second type. | const Second& second | ( | ) | const [inline] |
Const reference to the value of the Second type.
Second type. | bool firstState | ( | ) | const [inline] |
True when the variant stores value of the First type.
| bool secondState | ( | ) | const [inline] |
True when the variant stores value of the Second type.
1.5.9