Roomba App  1.0
FrameBuffer Class Reference

The FrameBuffer class. More...

#include <frameBuffer.hh>

Public Member Functions

 FrameBuffer ()
 Construct new FrameBuffer object. More...
 
 ~FrameBuffer ()
 Desctruct FrameBuffer object. More...
 
void addFrame (const std::string &frame)
 Add one frame to the end of the list. More...
 
bool getFrame (std::string &frame)
 Get one frame from the top of the list. More...
 
bool isFrame () const
 Check if list contain any frame. More...
 

Private Attributes

std::list< std::string > _frameList
 List containing individual frames. More...
 
std::mutex _access
 Mutex that provides single access to the list. More...
 

Detailed Description

Definition at line 23 of file frameBuffer.hh.

Constructor & Destructor Documentation

◆ FrameBuffer()

FrameBuffer::FrameBuffer ( )

Definition at line 18 of file frameBuffer.cpp.

◆ ~FrameBuffer()

FrameBuffer::~FrameBuffer ( )

Definition at line 20 of file frameBuffer.cpp.

Member Function Documentation

◆ addFrame()

void FrameBuffer::addFrame ( const std::string &  frame)
Parameters
[in]frameString containing frame

Definition at line 22 of file frameBuffer.cpp.

Here is the caller graph for this function:

◆ getFrame()

bool FrameBuffer::getFrame ( std::string &  frame)
Parameters
[out]frameString to which frame will be saved
Returns
bool Frame retrieval status
Return values
trueFrame succecfuly received
falseFrame list is empty

Definition at line 33 of file frameBuffer.cpp.

Here is the caller graph for this function:

◆ isFrame()

bool FrameBuffer::isFrame ( ) const
Returns
bool Empty list status
Return values
trueThere are at least one frame in list
falseList is empty

Definition at line 45 of file frameBuffer.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ _access

std::mutex FrameBuffer::_access
mutableprivate

Definition at line 33 of file frameBuffer.hh.

◆ _frameList

std::list<std::string> FrameBuffer::_frameList
private

Definition at line 28 of file frameBuffer.hh.


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