martinzink commented on code in PR #1682:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1682#discussion_r1383043044


##########
extensions/standard-processors/processors/SplitText.h:
##########
@@ -0,0 +1,235 @@
+/**
+ * @file SplitText.h
+ * SplitText class declaration
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#pragma once
+
+#include <memory>
+#include <string_view>
+#include <utility>
+#include <optional>
+
+#include "core/Processor.h"
+#include "core/ProcessSession.h"
+#include "core/PropertyDefinitionBuilder.h"
+#include "core/PropertyDefinition.h"
+#include "core/PropertyType.h"
+#include "core/RelationshipDefinition.h"
+#include "FlowFileRecord.h"
+#include "utils/Export.h"
+#include "utils/expected.h"
+
+namespace org::apache::nifi::minifi::processors {
+
+struct SplitTextConfiguration {
+  uint64_t line_split_count = 0;
+  std::optional<uint64_t> maximum_fragment_size;
+  uint64_t header_line_count = 0;
+  std::optional<std::string> header_line_marker_characters;
+  bool remove_trailing_new_lines = true;
+};
+
+namespace detail {
+
+const size_t SPLIT_TEXT_BUFFER_SIZE = 8192;
+
+enum class StreamReadState {
+  Ok,
+  StreamReadError,
+  EndOfStream
+};
+
+class LineReader {
+ public:
+  struct LineInfo {
+    uint64_t offset = 0;
+    uint64_t size = 0;
+    uint8_t endline_size = 0;
+    bool matches_starts_with = true;
+
+    bool operator==(const LineInfo& line_info) const = default;
+  };
+
+  explicit LineReader(const std::shared_ptr<io::InputStream>& stream);
+  std::optional<LineInfo> readNextLine(const std::optional<std::string>& 
starts_with = std::nullopt);
+  std::optional<std::string> extractNextLine();

Review Comment:
   This seems unused



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