Control-thread registry for pure note transforms. More...
#include <note_transform.hpp>
Public Member Functions | |
| std::optional< NoteTransformError > | register_transform (NoteTransformRegistration registration) |
| Admits one valid, unique transform identity. | |
| runtime::Result< NoteTransformPreview, NoteTransformError > | preview (const DocumentView &view, WriterToken &writer, const ApplyNoteTransform &request) const |
| Invokes the requested transform and prepares its durable replacement. | |
| std::size_t | size () const noexcept |
| Returns the number of admitted transform identities. | |
Static Public Attributes | |
| static constexpr std::size_t | kMaxRegistrations = 1024 |
| Maximum number of transform identities admitted by one registry. | |
| static constexpr std::size_t | kMaxParameterBytes = 1024 * 1024 |
| Maximum canonical parameter payload size in bytes. | |
| static constexpr std::size_t | kMaxDurableCommandNotes = DecodeLimits{}.max_notes |
Control-thread registry for pure note transforms.
Registrations are immutable by identity once admitted. A transform may preserve an input note's ItemId by returning it. An output with an invalid ItemId is assigned a fresh project identity; any other identity is refused.
| runtime::Result< NoteTransformPreview, NoteTransformError > pulp::timeline::NoteTransformRegistry::preview | ( | const DocumentView & | view, |
| WriterToken & | writer, | ||
| const ApplyNoteTransform & | request ) const |
Invokes the requested transform and prepares its durable replacement.
The callback runs once on the control thread. Successful output is validated, assigned identities where requested, lowered to an ordinary transaction, and applied to produce snapshot; neither the supplied view nor its project is mutated. The writer may consume identities while preparing valid output.
| std::optional< NoteTransformError > pulp::timeline::NoteTransformRegistry::register_transform | ( | NoteTransformRegistration | registration | ) |
Admits one valid, unique transform identity.
The registry retains shared ownership of user_data. Failure leaves the registry unchanged.
|
inlinenoexcept |
Returns the number of admitted transform identities.
|
staticconstexpr |
|
staticconstexpr |
Maximum canonical parameter payload size in bytes.
|
staticconstexpr |
Maximum number of transform identities admitted by one registry.