Subversion Repositories spk

Rev

Rev 10 | Rev 101 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8 cycrow 1
 
2
#include "StringList.h"
98 cycrow 3
#include "spkdef.h"
8 cycrow 4
 
5
namespace Utils {
6
	void CStringList::pushBack(const String &str, const String &data)
7
	{
8
		SStringList *strNode = new SStringList;
9
		strNode->str = str;
10
		strNode->data = data;
11
		this->push_back(strNode);
12
	}
9 cycrow 13
 
14
	void CStringList::clear()
15
	{
16
		this->destroy(true);
17
	}
98 cycrow 18
 
19
	void CStringList::tokenise(const String &str, const String &token)
20
	{
21
		int max = 0;
22
		Utils::String *strs = str.tokenise(token, &max);
23
		for ( int i = 0; i < max; i++ ) {
24
			this->pushBack(strs[i], Utils::String::Null());
25
		}
26
 
27
		CLEANSPLIT(strs, max);
28
	}
29
 
30
	Utils::String CStringList::firstString()
31
	{
32
		SStringList *node = this->First();
33
		if ( node ) return node->str;
34
		return Utils::String::Null();
35
	}
36
 
37
	Utils::String CStringList::nextString()
38
	{
39
		SStringList *node = this->Next();
40
		if ( node ) return node->str;
41
		return Utils::String::Null();
42
	}
8 cycrow 43
}
44
/*
45
StringList::StringList(void)
46
{
47
}
48
 
49
StringList::~StringList(void)
50
{
51
}
52
*/