00001 #ifndef _IT_BUS_PERSISTENT_MAP_H_
00002 #define _IT_BUS_PERSISTENT_MAP_H_
00003
00004
00005
00006
00007 #include <it_bus_pdk/persistent_map_base.h>
00008
00009 namespace IT_Bus
00010 {
00011 template<class Key, class Data>
00012 class PersistentMap : private PersistentMapBase<
00013 Key, Data,
00014 PODPersistenceHandler<Key>, PODPersistenceHandler<Data> >
00015 {
00016 public:
00017 typedef PersistentMapBase<
00018 Key, Data,
00019 PODPersistenceHandler<Key>, PODPersistenceHandler<Data>
00020 > BaseClass;
00021
00022 typedef IT_TYPENAME BaseClass::key_type key_type;
00023 typedef IT_TYPENAME BaseClass::data_type data_type;
00024 typedef IT_TYPENAME BaseClass::reference_type reference_type;
00025 typedef IT_TYPENAME BaseClass::const_reference_type const_reference_type;
00026 typedef IT_TYPENAME BaseClass::value_type value_type;
00027 typedef IT_TYPENAME BaseClass::size_type size_type;
00028 typedef IT_TYPENAME BaseClass::difference_type difference_type;
00029
00030 typedef IT_TYPENAME BaseClass::iterator iterator;
00031
00032 PersistentMap(
00033 const char* id,
00034 DBConfig* cfg
00035 );
00036 PersistentMap(
00037 const char* id,
00038 DBConfig* cfg,
00039 const value_type* first,
00040 const value_type* last
00041 );
00042 PersistentMap(
00043 const PersistentMap<Key, Data>& mp
00044 );
00045 ~PersistentMap();
00046
00047 PersistentMap<Key, Data>&
00048 operator=(
00049 const PersistentMap<Key, Data>& mp
00050 );
00051
00052 BaseClass::begin;
00053 BaseClass::end;
00054 BaseClass::insert;
00055 BaseClass::erase;
00056 BaseClass::find;
00057 BaseClass::empty;
00058 BaseClass::size;
00059 };
00060 }
00061
00062 #if IT_SUPPORTS_COMPILE_TIME_INSTANTIATION
00063 #include <it_bus_pdk/persistent_map.cxx>
00064 #endif
00065
00066 #endif