libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
crn::Prop3 Class Reference

A ternary proposition. More...

#include <CRNProp3.h>

+ Inheritance diagram for crn::Prop3:
+ Collaboration diagram for crn::Prop3:

Public Member Functions

 Prop3 () noexcept
 Default constructor. More...
 
 Prop3 (int val) noexcept
 Constructor from value. More...
 
 Prop3 (bool val) noexcept
 
 Prop3 (const Prop3 &)=default
 
 Prop3 (Prop3 &&)=default
 
 ~Prop3 ()=default
 
Prop3operator= (const Prop3 &)=default
 
Prop3operator= (Prop3 &&)=default
 
Prop3 operator| (const Prop3 &prop) const noexcept
 Logical OR operator. More...
 
Prop3operator|= (const Prop3 &prop) noexcept
 Logical OR operator. More...
 
Prop3 operator& (const Prop3 &prop) const noexcept
 Logical AND operator. More...
 
Prop3operator&= (const Prop3 &prop) noexcept
 Logical AND operator. More...
 
bool operator== (const Prop3 &prop) const noexcept
 Comparison. More...
 
Prop3operator= (const int &prop) noexcept
 Assignment operator. More...
 
Prop3 operator! () const noexcept
 Complementary operator. More...
 
bool IsTrue () const noexcept
 Is true? More...
 
bool IsFalse () const noexcept
 Is false? More...
 
bool IsUnknown () const noexcept
 Is unknown? More...
 
String ToString () const
 Dumps value to a string. More...
 
int GetValue () const noexcept
 Returns the internal integer value. More...
 
void Deserialize (xml::Element &el)
 Initializes the object from an XML element. Unsafe. More...
 
xml::Element Serialize (xml::Element &parent) const
 Dumps the object to an XML element. Unsafe. More...
 
- Public Member Functions inherited from crn::Object
virtual ~Object ()=default
 

Static Public Member Functions

static Prop3 True ()
 
static Prop3 False ()
 
static Prop3 Unknown ()
 

Static Public Attributes

static constexpr int FALSEval = 0
 
static constexpr int TRUEval = 1
 
static constexpr int UNKNOWNval = 2
 

Detailed Description

A ternary proposition.

A class for handling ternary logic

Author
Yann LEYDIER
Date
30 October 2006
Version
0.1

Definition at line 40 of file CRNProp3.h.

Constructor & Destructor Documentation

crn::Prop3::Prop3 ( )
inlinenoexcept

Default constructor.

Definition at line 44 of file CRNProp3.h.

Prop3::Prop3 ( int  val)
noexcept

Constructor from value.

Constructor from integer value

Parameters
[in]valthe value (TRUEval, FALSEval, anything else is UNKNOWNval)

Definition at line 38 of file CRNProp3.cpp.

crn::Prop3::Prop3 ( bool  val)
inlinenoexcept

Definition at line 49 of file CRNProp3.h.

crn::Prop3::Prop3 ( const Prop3 )
default
crn::Prop3::Prop3 ( Prop3 &&  )
default
crn::Prop3::~Prop3 ( )
default

Member Function Documentation

void Prop3::Deserialize ( xml::Element el)

Initializes the object from an XML element. Unsafe.

Unknown constant

Initialize the object from an XML element. Unsafe.

Exceptions
ExceptionInvalidArgumentnot a Prop3
ExceptionNotFoundattribute not found
ExceptionDomainwrong attribute
Parameters
[in]elthe element to read

Definition at line 189 of file CRNProp3.cpp.

static Prop3 crn::Prop3::False ( )
inlinestatic

True constant

Definition at line 89 of file CRNProp3.h.

int crn::Prop3::GetValue ( ) const
inlinenoexcept

Returns the internal integer value.

Definition at line 83 of file CRNProp3.h.

bool Prop3::IsFalse ( ) const
noexcept

Is false?

Definition at line 177 of file CRNProp3.cpp.

bool Prop3::IsTrue ( ) const
noexcept

Is true?

Definition at line 175 of file CRNProp3.cpp.

bool Prop3::IsUnknown ( ) const
noexcept

Is unknown?

Definition at line 179 of file CRNProp3.cpp.

Prop3 Prop3::operator! ( ) const
noexcept

Complementary operator.

Complementary operator

Returns
returns the complementary of the value

Definition at line 129 of file CRNProp3.cpp.

Prop3 Prop3::operator& ( const Prop3 prop) const
noexcept

Logical AND operator.

Logical AND operator

Parameters
[in]propthe other value
Returns
the union

Definition at line 91 of file CRNProp3.cpp.

Prop3 & Prop3::operator&= ( const Prop3 prop)
noexcept

Logical AND operator.

Logical AND operator

Parameters
[in]propthe other value
Returns
the union

Definition at line 163 of file CRNProp3.cpp.

Prop3& crn::Prop3::operator= ( const Prop3 )
default
Prop3& crn::Prop3::operator= ( Prop3 &&  )
default
Prop3 & Prop3::operator= ( const int &  prop)
noexcept

Assignment operator.

Assignment operator

Parameters
[in]propthe new value
Returns
the newly reassign value

Definition at line 119 of file CRNProp3.cpp.

bool Prop3::operator== ( const Prop3 prop) const
noexcept

Comparison.

Tests equality

Parameters
[in]propthe other value
Returns
true if the two values are equal, false else

Definition at line 107 of file CRNProp3.cpp.

Prop3 Prop3::operator| ( const Prop3 prop) const
noexcept

Logical OR operator.

Logical OR operator

Parameters
[in]propthe other value
Returns
the intersection

Definition at line 75 of file CRNProp3.cpp.

Prop3 & Prop3::operator|= ( const Prop3 prop)
noexcept

Logical OR operator.

Logical OR operator

Parameters
[in]propthe other value
Returns
the intersection

Definition at line 145 of file CRNProp3.cpp.

xml::Element Prop3::Serialize ( xml::Element parent) const

Dumps the object to an XML element. Unsafe.

Dump the object to an XML element. Unsafe.

Parameters
[in]parentthe parent element
Returns
the newly created element

Definition at line 206 of file CRNProp3.cpp.

String Prop3::ToString ( ) const

Dumps value to a string.

Dump value to a string

Returns
the string

Definition at line 54 of file CRNProp3.cpp.

static Prop3 crn::Prop3::True ( )
inlinestatic

Definition at line 88 of file CRNProp3.h.

static Prop3 crn::Prop3::Unknown ( )
inlinestatic

False constant

Definition at line 90 of file CRNProp3.h.

Member Data Documentation

constexpr int crn::Prop3::FALSEval = 0
static

Definition at line 85 of file CRNProp3.h.

constexpr int crn::Prop3::TRUEval = 1
static

Definition at line 86 of file CRNProp3.h.

constexpr int crn::Prop3::UNKNOWNval = 2
static

Definition at line 87 of file CRNProp3.h.


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