28 // String parsing utility for parsing ldconfig.ldr |
28 // String parsing utility for parsing ldconfig.ldr |
29 // ============================================================================= |
29 // ============================================================================= |
30 class LDConfigParser |
30 class LDConfigParser |
31 { |
31 { |
32 public: |
32 public: |
33 LDConfigParser (str inText, char sep); |
33 LDConfigParser (QString inText, char sep); |
34 |
34 |
35 bool isAtEnd(); |
35 bool isAtEnd(); |
36 bool isAtBeginning(); |
36 bool isAtBeginning(); |
37 bool getNextToken (str& val); |
37 bool getNextToken (QString& val); |
38 bool peekNextToken (str& val); |
38 bool peekNextToken (QString& val); |
39 bool getToken (str& val, const int pos); |
39 bool getToken (QString& val, const int pos); |
40 bool findToken (int& result, char const* needle, int args); |
40 bool findToken (int& result, char const* needle, int args); |
41 int getSize(); |
41 int getSize(); |
42 void rewind(); |
42 void rewind(); |
43 void seek (int amount, bool rel); |
43 void seek (int amount, bool rel); |
44 bool tokenCompare (int inPos, const char* sOther); |
44 bool tokenCompare (int inPos, const char* sOther); |
45 |
45 |
46 inline str operator[] (const int idx) |
46 inline QString operator[] (const int idx) |
47 { |
47 { |
48 return m_tokens[idx]; |
48 return m_tokens[idx]; |
49 } |
49 } |
50 |
50 |
51 private: |
51 private: |