Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

Generic Dumping and Loading

More...

#include <flat-database.h>

Public Member Functions

 CFlatDB (std::string strFilenameIn, std::string strMagicMessageIn)
 
bool Load (T &objToLoad)
 
bool Dump (T &objToSave)
 

Private Types

enum  ReadResult {
  Ok, FileError, HashReadError, IncorrectHash,
  IncorrectMagicMessage, IncorrectMagicNumber, IncorrectFormat
}
 

Private Member Functions

bool Write (const T &objToSave)
 
ReadResult Read (T &objToLoad, bool fDryRun=false)
 

Private Attributes

fs::path pathDB
 
std::string strFilename
 
std::string strMagicMessage
 

Detailed Description

template<typename T>
class CFlatDB< T >

Generic Dumping and Loading

Definition at line 21 of file flat-database.h.

Member Enumeration Documentation

◆ ReadResult

template<typename T>
enum CFlatDB::ReadResult
private
Enumerator
Ok 
FileError 
HashReadError 
IncorrectHash 
IncorrectMagicMessage 
IncorrectMagicNumber 
IncorrectFormat 

Definition at line 25 of file flat-database.h.

Constructor & Destructor Documentation

◆ CFlatDB()

template<typename T>
CFlatDB< T >::CFlatDB ( std::string  strFilenameIn,
std::string  strMagicMessageIn 
)
inline

Member Function Documentation

◆ Dump()

template<typename T>
bool CFlatDB< T >::Dump ( T &  objToSave)
inline

◆ Load()

template<typename T>
bool CFlatDB< T >::Load ( T &  objToLoad)
inline

◆ Read()

◆ Write()

template<typename T>
bool CFlatDB< T >::Write ( const T &  objToSave)
inlineprivate

Member Data Documentation

◆ pathDB

template<typename T>
fs::path CFlatDB< T >::pathDB
private

Definition at line 35 of file flat-database.h.

Referenced by CFlatDB< T >::CFlatDB(), CFlatDB< T >::Read(), and CFlatDB< T >::Write().

◆ strFilename

template<typename T>
std::string CFlatDB< T >::strFilename
private

◆ strMagicMessage

template<typename T>
std::string CFlatDB< T >::strMagicMessage
private

Definition at line 37 of file flat-database.h.

Referenced by CFlatDB< T >::CFlatDB(), CFlatDB< T >::Read(), and CFlatDB< T >::Write().


The documentation for this class was generated from the following file:
Released under the MIT license