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

HxImgFtorKey.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 HxImgFtorKey_h
00012 #define HxImgFtorKey_h
00013 
00014 #include "HxString.h"
00015 #include "HxStringList.h"
00016 #include "HxImgFtorKeyNameTable.h"
00017 
00018 
00025 class L_HXIMAGEREP HxImgFtorKey
00026 {
00027 public:
00029                             HxImgFtorKey();
00031                             HxImgFtorKey(const HxImgFtorKey&);
00033                             HxImgFtorKey(HxString className,
00034                                 HxStringListIter argListBegin,
00035                                 HxStringListIter argListEnd);
00037                             HxImgFtorKey(HxString className);
00038 
00040     void                    addArgument(HxString argName);
00042     void                    setArguments(
00043                                 HxStringListIter argListBegin,
00044                                 HxStringListIter argListEnd);
00045 
00047     HxString                getArgument(int) const;
00049     HxString                getClassName() const;
00050 
00052     HxString                toString() const;
00054     int                     compare(const HxImgFtorKey&) const;
00056     STD_OSTREAM&            put(STD_OSTREAM&) const;
00057 
00058 private:
00059     typedef unsigned short uShort;
00060 
00061     enum {maxKeySize = 8};
00062     uShort      _key[maxKeySize];
00063     static HxImgFtorKeyNameTable& nameTable();
00064 
00065 };
00066 
00067 inline STD_OSTREAM& 
00068 operator<<(STD_OSTREAM& os, const HxImgFtorKey& key) 
00069 {
00070     return key.put(os);
00071 }
00072 
00073 inline bool 
00074 operator<(const HxImgFtorKey& x, const HxImgFtorKey& y)
00075 {
00076     return x.compare(y) < 0;
00077 }
00078 
00079 inline bool 
00080 operator==(const HxImgFtorKey& x, const HxImgFtorKey& y)
00081 {
00082     return x.compare(y) == 0;
00083 }
00084 
00085 inline HxImgFtorKeyNameTable&
00086 HxImgFtorKey::nameTable()
00087 {
00088     return HxImgFtorKeyNameTable::instance();
00089 }
00090 
00091 
00092 #endif

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