MetriVis | Overview | Download | User Manual | Development |
Reference | Overview | Design Documentation | Reference Backend | Reference Frontend |
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 00030 #ifndef _METRIVIS_METRIVIS_H 00031 #define _METRIVIS_METRIVIS_H 00032 00033 #include "BaseClass.h" 00034 00035 00036 namespace metrivis { 00037 00038 // Pre-Declarations: 00039 class HTTPDriver; 00040 00047 class MetriVis : public BaseClass { 00048 00049 public: 00050 00054 MetriVis(); 00055 00059 ~MetriVis(); 00060 00064 int InitService(); 00065 00072 void RunService(); 00073 00080 void StopService(); 00081 00085 int UninitService(); 00086 00087 00094 inline void set_port_number(int port_number) { 00095 port_number_ = port_number; 00096 } 00097 00105 inline void set_max_cache_size(long max_cache_size) { 00106 max_cache_size_ = max_cache_size; 00107 } 00108 00116 inline void set_db_file_name(std::string db_file_name) { 00117 db_file_name_ = db_file_name; 00118 } 00119 00120 00121 private: 00122 MetriVis(const MetriVis& metrivis); 00123 MetriVis& operator=(MetriVis& metrivis); 00124 00125 00126 private: 00127 volatile bool running_; 00128 00129 int port_number_; 00130 int max_cache_size_; 00131 std::string db_file_name_; 00132 }; 00133 00135 typedef Singleton<MetriVis> MeVi; 00136 00137 } // namespace metrivis 00138 00139 #endif // _METRIVIS_METRIVIS_H