11 #ifndef _TUPLEKEYMAPI_H_ 12 #define _TUPLEKEYMAPI_H_ 16 #include "NamespaceHeader.H" 18 #define Tuple2 std::pair<T1, T2> 19 #define Tuple3 std::pair<Tuple2, T3> 20 #define Tuple4 std::pair<Tuple3, T4> 21 #define TupleTypenames typename T1, typename T2, typename T3, typename T4 22 #define TupleArgTypes T1,T2,T3,T4 23 #define TupleArgValues arg1,arg2,arg3,arg4 24 #define TupleArgDecls T1 arg1, T2 arg2, T3 arg3, T4 arg4 35 typedef std::map< Tuple4, ValueT >
RepType;
46 ValueT
fetch( ConstIteratorType )
const;
65 template<TupleTypenames,
typename ValueT> ValueT
71 Tuple3 tuple3(tuple2,arg3);
72 Tuple4 tuple4(tuple3,arg4);
74 Tuple4 const & item( tuple4 );
75 typename RepType::const_iterator iter =
m_rep.find( item );
79 template<TupleTypenames,
typename ValueT> ValueT
86 template<TupleTypenames,
typename ValueT>
bool 91 Tuple3 tuple3(tuple2,arg3);
92 Tuple4 tuple4(tuple3,arg4);
94 Tuple4 const & item( tuple4 );
97 *iter =
m_rep.find( item );
98 return !((*iter) ==
m_rep.end());
102 return !(it ==
m_rep.end());
106 template<TupleTypenames,
typename ValueT>
void 115 Tuple3 tuple3(tuple2,arg3);
116 Tuple4 tuple4(tuple3,arg4);
118 Tuple4 const & item( tuple4 );
123 template<TupleTypenames,
typename ValueT>
128 std::cout <<
"TupleKeyMap::report(): unique arg combinations: " 129 <<
m_rep.size() << std::endl;
134 template<TupleTypenames,
typename ValueT>
void 143 #undef TupleTypenames 147 #include "NamespaceFooter.H" 148 #endif // _TUPLEKEYMAPI_H_ #define CH_assert(cond)
Definition: CHArray.H:37
unsigned size()
Definition: TupleKeyMapI.H:52
bool containsKey(TupleArgDecls, ConstIteratorType *i=0) const
Definition: TupleKeyMapI.H:87
ValueT fetch(TupleArgDecls) const
Definition: TupleKeyMapI.H:66
Definition: TupleKeyMapI.H:33
#define Tuple2
Definition: TupleKeyMapI.H:18
#define TupleArgDecls
Definition: TupleKeyMapI.H:24
RepType m_rep
Definition: TupleKeyMapI.H:58
void insert(TupleArgDecls, ValueT)
Definition: TupleKeyMapI.H:107
std::map< Tuple4, ValueT > RepType
Definition: TupleKeyMapI.H:35
#define Tuple4
Definition: TupleKeyMapI.H:20
#define Tuple3
Definition: TupleKeyMapI.H:19
void clear()
Definition: TupleKeyMapI.H:135
#define TupleArgValues
Definition: TupleKeyMapI.H:23
RepType::const_iterator ConstIteratorType
Definition: TupleKeyMapI.H:38
void report() const
Definition: TupleKeyMapI.H:125