Equity
Bitcoin Protocol Library
Public Member Functions | List of all members
P2p::VarArray< T > Class Template Reference

An array of objects. More...

#include <Serialize.h>

Inheritance diagram for P2p::VarArray< T >:
P2p::Serializable

Public Member Functions

 VarArray (std::vector< T > const &v)
 
 VarArray (uint8_t const *&in, size_t &size)
 
std::vector< T > value () const
 Returns the elements contained in the array.
 
Overrides Serializable
virtual void serialize (std::vector< uint8_t > &out) const override
 
virtual json toJson () const override
 

Detailed Description

template<typename T>
class P2p::VarArray< T >

An array of objects.

This is used for serialization of an array of objects along with the number of elements in the array.

See also
VASize

Constructor & Destructor Documentation

template<typename T >
P2p::VarArray< T >::VarArray ( std::vector< T > const &  v)
inlineexplicit
Parameters
vThe elements to be contained in the array
template<typename T >
P2p::VarArray< T >::VarArray ( uint8_t const *&  in,
size_t &  size 
)
inline
Parameters
[in,out]inpointer to the next byte to deserialize
[in,out]sizenumber of bytes remaining in the serialized stream

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