vbl_bool_ostream.h
Go to the documentation of this file.
1 // This is core/vbl/vbl_bool_ostream.h
2 #ifndef vbl_bool_ostream_h_
3 #define vbl_bool_ostream_h_
4 //:
5 // \file
6 //
7 // \verbatim
8 // Modifications
9 // PDA (Manchester) 21/03/2001: Tidied up the documentation
10 // \endverbatim
11 
12 #include <iosfwd>
13 #ifdef _MSC_VER
14 # include <vcl_msvc_warnings.h>
15 #endif
16 
18 {
19  public:
20  class on_off
21  {
22  public:
23  on_off(const bool &val) : truth(&val) {}
24  const bool* truth;
25  };
26 
27  class high_low
28  {
29  public:
30  high_low(const bool &val) : truth(&val) {}
31  const bool* truth;
32  };
33 
34  class true_false
35  {
36  public:
37  true_false(const bool &val) : truth(&val) {}
38  const bool* truth;
39  };
40 };
41 
42 std::ostream& operator<<(std::ostream& s,
43  const vbl_bool_ostream::on_off& proxy);
44 std::ostream& operator<<(std::ostream& s,
45  const vbl_bool_ostream::high_low& proxy);
46 std::ostream& operator<<(std::ostream& s,
47  const vbl_bool_ostream::true_false& proxy);
48 
49 #endif // vbl_bool_ostream_h_
std::ostream & operator<<(std::ostream &s, const vbl_bool_ostream::on_off &proxy)