fgerlits commented on code in PR #1400: URL: https://github.com/apache/nifi-minifi-cpp/pull/1400#discussion_r973022579
########## libminifi/include/core/Processor.h: ########## @@ -29,19 +29,36 @@ #include <unordered_set> #include <unordered_map> #include <utility> +#include <vector> #include "ConfigurableComponent.h" #include "Connectable.h" #include "Core.h" #include "core/Annotation.h" #include "Scheduling.h" #include "utils/TimeUtil.h" +#include "core/state/nodes/MetricsBase.h" +#include "utils/gsl.h" + +#if WIN32 +#define ADD_GET_PROCESSOR_NAME \ + std::string getProcessorType() const override { \ + return org::apache::nifi::minifi::utils::StringUtils::split(__FUNCDNAME__, "@")[1]; \ + } +#else +#define ADD_GET_PROCESSOR_NAME \ + std::string getProcessorType() const override { \ + auto splitted = org::apache::nifi::minifi::utils::StringUtils::split(__PRETTY_FUNCTION__, "::"); \ + return splitted[splitted.size() - 2]; \ + } +#endif Review Comment: We already have `minifi::core::getClassName()`, so we'd just need do `getClassName<decltype(*this)>`, split it at the `::`s and use the last bit. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org