MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DataBuffer< sz > Class Template Reference

Buffer of data words. More...

#include <DataBuffer.hpp>

Inheritance diagram for DataBuffer< sz >:
Collaboration diagram for DataBuffer< sz >:

Classes

struct  ConstDataBufferIterator
struct  DataBufferIterator
struct  Head
struct  Segment

Public Types

typedef ArrayPool< SegmentDataBufferPool
typedef DataBufferIterator Iterator

Public Member Functions

 DataBuffer (DataBufferPool &)
bool seize (Uint32 n)
void release ()
Uint32 getSize () const
bool isEmpty () const
void print (FILE *) const
bool first (DataBufferIterator &)
bool next (DataBufferIterator &)
bool next (DataBufferIterator &, Uint32 hops)
bool nextPool (DataBufferIterator &)
bool position (DataBufferIterator &it, Uint32 pos)
bool first (ConstDataBufferIterator &) const
bool next (ConstDataBufferIterator &) const
bool next (ConstDataBufferIterator &, Uint32 hops) const
bool nextPool (ConstDataBufferIterator &) const
bool importable (const DataBufferIterator, Uint32 len)
bool import (const DataBufferIterator &, const Uint32 *src, Uint32 len)
bool append (const Uint32 *src, Uint32 len)

Static Public Member Functions

static Uint32 getSegmentSize ()

Protected Attributes

Head head
DataBufferPoolthePool

Detailed Description

template<Uint32 sz>
class DataBuffer< sz >

Buffer of data words.

Note
The buffer is divided into segments (of size sz)

Definition at line 30 of file DataBuffer.hpp.

Constructor & Destructor Documentation

template<Uint32 sz>
DataBuffer< sz >::DataBuffer ( DataBufferPool p)
inline

Constructor

Definition at line 311 of file DataBuffer.hpp.

Member Function Documentation

template<Uint32 sz>
bool DataBuffer< sz >::append ( const Uint32 *  src,
Uint32  len 
)
inline

Increases size with appends len words

Returns
true if success, false otherwise.

Definition at line 256 of file DataBuffer.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Uint32 sz>
bool DataBuffer< sz >::first ( DataBufferIterator it)
inline

Iterator hops Number of words to jump forward

Note
DataBuffer::next returns false if applied to last word.

Definition at line 418 of file DataBuffer.hpp.

Here is the caller graph for this function:

template<Uint32 sz>
bool DataBuffer< sz >::first ( ConstDataBufferIterator it) const
inline

Iterator

Definition at line 507 of file DataBuffer.hpp.

template<Uint32 sz>
Uint32 DataBuffer< sz >::getSegmentSize ( )
inlinestatic

Get segment size in words (template argument)

Definition at line 411 of file DataBuffer.hpp.

template<Uint32 sz>
Uint32 DataBuffer< sz >::getSize ( ) const
inline

Get size of databuffer, in words

Definition at line 596 of file DataBuffer.hpp.

Here is the caller graph for this function:

template<Uint32 sz>
bool DataBuffer< sz >::import ( const DataBufferIterator it,
const Uint32 *  src,
Uint32  len 
)
inline

Stores len no of words starting at location src in databuffer at position given in iterator.

Returns
true if success, false otherwise.
Note
Iterator is not advanced.

Definition at line 220 of file DataBuffer.hpp.

Here is the call graph for this function:

template<Uint32 sz>
bool DataBuffer< sz >::importable ( const DataBufferIterator  it,
Uint32  len 
)
inline

Returns true if it is possible to store len no of words at position given in iterator.

Definition at line 199 of file DataBuffer.hpp.

template<Uint32 sz>
bool DataBuffer< sz >::isEmpty ( ) const
inline

Check if buffer is empty

Definition at line 603 of file DataBuffer.hpp.

template<Uint32 sz>
bool DataBuffer< sz >::position ( DataBufferIterator it,
Uint32  pos 
)
inline

Set iterator to position

Definition at line 205 of file DataBuffer.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Uint32 sz>
bool DataBuffer< sz >::seize ( Uint32  n)
inline

Seize n words, Release

No extra allocation needed

Check for space

Definition at line 317 of file DataBuffer.hpp.

Here is the caller graph for this function:


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