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

A simple streambuf with fixed size buffer. More...

#include <FixedStream.h>

Inheritance diagram for Hypertable::FixedStreamBuf:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::FixedStreamBuf:
Collaboration graph
[legend]

Public Member Functions

 FixedStreamBuf (char *buf, size_t len)
 Constructor. More...
 
 FixedStreamBuf (const char *buf, const char *next, const char *end)
 Constructor. More...
 
String str ()
 Returns a String object from the output buffer. More...
 

Detailed Description

A simple streambuf with fixed size buffer.

Convenient for limitting size of output; faster than ostringstream and friends, which require heap allocations

Definition at line 45 of file FixedStream.h.

Constructor & Destructor Documentation

Hypertable::FixedStreamBuf::FixedStreamBuf ( char *  buf,
size_t  len 
)
inline

Constructor.

Constructs a new FixedStreamBuf object backed by a memory buffer provided by the caller. All objects "streamed" into this class will be stored in this memory buffer.

Parameters
bufPointer to the memory buffer
lenSize of that memory buffer

Definition at line 56 of file FixedStream.h.

Hypertable::FixedStreamBuf::FixedStreamBuf ( const char *  buf,
const char *  next,
const char *  end 
)
inline

Constructor.

Constructs a new FixedStreamBuf object backed by a memory buffer provided by the caller. All objects are "streamed" from this memory buffer.

Definition at line 63 of file FixedStream.h.

Member Function Documentation

String Hypertable::FixedStreamBuf::str ( )
inline

Returns a String object from the output buffer.

Definition at line 68 of file FixedStream.h.


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