15 #ifndef HEXT_NTH_CHILD_MATCH_H_INCLUDED
16 #define HEXT_NTH_CHILD_MATCH_H_INCLUDED
112 Option options = Option::First) noexcept;
121 Option options = Option::First) noexcept;
126 bool matches(
const GumboNode * node)
const noexcept
override;
135 int count_preceding_siblings(
const GumboNode * node,
136 HtmlTag count_tag)
const noexcept;
144 int count_following_siblings(
const GumboNode * node,
145 HtmlTag count_tag)
const noexcept;
163 static_cast<int>(right));
172 static_cast<int>(right));
Defines template hext::Cloneable.
Defines HEXT_PUBLIC and HEXT_PRIVATE.
Curiously recurring template pattern that extends a base class to provide a virtual method Cloneable:...
Matches HTML nodes having a certain position within their parent HTML element.
NthChildMatch(int step, int shift, Option options=Option::First) noexcept
Constructs an NthChildMatch with the pattern <step * n + shift>.
NthChildMatch(std::pair< int, int > step_and_shift, Option options=Option::First) noexcept
Constructs an NthChildMatch with the pattern <step * n + shift>, where step and shift is given as a s...
Option
NthChildMatch's options.
bool matches(const GumboNode *node) const noexcept override
Returns true if HTML node matches pattern <step * n + shift>.
HtmlTag
An enum containing all valid HTML tags.
HEXT_PUBLIC NthChildMatch::Option operator|(NthChildMatch::Option left, NthChildMatch::Option right) noexcept
Applies Bitwise-OR to NthChildMatch::Option.
HEXT_PUBLIC NthChildMatch::Option operator&(NthChildMatch::Option left, NthChildMatch::Option right) noexcept
Applies Bitwise-AND to NthChildMatch::Option.