Main Page   Class Overview   Pixels   Images   Geometry   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 
00039     void                    addImgFtorObserver(HxImgFtorObserver*);
00040 
00041     STD_OSTREAM&            put(STD_OSTREAM&) const;
00042 
00043                             ~HxImgFtorTable();
00044 
00045 protected:
00046                             HxImgFtorTable();
00047                             HxImgFtorTable(const HxImgFtorTable&);
00048 
00049 private:
00050     typedef std::map<HxImgFtorKey,
00051         HxImgFunctor*, std::less<HxImgFtorKey> >    Map;
00052     typedef std::list<HxImgFtorObserver*>           ObserverList;
00053 
00054 #pragma warning (disable : 4251)
00055     Map                     _map;
00056     ObserverList            _observerList;
00057 #pragma warning (default : 4251)
00058 };
00059 
00060 inline STD_OSTREAM& 
00061 operator << (STD_OSTREAM& os,const HxImgFtorTable& t)
00062 {
00063     return t.put(os);
00064 }
00065 
00066 
00067 #endif

Generated on Tue Jan 8 13:59:14 2002 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001