载入中...
搜索中...
未找到
eve::particles::ParticleEventJournal类 参考

Bounded owner-thread particle recording buffer with explicit time and sticky errors. @ownership Owns every event and its appearance; retains no input references or callbacks. @thread Exclusive owner-thread access. Event appends never allocate after prepare. 更多...

#include <ParticleEventJournal.h>

Public 成员函数

Result< void > prepare (std::size_t maximumEvents)
 Start a new empty journal with a bounded event budget, replacing prior contents only on success. @cost Linear in event capacity for reservation, once per recording outside simulation steps.
 
Result< void > append (ParticleRecordEvent event)
 Append an owning event at a nondecreasing explicit time; never allocates or calls user code.
 
Result< std::vector< ParticleRecordEvent > > finish ()
 Finish valid recording and transfer all owning events, disabling further appends. @cost Constant-time vector ownership transfer per completed recording; no event copy or allocation.
 
void invalidate () noexcept
 Mark active recording invalid after a producer failure; disabled journals remain disabled.
 
void disable () noexcept
 Disable valid recording, preserving sticky failures and owned events for inspection.
 
ParticleRecordState state () const noexcept
 Current lifecycle and failure state.
 
std::span< const ParticleRecordEvent > events () const noexcept
 Borrow recorded events; valid until prepare, append or journal destruction. @ownership Borrowed view only; copy before modifying the journal or transferring across threads.
 

详细描述

Bounded owner-thread particle recording buffer with explicit time and sticky errors. @ownership Owns every event and its appearance; retains no input references or callbacks. @thread Exclusive owner-thread access. Event appends never allocate after prepare.

在文件 ParticleEventJournal.h 第 24 行定义.

成员函数说明

◆ append()

Result< void > eve::particles::ParticleEventJournal::append ( ParticleRecordEvent  event)

◆ disable()

void eve::particles::ParticleEventJournal::disable ( )
noexcept

Disable valid recording, preserving sticky failures and owned events for inspection.

在文件 ParticleEventJournal.cpp 第 59 行定义.

引用了 eve::particles::Disabled , 以及 eve::particles::Recording.

◆ events()

std::span< const ParticleRecordEvent > eve::particles::ParticleEventJournal::events ( ) const
noexcept

Borrow recorded events; valid until prepare, append or journal destruction. @ownership Borrowed view only; copy before modifying the journal or transferring across threads.

在文件 ParticleEventJournal.cpp 第 63 行定义.

◆ finish()

Result< std::vector< ParticleRecordEvent > > eve::particles::ParticleEventJournal::finish ( )

Finish valid recording and transfer all owning events, disabling further appends. @cost Constant-time vector ownership transfer per completed recording; no event copy or allocation.

返回
Complete owned buffer or diagnostic; failed/disabled journals cannot publish and remain unchanged.
备注
Producer must close live births before this call; trajectory conversion validates event completeness.

在文件 ParticleEventJournal.cpp 第 46 行定义.

引用了 eve::particles::Disabled, eve::Diagnostic::error(), eve::PreconditionViolation, eve::particles::Recording , 以及 result.

◆ invalidate()

void eve::particles::ParticleEventJournal::invalidate ( )
noexcept

Mark active recording invalid after a producer failure; disabled journals remain disabled.

在文件 ParticleEventJournal.cpp 第 56 行定义.

引用了 eve::particles::InvalidInput , 以及 eve::particles::Recording.

被这些函数引用 eve::particles::recordParticleEvent() , 以及 eve::particles::stepEmitterSim().

◆ prepare()

Result< void > eve::particles::ParticleEventJournal::prepare ( std::size_t  maximumEvents)

Start a new empty journal with a bounded event budget, replacing prior contents only on success. @cost Linear in event capacity for reservation, once per recording outside simulation steps.

返回
Success or invalid budget/allocation diagnostic. Maximum 2 million events.

在文件 ParticleEventJournal.cpp 第 5 行定义.

引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, eve::particles::Recording , 以及 eve::Result< T >::success().

◆ state()

ParticleRecordState eve::particles::ParticleEventJournal::state ( ) const
noexcept

Current lifecycle and failure state.

在文件 ParticleEventJournal.cpp 第 62 行定义.

被这些函数引用 eve::particles::recordParticleEvent() , 以及 eve::particles::stepEmitterSim().


该类的文档由以下文件生成: