#include <BaseQueue.h>
Public Member Functions | |
void | Clear () |
Clears this queue. | |
BaseQueue () | |
Constructor. | |
bool | IsEmpty (void) |
Returns whether the queue is empty or not. | |
bool | IsFull (void) |
Returns whether the queue is full or not. | |
DataType & | Front () |
Returns reference of first item. | |
DataType & | Back () |
Returns reference of last item. | |
Protected Attributes | |
ListType | data |
volatile SizeType | write_pointer |
volatile SizeType | read_pointer |
struct { | |
volatile uint8_t is_full: 1 | |
}; |
Definition at line 52 of file BaseQueue.h.
AVRCpp::Collection::BaseQueue< DataType, SizeType, ListType >::BaseQueue | ( | ) | [inline] |
void AVRCpp::Collection::BaseQueue< DataType, SizeType, ListType >::Clear | ( | ) | [inline] |
Clears this queue.
Definition at line 69 of file BaseQueue.h.
00070 { 00071 this->write_pointer = 0; 00072 this->read_pointer = 0; 00073 this->is_full = 0; 00074 }
bool AVRCpp::Collection::BaseQueue< DataType, SizeType, ListType >::IsEmpty | ( | void | ) | [inline] |
bool AVRCpp::Collection::BaseQueue< DataType, SizeType, ListType >::IsFull | ( | void | ) | [inline] |
Returns whether the queue is full or not.
Definition at line 95 of file BaseQueue.h.
00096 { 00097 return this->is_full; 00098 }
DataType& AVRCpp::Collection::BaseQueue< DataType, SizeType, ListType >::Front | ( | ) | [inline] |
Returns reference of first item.
NB! For speed purposes does not check constraints!
Definition at line 104 of file BaseQueue.h.
00105 { 00106 return this->data[this->read_pointer]; 00107 }
DataType& AVRCpp::Collection::BaseQueue< DataType, SizeType, ListType >::Back | ( | ) | [inline] |
Returns reference of last item.
NB! For speed purposes does not check constraints!
Definition at line 113 of file BaseQueue.h.
00114 { 00115 return this->data[this->write_pointer]; 00116 }
ListType AVRCpp::Collection::BaseQueue< DataType, SizeType, ListType >::data [protected] |
Definition at line 55 of file BaseQueue.h.
volatile SizeType AVRCpp::Collection::BaseQueue< DataType, SizeType, ListType >::write_pointer [protected] |
Definition at line 56 of file BaseQueue.h.
volatile SizeType AVRCpp::Collection::BaseQueue< DataType, SizeType, ListType >::read_pointer [protected] |
Definition at line 57 of file BaseQueue.h.
volatile uint8_t AVRCpp::Collection::BaseQueue< DataType, SizeType, ListType >::is_full |
Definition at line 61 of file BaseQueue.h.
struct { ... } [protected] |
MTÜ TTÜ Robotiklubi |