#pragma once #include #include #include "Enum.h" #include "Types.h" #include "ParameterTypeSelector.h" template class enumHelper; template <> class enumHelper { public: static bool isValid(EnumIF *anEnum) { return anEnum->isValid(); } #ifdef FSFW_INTROSPECTION template static Types::ParameterType getType() { return Types::ENUM; } template static T getMin() { return 0; } template static T getMax() { return 0; } static std::vector getEnumValues() { return std::vector(); } static std::vector getEnumValues(EnumIF *anEnum) { std::vector vector; for (size_t i = 0; i < anEnum->getSize(); i++) { vector.push_back(anEnum->getElements()[i]); } return vector; } static const char *const *getEnumDescriptions(EnumIF *anEnum) { return anEnum->getDescriptions(); } #endif }; template <> class enumHelper { public: static bool isValid(void *) { return true; } #ifdef FSFW_INTROSPECTION template static Types::ParameterType getType() { return ParameterTypeSelector::getType(); } template static T getMin() { return std::numeric_limits::lowest(); } template static T getMax() { return std::numeric_limits::max(); } static std::vector getEnumValues(void *) { return std::vector(); } static const char *const *getEnumDescriptions(void *) { return nullptr; } #endif };