core/vbl/vbl_bool_ostream.cxx
Go to the documentation of this file.
00001 // This is core/vbl/vbl_bool_ostream.cxx
00002 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00003 #pragma implementation
00004 #endif
00005 
00006 #include "vbl_bool_ostream.h"
00007 #include <vcl_iostream.h>
00008 
00009 vcl_ostream& operator<<(vcl_ostream& s, const vbl_bool_ostream::on_off& proxy)
00010 {
00011   if (*(proxy.truth))
00012     s << "on";
00013   else
00014     s << "off";
00015   return s;
00016 }
00017 
00018 vcl_ostream& operator<<(vcl_ostream& s, const vbl_bool_ostream::high_low& proxy)
00019 {
00020   if (*(proxy.truth))
00021     s << "high";
00022   else
00023     s << "low";
00024   return s;
00025 }
00026 
00027 vcl_ostream& operator<<(vcl_ostream& s, const vbl_bool_ostream::true_false& proxy)
00028 {
00029   if (*(proxy.truth))
00030     s << "true";
00031   else
00032     s << "false";
00033   return s;
00034 }
00035