Classes | |
| class | ANSI2WIDE |
| The class used to do the conversion from ANSI to Wide via the X2Y() macros. More... | |
| class | WIDE2ANSI |
| The class used to do the conversion from Wide to ANSI via the X2Y() macros. More... | |
| class | Exception |
| The base class for all exception types. More... | |
| class | IFacePtr |
| A smart-pointer type for use with COM interfaces. More... | |
| class | LeakReporter |
| The static object that uses it's dtor to report any memory leaks. More... | |
| class | NotCopyable |
| Base class used to disable copying of the derived class. More... | |
| class | NotImplException |
| The exception type thrown for features that have not been implemented. More... | |
| class | SharedPtr |
| A reference counted smart pointer. More... | |
| class | SmartPtr |
| The base class for all smart-pointer types. More... | |
Functions | |
| void | AnsiToWide (const char *pszBegin, const char *pszEnd, wchar_t *pszDst) |
| Convert a string from ANSI to Wide. | |
| std::wstring | AnsiToWide (const char *pszBegin, const char *pszEnd) |
| Convert a string from ANSI to Wide. | |
| void | WideToAnsi (const wchar_t *pszBegin, const wchar_t *pszEnd, char *pszDst) |
| Convert a string from Wide to ANSI. | |
| std::string | WideToAnsi (const wchar_t *pszBegin, const wchar_t *pszEnd) |
| Convert a string from Wide to ANSI. | |
| std::wstring | AnsiToWide (const char *psz) |
| Convert a string from ANSI to Wide. | |
| std::wstring | AnsiToWide (const std::string &str) |
| Convert a string from ANSI to Wide. | |
| std::string | WideToAnsi (const wchar_t *psz) |
| Convert a string from Wide to ANSI. | |
| std::string | WideToAnsi (const std::wstring &str) |
| Convert a string from Wide to ANSI. | |
| void | AssertFail (const char *pszExpression, const char *pszFile, uint nLine) |
| The function invoked when an ASSERT fails. | |
| void | TraceEx (const tchar *pszFormat,...) |
| Function to write a message to the debugger output. | |
| void | DebugWrite (const tchar *pszFormat,...) |
| Write a message to the debugger stream in both Debug and Release builds. | |
| void | EnableLeakReporting (bool bEnable) |
| Enable or disable memory leak reporting. | |
| template<typename T> | |
| T ** | AttachTo (IFacePtr< T > &ptr) |
| Helper function to gain access to the internal member so that it can be passed as an output parameter, without overloading the & operator. | |
| template<typename T> | |
| bool | operator== (const SmartPtr< T > &oLHS, const SmartPtr< T > &oRHS) |
| SmartPtr<T> equality operator. | |
| template<typename T> | |
| bool | operator!= (const SmartPtr< T > &oLHS, const SmartPtr< T > &oRHS) |
| SmartPtr<T> inequality operator. | |
| std::tstring | FmtEx (const tchar *pszFormat, va_list args) |
| Format the string ala printf. | |
| std::tstring | Fmt (const tchar *pszFormat,...) |
| Format the string ala printf. | |
| template<typename CharT> | |
| size_t | NumBytes (size_t nChars) |
| Calculate the number of bytes required to represent a string of the given number of characters. | |
| size_t | NumBytes (const char *psz) |
| Calculate the number of bytes required to represent the string. | |
| size_t | NumBytes (const wchar_t *psz) |
| Calculate the number of bytes required to represent the string. | |
| void | WriteTestResult (const char *pszFile, size_t nLine, const tchar *pszExpression, bool bPassed) |
| Write the test results to stdout. | |
| void | WriteTestsSummary () |
| Write the summary of the test results to stdout. | |
| int | GetTestProcessResult () |
| Get the test process result code. | |
Variables | |
| static bool | g_bReportLeaks = false |
| The flag used to signal whether to dump leaks or not. | |
| Core::LeakReporter | g_oReporter |
| The static object that uses it's dtor to report any memory leaks. | |
| static const size_t | npos = static_cast<size_t>(-1) |
| A general purpose equivalent to basic_string::npos. | |
| static size_t | s_nPassed = 0 |
| The number of tests that passed. | |
| static size_t | s_nFailed = 0 |
| The number of tests that failed. | |
| void Core::AnsiToWide | ( | const char * | pszBegin, | |
| const char * | pszEnd, | |||
| wchar_t * | pszDst | |||
| ) |
Convert a string from ANSI to Wide.
| std::wstring Core::AnsiToWide | ( | const char * | pszBegin, | |
| const char * | pszEnd | |||
| ) |
Convert a string from ANSI to Wide.
| void Core::WideToAnsi | ( | const wchar_t * | pszBegin, | |
| const wchar_t * | pszEnd, | |||
| char * | pszDst | |||
| ) |
Convert a string from Wide to ANSI.
| std::string Core::WideToAnsi | ( | const wchar_t * | pszBegin, | |
| const wchar_t * | pszEnd | |||
| ) |
Convert a string from Wide to ANSI.
| std::wstring Core::AnsiToWide | ( | const char * | psz | ) | [inline] |
Convert a string from ANSI to Wide.
| std::wstring Core::AnsiToWide | ( | const std::string & | str | ) | [inline] |
Convert a string from ANSI to Wide.
| std::string Core::WideToAnsi | ( | const wchar_t * | psz | ) | [inline] |
Convert a string from Wide to ANSI.
| std::string Core::WideToAnsi | ( | const std::wstring & | str | ) | [inline] |
Convert a string from Wide to ANSI.
| void Core::AssertFail | ( | const char * | pszExpression, | |
| const char * | pszFile, | |||
| uint | nLine | |||
| ) |
The function invoked when an ASSERT fails.
It displays a message box with details about why and where the assert failed. If asked it will also cause an INT 3 to kick in the debugger.
| void Core::TraceEx | ( | const tchar * | pszFormat, | |
| ... | ||||
| ) |
Function to write a message to the debugger output.
This is a printf() style function for outputing debugging messages. It uses vsprintf() and so is restricted to the types it can handle.
| void Core::DebugWrite | ( | const tchar * | pszFormat, | |
| ... | ||||
| ) |
Write a message to the debugger stream in both Debug and Release builds.
Unlike TraceEx() this goes directly to OutputDebugString().
| void Core::EnableLeakReporting | ( | bool | bEnable | ) |
Enable or disable memory leak reporting.
NB: This function is available in all builds, but does nothing in Release.
| T ** Core::AttachTo | ( | IFacePtr< T > & | ptr | ) | [inline] |
Helper function to gain access to the internal member so that it can be passed as an output parameter, without overloading the & operator.
e.g. LoadTypeLib(..., AttachTo(p)).
| bool Core::operator== | ( | const SmartPtr< T > & | oLHS, | |
| const SmartPtr< T > & | oRHS | |||
| ) | [inline] |
SmartPtr<T> equality operator.
Compare two SmartPtr's for equality.
| bool Core::operator!= | ( | const SmartPtr< T > & | oLHS, | |
| const SmartPtr< T > & | oRHS | |||
| ) | [inline] |
SmartPtr<T> inequality operator.
Compare two SmartPtr's for inequality.
| std::tstring Core::FmtEx | ( | const tchar * | pszFormat, | |
| va_list | args | |||
| ) |
Format the string ala printf.
This function is used internally as the underlying function used for all var args string formatting.
| std::tstring Core::Fmt | ( | const tchar * | pszFormat, | |
| ... | ||||
| ) |
Format the string ala printf.
| size_t Core::NumBytes | ( | size_t | nChars | ) | [inline] |
Calculate the number of bytes required to represent a string of the given number of characters.
| size_t Core::NumBytes | ( | const char * | psz | ) | [inline] |
Calculate the number of bytes required to represent the string.
| size_t Core::NumBytes | ( | const wchar_t * | psz | ) | [inline] |
Calculate the number of bytes required to represent the string.
| void Core::WriteTestResult | ( | const char * | pszFile, | |
| size_t | nLine, | |||
| const tchar * | pszExpression, | |||
| bool | bPassed | |||
| ) |
Write the test results to stdout.
| void Core::WriteTestsSummary | ( | ) |
Write the summary of the test results to stdout.
| int Core::GetTestProcessResult | ( | ) |
Get the test process result code.
bool Core::g_bReportLeaks = false [static] |
The flag used to signal whether to dump leaks or not.
The static object that uses it's dtor to report any memory leaks.
This object must be the last one to be destroyed.
const size_t Core::npos = static_cast<size_t>(-1) [static] |
A general purpose equivalent to basic_string::npos.
size_t Core::s_nPassed = 0 [static] |
The number of tests that passed.
size_t Core::s_nFailed = 0 [static] |
The number of tests that failed.
1.5.2