PIVX Core  5.6.99
P2P Digital Currency
budgetdb.h
Go to the documentation of this file.
1 // Copyright (c) 2014-2015 The Dash developers
2 // Copyright (c) 2015-2020 The PIVX Core developers
3 // Distributed under the MIT/X11 software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef PIVX_BUDGET_BUDGETDB_H
7 #define PIVX_BUDGET_BUDGETDB_H
8 
9 #include "budget/budgetmanager.h"
10 #include "fs.h"
11 
12 void DumpBudgets(CBudgetManager& budgetman);
13 
14 
17 class CBudgetDB
18 {
19 private:
20  fs::path pathDB;
21  std::string strMagicMessage;
22 
23 public:
24  enum ReadResult {
25  Ok,
32  };
33 
34  CBudgetDB();
35  bool Write(const CBudgetManager& objToSave);
36  ReadResult Read(CBudgetManager& objToLoad, bool fDryRun = false);
37 };
38 
39 #endif // PIVX_BUDGET_BUDGETDB_H
void DumpBudgets(CBudgetManager &budgetman)
Definition: budgetdb.cpp:137
Save Budget Manager (budget.dat)
Definition: budgetdb.h:18
@ IncorrectFormat
Definition: budgetdb.h:31
@ IncorrectMagicNumber
Definition: budgetdb.h:30
@ IncorrectMagicMessage
Definition: budgetdb.h:29
@ FileError
Definition: budgetdb.h:26
@ HashReadError
Definition: budgetdb.h:27
@ IncorrectHash
Definition: budgetdb.h:28
std::string strMagicMessage
Definition: budgetdb.h:21
bool Write(const CBudgetManager &objToSave)
Definition: budgetdb.cpp:23
fs::path pathDB
Definition: budgetdb.h:20
ReadResult Read(CBudgetManager &objToLoad, bool fDryRun=false)
Definition: budgetdb.cpp:55