| 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 {
 | 
        
           | 196 | cycrow | 10 | 		SString str;
 | 
        
           |  |  | 11 | 		SString data;
 | 
        
           | 8 | cycrow | 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 |   | 
        
           | 196 | cycrow | 26 | 		void pushBack(const SString &str, const SString &data);
 | 
        
           |  |  | 27 | 		void pushBack(const SString &str);
 | 
        
           |  |  | 28 | 		void pushFront(const SString &str, const SString &data);
 | 
        
           |  |  | 29 | 		void pushFront(const SString &str);
 | 
        
           | 160 | cycrow | 30 | 		void popBack();
 | 
        
           | 179 | cycrow | 31 | 		void popFront();
 | 
        
           | 111 | cycrow | 32 |   | 
        
           | 196 | cycrow | 33 | 		void insertAt(int at, const SString& str, const SString& data);
 | 
        
           |  |  | 34 | 		void insertAt(int at, const SString& str);
 | 
        
           | 160 | cycrow | 35 |   | 
        
           | 9 | cycrow | 36 | 		void clear();
 | 
        
           | 196 | cycrow | 37 | 		void tokenise(const SString &str, const SString &token);
 | 
        
           | 98 | cycrow | 38 |   | 
        
           | 196 | cycrow | 39 | 		Utils::SString firstString();
 | 
        
           |  |  | 40 | 		Utils::SString nextString();
 | 
        
           | 112 | cycrow | 41 | 		Utils::SStringList *first();
 | 
        
           |  |  | 42 | 		Utils::SStringList *next();
 | 
        
           | 160 | cycrow | 43 | 		CStringListIterator begin() const;
 | 
        
           |  |  | 44 | 		CStringListIterator end() const;
 | 
        
           | 101 | cycrow | 45 |   | 
        
           | 196 | cycrow | 46 | 		Utils::SString front() const;
 | 
        
           |  |  | 47 | 		Utils::SString back() const;
 | 
        
           | 160 | cycrow | 48 |   | 
        
           | 165 | cycrow | 49 | 		Utils::SStringList *get(int i) const;
 | 
        
           | 116 | cycrow | 50 |   | 
        
           | 196 | cycrow | 51 | 		bool changeData(const Utils::SString &str, const Utils::SString &data, bool bIgnoreCase = false);
 | 
        
           |  |  | 52 | 		bool contains(const Utils::SString &data, bool bIgnoreCase = false) const;
 | 
        
           |  |  | 53 | 		bool containsData(const Utils::SString& str, bool bIgnoreCase = false) const;
 | 
        
           |  |  | 54 | 		bool containsStringAndData(const Utils::SString& str, const Utils::SString &data, bool bIgnoreCase = false) const;
 | 
        
           |  |  | 55 | 		Utils::SString findData(const Utils::SString &data, bool bIgnoreCase = false) const;
 | 
        
           |  |  | 56 | 		Utils::SString findString(const Utils::SString &str, bool bIgnoreCase = false) const;
 | 
        
           |  |  | 57 | 		int findStringAndData(const Utils::SString& str, const Utils::SString& data, bool bIgnoreCase = false) const;
 | 
        
           |  |  | 58 | 		int findPos(const Utils::SString& str, bool bIgnoreCase = false) const;
 | 
        
           | 112 | cycrow | 59 |   | 
        
           | 170 | cycrow | 60 | 		CStringListIterator remove(CStringListIterator itr);
 | 
        
           | 196 | cycrow | 61 | 		bool remove(const Utils::SString &str, bool single = true);
 | 
        
           | 121 | cycrow | 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 | 	};
 | 
        
           | 196 | cycrow | 69 |   | 
        
           | 8 | cycrow | 70 | } //NAMESPACE
 | 
        
           |  |  | 71 |   |