355 class iterator_base :
public std::iterator<std::bidirectional_iterator_tag, value_type> {
385 iterator
end() {
return iterator(); }
387 iterator
rend() {
return iterator(); }
406 const_iterator
end()
const {
return const_iterator(); }
408 const_iterator
rend()
const {
return const_iterator(); }
434 )
const {
return dynamic_cast<T &
>(this->
GetReferenceAt(index)); }
454 #define PLIST(cls, T) typedef PList<T> cls
467 #define PDECLARE_LIST(cls, T) \
468 PLIST(cls##_PTemplate, T); \
469 PDECLARE_CLASS(cls, PList<T>) \
471 cls(int dummy, const cls * c) \
472 : PList<T>(dummy, c) { } \
476 virtual PObject * Clone() const \
477 { return PNEW cls(0, this); } \
554 #define PQUEUE(cls, T) typedef PQueue<T> cls
569 #define PDECLARE_QUEUE(cls, T) \
570 PQUEUE(cls##_PTemplate, T); \
571 PDECLARE_CLASS(cls, cls##_PTemplate) \
573 cls(int dummy, const cls * c) \
574 : cls##_PTemplate(dummy, c) { } \
577 : cls##_PTemplate() { } \
578 virtual PObject * Clone() const \
579 { return PNEW cls(0, this); } \
670 #define PSTACK(cls, T) typedef PStack<T> cls
685 #define PDECLARE_STACK(cls, T) \
686 PSTACK(cls##_PTemplate, T); \
687 PDECLARE_CLASS(cls, cls##_PTemplate) \
689 cls(int dummy, const cls * c) \
690 : cls##_PTemplate(dummy, c) { } \
693 : cls##_PTemplate() { } \
694 virtual PObject * Clone() const \
695 { return PNEW cls(0, this); } \
1003 )
const {
return dynamic_cast<T &
>(*this->
GetAt(index)); }
1026 class iterator_base :
public std::iterator<std::bidirectional_iterator_tag, value_type> {
1033 bool Valid()
const {
return PAssert(this->m_list != NULL && this->m_element != NULL && this->m_element != &m_list->m_info->nil,
PInvalidArrayIndex); }
1034 void Next() {
if (Valid()) this->m_list->NextElement(this->m_element); }
1035 void Prev() {
if (Valid()) this->m_list->PrevElement(this->m_element); }
1036 value_type * Ptr()
const {
return dynamic_cast<value_type *
>(Valid() ? this->m_element->m_data : NULL); }
1061 iterator
end() {
return iterator(); }
1063 iterator
rend() {
return iterator(); }
1080 const_iterator
end()
const {
return const_iterator(); }
1082 const_iterator
rend()
const {
return const_iterator(); }
1115 #define PSORTED_LIST(cls, T) typedef PSortedList<T> cls
1130 #define PDECLARE_SORTED_LIST(cls, T) \
1131 PSORTED_LIST(cls##_PTemplate, T); \
1132 PDECLARE_CLASS(cls, PSortedList<T>) \
1134 cls(int dummy, const cls * c) \
1135 : PSortedList<T>(dummy, c) { } \
1138 : PSortedList<T>() { } \
1139 virtual PObject * Clone() const \
1140 { return PNEW cls(0, this); } \
1143 #endif // PTLIB_LISTS_H