11 #ifndef _TUPLEKEYMAPI_H_ 12 #define _TUPLEKEYMAPI_H_ 17 #include "NamespaceHeader.H" 19 #define Tuple2 std::pair<T1, T2> 20 #define Tuple3 std::pair<Tuple2, T3> 21 #define Tuple4 std::pair<Tuple3, T4> 22 #define TupleTypenames typename T1, typename T2, typename T3, typename T4 23 #define TupleArgTypes T1,T2,T3,T4 24 #define TupleArgValues arg1,arg2,arg3,arg4 25 #define TupleArgDecls T1 arg1, T2 arg2, T3 arg3, T4 arg4 36 typedef std::map< Tuple4, ValueT >
RepType;
47 ValueT
fetch( ConstIteratorType )
const;
66 template<TupleTypenames,
typename ValueT> ValueT
72 Tuple3 tuple3(tuple2,arg3);
73 Tuple4 tuple4(tuple3,arg4);
75 Tuple4 const & item( tuple4 );
76 typename RepType::const_iterator iter =
m_rep.find( item );
80 template<TupleTypenames,
typename ValueT> ValueT
87 template<TupleTypenames,
typename ValueT>
bool 92 Tuple3 tuple3(tuple2,arg3);
93 Tuple4 tuple4(tuple3,arg4);
95 Tuple4 const & item( tuple4 );
98 *iter =
m_rep.find( item );
99 return !((*iter) ==
m_rep.end());
103 return !(it ==
m_rep.end());
107 template<TupleTypenames,
typename ValueT>
void 116 Tuple3 tuple3(tuple2,arg3);
117 Tuple4 tuple4(tuple3,arg4);
119 Tuple4 const & item( tuple4 );
124 template<TupleTypenames,
typename ValueT>
129 pout() <<
"TupleKeyMap::report(): unique arg combinations: " 130 <<
m_rep.size() << std::endl;
135 template<TupleTypenames,
typename ValueT>
void 144 #undef TupleTypenames 148 #include "NamespaceFooter.H" 149 #endif // _TUPLEKEYMAPI_H_ std::ostream & pout()
Use this in place of std::cout for program output.
#define CH_assert(cond)
Definition: CHArray.H:37
unsigned size()
Definition: TupleKeyMapI.H:53
bool containsKey(TupleArgDecls, ConstIteratorType *i=0) const
Definition: TupleKeyMapI.H:88
ValueT fetch(TupleArgDecls) const
Definition: TupleKeyMapI.H:67
Definition: TupleKeyMapI.H:34
#define Tuple2
Definition: TupleKeyMapI.H:19
#define TupleArgDecls
Definition: TupleKeyMapI.H:25
RepType m_rep
Definition: TupleKeyMapI.H:59
void insert(TupleArgDecls, ValueT)
Definition: TupleKeyMapI.H:108
std::map< Tuple4, ValueT > RepType
Definition: TupleKeyMapI.H:36
#define Tuple4
Definition: TupleKeyMapI.H:21
#define Tuple3
Definition: TupleKeyMapI.H:20
void clear()
Definition: TupleKeyMapI.H:136
#define TupleArgValues
Definition: TupleKeyMapI.H:24
RepType::const_iterator ConstIteratorType
Definition: TupleKeyMapI.H:39
void report() const
Definition: TupleKeyMapI.H:126