|
C Container Collection (CCC)
|
#include <private_flat_double_ended_queue.h>

A flat double ended queue is a single Buffer with push and pop at the front and back. If no allocation is permitted it is a ring buffer. Because the CCC_Buffer abstraction already exists, the flat_double_ended_queue can be implemented with a single additional field rather than a front and back pointer. The back of the flat_double_ended_queue is always known if we know where the front is and how many elements are stored in the buffer.
Data Fields | |
| CCC_Buffer | buffer |
| size_t | front |
| CCC_Buffer CCC_Flat_double_ended_queue::buffer |
The helper Buffer abstraction the flat_double_ended_queue owns.
| size_t CCC_Flat_double_ended_queue::front |
The front of the flat_double_ended_queue. The back is implicit given the size.