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
docwire::transformer_func Class Reference

Wraps single function (tag_transform_func) into chain_element object. More...

#include <transformer_func.h>

Inheritance diagram for docwire::transformer_func:
docwire::chain_element docwire::with_pimpl< transformer_func > docwire::with_pimpl< chain_element > docwire::with_pimpl_base docwire::with_pimpl_base

Public Member Functions

 transformer_func (message_transform_func transformer_function)
 
virtual continuation operator() (message_ptr msg, const message_callbacks &emit_message) override
 Executes transform on the given message. More...
 
bool is_leaf () const override
 Check if chain element is a leaf (last element which doesn't produce any messages). At this moment only exporters are leafs. More...
 
- Public Member Functions inherited from docwire::chain_element
 chain_element (chain_element &&)=default
 
chain_elementoperator= (chain_element &&)=default
 
virtual bool is_generator () const
 

Additional Inherited Members

- Protected Types inherited from docwire::with_pimpl< chain_element >
using impl_type = pimpl_impl< chain_element >
 
- Protected Types inherited from docwire::with_pimpl< transformer_func >
using impl_type = pimpl_impl< transformer_func >
 
- Protected Member Functions inherited from docwire::with_pimpl< chain_element >
impl_typecreate_impl (Args &&... args)
 
 with_pimpl (Args &&... args)
 
 with_pimpl (with_pimpl< chain_element > &&other) noexcept
 
 with_pimpl (std::nullptr_t)
 
with_pimploperator= (with_pimpl &&other) noexcept
 
impl_typeimpl ()
 
const impl_typeimpl () const
 
- Protected Member Functions inherited from docwire::with_pimpl< transformer_func >
impl_typecreate_impl (Args &&... args)
 
 with_pimpl (Args &&... args)
 
 with_pimpl (with_pimpl< transformer_func > &&other) noexcept
 
 with_pimpl (std::nullptr_t)
 
with_pimploperator= (with_pimpl &&other) noexcept
 
impl_typeimpl ()
 
const impl_typeimpl () const
 

Detailed Description

Wraps single function (tag_transform_func) into chain_element object.

Definition at line 28 of file transformer_func.h.

Constructor & Destructor Documentation

◆ transformer_func()

docwire::transformer_func::transformer_func ( message_transform_func  transformer_function)
Parameters
transformer_functioncallback function, which will be called in transform().

Member Function Documentation

◆ is_leaf()

bool docwire::transformer_func::is_leaf ( ) const
inlineoverridevirtual

Check if chain element is a leaf (last element which doesn't produce any messages). At this moment only exporters are leafs.

Returns
true if leaf

Implements docwire::chain_element.

Definition at line 44 of file transformer_func.h.

◆ operator()()

virtual continuation docwire::transformer_func::operator() ( message_ptr  msg,
const message_callbacks emit_message 
)
overridevirtual

Executes transform on the given message.

See also
docwire::message_ptr
Parameters
msgIncoming message.
emit_messageCallback to emit downstream messages.

Implements docwire::chain_element.


The documentation for this class was generated from the following file: