veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
altintegration::btc::CSizeComputer Class Reference

Detailed Description

Definition at line 963 of file serialize.hpp.

+ Collaboration diagram for altintegration::btc::CSizeComputer:

Public Member Functions

 CSizeComputer (int nVersionIn)
 
void write (const char *, size_t _nSize)
 
template<typename T , typename = typename std::enable_if<std::is_integral<T>::value>::type>
void writeLE (T)
 
template<typename T , typename = typename std::enable_if<std::is_integral<T>::value>::type>
void writeBE (T, size_t)
 
void seek (size_t _nSize)
 Pretend _nSize bytes are written, without specifying them. More...
 
template<typename T >
CSizeComputeroperator<< (const T &obj)
 
size_t size () const
 
int GetVersion () const
 

Protected Attributes

size_t nSize
 
const int nVersion
 

Constructor & Destructor Documentation

◆ CSizeComputer()

altintegration::btc::CSizeComputer::CSizeComputer ( int  nVersionIn)
inlineexplicit

Definition at line 970 of file serialize.hpp.

970: nSize(0), nVersion(nVersionIn) {}

Member Function Documentation

◆ GetVersion()

int altintegration::btc::CSizeComputer::GetVersion ( ) const
inline

Definition at line 999 of file serialize.hpp.

999{ return nVersion; }

◆ operator<<()

template<typename T >
CSizeComputer & altintegration::btc::CSizeComputer::operator<< ( const T &  obj)
inline

Definition at line 992 of file serialize.hpp.

992 {
993 Serialize(*this, obj);
994 return (*this);
995 }

◆ seek()

void altintegration::btc::CSizeComputer::seek ( size_t  _nSize)
inline

Definition at line 989 of file serialize.hpp.

989{ this->nSize += _nSize; }

◆ size()

size_t altintegration::btc::CSizeComputer::size ( ) const
inline

Definition at line 997 of file serialize.hpp.

997{ return nSize; }

◆ write()

void altintegration::btc::CSizeComputer::write ( const char *  ,
size_t  _nSize 
)
inline

Definition at line 972 of file serialize.hpp.

972{ this->nSize += _nSize; }

◆ writeBE()

template<typename T , typename = typename std::enable_if<std::is_integral<T>::value>::type>
void altintegration::btc::CSizeComputer::writeBE ( ,
size_t   
)
inline

Definition at line 984 of file serialize.hpp.

984 {
985 this->nSize += sizeof(T);
986 }

◆ writeLE()

template<typename T , typename = typename std::enable_if<std::is_integral<T>::value>::type>
void altintegration::btc::CSizeComputer::writeLE ( )
inline

Definition at line 977 of file serialize.hpp.

977 {
978 this->nSize += sizeof(T);
979 }

Member Data Documentation

◆ nSize

size_t altintegration::btc::CSizeComputer::nSize
protected

Definition at line 965 of file serialize.hpp.

◆ nVersion

const int altintegration::btc::CSizeComputer::nVersion
protected

Definition at line 967 of file serialize.hpp.


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