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
document_elements.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_DOCUMENT_ELEMENTS_H
13 #define DOCWIRE_DOCUMENT_ELEMENTS_H
14 
15 #include "attributes.h"
16 #include "core_export.h"
17 #include "data_source.h"
18 #include "message.h"
19 #include <functional>
20 #include <optional>
21 #include <string>
22 
23 namespace docwire
24 {
25 namespace document
26 {
27 
28 struct DOCWIRE_CORE_EXPORT paragraph
29 {
30  attributes::styling styling;
31 };
32 
33 struct DOCWIRE_CORE_EXPORT close_paragraph {};
34 
35 struct DOCWIRE_CORE_EXPORT section
36 {
37  attributes::styling styling;
38 };
39 
40 struct DOCWIRE_CORE_EXPORT close_section {};
41 
42 struct DOCWIRE_CORE_EXPORT span
43 {
44  attributes::styling styling;
45 };
46 
47 struct DOCWIRE_CORE_EXPORT close_span {};
48 
49 struct DOCWIRE_CORE_EXPORT break_line
50 {
51  attributes::styling styling;
52 };
53 
54 struct DOCWIRE_CORE_EXPORT bold
55 {
56  attributes::styling styling;
57 };
58 
59 struct DOCWIRE_CORE_EXPORT close_bold {};
60 
61 struct DOCWIRE_CORE_EXPORT italic
62 {
63  attributes::styling styling;
64 };
65 
66 struct DOCWIRE_CORE_EXPORT close_italic {};
67 
68 struct DOCWIRE_CORE_EXPORT underline
69 {
70  attributes::styling styling;
71 };
72 
73 struct DOCWIRE_CORE_EXPORT close_underline {};
74 
75 struct DOCWIRE_CORE_EXPORT table
76 {
77  attributes::styling styling;
78 };
79 
80 struct DOCWIRE_CORE_EXPORT close_table {};
81 
82 struct DOCWIRE_CORE_EXPORT table_row
83 {
84  attributes::styling styling;
85 };
86 
87 struct DOCWIRE_CORE_EXPORT close_table_row {};
88 
89 struct DOCWIRE_CORE_EXPORT table_cell
90 {
91  attributes::styling styling;
92 };
93 
94 struct DOCWIRE_CORE_EXPORT close_table_cell {};
95 
96 struct DOCWIRE_CORE_EXPORT caption
97 {
98  attributes::styling styling;
99 };
100 
101 struct DOCWIRE_CORE_EXPORT close_caption {};
102 
103 struct DOCWIRE_CORE_EXPORT text
104 {
105  std::string text;
107  std::optional<double> font_size;
108 };
109 
110 struct DOCWIRE_CORE_EXPORT link
111 {
112  std::optional<std::string> url;
113  attributes::styling styling;
114 };
115 
116 struct DOCWIRE_CORE_EXPORT close_link {};
117 
118 struct DOCWIRE_CORE_EXPORT image
119 {
120  data_source source;
121  std::optional<std::string> alt;
123  attributes::styling styling;
124  std::optional<message_sequence_streamer> structured_content_streamer;
125 };
126 
127 struct DOCWIRE_CORE_EXPORT style
128 {
129  std::string css_text;
130 };
131 
132 struct DOCWIRE_CORE_EXPORT list
133 {
134  std::string type = "decimal";
135  attributes::styling styling;
136 };
137 
138 struct DOCWIRE_CORE_EXPORT close_list {};
139 
140 struct DOCWIRE_CORE_EXPORT list_item
141 {
142  attributes::styling styling;
143 };
144 
145 struct DOCWIRE_CORE_EXPORT close_list_item {};
146 
147 struct DOCWIRE_CORE_EXPORT header {};
148 struct DOCWIRE_CORE_EXPORT close_header {};
149 
150 struct DOCWIRE_CORE_EXPORT footer {};
151 struct DOCWIRE_CORE_EXPORT close_footer {};
152 
153 struct DOCWIRE_CORE_EXPORT comment
154 {
155  std::optional<std::string> author;
156  std::optional<std::string> time;
157  std::optional<std::string> comment;
158 };
159 
160 struct DOCWIRE_CORE_EXPORT page { };
161 struct DOCWIRE_CORE_EXPORT close_page { };
162 
163 struct DOCWIRE_CORE_EXPORT document
164 {
165  std::function<attributes::metadata()> metadata = []() { return attributes::metadata{}; };
166 };
167 
168 struct DOCWIRE_CORE_EXPORT close_document { };
169 
170 } // namespace document
171 } // namespace docwire
172 
173 #endif // DOCWIRE_DOCUMENT_ELEMENTS_H
The main namespace for the DocWire SDK.
Definition: ai_elements.h:19
Represents the geometric position and dimensions of an element.
Definition: attributes.h:89
Represents CSS-like styling information for document elements.
Definition: attributes.h:34
attributes::position position
Positional attributes.
std::optional< std::string > alt
Optional alternative text for the image.
attributes::position position
Positional attributes.
std::optional< double > font_size
Optional font size of the text.