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::ByteString Class Reference

A class managing one or more serializable ByteStrings. More...

#include <ByteString.h>

Inheritance diagram for Hypertable::ByteString:
Inheritance graph
[legend]

Public Member Functions

 ByteString ()
 Default constructor: starts with an empty string. More...
 
 ByteString (const uint8_t *buf)
 Overloaded constructor: takes ownership of a pointer. More...
 
size_t length () const
 Retrieves the length of the serialized string. More...
 
uint8_t * next ()
 Retrieves the next serialized String in the buffer. More...
 
size_t decode_length (const uint8_t **dptr) const
 Retrieves the decoded length and returns a pointer to the string. More...
 
size_t write (uint8_t *dst) const
 Writes the data of this ByteString into a pointer. More...
 
const char * str () const
 Returns a pointer to the String's deserialized data. More...
 
 operator bool () const
 Returns true if this ByteArray is not empty. More...
 

Public Attributes

const uint8_t * ptr
 The pointer to the serialized data. More...
 

Detailed Description

A class managing one or more serializable ByteStrings.

Definition at line 47 of file ByteString.h.

Constructor & Destructor Documentation

Hypertable::ByteString::ByteString ( )
inline

Default constructor: starts with an empty string.

Definition at line 50 of file ByteString.h.

Hypertable::ByteString::ByteString ( const uint8_t *  buf)
inline

Overloaded constructor: takes ownership of a pointer.

Parameters
bufThe pointer with data

Definition at line 56 of file ByteString.h.

Member Function Documentation

size_t Hypertable::ByteString::decode_length ( const uint8_t **  dptr) const
inline

Retrieves the decoded length and returns a pointer to the string.

Parameters
dptrA pointer to the string data
Returns
The decoded length of the string data

Definition at line 83 of file ByteString.h.

size_t Hypertable::ByteString::length ( ) const
inline

Retrieves the length of the serialized string.

Returns
The length of the serialized string

Definition at line 62 of file ByteString.h.

uint8_t* Hypertable::ByteString::next ( )
inline

Retrieves the next serialized String in the buffer.

Definition at line 71 of file ByteString.h.

Hypertable::ByteString::operator bool ( ) const
inline

Returns true if this ByteArray is not empty.

Returns
True if this ByteArray is not empty, otherwise false

Definition at line 116 of file ByteString.h.

const char* Hypertable::ByteString::str ( ) const
inline

Returns a pointer to the String's deserialized data.

Returns
A const char * pointer to the deserialized data

Definition at line 106 of file ByteString.h.

size_t Hypertable::ByteString::write ( uint8_t *  dst) const
inline

Writes the data of this ByteString into a pointer.

Parameters
dstA pointer which will receive the serialized data
Returns
The size of the data which was copied

Definition at line 93 of file ByteString.h.

Member Data Documentation

const uint8_t* Hypertable::ByteString::ptr

The pointer to the serialized data.

Definition at line 121 of file ByteString.h.


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