ct_common  1.0.1
Common library for combinatorial testing
src/ct_common/file_parse/err_logger.h
Go to the documentation of this file.
00001 #ifndef CT_COMMON_ERR_LOGGER_H_
00002 #define CT_COMMON_ERR_LOGGER_H_
00003 
00004 #include <string>
00005 
00006 namespace ct {
00007 namespace common {
00008 class ErrLogger {
00009 public:
00010   ErrLogger(void);
00011   ErrLogger(const ErrLogger &from);
00012   virtual ~ErrLogger(void);
00013   ErrLogger &operator = (const ErrLogger &right);
00014 
00015 public:
00016   void reportError(const std::string &str);
00017   void reportWarning(const std::string &str);
00018   
00019   std::size_t numErrs(void) const { return this->num_errs_; }
00020   std::size_t numWarnings(void) const { return this->num_warnings_; }
00021 
00022 private:
00023   virtual void innerReportError(const std::string &str) = 0;
00024   virtual void innerReportWarning(const std::string &str) = 0;
00025   
00026 private:
00027   std::size_t num_errs_;
00028   std::size_t num_warnings_;
00029 };
00030 }  // namespace common
00031 }  // namespace ct
00032 
00033 #endif  // CT_COMMON_ERR_LOGGER_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines