Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

Batch of changes queued to be written to a CDBWrapper. More...

#include <dbwrapper.h>

+ Collaboration diagram for CDBBatch:

Public Member Functions

 CDBBatch (const CDBWrapper &_parent)
 
void Clear ()
 
template<typename K , typename V >
void Write (const K &key, const V &value)
 
template<typename V >
void Write (const CDataStream &_ssKey, const V &value)
 
template<typename K >
void Erase (const K &key)
 
void Erase (const CDataStream &_ssKey)
 
size_t SizeEstimate () const
 

Private Attributes

const CDBWrapperparent
 
leveldb::WriteBatch batch
 
CDataStream ssKey
 
CDataStream ssValue
 
size_t size_estimate
 

Friends

class CDBWrapper
 

Detailed Description

Batch of changes queued to be written to a CDBWrapper.

Definition at line 49 of file dbwrapper.h.

Constructor & Destructor Documentation

◆ CDBBatch()

CDBBatch::CDBBatch ( const CDBWrapper _parent)
inlineexplicit
Parameters
[in]parentCDBWrapper that this batch is to be submitted to

Definition at line 66 of file dbwrapper.h.

Member Function Documentation

◆ Clear()

void CDBBatch::Clear ( )
inline

◆ Erase() [1/2]

◆ Erase() [2/2]

void CDBBatch::Erase ( const CDataStream _ssKey)
inline

Definition at line 112 of file dbwrapper.h.

References batch, CDataStream::data(), CDataStream::size(), and size_estimate.

◆ SizeEstimate()

size_t CDBBatch::SizeEstimate ( ) const
inline

◆ Write() [1/2]

◆ Write() [2/2]

template<typename V >
void CDBBatch::Write ( const CDataStream _ssKey,
const V &  value 
)
inline

Friends And Related Function Documentation

◆ CDBWrapper

friend class CDBWrapper
friend

Definition at line 51 of file dbwrapper.h.

Member Data Documentation

◆ batch

leveldb::WriteBatch CDBBatch::batch
private

Definition at line 55 of file dbwrapper.h.

Referenced by Clear(), Erase(), Write(), and CDBWrapper::WriteBatch().

◆ parent

const CDBWrapper& CDBBatch::parent
private

Definition at line 54 of file dbwrapper.h.

Referenced by Write().

◆ size_estimate

size_t CDBBatch::size_estimate
private

Definition at line 60 of file dbwrapper.h.

Referenced by Clear(), Erase(), SizeEstimate(), and Write().

◆ ssKey

CDataStream CDBBatch::ssKey
private

Definition at line 57 of file dbwrapper.h.

Referenced by Erase(), and Write().

◆ ssValue

CDataStream CDBBatch::ssValue
private

Definition at line 58 of file dbwrapper.h.

Referenced by Write().


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