Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::timeline::RegisteredContent Class Reference

Extension-defined typed C++ content admitted by a SchemaRegistry. More...

#include <clip.hpp>

Public Member Functions

const SchemaIdentity & schema () const noexcept
 Returns the schema identity that controls serialization.
const std::shared_ptr< const void > & value () const noexcept
 Returns shared ownership of the type-erased immutable value.
const std::string & canonical_payload_json () const noexcept
 Returns the validated canonical JSON representation.
std::size_t retained_bytes () const noexcept
 Returns the retained-byte charge used for document limits.
const std::shared_ptr< const void > & schema_registry_identity () const noexcept
 Opaque identity of the immutable schema registry whose codec created this erased value.
template<typename T>
const T * value_as () const noexcept
 Views the registered value as T.

Friends

class SchemaRegistry

Detailed Description

Extension-defined typed C++ content admitted by a SchemaRegistry.

The shared value and canonical JSON are immutable. Registered payloads own no ItemIds, so subtree remapping cannot hide untracked identity references.

Member Function Documentation

◆ canonical_payload_json()

const std::string & pulp::timeline::RegisteredContent::canonical_payload_json ( ) const
inlinenoexcept

Returns the validated canonical JSON representation.

◆ retained_bytes()

std::size_t pulp::timeline::RegisteredContent::retained_bytes ( ) const
inlinenoexcept

Returns the retained-byte charge used for document limits.

◆ schema()

const SchemaIdentity & pulp::timeline::RegisteredContent::schema ( ) const
inlinenoexcept

Returns the schema identity that controls serialization.

◆ schema_registry_identity()

const std::shared_ptr< const void > & pulp::timeline::RegisteredContent::schema_registry_identity ( ) const
inlinenoexcept

Opaque identity of the immutable schema registry whose codec created this erased value.

Equal type/version text from another registry is not sufficient to make value_as<T>() safe.

◆ value()

const std::shared_ptr< const void > & pulp::timeline::RegisteredContent::value ( ) const
inlinenoexcept

Returns shared ownership of the type-erased immutable value.

◆ value_as()

template<typename T>
const T * pulp::timeline::RegisteredContent::value_as ( ) const
inlinenoexcept

Views the registered value as T.

The caller must use the type associated with schema(); no run-time type check is performed, and the pointer remains owned by this value.

◆ SchemaRegistry

friend class SchemaRegistry
friend

The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/timeline/include/pulp/timeline/clip.hpp