Changeset 121:91c0fed3181e in lemon-main for lemon
- Timestamp:
- 04/12/08 20:41:48 (17 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/counter.h
r119 r121 30 30 { 31 31 32 template<class P> class _ SubNoCounter;32 template<class P> class _NoSubCounter; 33 33 34 34 template<class P> … … 42 42 43 43 typedef _SubCounter<_SubCounter<P> > SubCounter; 44 typedef _ SubNoCounter<_SubCounter<P> > SubNoCounter;44 typedef _NoSubCounter<_SubCounter<P> > NoSubCounter; 45 45 46 46 _SubCounter(P &parent) … … 65 65 66 66 template<class P> 67 class _ SubNoCounter67 class _NoSubCounter 68 68 { 69 69 P &_parent; 70 70 public: 71 typedef _ SubNoCounter<_SubNoCounter<P> > SubCounter;72 typedef _ SubNoCounter<_SubNoCounter<P> > SubNoCounter;71 typedef _NoSubCounter<_NoSubCounter<P> > SubCounter; 72 typedef _NoSubCounter<_NoSubCounter<P> > NoSubCounter; 73 73 74 _ SubNoCounter(P &parent) :_parent(parent) {}75 _ SubNoCounter(P &parent,std::string,std::ostream &)74 _NoSubCounter(P &parent) :_parent(parent) {} 75 _NoSubCounter(P &parent,std::string,std::ostream &) 76 76 :_parent(parent) {} 77 _ SubNoCounter(P &parent,std::string)77 _NoSubCounter(P &parent,std::string) 78 78 :_parent(parent) {} 79 _ SubNoCounter(P &parent,const char *,std::ostream &)79 _NoSubCounter(P &parent,const char *,std::ostream &) 80 80 :_parent(parent) {} 81 _ SubNoCounter(P &parent,const char *)81 _NoSubCounter(P &parent,const char *) 82 82 :_parent(parent) {} 83 ~_ SubNoCounter() {}84 _ SubNoCounter &operator++() { ++_parent; return *this;}83 ~_NoSubCounter() {} 84 _NoSubCounter &operator++() { ++_parent; return *this;} 85 85 int operator++(int) { _parent++; return 0;} 86 _ SubNoCounter &operator--() { --_parent; return *this;}86 _NoSubCounter &operator--() { --_parent; return *this;} 87 87 int operator--(int) { _parent--; return 0;} 88 _ SubNoCounter &operator+=(int c) { _parent+=c; return *this;}89 _ SubNoCounter &operator-=(int c) { _parent-=c; return *this;}88 _NoSubCounter &operator+=(int c) { _parent+=c; return *this;} 89 _NoSubCounter &operator-=(int c) { _parent-=c; return *this;} 90 90 void reset(int) {} 91 91 void reset() {} … … 118 118 ///\todo document please. 119 119 /// 120 typedef _ SubNoCounter<Counter> SubNoCounter;120 typedef _NoSubCounter<Counter> NoSubCounter; 121 121 122 122 ///\e … … 157 157 { 158 158 public: 159 typedef _ SubNoCounter<NoCounter> SubCounter;160 typedef _ SubNoCounter<NoCounter> SubNoCounter;159 typedef _NoSubCounter<NoCounter> SubCounter; 160 typedef _NoSubCounter<NoCounter> NoSubCounter; 161 161 162 162 NoCounter() {}
Note: See TracChangeset
for help on using the changeset viewer.