EzLogger

ezlogger_verbosity_level_policy.hpp

00001 #ifndef EZLOGGER_VERBOSITY_LEVEL_POLICY_HPP_HEADER_GRD_
00002 #define EZLOGGER_VERBOSITY_LEVEL_POLICY_HPP_HEADER_GRD_
00003 
00004 namespace axter
00005 {
00006         enum verbosity{log_default_verbosity_level = 3, log_verbosity_not_set = 0, log_always = 1, log_often, log_regularly, log_rarely, log_very_rarely};
00007 
00032         struct ezlogger_verbosity_level_policy
00033         {
00034                 static inline verbosity get_verbosity_level_tolerance(){return set_or_get_verbosity_level_tolerance(true);}
00035                 static void set_verbosity_level_tolerance(verbosity NewValue){set_or_get_verbosity_level_tolerance(false, NewValue);}
00036         private:
00037                 inline static verbosity initial_verbosity_level(){return log_default_verbosity_level;}
00038                 static verbosity set_or_get_verbosity_level_tolerance(bool GetLevel, verbosity NewValue = log_default_verbosity_level)
00039                 {
00040                         static verbosity verbosity_level = initial_verbosity_level();
00041                         if (!GetLevel) verbosity_level = NewValue;
00042                         return verbosity_level;
00043                 }
00044         };
00045 }
00046 
00047 #endif //EZLOGGER_VERBOSITY_LEVEL_POLICY_HPP_HEADER_GRD_

Generated on Wed Mar 29 00:31:09 2006 for EzLogger by  doxygen 1.4.6.Axter [Axter-Extended-Version]