11 virtual t_self *
prev() throw() {
return NULL;}
12 virtual t_self *
next() throw() {
return NULL;}
14 t_self *
walk(
bool forward)
throw() {
return forward ?
next() :
prev();}
23 bool is_empty()
const throw() {
return m_content.is_empty();}
24 bool is_valid()
const throw() {
return m_content.is_valid();}
27 void walk(
bool forward)
throw() {m_content = m_content->walk(forward);}
28 void prev() throw() {m_content = m_content->prev();}
29 void next() throw() {m_content = m_content->next();}
32 t_node*
_node()
const throw() {
return m_content.get_ptr();}
41 t_self
const &
operator=(t_self && other) {m_content = std::move(other.m_content);
return *
this;}
43 const t_item&
operator*()
const throw() {
return m_content->m_content;}
44 const t_item*
operator->()
const throw() {
return &m_content->m_content;}
48 t_self
operator++(
int) throw() {t_self old = *
this; this->
next();
return old;}
49 t_self
operator--(
int) throw() {t_self old = *
this; this->
prev();
return old;}
51 bool operator==(
const t_self & other)
const throw() {
return this->m_content == other.m_content;}
52 bool operator!=(
const t_self & other)
const throw() {
return this->m_content != other.m_content;}
64 iterator(t_node* source) : t_selfConst(source) {}
65 iterator(t_nodeptr
const & source) : t_selfConst(source) {}
66 iterator(t_self
const & other) : t_selfConst(other) {}
69 t_self
const &
operator=(t_self
const & other) {this->m_content = other.
m_content;
return *
this;}
70 t_self
const &
operator=(t_self && other) {this->m_content = std::move(other.m_content);
return *
this;}
72 t_item&
operator*()
const throw() {
return this->m_content->m_content;}
73 t_item*
operator->()
const throw() {
return &this->m_content->m_content;}
77 t_self
operator++(
int) throw() {t_self old = *
this; this->
next();
return old;}
78 t_self
operator--(
int) throw() {t_self old = *
this; this->
prev();
return old;}
80 bool operator==(
const t_self & other)
const throw() {
return this->m_content == other.m_content;}
81 bool operator!=(
const t_self & other)
const throw() {
return this->m_content != other.m_content;}
84 template<
typename t_comparator = comparator_default>
87 template<
typename t_list1,
typename t_list2>
88 static int compare(
const t_list1 & p_list1,
const t_list2 & p_list2) {
89 typename t_list1::const_iterator iter1 = p_list1.first();
90 typename t_list2::const_iterator iter2 = p_list2.first();
92 if (iter1.is_empty() && iter2.is_empty())
return 0;
93 else if (iter1.is_empty())
return -1;
94 else if (iter2.is_empty())
return 1;
97 if (state != 0)
return state;
104 template<
typename t_list1,
typename t_list2>
105 static bool listEquals(
const t_list1 & p_list1,
const t_list2 & p_list2) {
106 typename t_list1::const_iterator iter1 = p_list1.first();
107 typename t_list2::const_iterator iter2 = p_list2.first();
109 if (iter1.is_empty() && iter2.is_empty())
return true;
110 else if (iter1.is_empty() || iter2.is_empty())
return false;
111 else if (*iter1 != *iter2)
return false;
Base class for list nodes. Implemented by list implementers.
static bool listEquals(const t_list1 &p_list1, const t_list2 &p_list2)
bool operator!=(const t_self &other) const
iterator< t_item > t_self
static int compare(const t_list1 &p_list1, const t_list2 &p_list2)
const t_item * operator->() const
int compare(t1 const &p1, t2 const &p2)
const t_self & operator++()
_list_node< t_item > t_node
bool operator==(const t_self &other) const
iterator(t_self const &other)
t_self * walk(bool forward)
TEMPLATE_CONSTRUCTOR_FORWARD_FLOOD(_list_node, m_content) t_item m_content
t_self const & operator=(t_self &&other)
t_self const & operator=(t_self const &other)
t_self const & operator=(t_self const &other)
t_node * _node() const
For internal use / list implementations only! Do not call!
_list_node< t_item > t_node
refcounted_object_ptr_t< t_node > t_nodeptr
refcounted_object_ptr_t< t_node > t_nodeptr
t_self const & operator=(t_self &&other)
const_iterator< t_item > t_self
const t_self & operator++()
bool operator!=(const t_self &other) const
const t_item & operator*() const
const_iterator(t_nodeptr const &source)
const t_self & operator--()
const_iterator(t_self &&other)
t_item & operator*() const
_list_node< t_item > t_self
bool operator==(const t_self &other) const
const_iterator(t_self const &other)
iterator(t_nodeptr const &source)
t_item * operator->() const
const_iterator(t_node *source)
const_iterator< t_item > t_selfConst
const t_self & operator--()