23 #if !defined (octave_base_list_h)
24 #define octave_base_list_h 1
30 template <
typename elt_type>
36 typedef typename std::list<elt_type>::iterator
iterator;
42 bool empty (
void)
const {
return lst.empty (); }
44 size_t size (
void)
const {
return lst.size (); }
47 iterator
erase (iterator pos) {
return lst.erase (pos); }
50 void remove_if (P pred)
76 void clear (
void) { lst.clear (); }
78 iterator
begin (
void) {
return iterator (lst.begin ()); }
79 const_iterator
begin (
void)
const {
return const_iterator (lst.begin ()); }
81 iterator
end (
void) {
return iterator (lst.end ()); }
82 const_iterator
end (
void)
const {
return const_iterator (lst.end ()); }
84 reverse_iterator
rbegin (
void) {
return reverse_iterator (lst.rbegin ()); }
85 const_reverse_iterator rbegin (
void)
const
86 {
return const_reverse_iterator (lst.rbegin ()); }
88 reverse_iterator
rend (
void) {
return reverse_iterator (lst.rend ()); }
89 const_reverse_iterator rend (
void)
const
90 {
return const_reverse_iterator (lst.rend ()); }
92 elt_type&
front (
void) {
return lst.front (); }
93 elt_type&
back (
void) {
return lst.back (); }
95 const elt_type&
front (
void)
const {
return lst.front (); }
96 const elt_type&
back (
void)
const {
return lst.back (); }
98 void push_front (
const elt_type& s) { lst.push_front (s); }
99 void push_back (
const elt_type& s) { lst.push_back (s); }
105 void append (
const elt_type& s) { lst.push_back (s); }