Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::HTML_Player_Frame_Sink< Mapper > Class Template Reference

Sink that writes a self-contained HTML playback file. More...

#include <ca-html-player.H>

Collaboration diagram for Aleph::CA::HTML_Player_Frame_Sink< Mapper >:
[legend]

Public Member Functions

 HTML_Player_Frame_Sink (std::filesystem::path path, Mapper mapper, HTML_Player_Options opts={})
 Build an HTML player sink.
 
template<typename Lattice >
void accept (const std::size_t step, const Lattice &frame)
 Append one frame to the embedded trajectory.
 
void flush () const
 Write the final self-contained HTML file.
 
std::size_t size () const noexcept
 Return collected frame count.
 

Private Attributes

std::filesystem::path path_
 
Mapper mapper_
 
HTML_Player_Options opts_ {}
 
Array< ca_html_detail::Frame > frames_
 

Detailed Description

template<typename Mapper>
class Aleph::CA::HTML_Player_Frame_Sink< Mapper >

Sink that writes a self-contained HTML playback file.

Template Parameters
Mapperinvocable state_type -> RGB8.

Definition at line 133 of file ca-html-player.H.

Constructor & Destructor Documentation

◆ HTML_Player_Frame_Sink()

template<typename Mapper >
Aleph::CA::HTML_Player_Frame_Sink< Mapper >::HTML_Player_Frame_Sink ( std::filesystem::path  path,
Mapper  mapper,
HTML_Player_Options  opts = {} 
)
inline

Build an HTML player sink.

Parameters
[in]pathoutput .html file.
[in]mapperstate-to-RGB mapper.
[in]optsplayer options.

Definition at line 146 of file ca-html-player.H.

Member Function Documentation

◆ accept()

◆ flush()

◆ size()

template<typename Mapper >
std::size_t Aleph::CA::HTML_Player_Frame_Sink< Mapper >::size ( ) const
inlinenoexcept

Return collected frame count.

Returns
number of frames currently buffered.

Definition at line 217 of file ca-html-player.H.

Member Data Documentation

◆ frames_

◆ mapper_

◆ opts_

◆ path_

template<typename Mapper >
std::filesystem::path Aleph::CA::HTML_Player_Frame_Sink< Mapper >::path_
private

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