20 #ifndef H_GUARD_SYM_PRED_H
21 #define H_GUARD_SYM_PRED_H
30 template <
class TKey,
bool IREFLEXIVE>
33 typedef std::pair<TKey , TKey >
TItem;
42 bool chk(TKey k1, TKey k2)
const {
44 const TItem item(k1, k2);
48 bool add(TKey k1, TKey k2) {
52 const TItem item(k1, k2);
53 return cont_.insert(item).second;
56 bool del(TKey k1, TKey k2) {
60 const TItem item(k1, k2);
61 return !!
cont_.erase(item);
65 template <
class TKey,
class TVal>
68 typedef std::pair<TKey , TKey >
TItem;
69 typedef std::map<TItem, TVal>
TMap;
84 void add(TKey k1, TKey k2, TVal val) {
86 const TItem key(k1, k2);
92 bool chk(TVal *pDst, TKey k1, TKey k2)
const {
94 const TItem key(k1, k2);
96 typename TMap::const_iterator it =
db_.find(key);