Last change
on this file was
6366,
checked in by westram, 15 years ago
|
- fixed whitespace (scripted)
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.4 KB
|
Line | |
---|
1 | #ifndef PRD_SEQUENCEITERATOR_HXX |
---|
2 | #define PRD_SEQUENCEITERATOR_HXX |
---|
3 | |
---|
4 | #ifndef PRD_GLOBALS_HXX |
---|
5 | #include "PRD_Globals.hxx" |
---|
6 | #endif |
---|
7 | |
---|
8 | class SequenceIterator { |
---|
9 | private: |
---|
10 | |
---|
11 | const char *sequence; // sequence of bases to be iterated |
---|
12 | int max_length; // maximum count of bases returned (afterwards only EOS is returned) |
---|
13 | int stop_position; // stop at this position even if not yet max_length bases delivered |
---|
14 | int direction; // direction to walk through sequence (FORWARD / BACKWARD) |
---|
15 | |
---|
16 | public: |
---|
17 | static const int IGNORE = -1; // may be used at max_length_ or stop_pos_ parameter |
---|
18 | static const char EOS = '\x00'; // = End Of Sequence |
---|
19 | static const int FORWARD = 1; // may be used at direction_ parameter |
---|
20 | static const int BACKWARD = -1; // may be used at direction_ parameter |
---|
21 | |
---|
22 | PRD_Sequence_Pos pos; // current index in sequence .. position of last returned base |
---|
23 | int delivered; // current count of returned bases |
---|
24 | |
---|
25 | SequenceIterator (const char *sequence_, PRD_Sequence_Pos start_pos_, PRD_Sequence_Pos stop_pos_, int max_length_, int direction_); |
---|
26 | SequenceIterator (const char *sequence); |
---|
27 | |
---|
28 | void restart (PRD_Sequence_Pos start_pos_, PRD_Sequence_Pos stop_pos_, int max_length_, int direction_); |
---|
29 | unsigned char nextBase(); |
---|
30 | }; |
---|
31 | |
---|
32 | #else |
---|
33 | #error PRD_SequenceIterator.hxx included twice |
---|
34 | #endif // PRD_SEQUENCEITERATOR_HXX |
---|
Note: See
TracBrowser
for help on using the repository browser.