Subversion Repositories spk

Rev

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

Rev 109 Rev 121
Line 6... Line 6...
6
enum {
6
enum {
7
	COMPARE_SAME		= 0,
7
	COMPARE_SAME		= 0,
8
	COMPARE_NEWER		= 1,
8
	COMPARE_NEWER		= 1,
9
	COMPARE_OLDER		= -1,
9
	COMPARE_OLDER		= -1,
10
};
10
};
-
 
11
 
-
 
12
#pragma warning( push )
-
 
13
#pragma warning( disable : 4251)
11
 
14
 
12
namespace Utils {
15
namespace Utils {
13
/**
16
/**
14
 * String wrapper class
17
 * String wrapper class
15
 */
18
 */
Line 28... Line 31...
28
	String(unsigned long l);
31
	String(unsigned long l);
29
	String(float f);
32
	String(float f);
30
	String(double f);
33
	String(double f);
31
 
34
 
32
	virtual ~String(void);
35
	virtual ~String(void);
33
 
36
 
34
	// conversion functions
37
	// conversion functions
35
	void fromLong(long l);
38
	void fromLong(long l);
36
	void fromFloat(float f, int dp = -1);
39
	void fromFloat(float f, int dp = -1);
37
	void fromDouble(double f);
40
	void fromDouble(double f);
38
	void fromDouble(double f, int dp);
41
	void fromDouble(double f, int dp);
Line 49... Line 52...
49
	static String Null();
52
	static String Null();
50
	static String FromFloat(float f, int dp = -1);
53
	static String FromFloat(float f, int dp = -1);
51
 
54
 
52
	bool toBool() const;
55
	bool toBool() const;
53
	long toLong() const;
56
	long toLong() const;
-
 
57
	int toInt() const;
54
	double toDouble() const;
58
	double toDouble() const;
55
	float toFloat() const;
59
	float toFloat() const;
56
 
60
 
57
	// casting operators
61
	// casting operators
58
	inline operator const char *() const			{ return (const char *)this->c_str(); }
62
	inline operator const char *() const			{ return (const char *)this->c_str(); }
Line 178... Line 182...
178
	bool _isCharNumber(char c) const;
182
	bool _isCharNumber(char c) const;
179
	Utils::String::size_type _token_nextPos(const char *token, Utils::String::size_type curPos) const;
183
	Utils::String::size_type _token_nextPos(const char *token, Utils::String::size_type curPos) const;
180
};
184
};
181
 
185
 
182
SPKEXPORT String operator+(const char *str1, const String &str2);
186
SPKEXPORT String operator+(const char *str1, const String &str2);
-
 
187
 
-
 
188
#pragma warning( pop )
-
 
189
 
183
}
190
}