00001 #ifndef mbl_screen_counter_h_ 00002 #define mbl_screen_counter_h_ 00003 00004 //: 00005 // \file 00006 // \brief Printing dots to the screen to indicate events 00007 // \author Ian Scott 00008 00009 #include <vcl_iosfwd.h> 00010 00011 //: Prints items to the screen to represent events. 00012 // \code 00013 // // A rather trivial example 00014 // mbl_screen_counter counter; 00015 // 00016 // int n = 10; 00017 // for (int i=0;i<1000;i++) 00018 // { 00019 // counter(vcl_cout); 00020 // } 00021 // \endcode 00022 00023 class mbl_screen_counter 00024 { 00025 unsigned long count_; 00026 char symbol_; 00027 unsigned long skip_; 00028 vcl_ostream & os_; 00029 public: 00030 mbl_screen_counter(vcl_ostream &) ; 00031 00032 //: Mark event 00033 // This is a postfix increment operator 00034 mbl_screen_counter operator++ (int); 00035 }; 00036 00037 #endif // mbl_screen_counter_h_