Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Trichotomy Class Reference

class Trichotomy. More...

#include <Trichotomy.h>

List of all members.

Public Types

enum  TrichotomyValue { DONTKNOW = -1, NO, YES }

Public Methods

 Trichotomy (bool b)
 From boolean. More...

 Trichotomy (int i)
 Trichotomy (void *p)
 Has to be completeed.

 Trichotomy (const dontknow &)
 Special Initialisation Constructors //. More...

 operator bool () const
 operator int () const
Trichotomy operator! () const
bool defined () const
 true iff *this != dontknow. More...

bool undefined () const
 true iff *this == dontknow.


Private Attributes

TrichotomyValue theValue

Static Private Methods

TrichotomyValue convert (bool b)
TrichotomyValue convert (void *p)

Friends

bool operator== (const Trichotomy &t, const Trichotomy &u)
 equality operator.

ostream& operator<< (ostream &ostr, const Trichotomy &t)
 I/O routines //. More...

ostream& operator< (ostream &ostr, const Trichotomy &t)
 IPC operators //. More...

istream& operator> (istream &istr, Trichotomy &t)


Detailed Description

class Trichotomy.

Class Trichotomy used to define objects that can have three states: DONTKNOW, NO, YES

Definition at line 40 of file Trichotomy.h.


Member Enumeration Documentation

enum Trichotomy::TrichotomyValue
 

Enumerates logic constants.

Enumeration values:
DONTKNOW  
NO  
YES  

Definition at line 51 of file Trichotomy.h.


Constructor & Destructor Documentation

Trichotomy::Trichotomy ( bool b ) [inline]
 

From boolean.

Creates a trichotmoy object from boolean variable

Definition at line 66 of file Trichotomy.h.

Trichotomy::Trichotomy ( int i ) [inline]
 

/brief Constructor from integer Creates a trichotmoy object from integer variable

Definition at line 70 of file Trichotomy.h.

Trichotomy::Trichotomy ( void * p ) [inline]
 

Has to be completeed.

Definition at line 73 of file Trichotomy.h.

Trichotomy::Trichotomy ( const dontknow & ) [inline]
 

Special Initialisation Constructors //.

Creates a trichotomy object whose values is DONTKNOW This is the only way (execpt copying) to create DONTKNOW

Definition at line 86 of file Trichotomy.h.


Member Function Documentation

Trichotomy::operator bool ( ) const [inline]
 

Definition at line 95 of file Trichotomy.h.

Trichotomy::operator int ( ) const [inline]
 

Definition at line 102 of file Trichotomy.h.

Trichotomy Trichotomy::operator! ( ) const [inline]
 

invert the value if defined (either yes or no)

Definition at line 132 of file Trichotomy.h.

bool Trichotomy::defined ( ) const [inline]
 

true iff *this != dontknow.

True if value is not DONTKNOW

Definition at line 148 of file Trichotomy.h.

Referenced by undefined().

bool Trichotomy::undefined ( ) const [inline]
 

true iff *this == dontknow.

Definition at line 151 of file Trichotomy.h.

Referenced by operator &&(), operator!(), and operator||().

TrichotomyValue Trichotomy::convert ( bool b ) [inline, static, private]
 

Definition at line 213 of file Trichotomy.h.

TrichotomyValue Trichotomy::convert ( void * p ) [inline, static, private]
 

Definition at line 218 of file Trichotomy.h.


Friends And Related Function Documentation

bool operator== ( const Trichotomy & t,
const Trichotomy & u ) [friend]
 

equality operator.

Definition at line 116 of file Trichotomy.h.

ostream & operator<< ( ostream & ostr,
const Trichotomy & t ) [friend]
 

I/O routines //.

Print value into the stream

Definition at line 161 of file Trichotomy.h.

ostream & operator< ( ostream & ostr,
const Trichotomy & t ) [friend]
 

IPC operators //.

Special opertor for interprocessing communication

Definition at line 177 of file Trichotomy.h.

istream & operator> ( istream & istr,
Trichotomy & t ) [friend]
 

Special opertor for interprocessing communication

Definition at line 191 of file Trichotomy.h.


Member Data Documentation

TrichotomyValue Trichotomy::theValue [private]
 

Definition at line 229 of file Trichotomy.h.


The documentation for this class was generated from the following file:
Generated at Tue Jun 19 09:50:09 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001