#ifndef CT_VALUEANDBOOL_H #define CT_VALUEANDBOOL_H #include "ctlibmetrics/ctlibmetrics_global.h" #include "ct_tools/ct_numerictostringconversiont.h" #include "ct_tools/ct_stringtonumericconversiont.h" class CTLIBMETRICS_EXPORT CT_AbstractVaB { public: CT_AbstractVaB() : used(true) {} CT_AbstractVaB(const CT_AbstractVaB &other) { used = other.used; // value not copied ! } virtual ~CT_AbstractVaB() {} bool used; virtual void* valueToVoidPtr() const = 0; }; template class VaB : public CT_AbstractVaB { public: VaB() : CT_AbstractVaB() {} VaB(const VaB &other) : CT_AbstractVaB(other) {} VaB& operator=(const VaB &other) { used = other.used; // value not copied ! return *this; } void* valueToVoidPtr() const { return (void*)&value; } VType value; }; #endif // CT_VALUEANDBOOL_H