Mobile API Reference  MicroStrategy 2019
StringConverter.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : StringConverter.h
3 // AUTHOR : Juan Pablo Muraira
4 // CREATION : 9/26/01
5 // Copyright (C) MicroStrategy Incorporated 2001
6 // All Rights Reserved
7 //==============================================================================================
8 #ifndef MBase_StringConverter_h
9 #define MBase_StringConverter_h
10 
11 #include "../Defines/BasicTypes.h"
12 #include "Language.h"
13 #include "ReturnString.h"
14 
15 namespace MBase
16 {
23  ReturnWString DLL_BASE_EXIM WideChar2String(WCHAR iWideChar);
24 
33  DLL_BASE_EXIM ReturnWString Binary2String(void* ipBin, Int32 iSize);
34 
43  DLL_BASE_EXIM ReturnWString Binary2OctString(void* ipBin, Int32 iSize);
44 
48  DLL_BASE_EXIM ReturnWString ToDecimalWString(int iValue);
49 
53  DLL_BASE_EXIM ReturnString ToDecimalString(int iValue);
54 
58  DLL_BASE_EXIM ReturnWString ToHexUpperWString(int iValue);
59 
63  DLL_BASE_EXIM ReturnString ToHexUpperString(int iValue);
64 
68  DLL_BASE_EXIM ReturnWString ToHexLowerWString(int iValue);
69 
73  DLL_BASE_EXIM ReturnString ToHexLowerString(int iValue);
74 
75 #ifndef NO_WCHAR_SUPPORT
76 
79  DLL_BASE_EXIM int DecimalToInt(const WCHAR* ipStr);
80 #endif
81 
84  DLL_BASE_EXIM int DecimalToInt(const char* ipStr);
85 
92  DLL_BASE_EXIM double LocaleNeutralStringToDouble(const WCHAR* ipValueString);
93 
102 #ifndef NO_WCHAR_SUPPORT
103  DLL_BASE_EXIM unsigned int HexToUnsignedInt(const WCHAR* ipStr, bool iIgnoreTrailingCharacters = false);
104 #endif
105  DLL_BASE_EXIM unsigned int HexToUnsignedInt(const char* ipStr, bool iIgnoreTrailingCharacters = false);
106 
110  DLL_BASE_EXIM ReturnWString GetStandardCLibraryErrorDescriptionOrNULL(int iErrorCode) throw();
111 
115  DLL_BASE_EXIM ReturnString GetStandardCLibraryErrorSymbolOrNULL(int iErrorCode) throw();
116 
121  DLL_BASE_EXIM ReturnString GetStandardCLibraryErrorSymbolOrDecimalString(int iErrorCode) throw();
122 
123 #ifdef WIN32
124 
127  DLL_BASE_EXIM ReturnWString GetWin32APIErrorDescriptionOrNULL(unsigned Int32 iErrorCode, LanguageID iLanguageID) throw();
128 
132  DLL_BASE_EXIM ReturnString GetWin32ExceptionSymbolOrNULL(unsigned int iExceptionCode) throw();
133  DLL_BASE_EXIM ReturnString GetWin32ExceptionSymbolOrHexUpperString(unsigned int iExceptionCode) throw();
134 #else
135 
138  DLL_BASE_EXIM ReturnWString GetSignalDescriptionOrNULL(int iSignalNumber) throw();
139 
144  DLL_BASE_EXIM ReturnString GetSignalNameOrNULL(int iSignalNumber) throw();
145 
150  DLL_BASE_EXIM ReturnString GetSignalNameOrDecimalString(int iSignalNumber) throw();
154  DLL_BASE_EXIM Int64 DecimalToInt64(const wchar_t* ipStr);
155 
159  DLL_BASE_EXIM Int64 DecimalToInt64(const char* ipStr);
160 
161 #endif
162 }
163 
164 #endif // MBase_StringConverter_h
wchar_t WCHAR
Definition: PDCwchar.h:23
unsigned short LanguageID
Definition: Language.h:27
DLL_BASE_EXIM ReturnString ToHexUpperString(int iValue)
DLL_BASE_EXIM ReturnWString Binary2OctString(void *ipBin, Int32 iSize)
DLL_BASE_EXIM ReturnWString GetSignalDescriptionOrNULL(int iSignalNumber)
#define Int64
Definition: BasicTypes.h:36
DLL_BASE_EXIM ReturnString GetStandardCLibraryErrorSymbolOrNULL(int iErrorCode)
DLL_BASE_EXIM ReturnWString Binary2String(void *ipBin, Int32 iSize)
DLL_BASE_EXIM double LocaleNeutralStringToDouble(const WCHAR *ipValueString)
#define DLL_BASE_EXIM
Definition: Base.h:20
#define Int32
Definition: BasicTypes.h:20
DLL_BASE_EXIM ReturnString GetSignalNameOrDecimalString(int iSignalNumber)
DLL_BASE_EXIM ReturnWString GetStandardCLibraryErrorDescriptionOrNULL(int iErrorCode)
DLL_BASE_EXIM ReturnString GetStandardCLibraryErrorSymbolOrDecimalString(int iErrorCode)
Definition: Allocator.h:47
DLL_BASE_EXIM Int64 DecimalToInt64(const wchar_t *ipStr)
DLL_BASE_EXIM ReturnWString ToHexUpperWString(int iValue)
ReturnWString DLL_BASE_EXIM WideChar2String(WCHAR iWideChar)
DLL_BASE_EXIM ReturnWString ToDecimalWString(int iValue)
DLL_BASE_EXIM ReturnString GetSignalNameOrNULL(int iSignalNumber)
DLL_BASE_EXIM ReturnWString ToHexLowerWString(int iValue)
DLL_BASE_EXIM int DecimalToInt(const WCHAR *ipStr)
DLL_BASE_EXIM ReturnString ToDecimalString(int iValue)
DLL_BASE_EXIM unsigned int HexToUnsignedInt(const WCHAR *ipStr, bool iIgnoreTrailingCharacters=false)
DLL_BASE_EXIM ReturnString ToHexLowerString(int iValue)