00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef INCL_JUTIL_H
00022 #define INCL_JUTIL_H
00023
00024 #include <iterator>
00025 #include <string>
00026
00027 namespace jutil
00028 {
00029 template<class Iter, class Value>
00030 class ValueIterator : public Iter {
00031 public:
00032
00033 typedef std::bidirectional_iterator_tag iterator_category;
00034 typedef Value value_type;
00035 typedef ptrdiff_t difference_type;
00036 typedef value_type* pointer;
00037 typedef value_type& reference;
00038
00039 ValueIterator() : Iter() {}
00040 ValueIterator(const Iter& i)
00041 : Iter(i) {}
00042 ValueIterator(const ValueIterator& i)
00043 : Iter(i) {}
00044
00045 reference operator*() const
00046 {
00047 return Iter::operator*().second;
00048 }
00049
00050 pointer operator->() const
00051 {
00052 return &(Iter::operator*().second);
00053 }
00054
00055 };
00056
00057 std::string getTimeStamp();
00058
00059 struct CaseInsensitiveCmp {
00060 bool operator()(const std::string& lhs, const std::string& rhs) const;
00061 };
00062 }
00063
00064 #endif