| 8 | cycrow | 1 | #pragma once
 | 
        
           |  |  | 2 |   | 
        
           |  |  | 3 | #include "String.h"
 | 
        
           |  |  | 4 | #include "../lists.h"
 | 
        
           | 112 | cycrow | 5 | #include "List.h"
 | 
        
           | 8 | cycrow | 6 |   | 
        
           |  |  | 7 | namespace Utils {
 | 
        
           | 88 | cycrow | 8 |   | 
        
           | 8 | cycrow | 9 | 	typedef struct {
 | 
        
           |  |  | 10 | 		String str;
 | 
        
           |  |  | 11 | 		String data;
 | 
        
           |  |  | 12 | 	} SStringList;
 | 
        
           |  |  | 13 |   | 
        
           | 88 | cycrow | 14 | 	typedef CListNode<SStringList> CStringListNode;
 | 
        
           | 112 | cycrow | 15 | 	typedef CList<SStringList>::iterator CStringListIterator;
 | 
        
           | 88 | cycrow | 16 |   | 
        
           | 112 | cycrow | 17 | 	class SPKEXPORT CStringList
 | 
        
           | 8 | cycrow | 18 | 	{
 | 
        
           | 112 | cycrow | 19 | 	private:
 | 
        
           |  |  | 20 | 		CList<SStringList> *_lList;
 | 
        
           |  |  | 21 |   | 
        
           | 8 | cycrow | 22 | 	public:
 | 
        
           | 112 | cycrow | 23 | 		CStringList();
 | 
        
           |  |  | 24 | 		~CStringList();
 | 
        
           |  |  | 25 |   | 
        
           | 8 | cycrow | 26 | 		void pushBack(const String &str, const String &data);
 | 
        
           | 111 | cycrow | 27 | 		void pushBack(const String &str);
 | 
        
           | 121 | cycrow | 28 | 		void pushFront(const String &str, const String &data);
 | 
        
           |  |  | 29 | 		void pushFront(const String &str);
 | 
        
           | 160 | cycrow | 30 | 		void popBack();
 | 
        
           | 179 | cycrow | 31 | 		void popFront();
 | 
        
           | 111 | cycrow | 32 |   | 
        
           | 160 | cycrow | 33 | 		void insertAt(int at, const String& str, const String& data);
 | 
        
           |  |  | 34 | 		void insertAt(int at, const String& str);
 | 
        
           |  |  | 35 |   | 
        
           | 9 | cycrow | 36 | 		void clear();
 | 
        
           | 98 | cycrow | 37 | 		void tokenise(const String &str, const String &token);
 | 
        
           |  |  | 38 |   | 
        
           |  |  | 39 | 		Utils::String firstString();
 | 
        
           |  |  | 40 | 		Utils::String nextString();
 | 
        
           | 112 | cycrow | 41 | 		Utils::SStringList *first();
 | 
        
           |  |  | 42 | 		Utils::SStringList *next();
 | 
        
           | 160 | cycrow | 43 | 		CStringListIterator begin() const;
 | 
        
           |  |  | 44 | 		CStringListIterator end() const;
 | 
        
           | 101 | cycrow | 45 |   | 
        
           | 160 | cycrow | 46 | 		Utils::String front() const;
 | 
        
           |  |  | 47 | 		Utils::String back() const;
 | 
        
           |  |  | 48 |   | 
        
           | 165 | cycrow | 49 | 		Utils::SStringList *get(int i) const;
 | 
        
           | 116 | cycrow | 50 |   | 
        
           | 124 | cycrow | 51 | 		bool changeData(const Utils::String &str, const Utils::String &data, bool bIgnoreCase = false);
 | 
        
           | 121 | cycrow | 52 | 		bool contains(const Utils::String &data, bool bIgnoreCase = false) const;
 | 
        
           | 160 | cycrow | 53 | 		bool containsData(const Utils::String& str, bool bIgnoreCase = false) const;
 | 
        
           |  |  | 54 | 		bool containsStringAndData(const Utils::String& str, const Utils::String &data, bool bIgnoreCase = false) const;
 | 
        
           | 101 | cycrow | 55 | 		Utils::String findData(const Utils::String &data, bool bIgnoreCase = false) const;
 | 
        
           |  |  | 56 | 		Utils::String findString(const Utils::String &str, bool bIgnoreCase = false) const;
 | 
        
           | 160 | cycrow | 57 | 		int findStringAndData(const Utils::String& str, const Utils::String& data, bool bIgnoreCase = false) const;
 | 
        
           | 170 | cycrow | 58 | 		int findPos(const Utils::String& str, bool bIgnoreCase = false) const;
 | 
        
           | 112 | cycrow | 59 |   | 
        
           | 170 | cycrow | 60 | 		CStringListIterator remove(CStringListIterator itr);
 | 
        
           | 121 | cycrow | 61 | 		bool remove(const Utils::String &str, bool single = true);
 | 
        
           |  |  | 62 | 		void removeAt(int at);
 | 
        
           |  |  | 63 |   | 
        
           | 112 | cycrow | 64 | 		size_t size() const;
 | 
        
           |  |  | 65 | 		bool empty() const;
 | 
        
           | 165 | cycrow | 66 |   | 
        
           |  |  | 67 | 		const Utils::SStringList* operator[](int num) const;
 | 
        
           | 8 | cycrow | 68 | 	};
 | 
        
           |  |  | 69 | } //NAMESPACE
 | 
        
           |  |  | 70 |   |