xboolean Class Reference
The "extended boolean" class.
More...
#include <XBOOL.H>
Inheritance diagram for xboolean:
[legend]
Detailed Description
The "extended boolean" class.
This class implements the special kind "extended boolean". It extends the usual "boolean" class with value and functionality "unknown" and defines logical constans and operations. It is upwards compatible with the usual "boolean" class and functionality. The 'extended boolean' class is the anchestor of the 'generic rule' class, but it can also be used alone. The "truth tables" are shown below.
Document Title
Logical negation (unary).
(NOT) !A |
A |
U | F | T |
| U | T | F |
Logical AND (binary).
(AND) A && B |
A |
U | F | T |
B |
U | U | F | U |
F | F | F | F |
T | U | F | T |
Logical OR (binary).
(OR) A || B |
A |
U | F | T |
B |
U | U | U | T |
F | U | F | T |
T | T | T | T |
Logical equivalence (binary).
(EQUALS) A == B |
A |
U | F | T |
B |
U | U | U | U |
F | U | T | F |
T | U | F | T |
For easier readability, the notations AND, OR, NOT have been introduced and used, both in the source files and the manual, for the logical operators &&, || and !.
Note that the objects wxXXX are parts of the multiplatform package wxWindows, their detailed description is given there.
Member Enumeration Documentation
|
Defines the allowed values for the 3-state logic.
- Enumeration values:
-
|
Constructor & Destructor Documentation
xboolean::xboolean |
( |
xbool |
xb = Unknown |
) |
[inline] |
|
|
(default) Constructor (using xbool). Initializes xboolean::value from xb. - Parameters:
-
|
xboolean::xboolean |
( |
bool |
b |
) |
[inline] |
|
xboolean::xboolean |
( |
const xboolean & |
xb |
) |
[inline] |
|
|
Copy constructor. Copies function xboolean::value from xb.value. - Parameters:
-
xb | the generating xboolean |
|
Member Function Documentation
virtual void xboolean::CalculateValue |
( |
void |
|
) |
const [inline, virtual] |
|
|
Must be overridden. It calculates a fresh function value and saves it in xboolean::value. |
virtual void xboolean::CalculateValue |
( |
void |
|
) |
[inline, virtual] |
|
virtual xbool xboolean::GetValue |
( |
void |
|
) |
const [inline, virtual] |
|
virtual xbool xboolean::GetValue |
( |
void |
|
) |
[inline, virtual] |
|
virtual wxString xboolean::GetValueString |
( |
void |
|
) |
[inline, virtual] |
|
bool xboolean::IsFalse |
( |
void |
|
) |
[inline] |
|
bool xboolean::IsTrue |
( |
void |
|
) |
[inline] |
|
bool xboolean::IsUnknown |
( |
void |
|
) |
[inline] |
|
xboolean xboolean::operator! |
( |
void |
|
) |
[inline] |
|
|
! (negation) operator. It calls xboolean::GetValue and returns the negated value - Returns:
- result of logical negation for the extended boolean
Reimplemented in xpRuleGeneric. |
xboolean xboolean::operator!= |
( |
bool & |
b |
) |
[inline] |
|
|
- Parameters:
-
!= | logical non-identity operator calls xboolean::GetValue for this and return the result of their NOT EQUAL relation |
b | the operand |
- Returns:
- result of non-identity check for the extended boolean and a boolean
|
|
- Parameters:
-
!= | logical non-identity operator. It calls xboolean::GetValue for both this and xb and return the result of their NOT EQUAL relation |
xb | the operand |
- Returns:
- result of non-identity check for the extended booleans
|
xboolean& xboolean::operator= |
( |
bool & |
b |
) |
[inline] |
|
|
= (assign) operator. It assigns the value of b to this - Parameters:
-
- Returns:
- the extended boolean, set by a bool
|
|
- Parameters:
-
- Returns:
- the extended boolean, set by xboolean
|
xboolean xboolean::operator== |
( |
bool & |
b |
) |
[inline] |
|
|
- Parameters:
-
== | (logical identity) operator. It calls xboolean::GetValue for this and return the result of their EQUAL relation |
b | the operand |
- Returns:
- result of identity check for an extended booleans and a boolean
|
Friends And Related Function Documentation
|
- Parameters:
-
&& | logical AND operator. It calls xboolean::GetValue for xbL and returns the result of the AND relation with bR |
xbL | the first (left) operand |
bR | the second (right) operand |
- Returns:
- result of AND for an extended boolean and a boolean
|
|
- Parameters:
-
&& | logical AND operator calls xboolean::GetValue for xbR and return the result of the AND relation with bL |
bL | the first (left) operand |
xbR | the second (right) operand |
- Returns:
- result of AND for a boolean and an extended boolean
|
|
- Parameters:
-
&& | (logical AND) operator. It calls xboolean::GetValue for both xbL and xbR and returns the result of their AND relation |
xbL | the first (left) operand |
xbR | the second (right) operand |
- Returns:
- result of AND for the extended booleans
|
|
- Parameters:
-
== | logical identity operator. It calls xboolean::GetValue for both bL and xbR and returns the result of their EQUAL relation |
xbL | the first (left) operand |
xbR | the second (right) operand |
- Returns:
- result of identity check for the extended booleans
|
|
- Parameters:
-
|| | logical OR operator. It calls xboolean::GetValue for xbL and returns the result of the OR relation with bR |
xbL | the first (left) operand |
bR | the second (right) operand |
- Returns:
- result of OR for the extended boolean and a boolean
|
|
- Parameters:
-
|| | logical OR operator. It calls xboolean::GetValue for xbR and return the result of the OR relation with bL |
bL | the first (left) operand |
xbR | the second (right) operand |
- Returns:
- result of OR for a boolean and an extended boolean
|
|
- Parameters:
-
|| | logical OR operator. It calls xboolean::GetValue for both xbL and xbR and return the result of their OR relation |
xbL | the first (left) operand |
xbR | the second (right) operand |
- Returns:
- result of OR for the extended booleans
|
Field Documentation
The documentation for this class was generated from the following file:
Generated on Tue Dec 23 10:24:35 2003 for xps4xps by
1.3.5