Main MRPT website > C++ reference
MRPT logo

mrpt::synch::MT_buffer Class Reference

This class is a bulk sequence of bytes with MultiThread (MT)-safe read and write operations. More...

#include <mrpt/synch/MT_buffer.h>

Collaboration diagram for mrpt::synch::MT_buffer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MT_buffer ()
virtual ~MT_buffer ()
void clear ()
size_t size ()
void appendData (const vector_byte &d)
void readAndClear (vector_byte &d)
void read (vector_byte &d)

Private Attributes

vector_byte m_data
CCriticalSection m_cs

Detailed Description

This class is a bulk sequence of bytes with MultiThread (MT)-safe read and write operations.

Definition at line 40 of file MT_buffer.h.


Constructor & Destructor Documentation

mrpt::synch::MT_buffer::MT_buffer (  )  [inline]

Definition at line 47 of file MT_buffer.h.

virtual mrpt::synch::MT_buffer::~MT_buffer (  )  [inline, virtual]

Definition at line 49 of file MT_buffer.h.


Member Function Documentation

void mrpt::synch::MT_buffer::appendData ( const vector_byte d  )  [inline]
Parameters:
d Append new data to the stream

Definition at line 68 of file MT_buffer.h.

References mrpt::synch::CCriticalSection::enter(), mrpt::synch::CCriticalSection::leave(), m_cs, and m_data.

void mrpt::synch::MT_buffer::clear ( void   )  [inline]
void mrpt::synch::MT_buffer::read ( vector_byte d  )  [inline]
Parameters:
d Read the whole buffer.

Definition at line 83 of file MT_buffer.h.

References mrpt::synch::CCriticalSection::enter(), mrpt::synch::CCriticalSection::leave(), m_cs, and m_data.

void mrpt::synch::MT_buffer::readAndClear ( vector_byte d  )  [inline]
Parameters:
d Read the whole buffer and empty it.

Definition at line 75 of file MT_buffer.h.

References mrpt::synch::CCriticalSection::enter(), mrpt::synch::CCriticalSection::leave(), m_cs, and m_data.

size_t mrpt::synch::MT_buffer::size (  )  [inline]

Member Data Documentation

Definition at line 44 of file MT_buffer.h.

Referenced by appendData(), clear(), read(), readAndClear(), and size().

Definition at line 43 of file MT_buffer.h.

Referenced by appendData(), clear(), read(), readAndClear(), and size().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



Page generated by Doxygen 1.6.1 for MRPT 0.9.0 SVN: at Mon Jun 7 06:47:58 UTC 2010