*
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
#ifndef Utils_h__
|
||||
#define Utils_h__
|
||||
|
||||
#include "Types.h"
|
||||
#include "LString.h"
|
||||
#include <stdio.h>
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
|
||||
//TODO fix me, plz, cuz I'm just copy of int16 conversion!
|
||||
extern int8 StringToInt8(const String& str);
|
||||
|
||||
extern uint8 StringToUInt8(const String& str);
|
||||
|
||||
extern int16 StringToInt16(const String& str);
|
||||
|
||||
extern uint16 StringToUInt16(const String& str);
|
||||
|
||||
extern int32 StringToInt32(const String& str);
|
||||
|
||||
extern uint32 StringToUInt32(const String& str);
|
||||
|
||||
extern int64 StringToInt64(const String& str);
|
||||
|
||||
extern uint64 StringToUInt64(const String& str);
|
||||
|
||||
extern float StringToFloat(const String& str);
|
||||
|
||||
extern double StringToDouble(const String& str);
|
||||
|
||||
extern String Int8ToString(int8 value);
|
||||
|
||||
extern String Int16ToString(int16 value);
|
||||
|
||||
extern String Int32ToString(int32 value);
|
||||
|
||||
extern String Int64ToString(int32 value);
|
||||
|
||||
extern String UInt8ToString(uint8 value);
|
||||
|
||||
extern String UInt16ToString(uint16 value);
|
||||
|
||||
extern String UInt32ToString(uint32 value);
|
||||
|
||||
extern String UInt64ToString(uint32 value);
|
||||
|
||||
extern String FloatToString(float val);
|
||||
|
||||
extern String DoubleToString(double val);
|
||||
|
||||
extern String BoolToString(bool value);
|
||||
|
||||
extern bool StringToBool(const String& str);
|
||||
|
||||
|
||||
template <class T> void SafeRelease(T **ppT) {
|
||||
if(*ppT) {
|
||||
(*ppT)->Release();
|
||||
*ppT = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // Utils_h__
|
||||
Reference in New Issue
Block a user