All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
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 boost::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...
 

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

hext::Capture::Capture ( )
defaultnoexcept
hext::Capture::Capture ( const Capture )
default
hext::Capture::Capture ( Capture &&  )
defaultnoexcept
virtual hext::Capture::~Capture ( )
virtualdefaultnoexcept

Member Function Documentation

virtual boost::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::AttributeCapture, and hext::FunctionCapture.

virtual std::unique_ptr<Capture> hext::Capture::clone ( ) const
pure virtual
Capture& hext::Capture::operator= ( const Capture )
default
Capture& hext::Capture::operator= ( Capture &&  )
defaultnoexcept

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