26 #if ! defined (octave_base_list_h)
27 #define octave_base_list_h 1
29 #include "octave-config.h"
37 template <
typename elt_type>
43 typedef typename std::list<elt_type>::iterator
iterator;
47 typedef typename std::list<elt_type>::const_reverse_iterator
50 bool empty ()
const {
return m_lst.empty (); }
52 std::size_t
size ()
const {
return m_lst.size (); }
53 std::size_t
length ()
const {
return size (); }
60 m_lst.remove_if (pred);
63 void clear () { m_lst.clear (); }
79 elt_type&
front () {
return m_lst.front (); }
80 elt_type&
back () {
return m_lst.back (); }
82 const elt_type&
front ()
const {
return m_lst.front (); }
83 const elt_type&
back ()
const {
return m_lst.back (); }
85 void push_front (
const elt_type& s) { m_lst.push_front (s); }
86 void push_back (
const elt_type& s) { m_lst.push_back (s); }
92 void append (
const elt_type& s) { m_lst.push_back (s); }
96 base_list (
const std::list<elt_type>& l) : m_lst (l) { }
109 OCTAVE_END_NAMESPACE(
octave)
std::size_t length() const
std::list< elt_type > m_lst
std::list< elt_type >::const_reverse_iterator const_reverse_iterator
void push_back(const elt_type &s)
const elt_type & front() const
virtual ~base_list()=default
base_list(const base_list &bl)=default
const elt_type & back() const
void append(const elt_type &s)
std::list< elt_type >::const_iterator const_iterator
const_reverse_iterator rend() const
void push_front(const elt_type &s)
std::list< elt_type >::reverse_iterator reverse_iterator
base_list(const std::list< elt_type > &l)
const_iterator begin() const
const_reverse_iterator rbegin() const
reverse_iterator rbegin()
const_iterator end() const
std::list< elt_type >::iterator iterator
iterator erase(iterator pos)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn