0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
Hypertable::SshOutputCollector::Buffer Class Reference

Fixed-size buffer to hold a portion of output. More...

#include <SshOutputCollector.h>

Public Member Functions

 Buffer ()
 Constructor. More...
 
 Buffer (char *buffer, size_t sz=0)
 Constructor with allocated page argument. More...
 
size_t fill () const
 Returns amount of buffer filled. More...
 
size_t remain () const
 Returns amount of unused space remaining in buffer. More...
 
void add (const char *data, size_t len)
 Adds data to buffer. More...
 

Public Attributes

char * base {}
 Pointer to beginning of buffer memory. More...
 
char * ptr {}
 Pointer to next unused position in buffer memory. More...
 
size_t size {}
 Size of allocated buffer. More...
 

Detailed Description

Fixed-size buffer to hold a portion of output.

Definition at line 52 of file SshOutputCollector.h.

Constructor & Destructor Documentation

Hypertable::SshOutputCollector::Buffer::Buffer ( )
inline

Constructor.

Definition at line 55 of file SshOutputCollector.h.

Hypertable::SshOutputCollector::Buffer::Buffer ( char *  buffer,
size_t  sz = 0 
)
inline

Constructor with allocated page argument.

Parameters
bufferPointer to allocated buffer memory
szSize of allocated buffer memory

Definition at line 59 of file SshOutputCollector.h.

Member Function Documentation

void Hypertable::SshOutputCollector::Buffer::add ( const char *  data,
size_t  len 
)
inline

Adds data to buffer.

Parameters
dataPointer to data to add
lenLength of data to add

Definition at line 69 of file SshOutputCollector.h.

size_t Hypertable::SshOutputCollector::Buffer::fill ( ) const
inline

Returns amount of buffer filled.

Returns
Amount of buffer filled.

Definition at line 62 of file SshOutputCollector.h.

size_t Hypertable::SshOutputCollector::Buffer::remain ( ) const
inline

Returns amount of unused space remaining in buffer.

Returns
Amount of unused space remaining in buffer

Definition at line 65 of file SshOutputCollector.h.

Member Data Documentation

char* Hypertable::SshOutputCollector::Buffer::base {}

Pointer to beginning of buffer memory.

Definition at line 75 of file SshOutputCollector.h.

char* Hypertable::SshOutputCollector::Buffer::ptr {}

Pointer to next unused position in buffer memory.

Definition at line 77 of file SshOutputCollector.h.

size_t Hypertable::SshOutputCollector::Buffer::size {}

Size of allocated buffer.

Definition at line 79 of file SshOutputCollector.h.


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