hunyadi-dev commented on a change in pull request #866:
URL: https://github.com/apache/nifi-minifi-cpp/pull/866#discussion_r468453686



##########
File path: extensions/libarchive/MergeContent.h
##########
@@ -259,6 +261,42 @@ class ZipMerge: public ArchiveMerge, public MergeBin {
   }
 };
 
+class AttributeMerger {
+public:
+  AttributeMerger(core::ProcessSession *session, 
std::deque<std::shared_ptr<org::apache::nifi::minifi::core::FlowFile>> &flows, 
std::shared_ptr<core::FlowFile> &mergeFlow)
+    : session_(session)
+    , flows_(flows)
+    , mergeFlow_(mergeFlow) {}
+  void mergeAttributes();
+  virtual ~AttributeMerger() = default;
+protected:
+  std::map<std::string, std::string> getCommonAttributes();
+  virtual void processFlowFile(const std::shared_ptr<core::FlowFile> &flow, 
std::map<std::string, std::string>& commonAttributes) = 0;
+
+  std::deque<std::shared_ptr<core::FlowFile>> &flows_;

Review comment:
       I take it back, I see that this is actually a reference to the 
`BinFiles::queue_` that probably owns the flowfiles (it is irrelevant for this 
PR if it should be shared or not).
   
   As you only take `const &`-s to the elements, you should probably make the 
member `const &` as well.




----------------------------------------------------------------
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.

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


Reply via email to