DuxReiNummariae 1.1.0-alpha.19
Simple and powerful budgeting application
Loading...
Searching...
No Matches
drn::storage::BudgetStorage Struct Referenceabstract

The manager interface for interacting with a stored budget. More...

#include <BudgetStorage.hpp>

Inheritance diagram for drn::storage::BudgetStorage:
Collaboration diagram for drn::storage::BudgetStorage:

Classes

struct  Data
 Represents a data-bag for serialising the budget information. More...

Public Member Functions

 BudgetStorage ()=default
 BudgetStorage (BudgetStorage &&)=default
 BudgetStorage (const BudgetStorage &)=delete
virtual ~BudgetStorage ()=default
virtual void changeLocation (const ::QString &location)=0
 When implemented, changes the storage location for storing or loading a budget.
virtual Data load () const =0
 When implemented, loads a budget file from a storage location.
virtual const ::QString & name () const noexcept=0
 When implemented, provides an accessor to the name of the budget stored, e.g. when stored on a file-system this would be the file-name.
BudgetStorageoperator= (BudgetStorage &&)=default
BudgetStorageoperator= (const BudgetStorage &)=delete
virtual void store (const Data &data) const =0
 When implemented, stores all budget information to a location.

Detailed Description

The manager interface for interacting with a stored budget.

Constructor & Destructor Documentation

◆ BudgetStorage() [1/3]

drn::storage::BudgetStorage::BudgetStorage ( )
default
Here is the caller graph for this function:

◆ BudgetStorage() [2/3]

drn::storage::BudgetStorage::BudgetStorage ( const BudgetStorage & )
delete
Here is the call graph for this function:

◆ BudgetStorage() [3/3]

drn::storage::BudgetStorage::BudgetStorage ( BudgetStorage && )
default
Here is the call graph for this function:

◆ ~BudgetStorage()

virtual drn::storage::BudgetStorage::~BudgetStorage ( )
virtualdefault

Member Function Documentation

◆ changeLocation()

virtual void drn::storage::BudgetStorage::changeLocation ( const ::QString & location)
pure virtual

When implemented, changes the storage location for storing or loading a budget.

Exceptions
StorageErrorWhen the path is invalid.
Parameters
locationThe path to the location of the budget.

Implemented in drn::file_storage::BudgetFile.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load()

virtual Data drn::storage::BudgetStorage::load ( ) const
nodiscardpure virtual

When implemented, loads a budget file from a storage location.

Exceptions
StorageErrorWhen there's an issue loading the budget.
Returns
The values loaded for the budget file.

Implemented in drn::file_storage::BudgetFile.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

virtual const ::QString & drn::storage::BudgetStorage::name ( ) const
nodiscardpure virtualnoexcept

When implemented, provides an accessor to the name of the budget stored, e.g. when stored on a file-system this would be the file-name.

Implemented in drn::file_storage::BudgetFile.

◆ operator=() [1/2]

BudgetStorage & drn::storage::BudgetStorage::operator= ( BudgetStorage && )
default
Here is the call graph for this function:

◆ operator=() [2/2]

BudgetStorage & drn::storage::BudgetStorage::operator= ( const BudgetStorage & )
delete
Here is the call graph for this function:

◆ store()

virtual void drn::storage::BudgetStorage::store ( const Data & data) const
pure virtual

When implemented, stores all budget information to a location.

Exceptions
StorageErrorWhen the budget cannot be stored.
Parameters
[in]dataThe budget data to store.

Implemented in drn::file_storage::BudgetFile.

Here is the call graph for this function:
Here is the caller graph for this function: