DGtal  1.3.beta
BasicBoolFunctors.h
1 
17 #pragma once
18 
31 #if defined(BasicBoolFunctors_RECURSES)
32 #error Recursive header files inclusion detected in BasicBoolFunctors.h
33 #else // defined(BasicBoolFunctors_RECURSES)
34 
35 #define BasicBoolFunctors_RECURSES
36 
37 #if !defined BasicBoolFunctors_h
38 
39 #define BasicBoolFunctors_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <boost/function.hpp>
46 
47 // @since 0.8 In DGtal::functors
48 namespace DGtal {
49  namespace functors {
50 
54  typedef boost::function0< bool > BoolFunctor0;
55 
59  typedef boost::function1< bool, bool > BoolFunctor1;
60 
64  typedef boost::function2< bool, bool, bool > BoolFunctor2;
65 
69  typedef boost::function3< bool, bool, bool, bool > BoolFunctor3;
70 
74  struct TrueBoolFct0 {
75  bool operator()() const;
76  };
77 
81  struct FalseBoolFct0 {
82  bool operator()() const;
83  };
84 
88  static const BoolFunctor0 trueBF0 = TrueBoolFct0();
89 
94 
99  bool operator()( bool b ) const;
100  };
101 
105  struct NotBoolFct1 {
106  bool operator()( bool b ) const;
107  };
108 
113 
117  static const BoolFunctor1 notBF1 = NotBoolFct1();
118 
122  struct AndBoolFct2 {
123  bool operator()( bool b1, bool b2 ) const;
124  };
125 
129  struct OrBoolFct2 {
130  bool operator()( bool b1, bool b2 ) const;
131  };
132 
136  struct XorBoolFct2 {
137  bool operator()( bool b1, bool b2 ) const;
138  };
139 
144  bool operator()( bool b1, bool b2 ) const;
145  };
146 
150  static const BoolFunctor2 andBF2 = AndBoolFct2();
151 
155  static const BoolFunctor2 orBF2 = OrBoolFct2();
156 
160  static const BoolFunctor2 xorBF2 = XorBoolFct2();
161 
166 
167 } // namespace functors
168 } // namespace DGtal
169 
170 
172 // Includes inline functors.
173 #include "DGtal/base/BasicBoolFunctors.ih"
174 
175 // //
177 
178 #endif // !defined BasicBoolFunctors_h
179 
180 #undef BasicBoolFunctors_RECURSES
181 #endif // else defined(BasicBoolFunctors_RECURSES)
DGtal::functors::IdentityBoolFct1::operator()
bool operator()(bool b) const
DGtal::functors::NotBoolFct1::operator()
bool operator()(bool b) const
DGtal::functors::orBF2
static const BoolFunctor2 orBF2
Definition: BasicBoolFunctors.h:155
DGtal::functors::TrueBoolFct0::operator()
bool operator()() const
DGtal::functors::andBF2
static const BoolFunctor2 andBF2
Definition: BasicBoolFunctors.h:150
DGtal::functors::NotBoolFct1
Definition: BasicBoolFunctors.h:105
DGtal::functors::BoolFunctor3
boost::function3< bool, bool, bool, bool > BoolFunctor3
Definition: BasicBoolFunctors.h:69
DGtal::functors::XorBoolFct2
Definition: BasicBoolFunctors.h:136
DGtal::functors::falseBF0
static const BoolFunctor0 falseBF0
Definition: BasicBoolFunctors.h:93
DGtal::functors::xorBF2
static const BoolFunctor2 xorBF2
Definition: BasicBoolFunctors.h:160
DGtal::functors::TrueBoolFct0
Definition: BasicBoolFunctors.h:74
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::functors::BoolFunctor2
boost::function2< bool, bool, bool > BoolFunctor2
Definition: BasicBoolFunctors.h:64
DGtal::functors::XorBoolFct2::operator()
bool operator()(bool b1, bool b2) const
DGtal::functors::IdentityBoolFct1
Definition: BasicBoolFunctors.h:98
DGtal::functors::trueBF0
static const BoolFunctor0 trueBF0
Definition: BasicBoolFunctors.h:88
DGtal::functors::BoolFunctor0
boost::function0< bool > BoolFunctor0
Definition: BasicBoolFunctors.h:54
DGtal::functors::OrBoolFct2
Definition: BasicBoolFunctors.h:129
DGtal::functors::FalseBoolFct0
Definition: BasicBoolFunctors.h:81
DGtal::functors::ImpliesBoolFct2::operator()
bool operator()(bool b1, bool b2) const
DGtal::functors::BoolFunctor1
boost::function1< bool, bool > BoolFunctor1
Definition: BasicBoolFunctors.h:59
DGtal::functors::ImpliesBoolFct2
Definition: BasicBoolFunctors.h:143
DGtal::functors::OrBoolFct2::operator()
bool operator()(bool b1, bool b2) const
DGtal::functors::AndBoolFct2::operator()
bool operator()(bool b1, bool b2) const
DGtal::functors::identityBF1
static const BoolFunctor1 identityBF1
Definition: BasicBoolFunctors.h:112
DGtal::functors::AndBoolFct2
Definition: BasicBoolFunctors.h:122
DGtal::functors::impliesBF2
static const BoolFunctor2 impliesBF2
Definition: BasicBoolFunctors.h:165
DGtal::functors::notBF1
static const BoolFunctor1 notBF1
Definition: BasicBoolFunctors.h:117
DGtal::functors::FalseBoolFct0::operator()
bool operator()() const