|
|
Donner
C++20 SVG rendering library
|
Manages XML entity declarations for a document. More...
#include "donner/base/xml/components/EntityDeclarationsContext.h"
Public Member Functions | |
| EntityDeclarationsContext ()=default | |
| Constructor, should only be called once to construct on the given Registry, with registry.ctx().emplace<EntityDeclarationsContext>(). | |
| void | addEntityDeclaration (EntityType type, const RcStringOrRef &name, const RcString &value, bool isExternal=false) |
| Adds an entity declaration. | |
| std::optional< std::pair< RcString, bool > > | getEntityDeclaration (EntityType type, const RcStringOrRef &name) const |
| Gets the replacement text for a general entity by name. | |
Manages XML entity declarations for a document.
Stores general and parameter entity declarations from DOCTYPE sections. Currently used to store entity declarations, but complete entity expansion in the parsed XML content is not yet implemented (TODO).
Access via the Registry::ctx API:
|
default |
Constructor, should only be called once to construct on the given Registry, with registry.ctx().emplace<EntityDeclarationsContext>().
To use this class, access it via the Registry::ctx API.
|
inline |
Adds an entity declaration.
| type | The type of the entity (general or parameter). |
| name | The name of the entity. |
| value | The replacement text for the entity. |
| isExternal | Whether this is an external entity. |
|
inline |
Gets the replacement text for a general entity by name.
| type | The type of the entity (general or parameter). |
| name | The name of the entity. |