00001 #ifndef CDBBDB_SIMPLE_CACHE_HH
00002 #define CDBBDB_SIMPLE_CACHE_HH
00003
00004
00005
00006
00007 #include "CdbBdb/CdbBdbCache.hh"
00008
00009 #include <oo.h>
00010
00011 #include <string>
00012 #include <map>
00013
00014
00015
00016
00017
00018
00019
00020
00021 class CdbBdbSimpleCache : public CdbBdbCache< ooRef(ooObj) > {
00022
00023 public:
00024
00025
00026
00027 CdbBdbSimpleCache( );
00028
00029
00030
00031 virtual ~CdbBdbSimpleCache( );
00032
00033
00034
00035
00036
00037
00038
00039 virtual void addObject( const ooRef(ooObj)& theKeyRef,
00040 const ooRef(ooObj)& theValueRef );
00041
00042
00043
00044
00045
00046
00047
00048 virtual ooRef(ooObj) findObject( const ooRef(ooObj)& theKeyRef ) const;
00049
00050
00051
00052
00053
00054
00055
00056 virtual CdbItr<ooRef(ooObj)> iterator( ) const;
00057
00058 public:
00059
00060
00061
00062
00063
00064 static std::string refToString( const ooRef(ooObj)& theRef );
00065
00066
00067
00068
00069
00070 static ooRef(ooObj) stringToRef( const std::string& theString );
00071
00072 private:
00073
00074
00075
00076 std::map<std::string, ooRef(ooObj)>* _dict;
00077 };
00078
00079 #endif