diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-01-18 01:49:27 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-06-13 17:29:47 +0100 |
commit | 82412f7fe58608b26d8db96568f333182f481bf8 (patch) | |
tree | ca2883867803bb7a05694ff2f268753f5358f55d | |
parent | Remove remaining support code for old school DB selects (diff) | |
download | p2pvr-82412f7fe58608b26d8db96568f333182f481bf8.tar.bz2 p2pvr-82412f7fe58608b26d8db96568f333182f481bf8.tar.xz p2pvr-82412f7fe58608b26d8db96568f333182f481bf8.zip |
Remove unused MapIterator
-rw-r--r-- | p2pvr/lib/mapIterator.cpp | 11 | ||||
-rw-r--r-- | p2pvr/lib/mapIterator.h | 44 |
2 files changed, 0 insertions, 55 deletions
diff --git a/p2pvr/lib/mapIterator.cpp b/p2pvr/lib/mapIterator.cpp deleted file mode 100644 index 157669a..0000000 --- a/p2pvr/lib/mapIterator.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include <pch.hpp> -#include "mapIterator.h" -#include "p2Helpers.h" - -template<> -void BindColumns<std::pair<unsigned short const, unsigned short>>(RowState & rs, std::pair<unsigned short const, unsigned short> const & p) -{ - rs.fields[0] << p.first; - rs.fields[1] << p.second; -} - diff --git a/p2pvr/lib/mapIterator.h b/p2pvr/lib/mapIterator.h deleted file mode 100644 index 70aa424..0000000 --- a/p2pvr/lib/mapIterator.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef MAPITERATOR_H -#define MAPITERATOR_H - -#include <iHaveSubTasks.h> -#include "objectRowState.h" - -template <typename T> -class MapIterator : public IHaveSubTasks { - public: - template <typename ... Parents> - MapIterator(const ColumnSpecifier & cs, const T * m, const Parents & ... p) : - SourceObject(__PRETTY_FUNCTION__), - IHaveSubTasks(NULL), - binder(boost::bind(&BindColumns<typename T::value_type, Parents...>, _1, _2, p...)), - columnSpecifier(cs), - map(m) - { - } - - void execute(ExecContext * ec) const - { - ObjectRowState<typename T::value_type> rs(columnSpecifier); - for (const auto & i : *map) { - binder(rs, i); - rs.process(boost::bind(&MapIterator::executeChildren, this, ec)); - } - } - - private: - boost::function<void(RowState &, const typename T::value_type &)> binder; - const ColumnSpecifier columnSpecifier; - const T * map; - - void executeChildren(ExecContext * ec) const - { - for (const Tasks::value_type & sq : normal) { - sq->execute(ec); - } - } -}; - -#endif - - |