libhext: C++ Library Documentation  1.0.9-c8ac8b6
Public Member Functions | List of all members
hext::TypeRegexMatch Class Referencefinal

Matches the name of an HTML element against a regular expression. More...

Inheritance diagram for hext::TypeRegexMatch:
Inheritance graph
[legend]
Collaboration diagram for hext::TypeRegexMatch:
Collaboration graph
[legend]

Public Member Functions

 TypeRegexMatch (boost::regex regex)
 Constructs a TypeRegexMatch. More...
 
bool matches (const GumboNode *node) const override
 Returns true if the node has a tag name which matches the given regex. More...
 
- Public Member Functions inherited from hext::Cloneable< TypeRegexMatch, Match >
virtual std::unique_ptr< Matchclone () const override
 Clones objects of template type Derived and returns an owning pointer to the newly allocated Base. More...
 
- Public Member Functions inherited from hext::Match
 Match () noexcept=default
 
 Match (const Match &)=default
 
 Match (Match &&) noexcept=default
 
Matchoperator= (const Match &)=default
 
Matchoperator= (Match &&) noexcept=default
 
virtual ~Match () noexcept=default
 

Detailed Description

Matches the name of an HTML element against a regular expression.

Definition at line 33 of file TypeRegexMatch.h.

Constructor & Destructor Documentation

◆ TypeRegexMatch()

hext::TypeRegexMatch::TypeRegexMatch ( boost::regex  regex)
explicit

Constructs a TypeRegexMatch.

Parameters
regexThe regular expression that is applied against a tag name.

Member Function Documentation

◆ matches()

bool hext::TypeRegexMatch::matches ( const GumboNode *  node) const
overridevirtual

Returns true if the node has a tag name which matches the given regex.

Parameters
nodeA pointer to a GumboNode.

Implements hext::Match.


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