PolyBoRi
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
polybori
include
BooleConstant.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
//*****************************************************************************
28
//*****************************************************************************
29
30
// include basic definitions
31
#include "
pbori_defs.h
"
32
33
#ifndef BooleConstant_h_
34
#define BooleConstant_h_
35
36
BEGIN_NAMESPACE_PBORI
37
47
class
BooleConstant
{
48
49
public
:
51
BooleConstant
(): m_value(false) {}
52
54
BooleConstant
(
bool
value): m_value(value) {}
55
57
BooleConstant
(
int
value): m_value(value % 2) {}
58
60
operator
bool()
const
{
return
m_value; }
61
63
BooleConstant
operator!
()
const
{
return
!m_value; }
64
65
protected
:
67
const
bool
m_value
;
68
};
69
71
inline
CTypes::ostream_type
&
72
operator<<
(
CTypes::ostream_type
& os,
const
BooleConstant
& rhs) {
73
return
(os << (
int
) rhs);
74
}
75
76
77
END_NAMESPACE_PBORI
78
79
#endif // BooleConstant_h_
Generated on Tue Jun 25 2013 08:12:10 for PolyBoRi by
1.8.1.2