BitShares-Core  4.0.0
BitShares blockchain implementation and command-line interface software
Public Member Functions | List of all members
fc::datastream< T > Class Template Reference

#include <datastream.hpp>

Public Member Functions

 datastream (T start, size_t s)
 
void skip (size_t s)
 
bool read (char *d, size_t s)
 
bool write (const char *d, size_t s)
 
bool put (char c)
 
bool get (unsigned char &c)
 
bool get (char &c)
 
pos () const
 
bool valid () const
 
bool seekp (size_t p)
 
size_t tellp () const
 
size_t remaining () const
 

Detailed Description

template<typename T>
class fc::datastream< T >

The purpose of this datastream is to provide a fast, effecient, means of calculating the amount of data "about to be written" and then writing it. This means having two modes of operation, "test run" where you call the entire pack sequence calculating the size, and then actually packing it after doing a single allocation.

Definition at line 20 of file datastream.hpp.

Constructor & Destructor Documentation

template<typename T>
fc::datastream< T >::datastream ( start,
size_t  s 
)
inline

Definition at line 22 of file datastream.hpp.

Member Function Documentation

template<typename T>
bool fc::datastream< T >::get ( unsigned char &  c)
inline

Definition at line 54 of file datastream.hpp.

template<typename T>
bool fc::datastream< T >::get ( char &  c)
inline

Definition at line 55 of file datastream.hpp.

template<typename T>
T fc::datastream< T >::pos ( ) const
inline

Definition at line 65 of file datastream.hpp.

template<typename T>
bool fc::datastream< T >::put ( char  c)
inline

Definition at line 45 of file datastream.hpp.

template<typename T>
bool fc::datastream< T >::read ( char *  d,
size_t  s 
)
inline

Definition at line 27 of file datastream.hpp.

template<typename T>
size_t fc::datastream< T >::remaining ( ) const
inline

Definition at line 69 of file datastream.hpp.

template<typename T>
bool fc::datastream< T >::seekp ( size_t  p)
inline

Definition at line 67 of file datastream.hpp.

template<typename T>
void fc::datastream< T >::skip ( size_t  s)
inline

Definition at line 26 of file datastream.hpp.

template<typename T>
size_t fc::datastream< T >::tellp ( ) const
inline

Definition at line 68 of file datastream.hpp.

template<typename T>
bool fc::datastream< T >::valid ( ) const
inline

Definition at line 66 of file datastream.hpp.

template<typename T>
bool fc::datastream< T >::write ( const char *  d,
size_t  s 
)
inline

Definition at line 36 of file datastream.hpp.


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