7 #ifndef __data_RecordMap_h__ 8 #define __data_RecordMap_h__ 15 class RecordMap :
public WatcherI
18 typedef std::map<T, Record> t_T_record;
20 RecordMap(
const Accessor<T> aKey);
21 virtual ~RecordMap(
void);
24 void add(
const Record &record);
25 void remove(
const Record &record);
28 Record lookup(
const T &t);
31 std::map<T, Record> m_table;
36 RecordMap<T>::RecordMap(
const Accessor<T> aKey)
42 RecordMap<T>::~RecordMap(
void)
47 void RecordMap<T>::add(
const Record &record)
49 if(m_aKey.check(record))
51 m_table[m_aKey(record)] = record;
56 void RecordMap<T>::remove(
const Record &record)
58 if(m_aKey.check(record))
60 typename t_T_record::iterator it = m_table.find(m_aKey(record));
61 if(it != m_table.end())
63 if(record == it->second)
72 void RecordMap<T>::clear(
void)
78 Record RecordMap<T>::lookup(
const T &t)
80 typename t_T_record::iterator it = m_table.find(t);
81 if(it == m_table.end())
kernel
Definition: namespace.dox:3