![]() |
Mapper
0.9.0
API documentation
|
#include <autosave_t.h>
Public Member Functions | |
AutosaveTestDocument (Autosave::AutosaveResult expected_result) | |
Constructs a document with the given expected autosave() result. More... | |
~AutosaveTestDocument () override=default | |
Autosave::AutosaveResult | autosave () override |
Simulates autosaving by returning the current expected_result. More... | |
int | autosaveCount () const |
Returns the number of invocations of autosave(). More... | |
![]() | |
virtual QString | autosavePath (const QString &path) const |
Returns the autosave file path for the given path. More... | |
void | setAutosaveNeeded (bool) |
Informs Autosave whether autosaving is needed or not. More... | |
bool | autosaveNeeded () const |
Returns true if autosave is known to be needed. More... | |
Additional Inherited Members | |
![]() | |
enum | AutosaveResult { Success, PermanentFailure, TemporaryFailure } |
Possible results of autosave attempts. More... | |
![]() | |
Autosave () | |
Initializes the autosave feature. More... | |
virtual | ~Autosave () |
Destructs the autosave feature. More... | |
AutosaveTestDocument::AutosaveTestDocument | ( | Autosave::AutosaveResult | expected_result | ) |
Constructs a document with the given expected autosave() result.
|
overridedefault |
|
overridevirtual |
Simulates autosaving by returning the current expected_result.
If the result as returned by the current invocation is Autosave::TemporaryFailure, the expected result (as returned by the next invocation) will be changed to Autosave::Success.
Implements OpenOrienteering::Autosave.
int AutosaveTestDocument::autosaveCount | ( | ) | const |
Returns the number of invocations of autosave().