33 #ifndef __H__UG__attached_list__
34 #define __H__UG__attached_list__
44 template <
class TAAEntry>
class ConstAttachedElementListIterator;
48 template <
class TAAEntry>
50 std::bidirectional_iterator_tag,
51 typename TAAEntry::element>
54 typedef typename TAAEntry::element
element;
103 template <
class TAAEntry>
105 std::bidirectional_iterator_tag,
106 const typename TAAEntry::element>
180 template <
class TAttachmentPipe>
184 typedef typename TAttachmentPipe::element
element;
203 m_aEntry(
"AttachedElementList_Entry", false),
319 while(iter !=
end()){
359 if(
empty() || !(*position))
A linked list of elements living in an attachment.
Definition: attached_list.h:182
void set_pipe(TAttachmentPipe *pipe)
set the attachment pipe on which the list shall operate
Definition: attached_list.h:275
bool is_in_list(const element &elem)
returns true if the element is in the list
Definition: attached_list.h:432
void push_back(const element &elem)
pushes an element to the end of the list
Definition: attached_list.h:344
element m_front
Definition: attached_list.h:461
element m_back
Definition: attached_list.h:462
const element front() const
returns the first element in the list (const)
Definition: attached_list.h:339
TAttachmentPipe::element element
Definition: attached_list.h:184
const AttachedElementList & operator=(const AttachedElementList &ael)
Definition: attached_list.h:254
element back()
returns the last element in the list
Definition: attached_list.h:336
bool empty() const
retunrs true if the list is empty
Definition: attached_list.h:331
AEntry m_aEntry
Definition: attached_list.h:455
AAEntry m_aaEntry
Definition: attached_list.h:458
AttachedElementListIterator< AAEntry > iterator
Definition: attached_list.h:197
iterator erase(iterator begin, iterator end)
erases a sequence of entries
Definition: attached_list.h:403
AttachmentAccessor< element, AEntry, ElemHandler > AAEntry
Definition: attached_list.h:195
TAttachmentPipe * m_pipe
Definition: attached_list.h:452
const element back() const
returns the last element in the list (const)
Definition: attached_list.h:341
void set_pipe(TAttachmentPipe *pipe, AEntry aEntry)
Sets the pipe and a shared entry-attachment on which the list will operate.
Definition: attached_list.h:293
iterator end()
returns an iterator to the end of the sequence.
Definition: attached_list.h:441
AttachedElementList(TAttachmentPipe *pipe, AEntry aEntry)
Note that auto-copy on aEntry has to be disabled.
Definition: attached_list.h:222
AttachedElementList(const AttachedElementList &ael)
Definition: attached_list.h:233
ConstAttachedElementListIterator< AAEntry > const_iterator
Definition: attached_list.h:198
Attachment< Entry > AEntry
Definition: attached_list.h:193
void clear()
clears the list. begin() == end() afterwards.
Definition: attached_list.h:315
iterator get_iterator(const element &elem)
returns the iterator to the given element
Definition: attached_list.h:417
~AttachedElementList()
Definition: attached_list.h:249
AttachedElementList(TAttachmentPipe *pipe=NULL)
Definition: attached_list.h:201
iterator erase(iterator position)
erases the element at the given position
Definition: attached_list.h:383
TAttachmentPipe::ElementHandler ElemHandler
Definition: attached_list.h:194
const_iterator end() const
returns an iterator to the end of the sequence.
Definition: attached_list.h:448
iterator begin()
returns an iterator to the beginning of the sequence.
Definition: attached_list.h:437
const_iterator begin() const
returns an iterator to the beginning of the sequence.
Definition: attached_list.h:444
AttachedElementList(AEntry aEntry)
Note that auto-copy on aEntry has to be disabled.
Definition: attached_list.h:213
iterator insert(iterator position, const element &elem)
inserts an element right before the specified position.
Definition: attached_list.h:357
bool m_bSharedAttachment
Definition: attached_list.h:465
element const * get_pointer_to_element(const element &elem)
returns a const pointer to an element.
Definition: attached_list.h:424
element front()
returns the first element in the list
Definition: attached_list.h:334
A special iterator which allows to iterate over elements in a AttachedElementList.
Definition: attached_list.h:52
AttachedElementListIterator(const AttachedElementListIterator &cpy)
Definition: attached_list.h:60
element * operator->() const
Definition: attached_list.h:72
iterator operator++(int)
Definition: attached_list.h:75
element m_curElem
Definition: attached_list.h:96
iterator operator++()
Definition: attached_list.h:74
TAAEntry m_aaEntry
Definition: attached_list.h:95
AttachedElementListIterator()
Definition: attached_list.h:57
AttachedElementListIterator(element curElem, const TAAEntry &aaEntry)
Definition: attached_list.h:58
TAAEntry::element element
Definition: attached_list.h:54
element operator*() const
note that the * operator is read only.
Definition: attached_list.h:71
bool operator!=(const iterator &iter) const
Definition: attached_list.h:92
iterator operator--(int)
Definition: attached_list.h:83
const iterator & operator=(const iterator &iter)
Definition: attached_list.h:63
bool operator==(const iterator &iter) const
Definition: attached_list.h:91
iterator operator--()
Definition: attached_list.h:82
AttachedElementListIterator< TAAEntry > iterator
Definition: attached_list.h:55
void invalidate()
Definition: attachment_pipe.h:556
bool access(attachment_pipe &attachmentPipe, TAttachment &attachment)
Definition: attachment_pipe.hpp:472
A special iterator which allows to iterate over elements in a AttachedElementList.
Definition: attached_list.h:107
const iterator & operator=(const iterator &iter)
Definition: attached_list.h:120
TAAEntry::element element
Definition: attached_list.h:109
TAAEntry m_aaEntry
Definition: attached_list.h:152
ConstAttachedElementListIterator(const AttachedElementListIterator< TAAEntry > &it)
Definition: attached_list.h:117
ConstAttachedElementListIterator()
Definition: attached_list.h:112
bool operator!=(const iterator &iter) const
Definition: attached_list.h:149
iterator operator++()
Definition: attached_list.h:131
const element * operator->() const
Definition: attached_list.h:129
ConstAttachedElementListIterator(element curElem, const TAAEntry &aaEntry)
Definition: attached_list.h:113
bool operator==(const iterator &iter) const
Definition: attached_list.h:148
iterator operator++(int)
Definition: attached_list.h:132
element operator*() const
note that the * operator is read only.
Definition: attached_list.h:128
ConstAttachedElementListIterator(const ConstAttachedElementListIterator &it)
Definition: attached_list.h:115
element m_curElem
Definition: attached_list.h:153
iterator operator--()
Definition: attached_list.h:139
iterator operator--(int)
Definition: attached_list.h:140
ConstAttachedElementListIterator< TAAEntry > iterator
Definition: attached_list.h:110
Definition: attached_list.h:186
Entry(const element &p, const element &n)
Definition: attached_list.h:188
Entry()
Definition: attached_list.h:187
element prev
Definition: attached_list.h:189
element next
Definition: attached_list.h:190