libmoost
|
00001 /* vim:set ts=3 sw=3 sts=3 et: */ 00028 #ifndef MOOST_UTILS_PROGRESS_DISPLAY_HPP__ 00029 #define MOOST_UTILS_PROGRESS_DISPLAY_HPP__ 00030 00031 // Like boost progress only more flexible since you can specify different process policy types 00032 00033 namespace moost { namespace progress { 00034 00035 template < typename policyT > 00036 class display 00037 { 00038 public: 00039 typedef policyT policy_t; 00040 typedef display<policy_t> this_type; 00041 typedef typename policy_t::counter_type counter_type; 00042 00043 display() 00044 { 00045 } 00046 00047 display(policy_t const & policy) : policy_(policy) 00048 { 00049 } 00050 00051 counter_type operator ++ () 00052 { 00053 return ++policy_; 00054 } 00055 00056 counter_type operator ++ (int) 00057 { 00058 return policy_++; 00059 } 00060 00061 private: 00062 policy_t policy_; 00063 }; 00064 00065 }} 00066 00067 #endif // MOOST_UTILS_PROGRESS_DISPLAY_HPP__