veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
altintegration::BlockReader Struct Referenceabstract

An abstraction over on-disk storage iterator. More...

Detailed Description

Definition at line 26 of file block_reader.hpp.

#include <block_reader.hpp>

+ Inheritance diagram for altintegration::BlockReader:
+ Collaboration diagram for altintegration::BlockReader:

Public Member Functions

virtual bool getAltTip (AltBlock::hash_t &out) const =0
 
virtual bool getVbkTip (VbkBlock::hash_t &out) const =0
 
virtual bool getBtcTip (BtcBlock::hash_t &out) const =0
 
virtual bool getBlock (const AltBlock::prev_hash_t &hash, StoredBlockIndex< AltBlock > &out) const =0
 
virtual bool getBlock (const VbkBlock::prev_hash_t &hash, StoredBlockIndex< VbkBlock > &out) const =0
 
virtual bool getBlock (const BtcBlock::prev_hash_t &hash, StoredBlockIndex< BtcBlock > &out) const =0
 
virtual std::shared_ptr< BlockIterator< AltBlock > > getAltBlockIterator () const =0
 
virtual std::shared_ptr< BlockIterator< VbkBlock > > getVbkBlockIterator () const =0
 
virtual std::shared_ptr< BlockIterator< BtcBlock > > getBtcBlockIterator () const =0
 
template<typename Block >
std::shared_ptr< BlockIterator< Block > > getBlockIterator () const
 
template<typename Block >
bool getTip (typename Block::hash_t &out) const
 
template<>
std::shared_ptr< BlockIterator< AltBlock > > getBlockIterator () const
 
template<>
bool getTip (AltBlock::hash_t &out) const
 
template<>
bool getTip (VbkBlock::hash_t &out) const
 
template<>
bool getTip (BtcBlock::hash_t &out) const
 

Member Function Documentation

◆ getBlockIterator()

template<>
std::shared_ptr< BlockIterator< BtcBlock > > altintegration::BlockReader::getBlockIterator ( ) const
inline

Definition at line 63 of file block_reader.hpp.

63 {
64 return this->getAltBlockIterator();
65}

◆ getTip() [1/3]

template<>
bool altintegration::BlockReader::getTip ( AltBlock::hash_t &  out) const
inline

Definition at line 79 of file block_reader.hpp.

79 {
80 return this->getAltTip(out);
81}

◆ getTip() [2/3]

template<>
bool altintegration::BlockReader::getTip ( BtcBlock::hash_t out) const
inline

Definition at line 89 of file block_reader.hpp.

89 {
90 return this->getBtcTip(out);
91}

◆ getTip() [3/3]

template<>
bool altintegration::BlockReader::getTip ( VbkBlock::hash_t out) const
inline

Definition at line 84 of file block_reader.hpp.

84 {
85 return this->getVbkTip(out);
86}

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