Mapper  0.9.0
API documentation
Public Member Functions | List of all members
AutosaveTestDocument Class Reference

#include <autosave_t.h>

Inheritance diagram for AutosaveTestDocument:
Inheritance graph
[legend]
Collaboration diagram for AutosaveTestDocument:
Collaboration graph
[legend]

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...
 
- Public Member Functions inherited from OpenOrienteering::Autosave
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

- Public Types inherited from OpenOrienteering::Autosave
enum  AutosaveResult { Success, PermanentFailure, TemporaryFailure }
 Possible results of autosave attempts. More...
 
- Protected Member Functions inherited from OpenOrienteering::Autosave
 Autosave ()
 Initializes the autosave feature. More...
 
virtual ~Autosave ()
 Destructs the autosave feature. More...
 

Detailed Description

Test:
A simple document class for AutosaveTest.

Constructor & Destructor Documentation

◆ AutosaveTestDocument()

AutosaveTestDocument::AutosaveTestDocument ( Autosave::AutosaveResult  expected_result)

Constructs a document with the given expected autosave() result.

◆ ~AutosaveTestDocument()

AutosaveTestDocument::~AutosaveTestDocument ( )
overridedefault

Member Function Documentation

◆ autosave()

Autosave::AutosaveResult AutosaveTestDocument::autosave ( )
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.

◆ autosaveCount()

int AutosaveTestDocument::autosaveCount ( ) const

Returns the number of invocations of autosave().


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