Changeset 168:8ceb318224b1 in lemon-1.2
- Timestamp:
- 06/14/08 19:52:08 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/counter.h
r160 r168 60 60 _SubCounter &operator+=(int c) { count+=c; return *this;} 61 61 _SubCounter &operator-=(int c) { count-=c; return *this;} 62 void reset(int c=0) {count=c;}63 62 operator int() {return count;} 64 63 }; … … 88 87 _NoSubCounter &operator+=(int c) { _parent+=c; return *this;} 89 88 _NoSubCounter &operator-=(int c) { _parent-=c; return *this;} 90 void reset(int) {}91 void reset() {}92 89 operator int() {return 0;} 93 90 }; … … 204 201 Counter &operator-=(int c) { count-=c; return *this;} 205 202 /// Resets the counter to the given value. 203 204 /// Resets the counter to the given value. 205 /// \note This function does not reset the values of 206 /// \ref SubCounter "SubCounter"s but it resets \ref NoSubCounter 207 /// "NoSubCounter"s along with the main counter. 206 208 void reset(int c=0) {count=c;} 207 209 /// Returns the value of the counter.
Note: See TracChangeset
for help on using the changeset viewer.