From 33ac55b05980194fe93b9cec85ff0b3ca121cd97 Mon Sep 17 00:00:00 2001 From: Johannes Wendel Date: Wed, 9 Oct 2019 23:04:26 +0200 Subject: [PATCH] some working version --- .../networking/output/ItemVarHolder.h | 48 ------------------- 1 file changed, 48 deletions(-) delete mode 100644 FlippR-Driver/networking/output/ItemVarHolder.h diff --git a/FlippR-Driver/networking/output/ItemVarHolder.h b/FlippR-Driver/networking/output/ItemVarHolder.h deleted file mode 100644 index e951931..0000000 --- a/FlippR-Driver/networking/output/ItemVarHolder.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// Created by johannes on 29.08.19. -// - -#ifndef FLIPPR_DRIVER_ITEMVARHOLDER_H -#define FLIPPR_DRIVER_ITEMVARHOLDER_H - -#include -#include - -#include "output/items/Item.h" - - -template <> -class Poco::Dynamic::VarHolderImpl> : public Poco::Dynamic::VarHolder -{ -public: - VarHolderImpl(const std::shared_ptr & item) : - item(item) - {} - - void convert(std::string & val) const override - { - val = this->item->get_name(); - } - - VarHolder * clone(Placeholder < VarHolder > * pHolder = 0) const override - { - return cloneHolder(pHolder, item); - } - - const std::type_info & type() const override - { - return typeid(item); - } - - const std::shared_ptr & value() const - { - return item; - } - -private: - std::shared_ptr item; - -}; - - -#endif //FLIPPR_DRIVER_ITEMVARHOLDER_H