12#ifndef OPENSWMM_CHECKPOINT_H
13#define OPENSWMM_CHECKPOINT_H
21#define SWMM_CHECKPOINT_INSPECTION (1UL << 0)
22#define SWMM_CHECKPOINT_RESTORE (1UL << 1)
23#define SWMM_CHECKPOINT_SAVE_NEW (1UL << 2)
24#define SWMM_CHECKPOINT_BINARY_PROFILE (1UL << 3)
25#define SWMM_CHECKPOINT_SURFACE_PROFILE (1UL << 4)
26#define SWMM_CHECKPOINT_SOURCE_STREAM (1UL << 5)
27#define SWMM_CHECKPOINT_FILE_PROFILE (1UL << 6)
28#define SWMM_CHECKPOINT_BUNDLE_EXPORT (1UL << 7)
29#define SWMM_CHECKPOINT_SESSION_BUILDER (1UL << 8)
33#define SWMM_CHECKPOINT_SESSION_ATTACHED (1UL << 0)
34#define SWMM_CHECKPOINT_SESSION_BOUNDARY (1UL << 1)
35#define SWMM_CHECKPOINT_SESSION_FRESH (1UL << 2)
36#define SWMM_CHECKPOINT_SESSION_MANAGED (1UL << 3)
38#define SWMM_CHECKPOINT_OUTPUT_NONE 0
39#define SWMM_CHECKPOINT_OUTPUT_BINARY 1
40#define SWMM_CHECKPOINT_OUTPUT_MESH 2
41#define SWMM_CHECKPOINT_OUTPUT_COMBINED 3
42#define SWMM_CHECKPOINT_OUTPUT_FILES 4
180 size_t capacity,
size_t* required);
#define SWMM_ENGINE_API
Definition openswmm_2d.h:62
void * SWMM_Engine
Opaque handle to an OpenSWMM Engine instance.
Definition openswmm_callbacks.h:55
SWMM_ENGINE_API int swmm_checkpoint_session_status(SWMM_Engine engine, unsigned long *flags)
Read the current checkpoint attachment and boundary hints.
Definition openswmm_checkpoint_impl.cpp:143
SWMM_ENGINE_API void swmm_checkpoint_inspection_destroy(SWMM_CheckpointInspection snapshot)
Release an inspection snapshot independently of engine lifetime.
Definition openswmm_checkpoint_impl.cpp:216
SWMM_ENGINE_API int swmm_checkpoint_inspect(SWMM_Engine engine, const char *path, SWMM_CheckpointInspection *snapshot)
Validate a checkpoint against a fresh session and return independent metadata.
Definition openswmm_checkpoint_impl.cpp:181
SWMM_ENGINE_API const char * swmm_checkpoint_last_error_msg(void)
Borrow the diagnostic from the last checkpoint operation on this thread.
Definition openswmm_checkpoint_impl.cpp:257
void * SWMM_CheckpointInspection
Definition openswmm_checkpoint.h:95
SWMM_ENGINE_API int swmm_checkpoint_save(SWMM_Engine engine, const char *new_path)
Publish a new checkpoint exclusively at an accepted session boundary.
Definition openswmm_checkpoint_impl.cpp:219
SWMM_ENGINE_API int swmm_checkpoint_export_bundle(const char *path, const char *new_folder)
Package an existing file-backed checkpoint in a new exclusive directory.
Definition openswmm_checkpoint_impl.cpp:242
SWMM_ENGINE_API int swmm_checkpoint_restore(SWMM_Engine engine, const char *path)
Restore a compatible checkpoint into an explicitly prepared fresh session.
Definition openswmm_checkpoint_impl.cpp:232
SWMM_ENGINE_API int swmm_checkpoint_inspection_json(SWMM_CheckpointInspection snapshot, char *utf8, size_t capacity, size_t *required)
Copy inspection metadata as a complete NUL-terminated UTF-8 JSON document.
Definition openswmm_checkpoint_impl.cpp:199
SWMM_ENGINE_API int swmm_checkpoint_capabilities(SWMM_Engine engine, unsigned long *flags)
Query checkpoint features compiled into this backend.
Definition openswmm_checkpoint_impl.cpp:121
SWMM_ENGINE_API int swmm_checkpoint_start_session(SWMM_Engine engine, const SWMM_CheckpointSessionOptions *options)
Initialize and attach a managed checkpoint session at its initial boundary.
Definition openswmm_checkpoint_impl.cpp:153
OpenSWMM Engine — primary transparent C API (master header).
Definition openswmm_checkpoint.h:44
int output
Definition openswmm_checkpoint.h:47
unsigned long schema_version
Definition openswmm_checkpoint.h:46
const char * ownership_token
Definition openswmm_checkpoint.h:52
int detailed_source_intervals
Definition openswmm_checkpoint.h:50
const char * source_history
Definition openswmm_checkpoint.h:49
size_t struct_size
Definition openswmm_checkpoint.h:45