Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

roc::Sorter Class Reference

#include <Sorter.h>

Collaboration diagram for roc::Sorter:
Collaboration graph
[legend]

Public Member Functions

 Sorter (unsigned maxinpbuf=1024, unsigned intern_out_buf=1024, int intern_out_fmt=roc::formatNormal, unsigned intbuf=128)
virtual ~Sorter ()
bool isInternData () const
bool addData (void *data, unsigned datalen, int fmt, bool flush_data=false)
bool flush ()
void cleanBuffers ()
unsigned sizeFilled () const
void * filledBuf () const
bool shiftFilledData (unsigned num)
bool startFill (void *buf, unsigned totalsize, int fmt=formatNormal)
void stopFill ()

Protected Types

enum  TimesConstants {
  tmLastValid = 0x3fffffff, tmEmpty = tmLastValid + 100, tmFailure = tmLastValid + 200, tmBoundary = 0x8100,
  tmFrontShift = 0x10000000
}

Protected Member Functions

bool flushBuffer (void *data, unsigned num_msg, int fmt, bool force=false)
bool checkLastEpoch (roc::Message *data, unsigned indx, const roc::Iterator &iter)

Protected Attributes

unsigned fRocId
unsigned fIntBufMaxSize
unsigned fExtBufMaxSize
MessagefIntBuf
uint32_t * fIntBufTimes
unsigned fIntBufSize
uint32_t fIntBufFrontEpoch
bool fIsIntBufFrontEpoch
uint32_t fIntBufCurrEpoch
uint32_t fIntBufCurrRealEpoch
uint32_t fIntBuffCurrMaxTm
unsigned fAccumMissed
uint32_t fLastOutEpoch
void * fFillBuffer
unsigned fFillTotalSize
unsigned fFillSize
int fFillFormat
void * fInternOutBuf
unsigned fInternOutBufSize
int fInternOutFormat

Detailed Description

Definition at line 10 of file Sorter.h.


Member Enumeration Documentation

enum roc::Sorter::TimesConstants [protected]
Enumerator:
tmLastValid 
tmEmpty 
tmFailure 
tmBoundary 
tmFrontShift 

Definition at line 14 of file Sorter.h.


Constructor & Destructor Documentation

roc::Sorter::Sorter ( unsigned  maxinpbuf = 1024,
unsigned  intern_out_buf = 1024,
int  intern_out_fmt = roc::formatNormal,
unsigned  intbuf = 128 
) [explicit]
roc::Sorter::~Sorter (  )  [virtual]

Definition at line 42 of file Sorter.cxx.

References fIntBuf, fIntBufTimes, and fInternOutBuf.


Member Function Documentation

bool roc::Sorter::addData ( void *  data,
unsigned  datalen,
int  fmt,
bool  flush_data = false 
)
bool roc::Sorter::checkLastEpoch ( roc::Message data,
unsigned  indx,
const roc::Iterator iter 
) [protected]
void roc::Sorter::cleanBuffers (  ) 
void* roc::Sorter::filledBuf (  )  const [inline]

Definition at line 69 of file Sorter.h.

References fFillBuffer.

bool roc::Sorter::flush (  )  [inline]

Definition at line 61 of file Sorter.h.

References flushBuffer(), and roc::formatNormal.

bool roc::Sorter::flushBuffer ( void *  data,
unsigned  num_msg,
int  fmt,
bool  force = false 
) [protected]
bool roc::Sorter::isInternData (  )  const [inline]

Definition at line 54 of file Sorter.h.

References fIntBufSize.

bool roc::Sorter::shiftFilledData ( unsigned  num  ) 

Definition at line 507 of file Sorter.cxx.

References fFillBuffer, fFillFormat, fFillSize, and roc::Message::RawSize().

unsigned roc::Sorter::sizeFilled (  )  const [inline]

Definition at line 67 of file Sorter.h.

References fFillSize.

bool roc::Sorter::startFill ( void *  buf,
unsigned  totalsize,
int  fmt = formatNormal 
)

Definition at line 49 of file Sorter.cxx.

References fFillBuffer, fFillFormat, fFillSize, fFillTotalSize, and roc::Message::RawSize().

void roc::Sorter::stopFill (  ) 

Field Documentation

unsigned roc::Sorter::fAccumMissed [protected]

Definition at line 30 of file Sorter.h.

Referenced by cleanBuffers(), flushBuffer(), and Sorter().

unsigned roc::Sorter::fExtBufMaxSize [protected]

Definition at line 19 of file Sorter.h.

Referenced by flushBuffer(), and Sorter().

void* roc::Sorter::fFillBuffer [protected]

Definition at line 33 of file Sorter.h.

Referenced by addData(), filledBuf(), flushBuffer(), shiftFilledData(), Sorter(), startFill(), and stopFill().

int roc::Sorter::fFillFormat [protected]

Definition at line 36 of file Sorter.h.

Referenced by flushBuffer(), shiftFilledData(), Sorter(), startFill(), and stopFill().

unsigned roc::Sorter::fFillSize [protected]
unsigned roc::Sorter::fFillTotalSize [protected]

Definition at line 34 of file Sorter.h.

Referenced by flushBuffer(), Sorter(), startFill(), and stopFill().

Definition at line 21 of file Sorter.h.

Referenced by addData(), checkLastEpoch(), flushBuffer(), Sorter(), and ~Sorter().

uint32_t roc::Sorter::fIntBufCurrEpoch [protected]

Definition at line 26 of file Sorter.h.

Referenced by addData(), checkLastEpoch(), cleanBuffers(), and Sorter().

uint32_t roc::Sorter::fIntBufCurrRealEpoch [protected]

Definition at line 27 of file Sorter.h.

Referenced by addData(), cleanBuffers(), and Sorter().

uint32_t roc::Sorter::fIntBuffCurrMaxTm [protected]

Definition at line 28 of file Sorter.h.

Referenced by addData(), cleanBuffers(), and Sorter().

uint32_t roc::Sorter::fIntBufFrontEpoch [protected]

Definition at line 24 of file Sorter.h.

Referenced by addData(), cleanBuffers(), flushBuffer(), and Sorter().

unsigned roc::Sorter::fIntBufMaxSize [protected]

Definition at line 18 of file Sorter.h.

Referenced by addData(), flushBuffer(), and Sorter().

unsigned roc::Sorter::fIntBufSize [protected]

Definition at line 23 of file Sorter.h.

Referenced by addData(), checkLastEpoch(), cleanBuffers(), flushBuffer(), isInternData(), and Sorter().

uint32_t* roc::Sorter::fIntBufTimes [protected]

Definition at line 22 of file Sorter.h.

Referenced by addData(), checkLastEpoch(), flushBuffer(), Sorter(), and ~Sorter().

void* roc::Sorter::fInternOutBuf [protected]

Definition at line 38 of file Sorter.h.

Referenced by Sorter(), stopFill(), and ~Sorter().

unsigned roc::Sorter::fInternOutBufSize [protected]

Definition at line 39 of file Sorter.h.

Referenced by Sorter(), and stopFill().

Definition at line 40 of file Sorter.h.

Referenced by Sorter(), and stopFill().

Definition at line 25 of file Sorter.h.

Referenced by addData(), cleanBuffers(), and Sorter().

uint32_t roc::Sorter::fLastOutEpoch [protected]

Definition at line 31 of file Sorter.h.

Referenced by cleanBuffers(), flushBuffer(), and Sorter().

unsigned roc::Sorter::fRocId [protected]

Definition at line 16 of file Sorter.h.

Referenced by addData(), flushBuffer(), and Sorter().


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