libhext: C++ Library Documentation
1.0.12-3ea013c
|
Abstract base for every Capture. More...
Public Member Functions | |
Capture () noexcept=default | |
Capture (const Capture &)=default | |
Capture (Capture &&) noexcept=default | |
Capture & | operator= (const Capture &)=default |
Capture & | operator= (Capture &&) noexcept=default |
virtual | ~Capture () noexcept=default |
virtual std::unique_ptr< Capture > | clone () const =0 |
Clones derived object. More... | |
virtual std::optional< ResultPair > | capture (const GumboNode *node) const =0 |
Returns a name/value pair with the captured contents or an empty optional, if there was nothing to capture. More... | |
Abstract base for every Capture.
Captures are applied to HTML elements with Capture::capture() which will return either a ResultPair, or an empty optional if there was nothing to capture.
Note: You probably don't want to inherit from this class directly, unless you want to provide your own Capture::clone() method. If your subclass has a copy constructor, you can extend from hext::Cloneable<YourSubclass, hext::Capture> which provides a generic clone method.
|
defaultnoexcept |
|
default |
|
defaultnoexcept |
|
virtualdefaultnoexcept |
|
pure virtual |
Returns a name/value pair with the captured contents or an empty optional, if there was nothing to capture.
Implemented in hext::FunctionCapture, and hext::AttributeCapture.
|
pure virtual |
Clones derived object.
Implemented in hext::Cloneable< AttributeCapture, Capture >, and hext::Cloneable< FunctionCapture, Capture >.