|
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
|
The main namespace for the DocWire SDK. More...
Namespaces | |
| namespace | attributes |
| Contains definitions for document attributes and metadata. | |
| namespace | chaining |
| Provides functionality for chaining function calls and value transformations. | |
| namespace | content_type |
| Provides a multi-stage pipeline for content type detection. | |
| namespace | convert |
| Namespace for type conversion utilities. | |
| namespace | errors |
| Provides features for reporting and handling errors with context data using nested exceptions. | |
| namespace | invocation_concepts |
| Provides concepts for working with invocable objects and pushable containers. | |
| namespace | invocation_traits |
| Provides traits classes for working with callable objects. | |
| namespace | log |
| Provides a modern, high-performance, and structured logging framework. | |
| namespace | named |
| Utilities for named parameters. | |
| namespace | serialization |
| Provides a generic, concept-based serialization framework. | |
| namespace | tuple_utils |
| Provides transformations for tuples. | |
| namespace | xml |
| XML processing utilities. | |
Classes | |
| class | archives_parser |
| struct | basic_source_location |
| A fallback implementation of source_location for compilers that do not support std::source_location. More... | |
| class | buffer_stream |
| class | chain_element |
| class | charset_converter |
| class | checked |
| A generic wrapper for dereferenceable types (like pointers and optionals) that provides checked access based on a safety_policy. More... | |
| class | common_xml_document_parser |
| Base class for XML-based document parsers (ODF, OOXML, etc.). More... | |
| class | csv_exporter |
| Exports data to CSV format. More... | |
| class | csv_writer |
| class | data_source |
| class | data_stream |
| struct | default_file_name |
| class | doc_parser |
| class | eml_parser |
| class | ensure |
| A utility for creating expressive, exception-throwing assertions in a fluent style. More... | |
| struct | eol_sequence |
| class | file_extension |
| A class representing a file extension. More... | |
| class | file_stream |
| struct | guaranteed_t |
| A tag to indicate that a pointer is guaranteed to be non-null, bypassing the runtime check in not_null's constructor. More... | |
| class | html_exporter |
| Exports data to HTML format. More... | |
| class | html_parser |
| class | html_writer |
| class | imemorystream |
| imemorystream is a stream that wraps a std::span of const std::byte and provides a compatible interface with std::istream. More... | |
| class | imemorystreambuf |
| imemorystreambuf is a stream buffer that wraps std::span<const std::byte> and provides a compatible interface with std::istream. More... | |
| class | input_chain_element |
| struct | is_variant_alternative_trait |
| struct | is_variant_alternative_trait< T, std::variant< Us... > > |
| class | iwork_parser |
| struct | length_limit |
| Wrapper for a length limit value. More... | |
| struct | link_formatter |
| class | lru_memory_cache |
| Least Recently Used (LRU) cache with fixed memory size. More... | |
| class | mail_parser |
| class | metadata_exporter |
| Exports meta data only to plain text format. More... | |
| class | metadata_writer |
| struct | mime_type |
| Wrapper for a MIME type string. More... | |
| class | not_null |
| A wrapper for pointer-like types that enforces a non-null invariant. More... | |
| struct | ocr_confidence_threshold |
| struct | ocr_data_path |
| class | ocr_parser |
| struct | ocr_timeout |
| class | odf_ooxml_parser |
| A parser for ODF and OOXML document formats. More... | |
| class | odfxml_parser |
| A parser for flat ODF XML documents. More... | |
| class | office_formats_parser |
| A composite parser handling various office document formats. More... | |
| class | output_chain_element |
| output_chain_element class is responsible for saving data from parsing chain to an output stream. More... | |
| struct | overloaded |
| A helper for creating a visitor from a set of lambdas, used for visiting std::variant. More... | |
| struct | parse_lines |
| struct | parse_paragraphs |
| class | parsing_chain |
| class | pdf_parser |
| struct | pimpl_impl |
| struct | pimpl_impl_base |
| class | plain_text_exporter |
| Exports data to plain text format. More... | |
| class | plain_text_writer |
| class | ppt_parser |
| class | pst_parser |
| class | ranged |
| A wrapper for numeric types that enforces a range [Min, Max]. More... | |
| class | ref_or_owned |
| A utility class that simplifies declaring function attributes that need to be stored without requiring the user to create a shared pointer. More... | |
| class | rtf_parser |
| struct | seekable_stream_ptr |
| Wrapper for a shared pointer to a seekable input stream. More... | |
| struct | sentinel |
| A sentinel type used to define the end of a range or view. More... | |
| class | standard_filter |
| Sets of standard filters to use in parsers. example of use: More... | |
| class | static_flat_map |
| Immutable, fixed-size flat associative container. More... | |
| struct | stringifier |
| Primary template for the stringifier. More... | |
| struct | stringifier< const char * > |
| struct | stringifier< named::value< T > > |
| Specialization for docwire::named::value, providing a "name: value" string representation. More... | |
| struct | stringifier< serialization::object > |
| struct | stringifier< serialization::value > |
| struct | stringifier< std::exception_ptr > |
| Specialization for std::exception_ptr. More... | |
| struct | stringifier< std::pair< T1, T2 > > |
| struct | stringifier< std::string > |
| struct | stringifier< T > |
| Specialization for types that are streamable to std::ostream. More... | |
| class | strong_type |
| class | text_element |
| class | transformer_func |
| Wraps single function (tag_transform_func) into chain_element object. More... | |
| class | txt_parser |
| class | type_id |
| Strong type representing a compile-time type identity. More... | |
| class | unique_identifier |
| The class represents unique (for a single program run) identifier of an object. More... | |
| struct | unlimited_t |
| A marker type to signify an unlimited bound in a ranged type. More... | |
| struct | unseekable_stream_ptr |
| Wrapper for a shared pointer to an unseekable input stream. More... | |
| class | with_pimpl |
| class | with_pimpl_base |
| class | with_pimpl_owner |
| class | writer |
| The Writer class is used to write data from callbacks to an output stream. More... | |
| class | xls_parser |
| class | xlsb_parser |
| class | xml_fixer |
| class | xml_parser |
| A parser for generic XML documents. More... | |
| class | zip_reader |
Concepts | |
| concept | container |
| Concept to detect if a type is a container (iterable and not self-recursive). | |
| concept | context_tag |
| concept | data_source_compatible_type |
| Concept matching types that can be used to initialize a data_source. | |
| concept | data_source_compatible_type_ref_qualified |
| Concept matching reference-qualified types compatible with data_source. | |
| concept | dereferenceable |
| Concept to detect if a type is dereferenceable like a pointer. | |
| concept | empty |
| Concept for empty structs. | |
| concept | istream_derived_ref_qualified |
| concept | IStreamDerived |
| concept | ostream_derived_ref_qualified |
| concept | OStreamDerived |
| concept | ref_or_owned_compatible |
| concept | streamable |
| Concept for types that are streamable to std::ostream. | |
| concept | string_like |
| Concept for string-like types that can be converted to a string view. | |
| concept | string_method_equipped |
| Concept for types that have a string() member method. | |
| concept | strong_type_alias |
| Concept for strong type aliases that wrap a single public member v. | |
| concept | variant_alternative |
Typedefs | |
| using | message_sequence_streamer = std::function<continuation(const message_callbacks&)> |
| using | message_ptr = std::shared_ptr<message_base> |
| template<auto Min, typename T, safety_policy safety_level = default_safety_level> | |
| using | at_least = ranged<Min, unlimited, T, safety_level> |
| template<auto Max, typename T, safety_policy safety_level = default_safety_level> | |
| using | at_most = ranged<unlimited, Max, T, safety_level> |
| template<auto Value, typename T, safety_policy safety_level = default_safety_level> | |
| using | exactly = ranged<Value, Value, T, safety_level> |
| template<typename T, safety_policy safety_level = default_safety_level> | |
| using | non_negative = at_least<0, T, safety_level> |
| using | source_location = basic_source_location |
| A type that describes a location in source code. Uses a custom fallback implementation. | |
| using | svector = std::vector<std::string> |
| using | message_transform_func = std::function<continuation(message_ptr, const message_callbacks& emit_message)> |
Enumerations | |
| enum | xml_parse_mode { PARSE_XML , FIX_XML , STRIP_XML } |
| enum class | confidence { none , low , medium , high , very_high , highest } |
| Represents the confidence level of a detected MIME type. More... | |
| enum class | language { afr , amh , ara , asm_ , aze , aze_cyrl , bel , ben , bod , bos , bre , bul , cat , ceb , ces , chi_sim , chi_tra , chr , cos , cym , dan , deu , div , dzo , ell , eng , enm , epo , equ , est , eus , fao , fas , fil , fin , fra , frk , frm , fry , gla , gle , glg , grc , guj , hat , heb , hin , hrv , hun , hye , iku , ind , isl , ita , ita_old , jav , jpn , kan , kat , kat_old , kaz , khm , kir , kmr , kor , lao , lat , lav , lit , ltz , mal , mar , mkd , mlt , mon , mri , msa , mya , nep , nld , nor , oci , ori , pan , pol , por , pus , que , ron , rus , san , sin , slk , slv , snd , spa , spa_old , sqi , srp , srp_latn , sun , swa , swe , syr , tam , tat , tel , tgk , tha , tir , ton , tur , uig , ukr , urd , uzb , uzb_cyrl , vie , yid , yor } |
| enum class | continuation { proceed , skip , stop } |
| enum class | safety_policy { strict , relaxed } |
| Defines the safety policy for operations. More... | |
| enum class | safety_policy |
| Defines the safety policy for operations. More... | |
Functions | |
| double | cosine_similarity (const std::vector< double > &a, const std::vector< double > &b) |
| Calculates the cosine similarity between two vectors. | |
| template<class... Ts> | |
| overloaded (Ts...) -> overloaded< Ts... > | |
| template<typename... Context> | |
| void | debug_assert (detail::with_source_location< bool > condition, Context &&... context) |
| Asserts a condition in debug builds. | |
| template<safety_policy safety_level = default_safety_level, typename... Context> | |
| void | enforce (detail::with_source_location< bool > condition, Context &&... context) |
| Enforces a condition based on the safety policy. | |
| template<typename T> | |
| ensure (const T &, const docwire::source_location &) -> ensure< T > | |
| Deduction guide for the ensure class template. | |
| size_t | decode_html_entities_utf8 (char *dest, const char *src) |
| parsing_chain | operator| (ref_or_owned< data_source > data, ref_or_owned< chain_element > chain_element) |
| parsing_chain | operator| (ref_or_owned< std::istream > stream, ref_or_owned< chain_element > chain_element) |
| template<data_source_compatible_type_ref_qualified T> | |
| parsing_chain | operator| (T &&v, ref_or_owned< chain_element > chain_element) |
| bool | is_framing_message (const message_base &msg) |
| message_callbacks | make_counted_message_callbacks (const message_callbacks &original, message_counters &counters) |
| std::shared_ptr< text_element > | write_meta_data (const attributes::metadata &metadata) |
| template<typename Ptr> | |
| not_null< std::remove_cvref_t< Ptr > > | assume_not_null (Ptr &&ptr) |
| Wraps a pointer-like object in a not_null, bypassing the runtime check. | |
| void | parse_oshared_summary_info (thread_safe_ole_storage &storage, attributes::metadata &meta, const std::function< void(std::exception_ptr)> &non_fatal_error_handler) |
| void | parse_oshared_document_summary_info (thread_safe_ole_storage &storage, int &slide_count) |
| std::string | get_codepage_from_document_summary_info (thread_safe_ole_storage &storage) |
| parsing_chain | operator| (ref_or_owned< chain_element > element, ref_or_owned< std::ostream > stream) |
| parsing_chain & | operator|= (parsing_chain &chain, ref_or_owned< std::ostream > stream) |
| parsing_chain | operator| (ref_or_owned< chain_element > element, ref_or_owned< std::vector< message_ptr > > vector) |
| parsing_chain & | operator|= (parsing_chain &chain, ref_or_owned< std::vector< message_ptr > > vector) |
| parsing_chain | operator| (ref_or_owned< chain_element > lhs, ref_or_owned< chain_element > rhs) |
| parsing_chain & | operator|= (parsing_chain &lhs, ref_or_owned< chain_element > rhs) |
| std::filesystem::path | this_line_location () |
| std::filesystem::path | resource_path (const std::filesystem::path &resource_rel_path) |
| Locates a resource file or directory at runtime. | |
| template<typename T> | |
| std::string | stringify (const T &value) |
| int | prepareTable (std::vector< svector > &p_table) |
| int | prepareList (std::vector< std::string > &p_list) |
| std::string | formatTable (std::vector< svector > &mcols) |
| std::string | formatUrl (const std::string &mlink_url, const std::string &mlink_text) |
| std::string | formatList (std::vector< std::string > &mlist) |
| std::string | formatNumberedList (std::vector< std::string > &mlist) |
| tm * | thread_safe_gmtime (const time_t *timer, struct tm &time_buffer) |
| template<typename T> requires ( std::is_convertible_v<T, message_transform_func> && !std::is_base_of_v<chain_element, std::remove_cvref_t<T>> ) | |
| parsing_chain | operator| (ref_or_owned< chain_element > element, T func) |
| template<typename T> requires ( std::is_convertible_v<T, message_transform_func> && !std::is_base_of_v<chain_element, std::remove_cvref_t<T>> ) | |
| parsing_chain & | operator|= (parsing_chain &chain, T func) |
| template<typename T> | |
| consteval type_id | type_id_of () noexcept |
| Returns a compile-time strong identifier for type T. | |
Variables | |
| constexpr guaranteed_t | guaranteed |
| A constant to use with the unchecked not_null constructor, e.g., not_null(ptr, guaranteed). | |
| constexpr unlimited_t | unlimited |
| A convenient instance of the unlimited_t marker. | |
| constexpr safety_policy | default_safety_level = strict |
The main namespace for the DocWire SDK.
| using docwire::at_least = ranged<Min, unlimited, T, safety_level> |
| using docwire::at_most = ranged<unlimited, Max, T, safety_level> |
| using docwire::exactly = ranged<Value, Value, T, safety_level> |
| using docwire::message_ptr = std::shared_ptr<message_base> |
| using docwire::message_sequence_streamer = std::function<continuation(const message_callbacks&)> |
| using docwire::message_transform_func = std::function<continuation(message_ptr, const message_callbacks& emit_message)> |
Definition at line 25 of file transformer_func.h.
| using docwire::non_negative = at_least<0, T, safety_level> |
A type that describes a location in source code. Uses a custom fallback implementation.
Definition at line 63 of file source_location.h.
| using docwire::svector = std::vector<std::string> |
Definition at line 23 of file text_formatting.h.
|
strong |
Represents the confidence level of a detected MIME type.
Definition at line 88 of file data_source.h.
|
strong |
Definition at line 18 of file language.h.
|
strong |
Defines the safety policy for operations.
Definition at line 21 of file safety_policy.h.
|
strong |
Defines the safety policy for operations.
| Enumerator | |
|---|---|
| strict | Perform runtime checks and throw exceptions on violations. |
| relaxed | Skip runtime checks for performance; undefined behavior on violations. |
Definition at line 21 of file safety_policy.h.
| enum docwire::xml_parse_mode |
Definition at line 28 of file common_xml_document_parser.h.
|
nodiscard |
Wraps a pointer-like object in a not_null, bypassing the runtime check.
This should only be used when the pointer is guaranteed to be non-null, for example, when it's the result of a factory like std::make_shared which throws on failure instead of returning null.
Definition at line 102 of file not_null.h.
|
inline |
Calculates the cosine similarity between two vectors.
This function computes the cosine similarity between two double-precision floating-point vectors. The vectors must have the same size.
| a | The first vector. |
| b | The second vector. |
Definition at line 38 of file cosine_similarity.h.
| void docwire::debug_assert | ( | detail::with_source_location< bool > | condition, |
| Context &&... | context ) |
Asserts a condition in debug builds.
In debug builds (NDEBUG not defined), if the condition is false, the program terminates with a panic message containing the provided context. In release builds, this function does nothing.
| condition | The condition to check. |
| context | Additional context information to log if the assertion fails. |
Definition at line 56 of file debug_assert.h.
|
inline |
Definition at line 382 of file entities.h.
| void docwire::enforce | ( | detail::with_source_location< bool > | condition, |
| Context &&... | context ) |
Enforces a condition based on the safety policy.
If the condition is false:
| safety_level | The safety policy to apply (default is strict). |
| condition | The condition to check. |
| context | Additional context information to include in the error/assertion. |
| docwire::ensure | ( | const T & | , |
| const docwire::source_location & | ) -> ensure< T > |
Deduction guide for the ensure class template.
This allows the compiler to deduce the template argument T from the constructor call, enabling the clean ensure(value) syntax without needing a factory function.
|
inline |
Definition at line 99 of file text_formatting.h.
|
inline |
Definition at line 112 of file text_formatting.h.
|
inline |
Definition at line 64 of file text_formatting.h.
|
inline |
Definition at line 87 of file text_formatting.h.
|
inline |
Definition at line 30 of file message_counters.h.
|
inline |
Definition at line 37 of file message_counters.h.
|
inline |
|
inline |
| parsing_chain docwire::operator| | ( | ref_or_owned< chain_element > | element, |
| T | func ) |
Definition at line 65 of file transformer_func.h.
|
inline |
Definition at line 110 of file parsing_chain.h.
|
inline |
|
inline |
| parsing_chain docwire::operator| | ( | T && | v, |
| ref_or_owned< chain_element > | chain_element ) |
|
inline |
|
inline |
| parsing_chain & docwire::operator|= | ( | parsing_chain & | chain, |
| T | func ) |
Definition at line 75 of file transformer_func.h.
|
inline |
Definition at line 120 of file parsing_chain.h.
|
inline |
Definition at line 46 of file text_formatting.h.
|
inline |
Definition at line 25 of file text_formatting.h.
|
inline |
Locates a resource file or directory at runtime.
This function searches for the specified resource in standard locations relative to the running executable and the shared library. It supports both build-tree layouts (via .path files) and installed layouts (relative to bin/ or lib/).
| resource_rel_path | The relative path of the resource to find (e.g., "docwire/data.bin"). |
| docwire::errors::base | if the resource cannot be found. |
Definition at line 45 of file resource_path.h.
| std::string docwire::stringify | ( | const T & | value | ) |
Definition at line 36 of file stringification.h.
|
inline |
Definition at line 28 of file resource_path.h.
|
inline |
Definition at line 21 of file time_utils.h.
|
constevalnoexcept |
Returns a compile-time strong identifier for type T.
| T | The type to identify. |
|
inline |
Definition at line 38 of file meta_data_writer.h.
|
inlineconstexpr |
Definition at line 28 of file safety_policy.h.
|
inlineconstexpr |
A constant to use with the unchecked not_null constructor, e.g., not_null(ptr, guaranteed).
Definition at line 27 of file not_null.h.
|
inlineconstexpr |
A convenient instance of the unlimited_t marker.