| 25 | #include <vector> |
| 26 | |
| 27 | class FileContents |
| 28 | { |
| 29 | public: |
| 30 | FileContents(const char *file); |
| 31 | int getLine(int line, char *dest, int len); |
| 32 | int getField(int line, int field, char *dest, int len); |
| 33 | int numLines(); |
| 34 | int nextLine(int userId); |
| 35 | void dump(); |
| 36 | void index(int field); |
| 37 | int lookup(char *key); |
| 38 | void insert(char *value); |
| 39 | void replace(int line, char *value); |
| 40 | private: |
| 41 | void reIndex(int line); |
| 42 | void deIndex(int line); |
| 43 | |
| 44 | typedef enum { |
| 45 | InputFileSequentialOrder = 0, |
| 46 | InputFileRandomOrder, |
| 47 | InputFileUser |
| 48 | } InputFileUsage; |
| 49 | int usage; |
| 50 | int lineCounter; |
| 51 | |
| 52 | std::vector<std::string> fileLines; |
| 53 | const char *fileName; |
| 54 | bool printfFile; |
| 55 | int printfOffset; |
| 56 | int printfMultiple; |
| 57 | int numLinesInFile; |
| 58 | int realLinesInFile; |
| 59 | |
| 60 | int indexField; |
| 61 | str_int_map *indexMap; |
| 62 | }; |
| 63 | |
| 64 | #endif |
nothing calls this directly
no outgoing calls
no test coverage detected