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

HxImgFtorTable.h

00001 /*
00002  *  Copyright (c) 1999, University of Amsterdam, The Netherlands.
00003  *  All rights reserved.
00004  *
00005  *  Author(s):
00006  *  Edo Poll                (poll@wins.uva.nl)
00007  *  Marc Navarro            (mnavarro@wins.uva.nl)
00008  *  Dennis Koelma           (koelma@wins.uva.nl)
00009  */
00010 
00011 #ifndef HxImgFtorTable_h
00012 #define HxImgFtorTable_h
00013 
00014 #include "HxString.h"
00015 #include "HxImgFtorKey.h"
00016 #include "HxIoFwd.h"
00017 
00018 #include <map>
00019 
00020 class HxImgFunctor;
00021 class HxImgFtorObserver;
00022 
00023 
00026 class L_HXIMAGEREP HxImgFtorTable
00027 {
00028 public:
00029 
00031     static HxImgFtorTable&  instance();
00032 
00034     void                    insert(const HxImgFtorKey& key, HxImgFunctor* f);
00035 
00037     HxImgFunctor*           find(const HxImgFtorKey& key);
00038 
00040     void                    addImgFtorObserver(HxImgFtorObserver*);
00041 
00043     STD_OSTREAM&            put(STD_OSTREAM&) const;
00044 
00046                             ~HxImgFtorTable();
00047 
00048 protected:
00049                             HxImgFtorTable();
00050                             HxImgFtorTable(const HxImgFtorTable&);
00051 
00052 private:
00053     typedef std::map<HxImgFtorKey,
00054         HxImgFunctor*, std::less<HxImgFtorKey> >    Map;
00055     typedef std::list<HxImgFtorObserver*>           ObserverList;
00056 
00057 #pragma warning (disable : 4251)
00058     Map                     _map;
00059     ObserverList            _observerList;
00060 #pragma warning (default : 4251)
00061 };
00062 
00063 inline STD_OSTREAM& 
00064 operator << (STD_OSTREAM& os,const HxImgFtorTable& t)
00065 {
00066     return t.put(os);
00067 }
00068 
00069 
00070 #endif

Generated on Tue Feb 3 14:18:38 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001