Matches if the result of applying a given CaptureFunction to an HTML node passes a ValueTest.
More...
Matches if the result of applying a given CaptureFunction to an HTML node passes a ValueTest.
- Example:
GumboNode * foo = ...;
GumboNode * bar = ...;
std::unique_ptr<ContainsTest>("foo")
);
std::unique_ptr<ContainsTest>("bar")
);
assert(m_foo.matches(foo));
assert(m_bar.matches(bar));
assert(!m_foo.matches(bar));
assert(!m_bar.matches(foo));
FunctionValueMatch(CaptureFunction func, std::unique_ptr< ValueTest > value_test)
Constructs a FunctionValueMatch that matches HTML nodes for which a given CaptureFunction returns a r...
HEXT_PUBLIC const CaptureFunction InnerHtmlBuiltin
A CaptureFunction that returns the inner HTML of an HTML element.
Definition at line 58 of file FunctionValueMatch.h.
◆ FunctionValueMatch() [1/3]
Constructs a FunctionValueMatch that matches HTML nodes for which a given CaptureFunction returns a result that passes a ValueTest.
- Parameters
-
func | The CaptureFunction that will be applied to an HTML node. |
value_test | The ValueTest that the result of the given CaptureFunction must pass. |
◆ ~FunctionValueMatch()
hext::FunctionValueMatch::~FunctionValueMatch |
( |
| ) |
|
|
overridedefaultnoexcept |
◆ FunctionValueMatch() [2/3]
◆ FunctionValueMatch() [3/3]
◆ matches()
bool hext::FunctionValueMatch::matches |
( |
const GumboNode * |
node | ) |
const |
|
overridevirtual |
Returns true if the result of calling the given CaptureFunction with node as its first argument passes the given ValueTest.
- Parameters
-
node | A pointer to a GumboNode. |
Implements hext::Match.
◆ operator=() [1/2]
◆ operator=() [2/2]
The documentation for this class was generated from the following file: