26 template<
class Thing,
int max_size>
34 INLINE
int size()
const;
38 INLINE
bool empty()
const;
40 INLINE
const Thing &
front()
const;
41 INLINE Thing &
front();
49 INLINE
bool full()
const;
51 INLINE
const Thing &
back()
const;
58 Thing _array[max_size+1];
void push_back(const Thing &t)
Adds an item to the end of the buffer.
bool empty() const
Returns true if the buffer is empty.
const Thing & back() const
Returns a reference to the last item in the queue.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int size() const
Returns the number of items currently in the buffer.
bool full() const
Returns true if the buffer is full; if this is true, push_back() will fail.
void clear()
Removes all items from the queue.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void pop_front()
Removes the first item from the buffer.
This class implements a queue of some type via a circular buffer.
const Thing & operator[](int n) const
Returns the nth element in the buffer.
const Thing & front() const
Returns a reference to the first item in the queue.