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
plain_text_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_PLAIN_TEXT_WRITER_H
13 #define DOCWIRE_PLAIN_TEXT_WRITER_H
14 
15 #include "core_export.h"
16 #include <iostream>
17 
18 #include "pimpl.h"
19 #include "writer.h"
20 #include "message.h"
21 #include "document_elements.h"
22 
23 namespace docwire
24 {
25 
26 class DOCWIRE_CORE_EXPORT plain_text_writer : public writer, public with_pimpl<plain_text_writer>
27 {
28 public:
29  plain_text_writer(const std::string& eol_sequence,
30  std::function<std::string(const document::link&)> format_link_opening,
31  std::function<std::string(const document::close_link&)> format_link_closing);
32 
38  void write_to(const message_ptr& msg, std::ostream &stream) override;
39 
40  const std::string eol_sequence() const;
41 };
42 } // namespace docwire
43 
44 #endif //DOCWIRE_PLAIN_TEXT_WRITER_H
void write_to(const message_ptr &msg, std::ostream &stream) override
Converts text from callback to plain text 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