355 class iterator_base :
public std::iterator<std::bidirectional_iterator_tag, value_type> {
385 iterator
end() {
return iterator(); }
387 iterator
rend() {
return iterator(); }
405 const_iterator
end()
const {
return const_iterator(); }
407 const_iterator
rend()
const {
return iterator(); }
431 )
const {
return dynamic_cast<T &
>(this->
GetReferenceAt(index)); }
451 #define PLIST(cls, T) typedef PList<T> cls
464 #define PDECLARE_LIST(cls, T) \
465 PLIST(cls##_PTemplate, T); \
466 PDECLARE_CLASS(cls, PList<T>) \
468 cls(int dummy, const cls * c) \
469 : PList<T>(dummy, c) { } \
473 virtual PObject * Clone() const \
474 { return PNEW cls(0, this); } \
551 #define PQUEUE(cls, T) typedef PQueue<T> cls
566 #define PDECLARE_QUEUE(cls, T) \
567 PQUEUE(cls##_PTemplate, T); \
568 PDECLARE_CLASS(cls, cls##_PTemplate) \
570 cls(int dummy, const cls * c) \
571 : cls##_PTemplate(dummy, c) { } \
574 : cls##_PTemplate() { } \
575 virtual PObject * Clone() const \
576 { return PNEW cls(0, this); } \
664 #define PSTACK(cls, T) typedef PStack<T> cls
679 #define PDECLARE_STACK(cls, T) \
680 PSTACK(cls##_PTemplate, T); \
681 PDECLARE_CLASS(cls, cls##_PTemplate) \
683 cls(int dummy, const cls * c) \
684 : cls##_PTemplate(dummy, c) { } \
687 : cls##_PTemplate() { } \
688 virtual PObject * Clone() const \
689 { return PNEW cls(0, this); } \
997 )
const {
return dynamic_cast<T &
>(*this->
GetAt(index)); }
1020 class iterator_base :
public std::iterator<std::bidirectional_iterator_tag, value_type> {
1027 bool Valid()
const {
return PAssert(this->m_list != NULL && this->m_element != NULL && this->m_element != &m_list->m_info->nil,
PInvalidArrayIndex); }
1028 void Next() {
if (Valid()) this->m_list->NextElement(this->m_element); }
1029 void Prev() {
if (Valid()) this->m_list->PrevElement(this->m_element); }
1030 value_type * Ptr()
const {
return dynamic_cast<value_type *
>(Valid() ? this->m_element->m_data : NULL); }
1107 #define PSORTED_LIST(cls, T) typedef PSortedList<T> cls
1122 #define PDECLARE_SORTED_LIST(cls, T) \
1123 PSORTED_LIST(cls##_PTemplate, T); \
1124 PDECLARE_CLASS(cls, PSortedList<T>) \
1126 cls(int dummy, const cls * c) \
1127 : PSortedList<T>(dummy, c) { } \
1130 : PSortedList<T>() { } \
1131 virtual PObject * Clone() const \
1132 { return PNEW cls(0, this); } \
1135 #endif // PTLIB_LISTS_H