Raven Core  3.0.0
P2P Digital Currency
Public Member Functions | List of all members
CAssetsDB Class Reference

Access to the block database (blocks/index/) More...

#include <assetdb.h>

Inheritance diagram for CAssetsDB:
[legend]
Collaboration diagram for CAssetsDB:
[legend]

Public Member Functions

 CAssetsDB (size_t nCacheSize, bool fMemory=false, bool fWipe=false)
 
 CAssetsDB (const CAssetsDB &)=delete
 
CAssetsDBoperator= (const CAssetsDB &)=delete
 
bool WriteAssetData (const CNewAsset &asset, const int nHeight, const uint256 &blockHash)
 
bool WriteAssetAddressQuantity (const std::string &assetName, const std::string &address, const CAmount &quantity)
 
bool WriteAddressAssetQuantity (const std::string &address, const std::string &assetName, const CAmount &quantity)
 
bool WriteBlockUndoAssetData (const uint256 &blockhash, const std::vector< std::pair< std::string, CBlockAssetUndo > > &assetUndoData)
 
bool WriteReissuedMempoolState ()
 
bool ReadAssetData (const std::string &strName, CNewAsset &asset, int &nHeight, uint256 &blockHash)
 
bool ReadAssetAddressQuantity (const std::string &assetName, const std::string &address, CAmount &quantity)
 
bool ReadAddressAssetQuantity (const std::string &address, const std::string &assetName, CAmount &quantity)
 
bool ReadBlockUndoAssetData (const uint256 &blockhash, std::vector< std::pair< std::string, CBlockAssetUndo > > &assetUndoData)
 
bool ReadReissuedMempoolState ()
 
bool EraseAssetData (const std::string &assetName)
 
bool EraseMyAssetData (const std::string &assetName)
 
bool EraseAssetAddressQuantity (const std::string &assetName, const std::string &address)
 
bool EraseAddressAssetQuantity (const std::string &address, const std::string &assetName)
 
bool LoadAssets ()
 
bool AssetDir (std::vector< CDatabasedAssetData > &assets, const std::string filter, const size_t count, const long start)
 
bool AssetDir (std::vector< CDatabasedAssetData > &assets)
 
bool AddressDir (std::vector< std::pair< std::string, CAmount > > &vecAssetAmount, int &totalEntries, const bool &fGetTotal, const std::string &address, const size_t count, const long start)
 
bool AssetAddressDir (std::vector< std::pair< std::string, CAmount > > &vecAddressAmount, int &totalEntries, const bool &fGetTotal, const std::string &assetName, const size_t count, const long start)
 
- Public Member Functions inherited from CDBWrapper
 CDBWrapper (const fs::path &path, size_t nCacheSize, bool fMemory=false, bool fWipe=false, bool obfuscate=false, size_t maxFileSize=2<< 20)
 
 ~CDBWrapper ()
 
template<typename K , typename V >
bool Read (const K &key, V &value) const
 
template<typename K , typename V >
bool Write (const K &key, const V &value, bool fSync=false)
 
template<typename K >
bool Exists (const K &key) const
 
template<typename K >
bool Erase (const K &key, bool fSync=false)
 
bool WriteBatch (CDBBatch &batch, bool fSync=false)
 
bool Flush ()
 
bool Sync ()
 
CDBIteratorNewIterator ()
 
bool IsEmpty ()
 Return true if the database managed by this class contains no entries. More...
 
template<typename K >
size_t EstimateSize (const K &key_begin, const K &key_end) const
 
template<typename K >
void CompactRange (const K &key_begin, const K &key_end) const
 Compact a certain range of keys in the database. More...
 

Detailed Description

Access to the block database (blocks/index/)

Definition at line 60 of file assetdb.h.

Constructor & Destructor Documentation

◆ CAssetsDB() [1/2]

CAssetsDB::CAssetsDB ( size_t  nCacheSize,
bool  fMemory = false,
bool  fWipe = false 
)
explicit

Definition at line 24 of file assetdb.cpp.

◆ CAssetsDB() [2/2]

CAssetsDB::CAssetsDB ( const CAssetsDB )
delete

Member Function Documentation

◆ AddressDir()

bool CAssetsDB::AddressDir ( std::vector< std::pair< std::string, CAmount > > &  vecAssetAmount,
int &  totalEntries,
const bool &  fGetTotal,
const std::string &  address,
const size_t  count,
const long  start 
)

Definition at line 247 of file assetdb.cpp.

◆ AssetAddressDir()

bool CAssetsDB::AssetAddressDir ( std::vector< std::pair< std::string, CAmount > > &  vecAddressAmount,
int &  totalEntries,
const bool &  fGetTotal,
const std::string &  assetName,
const size_t  count,
const long  start 
)

Definition at line 320 of file assetdb.cpp.

◆ AssetDir() [1/2]

bool CAssetsDB::AssetDir ( std::vector< CDatabasedAssetData > &  assets,
const std::string  filter,
const size_t  count,
const long  start 
)

Definition at line 176 of file assetdb.cpp.

Here is the caller graph for this function:

◆ AssetDir() [2/2]

bool CAssetsDB::AssetDir ( std::vector< CDatabasedAssetData > &  assets)

Definition at line 391 of file assetdb.cpp.

Here is the call graph for this function:

◆ EraseAddressAssetQuantity()

bool CAssetsDB::EraseAddressAssetQuantity ( const std::string &  address,
const std::string &  assetName 
)

Definition at line 80 of file assetdb.cpp.

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

◆ EraseAssetAddressQuantity()

bool CAssetsDB::EraseAssetAddressQuantity ( const std::string &  assetName,
const std::string &  address 
)

Definition at line 76 of file assetdb.cpp.

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

◆ EraseAssetData()

bool CAssetsDB::EraseAssetData ( const std::string &  assetName)

Definition at line 66 of file assetdb.cpp.

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

◆ EraseMyAssetData()

bool CAssetsDB::EraseMyAssetData ( const std::string &  assetName)

Definition at line 71 of file assetdb.cpp.

Here is the call graph for this function:

◆ LoadAssets()

bool CAssetsDB::LoadAssets ( )

Definition at line 119 of file assetdb.cpp.

Here is the call graph for this function:

◆ operator=()

CAssetsDB& CAssetsDB::operator= ( const CAssetsDB )
delete

◆ ReadAddressAssetQuantity()

bool CAssetsDB::ReadAddressAssetQuantity ( const std::string &  address,
const std::string &  assetName,
CAmount quantity 
)

Definition at line 62 of file assetdb.cpp.

Here is the call graph for this function:

◆ ReadAssetAddressQuantity()

bool CAssetsDB::ReadAssetAddressQuantity ( const std::string &  assetName,
const std::string &  address,
CAmount quantity 
)

Definition at line 57 of file assetdb.cpp.

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

◆ ReadAssetData()

bool CAssetsDB::ReadAssetData ( const std::string &  strName,
CNewAsset asset,
int &  nHeight,
uint256 blockHash 
)

Definition at line 42 of file assetdb.cpp.

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

◆ ReadBlockUndoAssetData()

bool CAssetsDB::ReadBlockUndoAssetData ( const uint256 blockhash,
std::vector< std::pair< std::string, CBlockAssetUndo > > &  assetUndoData 
)

Definition at line 91 of file assetdb.cpp.

Here is the call graph for this function:

◆ ReadReissuedMempoolState()

bool CAssetsDB::ReadReissuedMempoolState ( )

Definition at line 106 of file assetdb.cpp.

Here is the call graph for this function:

◆ WriteAddressAssetQuantity()

bool CAssetsDB::WriteAddressAssetQuantity ( const std::string &  address,
const std::string &  assetName,
const CAmount quantity 
)

Definition at line 38 of file assetdb.cpp.

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

◆ WriteAssetAddressQuantity()

bool CAssetsDB::WriteAssetAddressQuantity ( const std::string &  assetName,
const std::string &  address,
const CAmount quantity 
)

Definition at line 33 of file assetdb.cpp.

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

◆ WriteAssetData()

bool CAssetsDB::WriteAssetData ( const CNewAsset asset,
const int  nHeight,
const uint256 blockHash 
)

Definition at line 27 of file assetdb.cpp.

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

◆ WriteBlockUndoAssetData()

bool CAssetsDB::WriteBlockUndoAssetData ( const uint256 blockhash,
const std::vector< std::pair< std::string, CBlockAssetUndo > > &  assetUndoData 
)

Definition at line 86 of file assetdb.cpp.

Here is the call graph for this function:

◆ WriteReissuedMempoolState()

bool CAssetsDB::WriteReissuedMempoolState ( )

Definition at line 101 of file assetdb.cpp.

Here is the call graph for this function:

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