Donner SVG 0.8.0
0.8.0 ยท ebf353960.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
SubDocumentCache.h File Reference
#include <functional>
#include <memory>
#include <optional>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "donner/base/ParseDiagnostic.h"
#include "donner/base/ParseWarningSink.h"
#include "donner/base/RcString.h"
#include "donner/svg/SVGDocumentHandle.h"
Include dependency graph for SubDocumentCache.h:
This graph shows which files directly or indirectly include this file:

Classes

class  donner::svg::components::SubDocumentCache
 Cache for parsed SVG sub-documents referenced by <image> or <use> elements. More...
struct  donner::svg::components::SubDocumentCache::Limits
 Local admission ceilings, also tightening the family when bound to a resource registry. Entity and parsed-payload admission snapshots include the original root. More...
struct  donner::svg::components::SubDocumentCache::SecurityStats
 Observed cache size, parse work, and admission failures. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.
namespace  donner::svg
 Donner SVG library, which can load, manipulate and render SVG files.
namespace  donner::svg::components
 Contains the implementation of the Donner ECS,.

Class Documentation

◆ donner::svg::components::SubDocumentCache::Limits

struct donner::svg::components::SubDocumentCache::Limits

Local admission ceilings, also tightening the family when bound to a resource registry. Entity and parsed-payload admission snapshots include the original root.

Class Members
size_t maximumAggregateEntities = 32 * 1024 Root plus cached sub-document entities.
size_t maximumAggregatePayloadBytes Root plus cached parsed-payload bytes.
size_t maximumDocuments = 64 Distinct cached documents.
size_t maximumParseAttempts = 128 Parse attempts, including failures.

◆ donner::svg::components::SubDocumentCache::SecurityStats

struct donner::svg::components::SubDocumentCache::SecurityStats

Observed cache size, parse work, and admission failures.

Class Members
size_t documents = 0 Successfully cached sub-documents.
size_t entities = 0 Aggregate entities in cached sub-documents.
size_t negativeCacheHits = 0 Negative-cache or reject-all short-circuits.
size_t parseAttempts = 0 Parse attempts charged to this cache.
size_t payloadBytes = 0 Aggregate retained parsed-payload bytes.
bool rejected = false Whether an admission limit rejected a request.