Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::components::TokenSequence Class Reference

Independently owned tokens whose style-byte reservation follows the last reference. More...

#include "donner/svg/components/style/CustomPropertyMap.h"

Public Member Functions

std::span< const css::ComponentValue > tokens () const
 Borrow the stored tokens for the lifetime of this sequence.
 TokenSequence (const TokenSequence &)=delete
TokenSequence & operator= (const TokenSequence &)=delete

Static Public Member Functions

static std::shared_ptr< const TokenSequence > Create (std::shared_ptr< RetainedStyleBytes > account, std::span< const css::ComponentValue > values)
 Deep-copy an admitted token tree, detaching token strings from the declaration source.

Static Public Attributes

static constexpr std::size_t kMaximumComponentValues = 65'536
 Maximum number of values in the entire token tree.
static constexpr std::size_t kMaximumTextBytes = 1024 * 1024
 Maximum aggregate stored token text.

Detailed Description

Independently owned tokens whose style-byte reservation follows the last reference.

Member Function Documentation

◆ Create()

std::shared_ptr< const TokenSequence > donner::svg::components::TokenSequence::Create ( std::shared_ptr< RetainedStyleBytes > account,
std::span< const css::ComponentValue > values )
staticnodiscard

Deep-copy an admitted token tree, detaching token strings from the declaration source.

Parameters
accountAccount charged until the last reference releases the sequence.
valuesBorrowed values. An empty tree is a valid custom property value.
Returns
Null when a storage or retained-byte limit refuses the sequence.

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