From ba0974e1a54a3c1ed4f39ef836eabebf271cc773 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Mon, 23 Dec 2019 19:43:23 -0800 Subject: [PATCH] drop unimplemented Value iteration --- src/pvxs/data.h | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/src/pvxs/data.h b/src/pvxs/data.h index 843b53d..ec0cd88 100644 --- a/src/pvxs/data.h +++ b/src/pvxs/data.h @@ -467,48 +467,6 @@ public: inline Value operator[](const std::string& name) { return (*this)[name.c_str()]; } const Value operator[](const char *name) const; inline const Value operator[](const std::string& name) const { return (*this)[name.c_str()]; } - -private: - template friend class _iterator; - // these cheat on const-ness - void _step(const Value& child, bool next) const; - void _first_child(const Value& child) const; - - template - class _iterator { - V *parent; - V child; - friend class Value; - public: - _iterator() :parent(nullptr) {} - explicit _iterator(V* parent) :parent(parent) {} - - V& operator*() { return child; } - V* operator->() { return &child; } - - // ++(*this) - inline _iterator& operator++() { parent->_step(child, true); return *this; } - // (*this)++ - inline _iterator operator++(int) { _iterator ret(*this); parent->_step(child, true); return ret;} - // --(*this) - inline _iterator& operator--() { parent->_step(child, false); return *this; } - // (*this)-- - inline _iterator operator--(int) { _iterator ret(*this); parent->_step(child, false); return ret;} - - inline bool operator==(const _iterator& o) const { return child.compareInst(o.child)==0; } - inline bool operator!=(const _iterator& o) const { return !((*this)==o); } - }; -public: - typedef _iterator iterator; - typedef _iterator const_iterator; - - inline iterator begin() { iterator ret(this); _first_child(ret.child); return ret;} - inline const_iterator cbegin() const { const_iterator ret(this); _first_child(ret.child); return ret;} - inline const_iterator begin() const { return cbegin(); } - - inline iterator end() { iterator ret(this); return ret;} - inline const_iterator cend() const { const_iterator ret(this); return ret;} - inline const_iterator end() const { return cend(); } }; PVXS_API