Appearance
Snapshot
cpp
#include <Media/Snapshot.h>cpp
class SnapshotDefined in Media/Snapshot.h:59
A snapshot of the emulator state.
Public Methods
| Return | Name | Description |
|---|---|---|
Snapshot inline | Creates a copy of a snapshot. | |
Snapshot inline | Reads a snapshot from a file. | |
Snapshot inline | Reads a snapshot from a memory buffer. | |
Snapshot | Creates an empty snapshot with the given capacity. | |
Snapshot | Takes a snapshot of the emulator state. | |
Snapshot | Takes a snapshot of the emulator state and compresses it. | |
bool | isCompatiblePath virtual const inline override | Returns true if the given path points to a snapshot file. |
void | didLoad virtual override | Called after the snapshot has been loaded. |
std::pair< isize, isize > | previewImageSize const | Returns the size of the preview image (width, height). |
const u32 * | previewImageData const | Returns the pixel data of the preview image. |
time_t | timestamp const | Returns the time the snapshot was taken. |
bool | isTooOld const | Returns true if the snapshot was created by an older, incompatible version. |
bool | isTooNew const | Returns true if the snapshot was created by a newer version. |
bool | isBeta const | Returns true if the snapshot was created by a beta version. |
bool | matches inline | Returns true if the snapshot can be restored by this version. |
SnapshotHeader * | getHeader const inline | Returns a pointer to the snapshot header. |
const Thumbnail & | getThumbnail const inline | Returns the preview image. |
void | takeScreenshot | Records a screenshot. |
utl::Compressor | compressor const inline | Returns the compression method. |
bool | isCompressed const inline | Returns true if the snapshot is compressed. |
void | compress | Compresses the snapshot with the given method. |
void | uncompress | Uncompresses the snapshot. |
Snapshot
inline
cpp
inline Snapshot(const Snapshot & other)Defined in Media/Snapshot.h:72
Creates a copy of a snapshot.
Snapshot
inline
cpp
inline Snapshot(const fs::path & path)Defined in Media/Snapshot.h:74
Reads a snapshot from a file.
Snapshot
inline
cpp
inline Snapshot(const u8 * buf, isize len)Defined in Media/Snapshot.h:76
Reads a snapshot from a memory buffer.
Snapshot
cpp
Snapshot(isize capacity)Defined in Media/Snapshot.h:78
Creates an empty snapshot with the given capacity.
Snapshot
cpp
Snapshot(Amiga & amiga)Defined in Media/Snapshot.h:80
Takes a snapshot of the emulator state.
Snapshot
cpp
Snapshot(Amiga & amiga, utl::Compressor compressor)Defined in Media/Snapshot.h:82
Takes a snapshot of the emulator state and compresses it.
isCompatiblePath
virtual const inline override
cpp
virtual inline bool isCompatiblePath(const fs::path & path) const overrideDefined in Media/Snapshot.h:90
Returns true if the given path points to a snapshot file.
Reimplements
didLoad
virtual override
cpp
virtual void didLoad() overrideDefined in Media/Snapshot.h:92
Called after the snapshot has been loaded.
Reimplements
AnyFile::didLoad
previewImageSize
const
cpp
std::pair< isize, isize > previewImageSize() constDefined in Media/Snapshot.h:102
Returns the size of the preview image (width, height).
previewImageData
const
cpp
const u32 * previewImageData() constDefined in Media/Snapshot.h:104
Returns the pixel data of the preview image.
timestamp
const
cpp
time_t timestamp() constDefined in Media/Snapshot.h:106
Returns the time the snapshot was taken.
isTooOld
const
cpp
bool isTooOld() constDefined in Media/Snapshot.h:110
Returns true if the snapshot was created by an older, incompatible version.
isTooNew
const
cpp
bool isTooNew() constDefined in Media/Snapshot.h:112
Returns true if the snapshot was created by a newer version.
isBeta
const
cpp
bool isBeta() constDefined in Media/Snapshot.h:114
Returns true if the snapshot was created by a beta version.
matches
inline
cpp
inline bool matches()Defined in Media/Snapshot.h:116
Returns true if the snapshot can be restored by this version.
getHeader
const inline
cpp
inline SnapshotHeader * getHeader() constDefined in Media/Snapshot.h:120
Returns a pointer to the snapshot header.
getThumbnail
const inline
cpp
inline const Thumbnail & getThumbnail() constDefined in Media/Snapshot.h:124
Returns the preview image.
takeScreenshot
cpp
void takeScreenshot(Amiga & amiga)Defined in Media/Snapshot.h:131
Records a screenshot.
compressor
const inline
cpp
inline utl::Compressor compressor() constDefined in Media/Snapshot.h:140
Returns the compression method.
isCompressed
const inline
cpp
inline bool isCompressed() constDefined in Media/Snapshot.h:144
Returns true if the snapshot is compressed.
compress
cpp
void compress(utl::Compressor method)Defined in Media/Snapshot.h:148
Compresses the snapshot with the given method.
uncompress
cpp
void uncompress()Defined in Media/Snapshot.h:150
Uncompresses the snapshot.
Public Static Methods
| Return | Name | Description |
|---|---|---|
bool | isCompatible static | Checks whether a file contains a snapshot. |
isCompatible
static
cpp
static bool isCompatible(const fs::path & path)Defined in Media/Snapshot.h:64
Checks whether a file contains a snapshot.