15#ifndef OPENVPN_COMMON_CIRC_LIST_H
16#define OPENVPN_COMMON_CIRC_LIST_H
44 void init(
const size_t capacity)
48 data_.reserve(capacity);
67 throw circ_list_reset();
87 data_.push_back(item);
89 throw circ_list_push();
94 if (index >=
data_.size())
95 throw circ_list_index();
96 else if (index <=
head_)
104 if (index >=
data_.size())
105 throw circ_list_const_index();
106 else if (index <=
head_)
CircList(const size_t capacity)
OPENVPN_SIMPLE_EXCEPTION(circ_list_reset)
const T & operator[](const size_t index) const
void init(const size_t capacity)
T & operator[](const size_t index)
OPENVPN_SIMPLE_EXCEPTION(circ_list_index)
OPENVPN_SIMPLE_EXCEPTION(circ_list_push)
OPENVPN_SIMPLE_EXCEPTION(circ_list_const_index)