MetriVis Overview | Download | User Manual | Development
Reference Overview | Design Documentation | Reference Backend | Reference Frontend

src/BaseClass.h

Go to the documentation of this file.
00001 /*
00002  *   MetriVis - Metrics Visualization Application
00003  *
00004  *
00005  *   License notice:
00006  *
00007  *   This program is free software: you can redistribute it and/or modify
00008  *   it under the terms of the GNU General Public License as published by
00009  *   the Free Software Foundation, either version 3 of the License, or
00010  *   (at your option) any later version.
00011  *
00012  *   This program is distributed in the hope that it will be useful,
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *   GNU General Public License for more details.
00016  *
00017  *   You should have received a copy of the GNU General Public License
00018  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019  *
00020  */
00021 
00022 #ifndef _METRIVIS_BASE_CLASS__
00023 #define _METRIVIS_BASE_CLASS__
00024 
00031 #include "lib/log4cplus/logger.h"
00032 #include "lib/log4cplus/loglevel.h"
00033 #include "lib/log4cplus/layout.h"
00034 #include "lib/log4cplus/ndc.h"
00035 #include "lib/log4cplus/consoleappender.h"
00036 #include "utils/string_utilities.h"
00037 #include <iostream>
00038 
00039 namespace metrivis {
00040 
00041 
00042 class BaseClass {
00043 
00044 public:
00048   BaseClass();
00049 
00053   virtual ~BaseClass();
00054 
00059   void InitObject(std::string object_name, int clone_id = -1);
00060 
00069   void Log(int log_level, std::string message);
00070 
00071 
00072 protected:
00078   enum LogLevels {
00079     LOG_FATAL = 0,
00080     LOG_ERROR,
00081     LOG_WARN,
00082     LOG_INFO,
00083     LOG_DEBUG
00084   };
00085 
00086 
00087 private:
00088 
00089   std::string object_name_;          
00090 
00091   int clonde_id_;                    
00092 };
00093 
00094 
00095 } // namespace metrivis
00096 
00097 
00098 #endif // _METRIVIS_BASE_CLASS__
00099 

Generated on Fri Feb 29 16:47:19 2008 for MetriVis by  doxygen 1.5.3