|
|
Donner
C++20 SVG rendering library
|
Selector which matches the element type, e.g. More...
#include "donner/css/selectors/TypeSelector.h"
Public Member Functions | |
| TypeSelector (xml::XMLQualifiedName &&matcher) | |
| Create a TypeSelector with the given namespace and name. | |
| TypeSelector (const xml::XMLQualifiedNameRef &matcher) | |
| Create a TypeSelector with the given namespace and name. | |
| ~TypeSelector () noexcept=default | |
| Destructor. | |
| TypeSelector (TypeSelector &&)=default | |
| Move constructor. | |
| TypeSelector & | operator= (TypeSelector &&)=default |
| Move assignment operator. | |
| TypeSelector (const TypeSelector &)=default | |
| Copy constructor. | |
| TypeSelector & | operator= (const TypeSelector &)=default |
| Copy assignment operator. | |
| bool | isUniversal () const |
| Returns true if this is a universal selector. | |
| bool | isValid () const |
| Returns true if this is a valid selector. | |
| template<ElementLike T> | |
| bool | matches (const T &element) const |
| Returns true if the provided element matches this selector. | |
Public Attributes | |
| xml::XMLQualifiedName | matcher |
| Selector matcher itself, which may contain wildcards. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const TypeSelector &obj) |
| Ostream output operator for TypeSelector, outputs a debug string e.g. TypeSelector(div). | |
Selector which matches the element type, e.g.
div or circle. The selector may also include a namespace, or be a universal selector.
In the CSS source, this is represented by either a standalone type, or namespace and type separated by a pipe (|). Either the namespace or the type may be a wildcard (*).
TypeSelector represents the parsed representation, if no namespace is provided it will be an empty string.
|
inline |
Create a TypeSelector with the given namespace and name.
| matcher | Selector matcher, which may be a wildcard. If the namespace is "*", it will match every namespaces. If the name is "*", it will match every attribute in its namespace. |
|
inline |
Create a TypeSelector with the given namespace and name.
| matcher | Selector matcher, which may be a wildcard. If the namespace is "*", it will match every namespaces. If the name is "*", it will match every attribute in its namespace. |
|
inline |
Returns true if the provided element matches this selector.
| element | The element to check. |
| xml::XMLQualifiedName donner::css::TypeSelector::matcher |
Selector matcher itself, which may contain wildcards.
In this context, the members have the following meanings: