Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::components::RuleIndexElementView Class Reference

An element as the rule index and the ancestor filter read its keys: straight from its components, without copies. A shadow entity reads its tag from its own tree entity and its id, classes and attributes from its light entity. More...

#include "donner/svg/components/style/StyleElementView.h"

Public Member Functions

 RuleIndexElementView (const Registry &registry, Entity treeEntity, Entity dataEntity, bool *tagOnly=nullptr)
std::string_view id () const
 The element's id, or empty.
std::string_view typeName () const
 The local tag name, in any case.
std::string_view className () const
 Raw class text, for callers that must bound tokenization before starting.
std::size_t attributeCount () const
 Number of attributes, without visiting their names.
template<typename Visitor>
void forEachClassName (Visitor &&visit) const
 Calls visit with each token of the class list.
template<typename Visitor>
void forEachAttributeLocalName (Visitor &&visit) const
 Calls visit with the local name of each attribute, whatever its namespace.

Detailed Description

An element as the rule index and the ancestor filter read its keys: straight from its components, without copies. A shadow entity reads its tag from its own tree entity and its id, classes and attributes from its light entity.

Constructor & Destructor Documentation

◆ RuleIndexElementView()

donner::svg::components::RuleIndexElementView::RuleIndexElementView ( const Registry & registry,
Entity treeEntity,
Entity dataEntity,
bool * tagOnly = nullptr )
inline
Parameters
registryRegistry holding the element.
treeEntityThe element's tree entity.
dataEntityIts data entity, see StyleDataEntity.

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