[Mockpp-commits] mockpp/mockpp MockObject.cpp,1.24,1.25 mockpp.h,1.60,1.61
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-11-27 15:34:53
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19644/mockpp Modified Files: MockObject.cpp mockpp.h Log Message: optionally disable runtime type information (rtti) Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- mockpp.h 26 Nov 2005 20:16:55 -0000 1.60 +++ mockpp.h 27 Nov 2005 15:34:36 -0000 1.61 @@ -82,8 +82,6 @@ #ifndef MOCKPP_H #define MOCKPP_H -#include <typeinfo> - # ifdef _MSC_VER // Compilation Warning remover // needed to prevent MSVC6 complain about itself :-/ @@ -135,6 +133,9 @@ # endif #endif +////////////////////////////////////////////////// +// + /* #if defined(MOCKPP_UNICODE) # ifndef _UNICODE @@ -153,6 +154,9 @@ #endif +////////////////////////////////////////////////// +// + #ifdef MOCKPP_USE_MINI_STL #include <ministl/string> @@ -181,6 +185,19 @@ #endif +////////////////////////////////////////////////// +// + +#ifndef MOCKPP_NO_RTTI +#include <typeinfo> +#else +#undef CPPUNIT_USE_TYPEINFO_NAME +#define CPPUNIT_USE_TYPEINFO_NAME 0 +#endif + +////////////////////////////////////////////////// +// + #ifdef HAVE_LIMITS # include <limits> // current #else @@ -201,6 +218,9 @@ # define MOCKPP_UNLIMITED (UINT_MAX) #endif +////////////////////////////////////////////////// +// + #ifdef __BORLANDC__ # define MOCKPP_FUNC_MACRO __FUNC__ #elif defined(_MSC_VER) @@ -218,6 +238,9 @@ * for a whole project. */ +////////////////////////////////////////////////// +// + /** @def MOCKPP_UNUSED * Simple macro to suppress warnings about unused variables if possible. * Note: This is just an empty fallback. The actual content (if any) is in the @@ -229,6 +252,9 @@ #define MOCKPP_UNUSED(x) #endif +////////////////////////////////////////////////// +// + //! Output char values more readable (e.g. non-alphanumeric as number) #define MOCKPP_MAKE_CHAR_READABLE 1 @@ -242,6 +268,9 @@ //! with user's data type if there are no operator+() and operator-(). #define MOCKPP_BOUNDARY_DELTA 0 +////////////////////////////////////////////////// +// + #if defined(__BORLANDC__) || defined (_MSC_VER) # ifndef __WIN32__ @@ -261,6 +290,9 @@ # endif +////////////////////////////////////////////////// +// + # ifdef _MSC_VER // DLL // EXPORT @@ -316,6 +348,9 @@ #endif +////////////////////////////////////////////////// +// + //! Namespace for project "Mock Objects for C++" namespace mockpp { Index: MockObject.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/MockObject.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- MockObject.cpp 26 Nov 2005 18:00:16 -0000 1.24 +++ MockObject.cpp 27 Nov 2005 15:34:36 -0000 1.25 @@ -48,10 +48,14 @@ void MOCKPP_EXPORT MockObject::notImplemented() { -#ifdef MOCKPP_UNICODE +#ifndef MOCKPP_NO_RTTI +# ifdef MOCKPP_UNICODE MOCKPP_NOT_IMPLEMENTED(getUnicode(typeid(*this).name())); -#else +# else MOCKPP_NOT_IMPLEMENTED(typeid(*this).name()); +# endif +#else + MOCKPP_NOT_IMPLEMENTED(MOCKPP_PCHAR("[rtti-disabled in MockObject::notImplemented()") ); #endif } |