15 #ifndef HEXT_FUNCTION_CAPTURE_H_INCLUDED
16 #define HEXT_FUNCTION_CAPTURE_H_INCLUDED
64 :
public Cloneable<FunctionCapture, Capture>
75 std::string result_name,
76 std::unique_ptr<StringPipe> pipe = {}) noexcept;
90 std::optional<
ResultPair> capture(const GumboNode * node) const override;
Declares hext::CaptureFunction.
Defines template hext::Cloneable.
Typedefs for results returned from capturing HTML.
Declares hext::StringPipe.
Defines HEXT_PUBLIC and HEXT_PRIVATE.
Curiously recurring template pattern that extends a base class to provide a virtual method Cloneable:...
Captures the result of applying a function to an HTML node.
FunctionCapture(CaptureFunction func, std::string result_name, std::unique_ptr< StringPipe > pipe={}) noexcept
Constructs a FunctionCapture.
FunctionCapture(FunctionCapture &&) noexcept=default
FunctionCapture(const FunctionCapture &other)
Abstract base for every StringPipe.
std::function< std::string(const GumboNode *)> CaptureFunction
A type of std::function that receives an HTML element and returns a string.
std::pair< std::string, std::string > ResultPair
A string-pair containing a name and a value.