diff options
Diffstat (limited to 'src/core/function/basic')
-rw-r--r-- | src/core/function/basic/ChannelObject.cpp | 11 | ||||
-rw-r--r-- | src/core/function/basic/ChannelObject.h | 3 | ||||
-rw-r--r-- | src/core/function/basic/GpgFunctionObject.h | 3 |
3 files changed, 13 insertions, 4 deletions
diff --git a/src/core/function/basic/ChannelObject.cpp b/src/core/function/basic/ChannelObject.cpp index 7a41d4d1..3f040ca6 100644 --- a/src/core/function/basic/ChannelObject.cpp +++ b/src/core/function/basic/ChannelObject.cpp @@ -28,13 +28,20 @@ #include "ChannelObject.h" +#include <ostream> +#include <utility> +#include <iostream> + namespace GpgFrontend { ChannelObject::ChannelObject() noexcept = default; -ChannelObject::ChannelObject(int channel) : channel_(channel) {} +ChannelObject::ChannelObject(int channel, std::string type) + : channel_(channel), type_(std::move(type)) {} -ChannelObject::~ChannelObject() noexcept = default; +ChannelObject::~ChannelObject() noexcept { + std::cout << "deleting channel object: " << type_ << std::endl; +} void ChannelObject::SetChannel(int channel) { this->channel_ = channel; } diff --git a/src/core/function/basic/ChannelObject.h b/src/core/function/basic/ChannelObject.h index 6fb315ae..18317ee2 100644 --- a/src/core/function/basic/ChannelObject.h +++ b/src/core/function/basic/ChannelObject.h @@ -55,7 +55,7 @@ class GPGFRONTEND_CORE_EXPORT ChannelObject { * * @param channel */ - explicit ChannelObject(int channel); + explicit ChannelObject(int channel, std::string type); /** * @brief Get the Default Channel object @@ -80,6 +80,7 @@ class GPGFRONTEND_CORE_EXPORT ChannelObject { private: int channel_ = kGpgFrontendDefaultChannel; ///< The channel id + std::string type_; }; template <typename Derived> diff --git a/src/core/function/basic/GpgFunctionObject.h b/src/core/function/basic/GpgFunctionObject.h index dd06608d..afe81131 100644 --- a/src/core/function/basic/GpgFunctionObject.h +++ b/src/core/function/basic/GpgFunctionObject.h @@ -216,7 +216,8 @@ class SingletonFunctionObject : public ChannelObject { * * @param channel */ - explicit SingletonFunctionObject(int channel) : ChannelObject(channel) {} + explicit SingletonFunctionObject(int channel) + : ChannelObject(channel, typeid(T).name()) {} /** * @brief Destroy the Singleton Function Object object |