DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
csv_writer.h
1 /*********************************************************************************************************************************************/
2 /* DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. */
3 /* Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, */
4 /* document analysis. Offline processing possible for security and confidentiality */
5 /* */
6 /* Copyright (c) SILVERCODERS Ltd, http://silvercoders.com */
7 /* Project homepage: https://github.com/docwire/docwire */
8 /* */
9 /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-DocWire-Commercial */
10 /*********************************************************************************************************************************************/
11 
12 #ifndef DOCWIRE_CSV_WRITER_H
13 #define DOCWIRE_CSV_WRITER_H
14 
15 #include "core_export.h"
16 #include <iostream>
17 #include "writer.h"
18 #include <vector>
19 
20 namespace docwire
21 {
22 
23 class DOCWIRE_CORE_EXPORT csv_writer : public writer
24 {
25 public:
31  void write_to(const message_ptr& msg, std::ostream &stream) override;
32 
33 private:
34  bool m_in_table { false };
35  std::vector<std::string> m_curr_line;
36  std::string m_curr_cell;
37 };
38 
39 } // namespace docwire
40 
41 #endif //DOCWIRE_CSV_WRITER_H
void write_to(const message_ptr &msg, std::ostream &stream) override
Converts text from callback to CSV format.
The Writer class is used to write data from callbacks to an output stream.
Definition: writer.h:41
The main namespace for the DocWire SDK.
Definition: ai_elements.h:19