|
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
|
Namespace for type conversion utilities. More...
Classes | |
| struct | dest_type_tag |
A tag type used for dispatching convert_impl overloads based on the destination type. More... | |
Functions | |
| template<typename To , typename From > | |
| requires constexpr conversion_implementation_exists< To, From > std::optional< To > | try_to (const From &from) noexcept |
| Tries to convert a value of type From to type To. More... | |
| template<typename To , typename From > | |
| requires conversion_implementation_exists< To, From > To | to (const From &from) |
| Converts a value of type From to type To. More... | |
| DOCWIRE_CORE_EXPORT std::optional< std::chrono::sys_seconds > | convert_impl (with::date_format::iso8601 s, dest_type_tag< std::chrono::sys_seconds >) noexcept |
| Converts an ISO 8601 date string to sys_seconds. | |
| DOCWIRE_CORE_EXPORT std::optional< std::chrono::sys_seconds > | convert_impl (with::date_format::openoffice_legacy s, dest_type_tag< std::chrono::sys_seconds >) noexcept |
| Converts a legacy OpenOffice date string to sys_seconds. | |
| DOCWIRE_CORE_EXPORT std::optional< std::chrono::sys_seconds > | convert_impl (with::date_format::asn1 s, dest_type_tag< std::chrono::sys_seconds >) noexcept |
| Converts an ASN.1 date string to sys_seconds. | |
| DOCWIRE_CORE_EXPORT std::optional< std::string > | convert_impl (std::chrono::sys_seconds tp, dest_type_tag< std::string >) noexcept |
| Converts sys_seconds to a string representation. | |
Variables | |
| template<typename To , typename From > | |
| concept | conversion_implementation_exists |
| template<typename T > | |
| concept | is_from_chars_compatible = (std::is_integral_v<T> && !std::is_same_v<T, bool>) || std::is_floating_point_v<T> |
| Concept checking if a type is compatible with std::from_chars. | |
Namespace for type conversion utilities.
| requires conversion_implementation_exists<To, From> To docwire::convert::to | ( | const From & | from | ) |
Converts a value of type From to type To.
| To | The target type. |
| From | The source type. |
| from | The value to convert. |
| docwire::error | with docwire::errors::uninterpretable_data tag attached if the conversion fails. |
Definition at line 79 of file convert_base.h.
|
constexprnoexcept |
Tries to convert a value of type From to type To.
| To | The target type. |
| From | The source type. |
| from | The value to convert. |
Definition at line 65 of file convert_base.h.
| concept docwire::convert::conversion_implementation_exists |
Definition at line 35 of file convert_base.h.