Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::xml::components::XMLDocumentContext Class Reference

Holds global state of an XML document, such as the root element. More...

#include "donner/base/xml/components/XMLDocumentContext.h"

Public Member Functions

 XMLDocumentContext (InternalCtorTag ctorTag)
 Internal constructor, creates a context on the given XMLDocument.

Public Attributes

Entity rootEntity = entt::null
 Root entity of the document.
std::shared_ptr< XMLSourceStoresourceStore
 Optional source store for parsed documents that own their source projection.
std::optional< ParseDiagnosticsourceDiagnostic
 Current source diagnostic for a dirty structured-editing region, if any.
std::uint64_t maximumSourceEditTreeNodes = kDefaultMaximumSourceEditTreeNodes
 Maximum live non-document XML nodes admitted by one incremental source edit.
int maximumSourceEditTreeDepth = kDefaultMaximumSourceEditTreeDepth
 Maximum attached element depth admitted by one incremental source edit.
std::uint64_t maximumSourceEditTotalAttributes = kDefaultMaximumSourceEditTotalAttributes
 Maximum live attributes admitted by one incremental source edit.

Static Public Attributes

static constexpr std::uint64_t kDefaultMaximumSourceEditTreeNodes = 8'192
 Bounded incremental-edit defaults, kept in sync with XMLParser::Options.
static constexpr int kDefaultMaximumSourceEditTreeDepth = 256
static constexpr std::uint64_t kDefaultMaximumSourceEditTotalAttributes = 100'000

Friends

class donner::xml::XMLDocument
class donner::xml::XMLNode

Detailed Description

Holds global state of an XML document, such as the root element.

One instance of this class is created per XML document.

Access the document context via the Registry::ctx API:

XMLDocumentContext& context = registry.ctx().get<XMLDocumentContext>();
XMLDocumentContext(InternalCtorTag ctorTag)
Internal constructor, creates a context on the given XMLDocument.
Definition XMLDocumentContext.h:58

Constructor & Destructor Documentation

◆ XMLDocumentContext()

donner::xml::components::XMLDocumentContext::XMLDocumentContext ( InternalCtorTag ctorTag)
inlineexplicit

Internal constructor, creates a context on the given XMLDocument.

To use this class, access it via the Registry::ctx API.

XMLDocumentContext& context = registry.ctx().get<XMLDocumentContext>();
Parameters
ctorTagInternal tag to allow construction.

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