Mercurial > hg > octave-nkf
diff src/base-list.h @ 8470:5da39b223f61
base-list.h (push_front, pop_front, push_back, pop_back): new functions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 12 Jan 2009 19:02:23 -0500 |
parents | a1dbe9d80eee |
children | eb63fbe60fab |
line wrap: on
line diff
--- a/src/base-list.h +++ b/src/base-list.h @@ -65,8 +65,6 @@ void clear (void) { lst.clear (); } - void append (const elt_type& s) { lst.push_back (s); } - iterator begin (void) { return iterator (lst.begin ()); } const_iterator begin (void) const { return const_iterator (lst.begin ()); } @@ -79,6 +77,15 @@ const elt_type& front (void) const { return lst.front (); } const elt_type& back (void) const { return lst.back (); } + void push_front (const elt_type& s) { lst.push_front (s); } + void push_back (const elt_type& s) { lst.push_back (s); } + + void pop_front (void) { lst.pop_front (); } + void pop_back (void) { lst.pop_back (); } + + // For backward compatibility. + void append (const elt_type& s) { lst.push_back (s); } + private: std::list<elt_type> lst;