Example Program
ModReverse
Modifier example for reverse strings.
File "modifier_modreverse.cpp"
A tutorial about the use of the reverse modifier.

1 | #include <iostream>
2 | #include <seqan/file.h>
3 | #include <seqan/modifier.h>
4 |
5 | using namespace seqan;
6 |
7 |
8 | int main ()
9 | {

A reverse modifier applied to a string.

10 | String<char> myString = "A man, a plan, a canal-Panama";
11 | ModifiedString< String<char>, ModReverse > myModifier(myString);
12 |
13 | ::std::cout << myString << ::std::endl;
14 | ::std::cout << myModifier << ::std::endl;
15 | infix(myString, 9, 9) = "master ";
16 | ::std::cout << myString << ::std::endl;
17 | ::std::cout << myModifier << ::std::endl;
18 | return 0;
19 | }

Output
weese@tanne:~/seqan$ cd demos
weese@tanne:~/seqan/demos$ make modifier_modreverse
weese@tanne:~/seqan/demos$ ./modifier_modreverse
A man, a plan, a canal-Panama
amanaP-lanac a ,nalp a ,nam A
A man, a master plan, a canal-Panama
amanaP-lanac a ,nalp retsam a ,nam A
weese@tanne:~/seqan/demos$
See
ModifiedString, ModReverse, String
SeqAn - Sequence Analysis Library - www.seqan.de

Page built @2012/03/14 16:34:46