Bobox
Public Types | Public Member Functions | Static Public Member Functions
bobox::envelope Class Reference

Represents an envelope. More...

#include <bobox_envelope.hpp>

List of all members.

Public Types

enum  envelope_type { ET_DATA, ET_POISONED_PILL }
 Enumerates the types of the envelope. More...

Public Member Functions

void cut_off (unsigned size)
 Cuts off size rows from the begin of the envelope.
unsigned get_capacity () const
 Gets the number of allocated rows.
const columnget_column (column_index_type idx) const
 Gets the column on the given index.
const columns_type & get_columns () const
 Gets the list of all columns in the envelope.
size_t get_columns_count () const
 Gets the number of columns in the envelope.
template<typename T >
T ** get_columns_data () const
 Gets the array of pointers to the type T to the data of columns.
void ** get_columns_raw_data () const
 Gets the array of raw pointers to the data of columns.
template<typename T >
T * get_data (column_index_type index) const
 Gets the data of the column with the given index as an array of type T.
void * get_raw_data (column_index_type index) const
 Gets the raw pointer to the data of the column with the given index.
unsigned get_size () const
 Gets the number of valid rows.
envelope_type get_type () const
 Gets the type of the envelope.
bool is_data () const
 Query if the envelope contains data.
bool is_poisoned () const
 Query if the envelope is poisoned pill.
void relocate (unsigned offset)
 Relocates the begin of the column relatively to current position.
void reset_relocation ()
 Resets the relocation. See bobox::envelope::relocate.
void set_capacity (unsigned capacity)
 Sets the total number of allocated rows.
void set_column (column_index_type idx, const column &column)
 Sets the column on the given index.
void set_size (unsigned size)
 Sets the new number of valid rows.

Static Public Member Functions

static envelopecreate (columns_type &&columns, unsigned size=0, unsigned capacity=0, const parameters_ptr_type &parameters=parameters_ptr_type())
 Creates new envelope with data.
static envelopecreate_poisoned_pill ()
 Creates the poisoned pill.

Detailed Description

Represents an envelope.


Member Enumeration Documentation

Enumerates the types of the envelope.

Enumerator:
ET_DATA 

The envelope contains data.

ET_POISONED_PILL 

The envelope is poisoned, i.e. the last in the stream.


Member Function Documentation

static envelope* bobox::envelope::create ( columns_type &&  columns,
unsigned  size = 0,
unsigned  capacity = 0,
const parameters_ptr_type &  parameters = parameters_ptr_type() 
) [static]

Creates new envelope with data.

Parameters:
columnsThe columns with data.
sizeThe number of valid rows in the envelope.
capacityThe number of all rows in the envelope.
parameters(optional) The parameters.
void bobox::envelope::relocate ( unsigned  offset)

Relocates the begin of the column relatively to current position.

Parameters:
offsetOffset as the number of rows.

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