SST::Core::Interprocess::CircularBuffer< T, A > Class Template Reference
Multi-process safe, Circular Buffer class.
More...
#include <circularBuffer.h>
Public Member Functions |
| CircularBuffer (size_t bufferSize, const A &allocator) |
| Construct a new circular buffer.
|
void | write (const T &value) |
| Write a value to the circular buffer.
|
T | read (void) |
| Blocking Read a value from the circular buffer.
|
bool | readNB (T *result) |
| Non-Blocking Read a value from the circular buffer.
|
Detailed Description
template<typename T, typename A>
class SST::Core::Interprocess::CircularBuffer< T, A >
Multi-process safe, Circular Buffer class.
- Template Parameters:
-
| T | Type of data item to store in the buffer |
| A | Memory Allocator type to use |
Constructor & Destructor Documentation
template<typename T , typename A >
Construct a new circular buffer.
- Parameters:
-
| bufferSize | Number of elements in the buffer |
| allocator | Memory allocator to use for constructing the buffer |
Member Function Documentation
template<typename T , typename A >
Blocking Read a value from the circular buffer.
- Returns:
- The next item in the queue to be read
template<typename T , typename A >
Non-Blocking Read a value from the circular buffer.
- Parameters:
-
| result | Pointer to an item which will be filled in if possible |
- Returns:
- True if an item was available, False otherwisw
template<typename T , typename A >
Write a value to the circular buffer.
- Parameters:
-
The documentation for this class was generated from the following file: