![]() |
ImFusion SDK 4.3
|
#include <AnatomyPlugin/include/ImFusion/AnatomyPlugin/Selector.h>
Style selector combining with logical OR multiple SelectorElem objects. More...
Style selector combining with logical OR multiple SelectorElem objects.
Selectors either match or do not match an object in a given setting. This class is modeled after the CSS concept of a selector.
Public Member Functions | |
| Selector (SelectorElem selector) | |
| Convenience constructor to create a Selector from a single SelectorElem. | |
| Selector (std::vector< SelectorElem > selectors={}) | |
| Constructor allowing specification of a list of SelectorElem objects. | |
| bool | match (const std::string &identifier, const Properties &attributesStructure, std::optional< AnatomicalStructure::ContentType > ct, const std::string &key, const Properties &attributesObject, const std::set< std::string > &pseudoClasses) const |
| Returns true, if the given object in the given setting matches the selector. | |
| const std::string & | str () const |
| Returns a string representation of the selector. | |
| Selector | operator|| (const SelectorElem &sel) const |
| Returns a Selector that combines this Selector with another SelectorElem using logical OR. | |
| bool | operator!= (const Selector &other) const |
Static Public Member Functions | |
| static std::optional< Selector > | parse (const std::string &str) |
| Parse a string into a Selector. | |
|
explicit |
Constructor allowing specification of a list of SelectorElem objects.
Any selector must match for the resulting Selector to match (logical OR).
|
static |
| const std::string & str | ( | ) | const |
Returns a string representation of the selector.
This is the inverse of the parse function. Individual SelectorElem strings are combined with a comma.