Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
XMLSourceStore.h File Reference
#include <cstddef>
#include <cstdint>
#include <optional>
#include <ostream>
#include <string>
#include <string_view>
#include <unordered_map>
#include "donner/base/FileOffset.h"
#include "donner/base/Utils.h"
#include "donner/base/parser/LineOffsets.h"
Include dependency graph for XMLSourceStore.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::xml::SourceAnchorId
 Stable identifier for a source anchor stored in XMLSourceStore. More...
struct  donner::xml::ResolvedSourceSpan
 Current resolved byte span between two source anchors. More...
struct  donner::xml::SourceAnchorSpan
 Pair of anchors representing a source span. More...
struct  donner::xml::XMLSourceDelta
 Describes one applied source edit. More...
class  donner::xml::XMLSourceStore
 Owns XML source bytes and mutable source anchors. More...
struct  donner::xml::XMLSourceStore::ResourceLimits
 Resource limits for retained anchors and anchor-update work. More...
struct  donner::xml::XMLSourceStore::ResourceStats
 Exact resource accounting for source anchors and edit work. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.
namespace  donner::xml
 XML parsing and document model support, top-level objects are donner::xml::XMLParser and donner::xml::XMLDocument.

Enumerations

enum class  donner::xml::SourceAnchorBias : std::uint8_t {
  donner::xml::Before ,
  donner::xml::After
}
 Controls how an anchor behaves when text is inserted exactly at its offset. More...

Class Documentation

◆ donner::xml::SourceAnchorSpan

struct donner::xml::SourceAnchorSpan

Pair of anchors representing a source span.

Class Members
SourceAnchorId end End anchor.
SourceAnchorId start Start anchor.

◆ donner::xml::XMLSourceStore::ResourceLimits

struct donner::xml::XMLSourceStore::ResourceLimits

Resource limits for retained anchors and anchor-update work.

Class Members
size_t maximumAnchorUpdateWorkPerEdit = 1024 * 1024 Maximum live anchors visited by one source edit.
size_t maximumLiveAnchorCount = 1024 * 1024 Maximum simultaneously live source anchors.
size_t maximumSourceSize = 16 * 1024 * 1024 Maximum source bytes retained after an edit.

◆ donner::xml::XMLSourceStore::ResourceStats

struct donner::xml::XMLSourceStore::ResourceStats

Exact resource accounting for source anchors and edit work.

Class Members
uint64_t anchorUpdateWorkRejections = 0 Edits rejected before an anchor scan.
size_t lastAnchorUpdateWork = 0 Live anchors visited by the last accepted edit.
size_t liveAnchorCount = 0 Anchors that can currently be resolved.
size_t peakLiveAnchorCount = 0 Highest live-anchor count reached.
uint64_t totalAnchorUpdateWork = 0 Live anchors visited by accepted edits.
uint64_t totalCreatedAnchors = 0 Anchors created over this store's lifetime.
uint64_t totalRetiredAnchors = 0 Anchors invalidated over this store's lifetime.