Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxImgSystem.h

00001 /*
00002  *  Copyright (c) 2000, University of Amsterdam, The Netherlands.
00003  *  All rights reserved.
00004  *
00005  *
00006  *  Author(s):
00007  *  Edo Poll (poll@wins.uva.nl)
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     // Message log
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

Generated on Mon Jan 27 15:48:45 2003 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001