Apama  9.10.0.4.289795
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
com::softwareag::connectivity::buffer_t Class Reference

A class that holds an untyped byte buffer. More...

#include <sag_connectivity_cpp.hpp>

Inherits sag_underlying_buffer_t.

Public Member Functions

 buffer_t ()
 Construct an empty buffer. More...
 
 buffer_t (size_t n)
 Construct a buffer with (at least) capacity for n items. More...
 
 ~buffer_t ()
 Free the underlying buffer contents. More...
 
buffer_toperator= (buffer_t &&other)
 Move assignement. More...
 
 buffer_t (buffer_t &&other)
 Move constructor. Other will be left as the empty buffer. More...
 
void swap (buffer_t &&other)
 Swap the contents of this buffer and other. More...
 
buffer_t copy () const
 Return a deep copy of this buffer. More...
 
bool operator== (const buffer_t &other) const
 Returns true. More...
 
bool operator!= (const buffer_t &other) const
 Returns false. More...
 
iterator begin ()
 Forward iterator begin. More...
 
iterator end ()
 Forward iterator end. More...
 
const_iterator begin () const
 Forward const_iterator begin. More...
 
const_iterator end () const
 Forward const_iterator end. More...
 
const_iterator cbegin () const
 Forward const_iterator begin. More...
 
const_iterator cend () const
 Forward const_iterator end. More...
 
size_t size () const
 Returns the size of the buffer. More...
 
bool empty () const
 Returns true if the buffer is unallocated (size() == 0) More...
 
uint8_t & operator[] (size_t n)
 Return a reference the byte at the given offset. More...
 
const uint8_t & operator[] (size_t n) const
 Return a reference the byte at the given offset. More...
 
void clear ()
 Free the underlying buffer;. More...
 

Detailed Description

A class that holds an untyped byte buffer.

This is moveable, but not implicitly copyable. If you want to copy it use the .copy() method. If you want to move it use std::move().

Constructor & Destructor Documentation

com::softwareag::connectivity::buffer_t::buffer_t ( )
inline

Construct an empty buffer.

com::softwareag::connectivity::buffer_t::buffer_t ( size_t  n)
explicit

Construct a buffer with (at least) capacity for n items.

com::softwareag::connectivity::buffer_t::~buffer_t ( )
inline

Free the underlying buffer contents.

com::softwareag::connectivity::buffer_t::buffer_t ( buffer_t &&  other)
inline

Move constructor. Other will be left as the empty buffer.

Member Function Documentation

iterator com::softwareag::connectivity::buffer_t::begin ( )
inline

Forward iterator begin.

const_iterator com::softwareag::connectivity::buffer_t::begin ( ) const
inline

Forward const_iterator begin.

const_iterator com::softwareag::connectivity::buffer_t::cbegin ( ) const
inline

Forward const_iterator begin.

const_iterator com::softwareag::connectivity::buffer_t::cend ( ) const
inline

Forward const_iterator end.

void com::softwareag::connectivity::buffer_t::clear ( )

Free the underlying buffer;.

buffer_t com::softwareag::connectivity::buffer_t::copy ( ) const

Return a deep copy of this buffer.

bool com::softwareag::connectivity::buffer_t::empty ( ) const
inline

Returns true if the buffer is unallocated (size() == 0)

iterator com::softwareag::connectivity::buffer_t::end ( )
inline

Forward iterator end.

const_iterator com::softwareag::connectivity::buffer_t::end ( ) const
inline

Forward const_iterator end.

bool com::softwareag::connectivity::buffer_t::operator!= ( const buffer_t other) const
inline

Returns false.

buffer_t& com::softwareag::connectivity::buffer_t::operator= ( buffer_t &&  other)
inline

Move assignement.

Other will be left as the empty buffer and our previous contents will be freed.

bool com::softwareag::connectivity::buffer_t::operator== ( const buffer_t other) const
inline

Returns true.

uint8_t& com::softwareag::connectivity::buffer_t::operator[] ( size_t  n)
inline

Return a reference the byte at the given offset.

If the offset is outside the buffer then throws std::runtime_error

const uint8_t& com::softwareag::connectivity::buffer_t::operator[] ( size_t  n) const
inline

Return a reference the byte at the given offset.

If the offset is outside the buffer then throws std::runtime_error

size_t com::softwareag::connectivity::buffer_t::size ( ) const
inline

Returns the size of the buffer.

void com::softwareag::connectivity::buffer_t::swap ( buffer_t &&  other)
inline

Swap the contents of this buffer and other.


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