src/ldconfig.h

changeset 493
16766ac1bbd9
parent 421
7d26db0be944
child 496
d6cbf21af8fb
equal deleted inserted replaced
492:e964085e6913 493:16766ac1bbd9
24 // ============================================================================= 24 // =============================================================================
25 // StringParser 25 // StringParser
26 // 26 //
27 // String parsing utility 27 // String parsing utility
28 // ============================================================================= 28 // =============================================================================
29 class LDConfigParser { 29 class LDConfigParser
30 public: 30 { public:
31 LDConfigParser (str inText, char sep); 31 LDConfigParser (str inText, char sep);
32 32
33 bool atEnd(); 33 bool atEnd();
34 bool atBeginning(); 34 bool atBeginning();
35 bool next (str& val); 35 bool next (str& val);
36 bool peekNext (str& val); 36 bool peekNext (str& val);
37 bool getToken (str& val, const ushort pos); 37 bool getToken (str& val, const ushort pos);
38 bool findToken (short& result, char const* needle, short args); 38 bool findToken (short& result, char const* needle, short args);
39 size_t size(); 39 size_t size();
40 void rewind(); 40 void rewind();
41 void seek (short amount, bool rel); 41 void seek (short amount, bool rel);
42 bool tokenCompare (short inPos, const char* sOther); 42 bool tokenCompare (short inPos, const char* sOther);
43 43
44 str operator[] (const size_t idx) { 44 str operator[] (const size_t idx)
45 return m_tokens[idx]; 45 { return m_tokens[idx];
46 } 46 }
47 47
48 private: 48 private:
49 List<str> m_tokens; 49 List<str> m_tokens;
50 short m_pos; 50 short m_pos;
51 }; 51 };
52 52
53 void parseLDConfig(); 53 void parseLDConfig();
54 54
55 #endif // LDCONFIG_H 55 #endif // LDCONFIG_H

mercurial