veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
altintegration::adaptors::LevelDBStorage Struct Reference

Detailed Description

Definition at line 63 of file leveldb_impl.hpp.

+ Inheritance diagram for altintegration::adaptors::LevelDBStorage:
+ Collaboration diagram for altintegration::adaptors::LevelDBStorage:

Public Member Functions

 LevelDBStorage (const std::string &path)
 
void write (const std::vector< uint8_t > &key, const std::vector< uint8_t > &value) override
 
bool read (const std::vector< uint8_t > &key, std::vector< uint8_t > &value) override
 
std::shared_ptr< WriteBatchgenerateWriteBatch () override
 
std::shared_ptr< StorageIteratorgenerateIterator () override
 
virtual void write (const std::vector< uint8_t > &key, const std::vector< uint8_t > &value)=0
 
virtual bool read (const std::vector< uint8_t > &key, std::vector< uint8_t > &out)=0
 
virtual std::shared_ptr< WriteBatchgenerateWriteBatch ()=0
 
virtual std::shared_ptr< StorageIteratorgenerateIterator ()=0
 

Member Function Documentation

◆ generateIterator()

std::shared_ptr< StorageIterator > altintegration::adaptors::LevelDBStorage::generateIterator ( )
inlineoverridevirtual

Implements altintegration::adaptors::Storage.

Definition at line 78 of file leveldb_impl.hpp.

78 {
79 return std::make_shared<LevelDBStorageIterator>(
80 db_->NewIterator(read_options_));
81 }

◆ generateWriteBatch()

std::shared_ptr< WriteBatch > altintegration::adaptors::LevelDBStorage::generateWriteBatch ( )
inlineoverridevirtual

Implements altintegration::adaptors::Storage.

Definition at line 74 of file leveldb_impl.hpp.

74 {
75 return std::make_shared<LevelDBWriteBatch>(*db_, write_options_);
76 }

◆ read()

bool altintegration::adaptors::LevelDBStorage::read ( const std::vector< uint8_t > &  key,
std::vector< uint8_t > &  value 
)
overridevirtual

◆ write()

void altintegration::adaptors::LevelDBStorage::write ( const std::vector< uint8_t > &  key,
const std::vector< uint8_t > &  value 
)
overridevirtual

The documentation for this struct was generated from the following file: