inkcpp
Loading...
Searching...
No Matches
HInkSnapshot Class Reference

Handler for a ink snapshot. More...

#include <inkcpp.h>

Public Member Functions

HInkSnapshotink_snapshot_from_file (const char *filename)
 deserialize snapshot from file.
 
int ink_snapshot_num_runners (const HInkSnapshot *self)
 number of runners which are stored inside this snapshot
 
void ink_snapshot_write_to_file (const HInkSnapshot *self, const char *filename)
 serialize snapshot to file
 

Detailed Description

Handler for a ink snapshot.

Each snapshot contains a globals store and all assoziated runners/threads For convinience there exist ink::runtime::globals_interface::create_snapshot() and runner_interface::create_snapshot() . If the runner is assoziated to the globals the snapshot will be identical. If multiple runners are assoziated to the same globals all will be contained, and cann be reconsrtucted with the id parameter of ink::runtime::story::new_runner_from_snapshot()

Todo
Currently the id is equal to the creation order, a way to name the single runner/threads is WIP

Member Function Documentation

◆ ink_snapshot_from_file()

HInkSnapshot * ink_snapshot_from_file ( const char * filename)

deserialize snapshot from file.

Parameters
filenameof input file
Exceptions
ink_exceptionif it fails to open the file

◆ ink_snapshot_num_runners()

int ink_snapshot_num_runners ( const HInkSnapshot * self)

number of runners which are stored inside this snapshot

Parameters
self

◆ ink_snapshot_write_to_file()

void ink_snapshot_write_to_file ( const HInkSnapshot * self,
const char * filename )

serialize snapshot to file

Parameters
filenameoutput file filename, if already exist it will be overwritten
Exceptions
ink_exceptionif it failt to open the file
Parameters
self

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