Galois
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
galois::runtime::SerializeBuffer Class Reference

Buffer for serialization of data. More...

#include <Serialize.h>

Public Types

using size_type = vTy::size_type
 

Public Member Functions

 SerializeBuffer ()=default
 default constructor More...
 
 SerializeBuffer (SerializeBuffer &&rhs)=default
 disabled copy constructor More...
 
 SerializeBuffer (const char *d, unsigned len)
 Creates a buffer from another buffer. More...
 
void push (const char c)
 Push a character onto the serialize buffer. More...
 
void insert (const uint8_t *c, size_t bytes)
 Insert characters from a buffer into the serialize buffer. More...
 
void insertAt (const uint8_t *c, size_t bytes, size_t offset)
 Insert characters from a buffer into the serialize buffer at a particular offset. More...
 
size_t encomber (size_t bytes)
 Reserve space at the end for inserting new data into the serialize buffer. More...
 
void resize (size_t bytes)
 
void reserve (size_t s)
 Reserve more space in the serialize buffer. More...
 
const uint8_t * linearData () const
 Returns a pointer to the data stored in this serialize buffer. More...
 
vTygetVec ()
 Returns vector of data stored in this serialize buffer. More...
 
vTy::const_iterator begin () const
 Returns an iterator to the beginning of the data in this serialize buffer. More...
 
vTy::const_iterator end () const
 Returns an iterator to the end of the data in this serialize buffer. More...
 
size_type size () const
 Returns the size of the serialize buffer. More...
 
void print (std::ostream &o) const
 Utility print function for the serialize buffer. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const SerializeBuffer &b)
 Operator that calls the print function of the serialize buffer. More...
 

Detailed Description

Buffer for serialization of data.

Mainly used during network communication.

Member Typedef Documentation

Constructor & Destructor Documentation

galois::runtime::SerializeBuffer::SerializeBuffer ( )
default

default constructor

galois::runtime::SerializeBuffer::SerializeBuffer ( SerializeBuffer &&  rhs)
default

disabled copy constructor

galois::runtime::SerializeBuffer::SerializeBuffer ( const char *  d,
unsigned  len 
)
inline

Creates a buffer from another buffer.

Parameters
dbuffer to create from
lenamount of copy from buffer d

Member Function Documentation

vTy::const_iterator galois::runtime::SerializeBuffer::begin ( ) const
inline

Returns an iterator to the beginning of the data in this serialize buffer.

size_t galois::runtime::SerializeBuffer::encomber ( size_t  bytes)
inline

Reserve space at the end for inserting new data into the serialize buffer.

Parameters
bytesnumber of bytes to reserve at the end
Returns
offset to the end of the buffer before new space was reserved
vTy::const_iterator galois::runtime::SerializeBuffer::end ( ) const
inline

Returns an iterator to the end of the data in this serialize buffer.

vTy& galois::runtime::SerializeBuffer::getVec ( )
inline

Returns vector of data stored in this serialize buffer.

void galois::runtime::SerializeBuffer::insert ( const uint8_t *  c,
size_t  bytes 
)
inline

Insert characters from a buffer into the serialize buffer.

void galois::runtime::SerializeBuffer::insertAt ( const uint8_t *  c,
size_t  bytes,
size_t  offset 
)
inline

Insert characters from a buffer into the serialize buffer at a particular offset.

const uint8_t* galois::runtime::SerializeBuffer::linearData ( ) const
inline

Returns a pointer to the data stored in this serialize buffer.

void galois::runtime::SerializeBuffer::print ( std::ostream &  o) const
inline

Utility print function for the serialize buffer.

Parameters
ostream to print to
void galois::runtime::SerializeBuffer::push ( const char  c)
inline

Push a character onto the serialize buffer.

void galois::runtime::SerializeBuffer::reserve ( size_t  s)
inline

Reserve more space in the serialize buffer.

Parameters
sextra space to reserve
void galois::runtime::SerializeBuffer::resize ( size_t  bytes)
inline
size_type galois::runtime::SerializeBuffer::size ( ) const
inline

Returns the size of the serialize buffer.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const SerializeBuffer b 
)
friend

Operator that calls the print function of the serialize buffer.


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