Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::StorageInterface Class Referenceabstract

Base class for the interface. More...

#include <StorageInterface.h>

Classes

struct  Parameters
 

Public Types

enum  EState { ssError , ssReady , ssSaving }
 States of executing saving. More...
 

Public Member Functions

 StorageInterface (const Parameters &)
 Constructor for passing general structure for derived classes.
 
virtual ~StorageInterface ()
 Virtual destructor for derived classes.
 
bool initialize ()
 Initializes the implementation for operation. Calls doInitialize.
 
bool uinitialize ()
 Uninitializes the implementation. Calls doInitialize.
 
virtual void addPropertyPages (PropertySheetDialog *sheet)
 
virtual std::string getFileExtension () const =0
 Gets the extension of the data file.
 
virtual std::string getFileDescription () const =0
 Gets the description of the data file.
 
virtual bool fileOpen (const std::string &path)=0
 Opens the data file.
 
virtual void fileClose ()=0
 Closes the opened file if any.
 
virtual bool fileSave (const std::string &dir, const std::string &name)=0
 Saves the data file. Return true on success.
 
virtual std::string getSavedFileName () const =0
 Gets the file name generated by the save sequence. This without extension and only after a file has been succesfully saved.
 
virtual EState GetState () const =0
 For testing if saving is ready or in error.
 

Protected Member Functions

virtual bool doInitialize (bool init)
 Must be overridden by a derived class. Should check the hardware configuration.
 

Detailed Description

Base class for the interface.

Member Enumeration Documentation

◆ EState

States of executing saving.

Enumerator
ssError 

Error occurred during operation.

Finished saving or is ready for action again.

ssReady 

Saving sequence is in progress.

ssSaving 

Constructor & Destructor Documentation

◆ StorageInterface()

sf::StorageInterface::StorageInterface ( const Parameters )
explicit

Constructor for passing general structure for derived classes.

◆ ~StorageInterface()

virtual sf::StorageInterface::~StorageInterface ( )
virtual

Virtual destructor for derived classes.

Member Function Documentation

◆ addPropertyPages()

virtual void sf::StorageInterface::addPropertyPages ( PropertySheetDialog sheet)
virtual

Adds controller specific property pages to the passed sheet.

Parameters
sheet

◆ doInitialize()

virtual bool sf::StorageInterface::doInitialize ( bool  init)
inlineprotectedvirtual

Must be overridden by a derived class. Should check the hardware configuration.

Parameters
initTrue when initializing.
Returns
True on success.

◆ fileClose()

virtual void sf::StorageInterface::fileClose ( )
pure virtual

Closes the opened file if any.

◆ fileOpen()

virtual bool sf::StorageInterface::fileOpen ( const std::string &  path)
pure virtual

Opens the data file.

Parameters
pathfile to open.
Returns
true on success.

◆ fileSave()

virtual bool sf::StorageInterface::fileSave ( const std::string &  dir,
const std::string &  name 
)
pure virtual

Saves the data file. Return true on success.

Parameters
dir
name
Returns

◆ getFileDescription()

virtual std::string sf::StorageInterface::getFileDescription ( ) const
pure virtual

Gets the description of the data file.

◆ getFileExtension()

virtual std::string sf::StorageInterface::getFileExtension ( ) const
pure virtual

Gets the extension of the data file.

Returns
Extension including the point.

◆ getSavedFileName()

virtual std::string sf::StorageInterface::getSavedFileName ( ) const
pure virtual

Gets the file name generated by the save sequence. This without extension and only after a file has been succesfully saved.

◆ GetState()

virtual EState sf::StorageInterface::GetState ( ) const
pure virtual

For testing if saving is ready or in error.

◆ initialize()

bool sf::StorageInterface::initialize ( )

Initializes the implementation for operation. Calls doInitialize.

Returns
True on success.

◆ uinitialize()

bool sf::StorageInterface::uinitialize ( )

Uninitializes the implementation. Calls doInitialize.

Returns
True on success.

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