Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
XMLDocument.h File Reference
#include <cstdint>
#include <memory>
#include <optional>
#include <ostream>
#include <string>
#include <string_view>
#include <vector>
#include "donner/base/EcsRegistry.h"
#include "donner/base/ParseDiagnostic.h"
#include "donner/base/RcString.h"
#include "donner/base/Utils.h"
#include "donner/base/xml/XMLNode.h"
#include "donner/base/xml/XMLSourceStore.h"
Include dependency graph for XMLDocument.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::xml::XMLAttributeAtSourceOffset
 Result of locating an attribute at a source offset. More...
struct  donner::xml::XMLEditIntent
 Source edit request from an editor/source view. More...
struct  donner::xml::XMLMutation
 XML DOM mutation emitted by an incremental source edit. More...
struct  donner::xml::ApplySourceEditResult
 Result from XMLDocument::applySourceEdit. More...
class  donner::xml::XMLDocument
 Represents an XML document, which holds a collection of XMLNode as the document tree. 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::ReparseScope : std::uint8_t {
  donner::xml::AttributeValue ,
  donner::xml::OpeningTag ,
  donner::xml::TextNode ,
  donner::xml::ElementSubtree ,
  donner::xml::Document
}
 Local XML reparse scope chosen for a source edit. More...

Functions

std::ostream & donner::xml::operator<< (std::ostream &os, ReparseScope scope)
 Print a ReparseScope.

Class Documentation

◆ donner::xml::XMLAttributeAtSourceOffset

struct donner::xml::XMLAttributeAtSourceOffset

Result of locating an attribute at a source offset.

Collaboration diagram for donner::xml::XMLAttributeAtSourceOffset:
[legend]
Class Members
SourceRange location Current full source range of the attribute.
XMLQualifiedName name Attribute name.
XMLNode node Element node that owns the attribute.
char quote = '"' Quote delimiter used for the value.
SourceRange valueLocation Current unquoted value source range.

◆ donner::xml::XMLEditIntent

struct donner::xml::XMLEditIntent

Source edit request from an editor/source view.

Collaboration diagram for donner::xml::XMLEditIntent:
[legend]
Class Members
SourceRange range Source byte range to replace.
string_view replacement Replacement source bytes.
uint64_t sourceVersion = 0 Source version observed by the caller.

◆ donner::xml::ApplySourceEditResult

struct donner::xml::ApplySourceEditResult
Collaboration diagram for donner::xml::ApplySourceEditResult:
[legend]
Class Members
bool applied = false True if source bytes were changed.
optional< ParseDiagnostic > diagnostic Diagnostic if local reparsing failed.
vector< XMLMutation > mutations DOM mutations emitted by this operation.
ReparseScope scope = ReparseScope::Document Reparse scope selected for the edit.
vector< XMLSourceDelta > sourceDeltas Source edits applied by this operation.