00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef HxImgSystem_h
00011 #define HxImgSystem_h
00012
00013 #include "HxStd.h"
00014 #include "HxIoFwd.h"
00015
00016 #include <list>
00017
00018 class HxLogMessage;
00019
00020 class L_HXIMAGEREP HxImgSystem {
00021
00022 public:
00023
00024 ~HxImgSystem();
00025 static HxImgSystem& instance();
00026
00027 HxLogMessage* allocated(size_t);
00028 HxLogMessage* deallocated(size_t);
00029 size_t memoryUsage() const;
00030
00031
00032
00033 void pushMessage(HxLogMessage*);
00034
00035 void setLogging(bool);
00036 bool isLogging() const;
00037 void verboseLogging(bool);
00038
00039 void clearLog();
00040 STD_OSTREAM& printLog(STD_OSTREAM&) const;
00041
00042 private:
00043 HxImgSystem();
00044 HxImgSystem(const HxImgSystem&);
00045 HxImgSystem& operator=(const HxImgSystem&);
00046
00047 size_t _memUse;
00048
00049 typedef HxLogMessage* LogMsgPtr;
00050 typedef std::list<LogMsgPtr> LogMsgList;
00051
00052 #pragma warning(disable: 4251)
00053 LogMsgList _logMsgList;
00054 #pragma warning(default: 4251)
00055
00056 bool _logOn;
00057 bool _logVerbose;
00058 HxLogMessage* _lastMsg;
00059 };
00060
00061 inline bool
00062 HxImgSystem::isLogging() const
00063 {
00064 return _logOn;
00065 }
00066
00067 #endif