Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 namespace std
00032 {
00033 namespace __regex
00034 {
00035
00036 struct _PatternCursor
00037 {
00038 virtual ~_PatternCursor() { };
00039 virtual void _M_next() = 0;
00040 virtual bool _M_at_end() const = 0;
00041 };
00042
00043
00044 template<typename _FwdIterT>
00045 class _SpecializedCursor
00046 : public _PatternCursor
00047 {
00048 public:
00049 _SpecializedCursor(const _FwdIterT& __b, const _FwdIterT __e)
00050 : _M_b(__b), _M_c(__b), _M_e(__e)
00051 { }
00052
00053 typename std::iterator_traits<_FwdIterT>::value_type
00054 _M_current() const
00055 { return *_M_c; }
00056
00057 void
00058 _M_next()
00059 { ++_M_c; }
00060
00061 _FwdIterT
00062 _M_pos() const
00063 { return _M_c; }
00064
00065 const _FwdIterT&
00066 _M_begin() const
00067 { return _M_b; }
00068
00069 const _FwdIterT&
00070 _M_end() const
00071 { return _M_e; }
00072
00073 bool
00074 _M_at_end() const
00075 { return _M_c == _M_e; }
00076
00077 private:
00078 _FwdIterT _M_b;
00079 _FwdIterT _M_c;
00080 _FwdIterT _M_e;
00081 };
00082
00083
00084 template<typename _FwdIterT>
00085 inline _SpecializedCursor<_FwdIterT>
00086 __cursor(const _FwdIterT& __b, const _FwdIterT __e)
00087 { return _SpecializedCursor<_FwdIterT>(__b, __e); }
00088
00089 }
00090 }
00091
00092