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
chain_element.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_CHAIN_ELEMENT_H
13 #define DOCWIRE_CHAIN_ELEMENT_H
14 
15 #include "core_export.h"
16 #include "pimpl.h"
17 #include "message.h"
18 
19 namespace docwire
20 {
21 
22 class parsing_chain;
23 
24 class DOCWIRE_CORE_EXPORT chain_element : public with_pimpl<chain_element>
25 {
26 public:
27  chain_element();
28  chain_element(chain_element&&) = default;
29  virtual ~chain_element() = default;
30  chain_element& operator=(chain_element&&) = default;
31 
32  virtual continuation operator()(message_ptr msg, const message_callbacks& emit_message) = 0;
33 
38  virtual bool is_leaf() const = 0;
39 
40  virtual bool is_generator() const { return false; }
41 };
42 
43 }
44 #endif //DOCWIRE_CHAIN_ELEMENT_H
virtual bool is_leaf() const =0
Check if chain element is a leaf (last element which doesn't produce any messages)....
The main namespace for the DocWire SDK.
Definition: ai_elements.h:19