adamdebreceni commented on code in PR #1930:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1930#discussion_r2213383357


##########
libminifi/test/libtest/unit/TestBase.h:
##########
@@ -201,13 +201,56 @@ class TempDirectory {
   bool is_owner_;
 };
 
+template<typename T>
+class TypedProcessorWrapper {
+ public:
+  TypedProcessorWrapper() = default;
+  TypedProcessorWrapper(core::Processor* proc): proc_(proc) {  // 
NOLINT(runtime/explicit)
+    if (proc_) {
+      proc_->getImpl<T>();
+    }
+  }
+
+  explicit operator bool() const {
+    return proc_ != nullptr;
+  }
+
+  operator core::Processor*() const {

Review Comment:
   the purpose of this class is to behave as a core::Processor* while also 
storing the underlying type so we don't have to specify it when accessing it, 
having explicit conversions or otherwise adding frictions defeats the purpose



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to