This class is a bulk sequence of bytes with MultiThread (MT)-safe read and write operations.
#include <mrpt/synch/MT_buffer.h>
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 |
| mrpt::synch::MT_buffer::MT_buffer | ( | ) | [inline] |
Definition at line 48 of file MT_buffer.h.
| virtual mrpt::synch::MT_buffer::~MT_buffer | ( | ) | [inline, virtual] |
Definition at line 50 of file MT_buffer.h.
| void mrpt::synch::MT_buffer::appendData | ( | const vector_byte & | d | ) | [inline] |
| d | Append new data to the stream |
Definition at line 69 of file MT_buffer.h.
References m_cs, mrpt::synch::CCriticalSection::enter(), m_data, and mrpt::synch::CCriticalSection::leave().
| void mrpt::synch::MT_buffer::clear | ( | void | ) | [inline] |
Definition at line 53 of file MT_buffer.h.
References m_cs, mrpt::synch::CCriticalSection::enter(), m_data, and mrpt::synch::CCriticalSection::leave().
| void mrpt::synch::MT_buffer::read | ( | vector_byte & | d | ) | [inline] |
| d | Read the whole buffer. |
Definition at line 84 of file MT_buffer.h.
References m_cs, mrpt::synch::CCriticalSection::enter(), m_data, and mrpt::synch::CCriticalSection::leave().
| void mrpt::synch::MT_buffer::readAndClear | ( | vector_byte & | d | ) | [inline] |
| d | Read the whole buffer and empty it. |
Definition at line 76 of file MT_buffer.h.
References m_cs, mrpt::synch::CCriticalSection::enter(), m_data, and mrpt::synch::CCriticalSection::leave().
| size_t mrpt::synch::MT_buffer::size | ( | ) | [inline] |
Definition at line 60 of file MT_buffer.h.
References m_cs, mrpt::synch::CCriticalSection::enter(), m_data, and mrpt::synch::CCriticalSection::leave().
CCriticalSection mrpt::synch::MT_buffer::m_cs [private] |
Definition at line 45 of file MT_buffer.h.
Referenced by clear(), size(), appendData(), readAndClear(), and read().
vector_byte mrpt::synch::MT_buffer::m_data [private] |
Definition at line 44 of file MT_buffer.h.
Referenced by clear(), size(), appendData(), readAndClear(), and read().
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |