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

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 ( )
hext::Capture::Capture ( const Capture )
hext::Capture::Capture ( Capture &&  )
virtual hext::Capture::~Capture ( )

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 )
Capture& hext::Capture::operator= ( Capture &&  )

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