00001 #ifndef QRK_MONITOR_DATA_HANDLER_H 00002 #define QRK_MONITOR_DATA_HANDLER_H 00003 00013 #include "MonitorModeManager.h" 00014 #include "DetectOS.h" 00015 #include <string> 00016 00017 #ifdef MSC 00018 #define snprintf _snprintf 00019 #endif 00020 00021 00022 namespace qrk 00023 { 00024 00034 class MonitorDataHandler 00035 { 00036 MonitorDataHandler(void); 00037 MonitorDataHandler(const MonitorDataHandler& rhs); 00038 MonitorDataHandler& operator = (const MonitorDataHandler& rhs); 00039 00040 struct pImpl; 00041 std::auto_ptr<pImpl> pimpl; 00042 00043 public: 00044 explicit MonitorDataHandler(std::string file, 00045 MonitorModeManager::MonitorMode mode); 00046 ~MonitorDataHandler(void); 00047 00048 int fetch(char* data, int size, const char* comment = NULL); 00049 00053 int fetch(std::string& data, const char* comment = NULL); 00054 int fetch(bool& data, const char* comment = NULL); 00055 int fetch(int& data, const char* comment = NULL); 00056 int fetch(unsigned int& data, const char* comment = NULL); 00057 int fetch(short& data, const char* comment = NULL); 00058 int fetch(long& data, const char* comment = NULL); 00059 }; 00060 } 00061 00062 #endif /* !QRK_MONITOR_DATA_HANDLER_H */