| 1 | #ifndef __TextFile__ |
| 2 | #define __TextFile__ |
| 3 | |
| 4 | #include "stdafx.h" |
| 5 | #include <stdio.h> |
| 6 | #include <stdlib.h> |
| 7 | #include "KmpSearch.h" |
| 8 | |
| 9 | class TextFile { |
| 10 | public: |
| 11 | TextFile(char *name); |
| 12 | ~TextFile(void); |
| 13 | char *giveLine(uint32 num); |
| 14 | int32 findLine(KmpSearch *kmp, uint32 fromLine = 0); |
| 15 | private: |
| 16 | void read(FILE *inf); |
| 17 | char **_lines; |
| 18 | uint32 _numLines; |
| 19 | }; |
| 20 | |
| 21 | #endif |