00001 #ifndef IFDSTRKEY_HH
00002 #define IFDSTRKEY_HH
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "ProxyDict/IfdKey.h"
00027 #if !(defined(__GNUC__) && (__GNUC__ < 3) && (__GNUC_MINOR__ < 95)) // BABAR_IOSTREAMS_MIGRATION
00028 #include <iostream>
00029 #else // BABAR_IOSTREAMS_MIGRATION
00030 #include <iostream.h>
00031 #endif // BABAR_IOSTREAMS_MIGRATION
00032 #include <stdlib.h>
00033 #include <string.h>
00034 #ifndef VXWORKS
00035 #include <string>
00036 #endif
00037
00038
00039 class IfdStrKey : public IfdKey {
00040 public:
00041 enum { IFDKEY_BUFSIZE=32 };
00042
00043 IfdStrKey( const char *s );
00044 #ifndef VXWORKS
00045 IfdStrKey( const std::string& s );
00046 #endif
00047 virtual ~IfdStrKey();
00048
00049 virtual int operator==( const IfdKey& k ) const;
00050 virtual int operator< ( const IfdKey& k ) const;
00051
00052
00053 virtual IfdKey* clone(void) const;
00054
00055
00056 const char* asString(void) const { return strVal; }
00057 #if !(defined(__GNUC__) && (__GNUC__ < 3) && (__GNUC_MINOR__ < 95)) // BABAR_IOSTREAMS_MIGRATION
00058 virtual void print( std::ostream &o) const;
00059 #else // BABAR_IOSTREAMS_MIGRATION
00060 virtual void print( ostream &o) const;
00061 #endif // BABAR_IOSTREAMS_MIGRATION
00062
00063 protected:
00064
00065
00066 private:
00067 IfdStrKey( const char *s, unsigned int hashVal );
00068
00069
00070
00071
00072
00073 IfdStrKey( const IfdStrKey &);
00074 IfdStrKey& operator=( IfdStrKey &);
00075
00076
00077
00078
00079
00080
00081 char _stringBuf[ IFDKEY_BUFSIZE ];
00082 bool _onHeap;
00083
00084 };
00085
00086
00087 #endif