Function
atEnd
Determines whether an virtual string tree iterator is at the end position.
bool atEnd(iterator)
Include Headers
seqan/index.h
Return Values
true if iterator points behind the last item of the container, otherwise false.
Examples
The following example shows the usage of the atEnd function.
1#include <seqan/index.h>
2
3using namespace seqan;
4
5int main ()
6{
7    typedef Index<CharString> TIndex;
8    TIndex index("TATAA");
9
10    Iterator<TIndex, TopDown<ParentLinks<> > >::Type itDefault;
11    itDefault = begin(index, TopDown<ParentLinks<> >());
12
13    while(!atEnd(itDefault))
14    {
15        std::cout << representative(itDefault) << std::endl;
16        goNext(itDefault);
17    }
18
19    std::cout << "--------------------------------" << std::endl;
20
21    Iterator<TIndex, TopDown<ParentLinks<Postorder> > >::Type itPostOrder;
22    itPostOrder = begin(index, TopDown<ParentLinks<Postorder> >());
23
24    while(!atEnd(itPostOrder))
25    {
26        std::cout << representative(itPostOrder) << std::endl;
27        goNext(itPostOrder);
28    };
29
30    return 0;
31}
A
AA
ATAA
TA
TAA
TATAA
--------------------------------
AA
ATAA
A
TAA
TATAA
TA
Part of Concept
SeqAn - Sequence Analysis Library - www.seqan.de
 

Page built @2013/07/11 09:12:36