libUTL++
BidIt.h
1 #pragma once
2 
4 
5 #include <libutl/FwdIt.h>
6 
8 
9 UTL_NS_BEGIN;
10 
12 
23 
25 class BidIt : public FwdIt
26 {
29 
30 public:
36  virtual void reverse(size_t dist = 1) = 0;
37 
43  {
44  reverse();
45  return *this;
46  }
47 
52  void operator--(int)
53  {
54  reverse();
55  }
56 
62  BidIt& operator-=(size_t dist)
63  {
64  reverse(dist);
65  return *this;
66  }
67 
68 public:
69  // for STL
70  typedef Object* value_type;
71  typedef Object*& reference;
72  typedef Object** pointer;
73  typedef std::bidirectional_iterator_tag iterator_category;
74  typedef std::ptrdiff_t difference_type;
75 };
76 
78 
79 UTL_NS_END;
80 
82 
83 #include <libutl/TBidIt.h>
#define UTL_CLASS_DEFID
Default init() and deInit() (which are merely place-holders).
Definition: macros.h:532
void reverse(const BidIt &begin, const BidIt &end)
Reverse a sequence.
Forward iterator abstraction.
Definition: FwdIt.h:26
BidIt & operator-=(size_t dist)
Decrement operator.
Definition: BidIt.h:62
BidIt & operator--()
Pre-decrement operator.
Definition: BidIt.h:42
#define UTL_CLASS_DECL_ABC(DC, BC)
Declaration of standard UTL++ functionality for an abstract base class (ABC).
Definition: macros.h:650
Bi-directional iterator abstraction.
Definition: BidIt.h:25
void operator--(int)
Post-decrement operator.
Definition: BidIt.h:52
Root of UTL++ class hierarchy.
Definition: Object.h:52