Subversion Repositories spk

Rev

Rev 216 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 216 Rev 246
Line 11... Line 11...
11
	WStringList::~WStringList()
11
	WStringList::~WStringList()
12
	{
12
	{
13
		delete _lList;
13
		delete _lList;
14
	}
14
	}
15
 
15
 
16
	void WStringList::pushBack(const WString &str, const WString &data)
16
	void WStringList::pushBack(const WString& str, const WString& data)
17
	{
17
	{
18
		WStringNode *strNode = new WStringNode;
18
		WStringNode* strNode = new WStringNode;
19
		strNode->str = str;
19
		strNode->str = str;
20
		strNode->data = data;
20
		strNode->data = data;
21
		_lList->push_back(strNode);
21
		_lList->push_back(strNode);
-
 
22
	}
-
 
23
	void WStringList::pushBackUnique(const WString& str, const WString& data)
-
 
24
	{
-
 
25
		if (!contains(str))
-
 
26
		{
-
 
27
			WStringNode* strNode = new WStringNode;
-
 
28
			strNode->str = str;
-
 
29
			strNode->data = data;
-
 
30
			_lList->push_back(strNode);
-
 
31
		}
22
	}
32
	}
23
 
33
 
24
	void WStringList::popFront()
34
	void WStringList::popFront()
25
	{
35
	{
26
		if (!_lList->empty())
36
		if (!_lList->empty())
27
		{
37
		{
28
			delete _lList->front();
38
			delete _lList->front();
29
			_lList->removeAt(0);
39
			_lList->removeAt(0);
30
		}
40
		}
31
	}
41
	}
32
	void WStringList::popBack()
42
	void WStringList::popBack()
33
	{
43
	{
34
		if (!_lList->empty())
44
		if (!_lList->empty())
35
		{
45
		{
36
			delete _lList->back();
46
			delete _lList->back();
37
			_lList->pop_back();
47
			_lList->pop_back();
38
		}
48
		}
39
	}
49
	}
40
	void WStringList::pushBack(const WString &str)
50
	void WStringList::pushBack(const WString& str)
-
 
51
	{
-
 
52
		pushBack(str, L"");
-
 
53
	}
-
 
54
	void WStringList::pushBackUnique(const WString& str)
41
	{
55
	{
42
		pushBack(str, L"");
56
		pushBackUnique(str, L"");
43
	}
57
	}
44
 
58
 
45
	void WStringList::pushFront(const WString &str, const WString &data)
59
	void WStringList::pushFront(const WString &str, const WString &data)
46
	{
60
	{
47
		WStringNode* strNode = new WStringNode;
61
		WStringNode* strNode = new WStringNode;