libhext: C++ Library Documentation  1.0.8-3ad0ae4
Public Member Functions | List of all members
hext::Capture Class Referenceabstract

Abstract base for every Capture. More...

Inheritance diagram for hext::Capture:
Inheritance graph
[legend]

Public Member Functions

 Capture () noexcept=default
 
 Capture (const Capture &)=default
 
 Capture (Capture &&) noexcept=default
 
Captureoperator= (const Capture &)=default
 
Captureoperator= (Capture &&) noexcept=default
 
virtual ~Capture () noexcept=default
 
virtual std::unique_ptr< Captureclone () const =0
 Clones derived object. More...
 
virtual std::optional< ResultPaircapture (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...
 

Detailed Description

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.

Definition at line 44 of file Capture.h.

Constructor & Destructor Documentation

◆ Capture() [1/3]

hext::Capture::Capture ( )
defaultnoexcept

◆ Capture() [2/3]

hext::Capture::Capture ( const Capture )
default

◆ Capture() [3/3]

hext::Capture::Capture ( Capture &&  )
defaultnoexcept

◆ ~Capture()

virtual hext::Capture::~Capture ( )
virtualdefaultnoexcept

Member Function Documentation

◆ capture()

virtual std::optional<ResultPair> hext::Capture::capture ( const GumboNode *  node) const
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.

◆ clone()

virtual std::unique_ptr<Capture> hext::Capture::clone ( ) const
pure virtual

◆ operator=() [1/2]

Capture& hext::Capture::operator= ( Capture &&  )
defaultnoexcept

◆ operator=() [2/2]

Capture& hext::Capture::operator= ( const Capture )
default

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