diff --git a/include/loki/AbstractFactory.h b/include/loki/AbstractFactory.h index 6fdfc0d..22e0c4d 100644 --- a/include/loki/AbstractFactory.h +++ b/include/loki/AbstractFactory.h @@ -15,8 +15,8 @@ // Last update: June 20, 2001 -#ifndef ABSTRACTFACTORY_INC_ -#define ABSTRACTFACTORY_INC_ +#ifndef LOKI_ABSTRACTFACTORY_INC_ +#define LOKI_ABSTRACTFACTORY_INC_ #include "Typelist.h" #include "TypeManip.h" diff --git a/include/loki/AssocVector.h b/include/loki/AssocVector.h index 4655ef8..6c1b50e 100644 --- a/include/loki/AssocVector.h +++ b/include/loki/AssocVector.h @@ -13,8 +13,8 @@ // without express or implied warranty. //////////////////////////////////////////////////////////////////////////////// -#ifndef ASSOCVECTOR_INC_ -#define ASSOCVECTOR_INC_ +#ifndef LOKI_ASSOCVECTOR_INC_ +#define LOKI_ASSOCVECTOR_INC_ #include #include diff --git a/include/loki/DataGenerators.h b/include/loki/DataGenerators.h index bca2691..83d87a2 100644 --- a/include/loki/DataGenerators.h +++ b/include/loki/DataGenerators.h @@ -12,8 +12,8 @@ // Last update: Oct 10, 2002 -#ifndef DATAGENERATORS_H -#define DATAGENERATORS_H +#ifndef LOKI_DATAGENERATORS_H +#define LOKI_DATAGENERATORS_H #include "Typelist.h" //Reference version diff --git a/include/loki/EmptyType.h b/include/loki/EmptyType.h index e8ffb17..ee6c2e7 100644 --- a/include/loki/EmptyType.h +++ b/include/loki/EmptyType.h @@ -15,8 +15,8 @@ // Last update: June 20, 2001 -#ifndef EMPTYTYPE_INC_ -#define EMPTYTYPE_INC_ +#ifndef LOKI_EMPTYTYPE_INC_ +#define LOKI_EMPTYTYPE_INC_ namespace Loki { diff --git a/include/loki/Factory.h b/include/loki/Factory.h index ad62606..c1f67f5 100644 --- a/include/loki/Factory.h +++ b/include/loki/Factory.h @@ -13,8 +13,8 @@ // $Header$ -#ifndef FACTORYPARM_INC_ -#define FACTORYPARM_INC_ +#ifndef LOKI_FACTORYPARM_INC_ +#define LOKI_FACTORYPARM_INC_ #include "LokiTypeInfo.h" #include "Functor.h" @@ -45,8 +45,8 @@ namespace Loki }; -#define ENABLE_NEW_FACTORY_CODE -#ifdef ENABLE_NEW_FACTORY_CODE +#define LOKI_ENABLE_NEW_FACTORY_CODE +#ifdef LOKI_ENABLE_NEW_FACTORY_CODE //////////////////////////////////////////////////////////////////////////////// /* @@ -125,7 +125,7 @@ namespace Loki }; template - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -133,7 +133,7 @@ namespace Loki }; template - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -142,7 +142,7 @@ namespace Loki }; template - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -152,7 +152,7 @@ namespace Loki }; template - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -164,7 +164,7 @@ namespace Loki template - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -178,7 +178,7 @@ namespace Loki template - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -195,7 +195,7 @@ namespace Loki template - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -213,7 +213,7 @@ namespace Loki template - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -232,7 +232,7 @@ namespace Loki template - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -252,7 +252,7 @@ namespace Loki template - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -274,7 +274,7 @@ namespace Loki typename P1,typename P2,typename P3,typename P4,typename P5, typename P6,typename P7,typename P8,typename P9,typename P10, typename P11> - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -298,7 +298,7 @@ namespace Loki typename P1,typename P2,typename P3,typename P4,typename P5, typename P6,typename P7,typename P8,typename P9,typename P10, typename P11,typename P12> - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -323,7 +323,7 @@ namespace Loki typename P1,typename P2,typename P3,typename P4,typename P5, typename P6,typename P7,typename P8,typename P9,typename P10, typename P11,typename P12,typename P13> - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -349,7 +349,7 @@ namespace Loki typename P1,typename P2,typename P3,typename P4,typename P5, typename P6,typename P7,typename P8,typename P9,typename P10, typename P11,typename P12,typename P13,typename P14> - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -376,7 +376,7 @@ namespace Loki typename P1,typename P2,typename P3,typename P4,typename P5, typename P6,typename P7,typename P8,typename P9,typename P10, typename P11,typename P12,typename P13,typename P14,typename P15 > - struct FactoryImpl + struct FactoryImpl : public FactoryImplBase { typedef typename TypeTraits::ParameterType Parm1; @@ -747,6 +747,9 @@ namespace Loki #endif // FACTORY_INC_ // $Log$ +// Revision 1.6 2005/09/26 07:33:04 syntheticpp +// move macros into LOKI_ namespace +// // Revision 1.5 2005/07/31 14:23:24 syntheticpp // invert new factory code macro logic to be ReferenceTest more compatible with noncc code // diff --git a/include/loki/Functor.h b/include/loki/Functor.h index 75041cc..5122aca 100644 --- a/include/loki/Functor.h +++ b/include/loki/Functor.h @@ -15,8 +15,8 @@ // Last update: June 20, 2001 -#ifndef FUNCTOR_INC_ -#define FUNCTOR_INC_ +#ifndef LOKI_FUNCTOR_INC_ +#define LOKI_FUNCTOR_INC_ #include "Typelist.h" #include "EmptyType.h" @@ -70,11 +70,11 @@ namespace Loki } //////////////////////////////////////////////////////////////////////////////// -// macro DEFINE_CLONE_FUNCTORIMPL +// macro LOKI_DEFINE_CLONE_FUNCTORIMPL // Implements the DoClone function for a functor implementation //////////////////////////////////////////////////////////////////////////////// -#define DEFINE_CLONE_FUNCTORIMPL(Cls) \ +#define LOKI_DEFINE_CLONE_FUNCTORIMPL(Cls) \ virtual Cls* DoClone() const { return new Cls(*this); } //////////////////////////////////////////////////////////////////////////////// @@ -87,7 +87,7 @@ namespace Loki //////////////////////////////////////////////////////////////////////////////// template class ThreadingModel = DEFAULT_THREADING_NO_OBJ_LEVEL> + template class ThreadingModel = LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL> class FunctorImpl; //////////////////////////////////////////////////////////////////////////////// @@ -110,7 +110,7 @@ namespace Loki //////////////////////////////////////////////////////////////////////////////// template class ThreadingModel> - class FunctorImpl + class FunctorImpl : public Private::FunctorImplBase { public: @@ -126,7 +126,7 @@ namespace Loki template class ThreadingModel> - class FunctorImpl + class FunctorImpl : public Private::FunctorImplBase { public: @@ -143,7 +143,7 @@ namespace Loki template class ThreadingModel> - class FunctorImpl + class FunctorImpl : public Private::FunctorImplBase { public: @@ -161,7 +161,7 @@ namespace Loki template class ThreadingModel> - class FunctorImpl + class FunctorImpl : public Private::FunctorImplBase { public: @@ -181,7 +181,7 @@ namespace Loki template class ThreadingModel> - class FunctorImpl + class FunctorImpl : public Private::FunctorImplBase { public: @@ -202,7 +202,7 @@ namespace Loki template class ThreadingModel> - class FunctorImpl + class FunctorImpl : public Private::FunctorImplBase { public: @@ -224,7 +224,7 @@ namespace Loki template class ThreadingModel> - class FunctorImpl + class FunctorImpl : public Private::FunctorImplBase { public: @@ -248,7 +248,7 @@ namespace Loki template class ThreadingModel> - class FunctorImpl : public Private::FunctorImplBase { @@ -274,7 +274,7 @@ namespace Loki template class ThreadingModel> - class FunctorImpl : public Private::FunctorImplBase { @@ -302,7 +302,7 @@ namespace Loki typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, template class ThreadingModel> - class FunctorImpl : public Private::FunctorImplBase { @@ -332,7 +332,7 @@ namespace Loki typename P10, typename P11, template class ThreadingModel> class FunctorImpl : public Private::FunctorImplBase { @@ -363,7 +363,7 @@ namespace Loki typename P10, typename P11, typename P12, template class ThreadingModel> class FunctorImpl : public Private::FunctorImplBase { @@ -395,7 +395,7 @@ namespace Loki typename P10, typename P11, typename P12, typename P13, template class ThreadingModel> class FunctorImpl : public Private::FunctorImplBase { @@ -428,7 +428,7 @@ namespace Loki typename P10, typename P11, typename P12, typename P13, typename P14, template class ThreadingModel> class FunctorImpl : public Private::FunctorImplBase @@ -463,7 +463,7 @@ namespace Loki typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, template class ThreadingModel> class FunctorImpl : public Private::FunctorImplBase @@ -521,7 +521,7 @@ namespace Loki FunctorHandler(const Fun& fun) : f_(fun) {} - DEFINE_CLONE_FUNCTORIMPL(FunctorHandler) + LOKI_DEFINE_CLONE_FUNCTORIMPL(FunctorHandler) // operator() implementations for up to 15 arguments @@ -630,7 +630,7 @@ namespace Loki : pObj_(pObj), pMemFn_(pMemFn) {} - DEFINE_CLONE_FUNCTORIMPL(MemFunHandler) + LOKI_DEFINE_CLONE_FUNCTORIMPL(MemFunHandler) ResultType operator()() { return ((*pObj_).*pMemFn_)(); } @@ -720,7 +720,7 @@ namespace Loki //////////////////////////////////////////////////////////////////////////////// template class ThreadingModel = DEFAULT_THREADING_NO_OBJ_LEVEL> + template class ThreadingModel = LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL> class Functor { public: @@ -910,7 +910,7 @@ namespace Loki : f_(fun), b_(bound) {} - DEFINE_CLONE_FUNCTORIMPL(BinderFirst) + LOKI_DEFINE_CLONE_FUNCTORIMPL(BinderFirst) // operator() implementations for up to 15 arguments @@ -1027,7 +1027,7 @@ namespace Loki Chainer(const Fun1& fun1, const Fun2& fun2) : f1_(fun1), f2_(fun2) {} - DEFINE_CLONE_FUNCTORIMPL(Chainer) + LOKI_DEFINE_CLONE_FUNCTORIMPL(Chainer) // operator() implementations for up to 15 arguments diff --git a/include/loki/HierarchyGenerators.h b/include/loki/HierarchyGenerators.h index c17c6ea..8705f7f 100644 --- a/include/loki/HierarchyGenerators.h +++ b/include/loki/HierarchyGenerators.h @@ -15,8 +15,8 @@ // $Header: -#ifndef HIERARCHYGENERATORS_INC_ -#define HIERARCHYGENERATORS_INC_ +#ifndef LOKI_HIERARCHYGENERATORS_INC_ +#define LOKI_HIERARCHYGENERATORS_INC_ #include "Typelist.h" #include "TypeTraits.h" @@ -44,10 +44,10 @@ namespace Loki // The following type helps to overcome subtle flaw in the original // implementation of GenScatterHierarchy. // The flaw is revealed when the input type list of GenScatterHierarchy - // contains more then one element of the same type (e.g. TYPELIST_2(int, int)). + // contains more then one element of the same type (e.g. LOKI_TYPELIST_2(int, int)). // In this case GenScatterHierarchy will contain multiple bases of the same // type and some of them will not be reachable (per 10.3). - // For example before the fix the first element of Tuple + // For example before the fix the first element of Tuple // is not reachable in any way! template struct ScatterHierarchyTag; diff --git a/include/loki/LokiTypeInfo.h b/include/loki/LokiTypeInfo.h index aa45941..0846563 100644 --- a/include/loki/LokiTypeInfo.h +++ b/include/loki/LokiTypeInfo.h @@ -15,8 +15,8 @@ // Last update: June 20, 2001 -#ifndef LOKITYPEINFO_INC_ -#define LOKITYPEINFO_INC_ +#ifndef LOKI_LOKITYPEINFO_INC_ +#define LOKI_LOKITYPEINFO_INC_ #include #include diff --git a/include/loki/MultiMethods.h b/include/loki/MultiMethods.h index 367f058..cb4243d 100644 --- a/include/loki/MultiMethods.h +++ b/include/loki/MultiMethods.h @@ -13,8 +13,8 @@ // without express or implied warranty. //////////////////////////////////////////////////////////////////////////////// -#ifndef MULTIMETHODS_INC_ -#define MULTIMETHODS_INC_ +#ifndef LOKI_MULTIMETHODS_INC_ +#define LOKI_MULTIMETHODS_INC_ #include "Typelist.h" #include "LokiTypeInfo.h" @@ -355,8 +355,8 @@ namespace Loki class DispatcherBackend = BasicDispatcher> class FunctorDispatcher { - typedef TYPELIST_2(BaseLhs&, BaseRhs&) ArgsList; - typedef Functor FunctorType; + typedef LOKI_TYPELIST_2(BaseLhs&, BaseRhs&) ArgsList; + typedef Functor FunctorType; DispatcherBackend backEnd_; diff --git a/include/loki/NullType.h b/include/loki/NullType.h index c2f31be..9cbdcf9 100644 --- a/include/loki/NullType.h +++ b/include/loki/NullType.h @@ -15,8 +15,8 @@ // Last update: November 22, 2001 -#ifndef NULLTYPE_INC_ -#define NULLTYPE_INC_ +#ifndef LOKI_NULLTYPE_INC_ +#define LOKI_NULLTYPE_INC_ namespace Loki { diff --git a/include/loki/SafeFormat.h b/include/loki/SafeFormat.h index 26de537..b06713f 100755 --- a/include/loki/SafeFormat.h +++ b/include/loki/SafeFormat.h @@ -15,8 +15,8 @@ // See Alexandrescu, Andrei: Type-safe Formatting, C/C++ Users Journal, Jul 2005 //////////////////////////////////////////////////////////////////////////////// -#ifndef SAFEFORMAT_H_ -#define SAFEFORMAT_H_ +#ifndef LOKI_SAFEFORMAT_H_ +#define LOKI_SAFEFORMAT_H_ #include #include @@ -68,20 +68,20 @@ struct PrintfState { ~PrintfState() { } - #define PRINTF_STATE_FORWARD(type) \ + #define LOKI_PRINTF_STATE_FORWARD(type) \ PrintfState& operator()(type par) {\ return (*this)(static_cast< unsigned long >(par)); \ } - PRINTF_STATE_FORWARD(bool) - PRINTF_STATE_FORWARD(char) - PRINTF_STATE_FORWARD(signed char) - PRINTF_STATE_FORWARD(unsigned char) - PRINTF_STATE_FORWARD(short) - PRINTF_STATE_FORWARD(unsigned short) - PRINTF_STATE_FORWARD(int) - PRINTF_STATE_FORWARD(unsigned) - PRINTF_STATE_FORWARD(long) + LOKI_PRINTF_STATE_FORWARD(bool) + LOKI_PRINTF_STATE_FORWARD(char) + LOKI_PRINTF_STATE_FORWARD(signed char) + LOKI_PRINTF_STATE_FORWARD(unsigned char) + LOKI_PRINTF_STATE_FORWARD(short) + LOKI_PRINTF_STATE_FORWARD(unsigned short) + LOKI_PRINTF_STATE_FORWARD(int) + LOKI_PRINTF_STATE_FORWARD(unsigned) + LOKI_PRINTF_STATE_FORWARD(long) // Print (or gobble in case of the "*" specifier) an int PrintfState& operator()(unsigned long i) { diff --git a/include/loki/Singleton.h b/include/loki/Singleton.h index 918f677..1402cee 100644 --- a/include/loki/Singleton.h +++ b/include/loki/Singleton.h @@ -13,8 +13,8 @@ // without express or implied warranty. //////////////////////////////////////////////////////////////////////////////// -#ifndef SINGLETON_INC_ -#define SINGLETON_INC_ +#ifndef LOKI_SINGLETON_INC_ +#define LOKI_SINGLETON_INC_ #include "Threads.h" #include @@ -24,15 +24,15 @@ #include #ifdef _MSC_VER -#define C_CALLING_CONVENTION_QUALIFIER __cdecl +#define LOKI_C_CALLING_CONVENTION_QUALIFIER __cdecl #else -#define C_CALLING_CONVENTION_QUALIFIER +#define LOKI_C_CALLING_CONVENTION_QUALIFIER #endif namespace Loki { - typedef void (C_CALLING_CONVENTION_QUALIFIER *atexit_pfn_t)(); + typedef void (LOKI_C_CALLING_CONVENTION_QUALIFIER *atexit_pfn_t)(); namespace Private { @@ -94,7 +94,7 @@ namespace Loki Destroyer destroyer_; }; - void C_CALLING_CONVENTION_QUALIFIER AtExitFn(); // declaration needed below + void LOKI_C_CALLING_CONVENTION_QUALIFIER AtExitFn(); // declaration needed below } // namespace Private //////////////////////////////////////////////////////////////////////////////// @@ -338,7 +338,7 @@ namespace Loki typename T, template class CreationPolicy = CreateUsingNew, template class LifetimePolicy = DefaultLifetime, - template class ThreadingModel = DEFAULT_THREADING_NO_OBJ_LEVEL + template class ThreadingModel = LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL > class SingletonHolder { @@ -348,7 +348,7 @@ namespace Loki private: // Helpers static void MakeInstance(); - static void C_CALLING_CONVENTION_QUALIFIER DestroySingleton(); + static void LOKI_C_CALLING_CONVENTION_QUALIFIER DestroySingleton(); // Protection SingletonHolder(); @@ -440,7 +440,7 @@ namespace Loki template class L, template class M > - void C_CALLING_CONVENTION_QUALIFIER + void LOKI_C_CALLING_CONVENTION_QUALIFIER SingletonHolder::DestroySingleton() { assert(!destroyed_); diff --git a/include/loki/SmallObj.h b/include/loki/SmallObj.h index 6860749..22b9752 100644 --- a/include/loki/SmallObj.h +++ b/include/loki/SmallObj.h @@ -16,20 +16,20 @@ // $Header$ -#ifndef SMALLOBJ_INC_ -#define SMALLOBJ_INC_ +#ifndef LOKI_SMALLOBJ_INC_ +#define LOKI_SMALLOBJ_INC_ #include "Threads.h" #include "Singleton.h" #include #include // needed for std::nothrow_t parameter. -#ifndef DEFAULT_CHUNK_SIZE -#define DEFAULT_CHUNK_SIZE 4096 +#ifndef LOKI_DEFAULT_CHUNK_SIZE +#define LOKI_DEFAULT_CHUNK_SIZE 4096 #endif -#ifndef MAX_SMALL_OBJECT_SIZE -#define MAX_SMALL_OBJECT_SIZE 256 +#ifndef LOKI_MAX_SMALL_OBJECT_SIZE +#define LOKI_MAX_SMALL_OBJECT_SIZE 256 #endif #ifndef LOKI_DEFAULT_OBJECT_ALIGNMENT @@ -89,9 +89,9 @@ namespace Loki template < - template class ThreadingModel = DEFAULT_THREADING_NO_OBJ_LEVEL, - std::size_t chunkSize = DEFAULT_CHUNK_SIZE, - std::size_t maxSmallObjectSize = MAX_SMALL_OBJECT_SIZE, + template class ThreadingModel = LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL, + std::size_t chunkSize = LOKI_DEFAULT_CHUNK_SIZE, + std::size_t maxSmallObjectSize = LOKI_MAX_SMALL_OBJECT_SIZE, std::size_t objectAlignSize = LOKI_DEFAULT_OBJECT_ALIGNMENT, template class LifetimePolicy = Loki::NoDestroy > @@ -161,7 +161,7 @@ namespace Loki class SmallObjectBase { -#if (MAX_SMALL_OBJECT_SIZE != 0) && (DEFAULT_CHUNK_SIZE != 0) && (LOKI_DEFAULT_OBJECT_ALIGNMENT != 0) +#if (LOKI_MAX_SMALL_OBJECT_SIZE != 0) && (LOKI_DEFAULT_CHUNK_SIZE != 0) && (LOKI_DEFAULT_OBJECT_ALIGNMENT != 0) /// Defines type of allocator. typedef AllocatorSingleton< ThreadingModel, chunkSize, @@ -243,9 +243,9 @@ namespace Loki template < - template class ThreadingModel = DEFAULT_THREADING_NO_OBJ_LEVEL, - std::size_t chunkSize = DEFAULT_CHUNK_SIZE, - std::size_t maxSmallObjectSize = MAX_SMALL_OBJECT_SIZE, + template class ThreadingModel = LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL, + std::size_t chunkSize = LOKI_DEFAULT_CHUNK_SIZE, + std::size_t maxSmallObjectSize = LOKI_MAX_SMALL_OBJECT_SIZE, std::size_t objectAlignSize = LOKI_DEFAULT_OBJECT_ALIGNMENT, template class LifetimePolicy = Loki::NoDestroy > @@ -274,9 +274,9 @@ namespace Loki template < - template class ThreadingModel = DEFAULT_THREADING_NO_OBJ_LEVEL, - std::size_t chunkSize = DEFAULT_CHUNK_SIZE, - std::size_t maxSmallObjectSize = MAX_SMALL_OBJECT_SIZE, + template class ThreadingModel = LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL, + std::size_t chunkSize = LOKI_DEFAULT_CHUNK_SIZE, + std::size_t maxSmallObjectSize = LOKI_MAX_SMALL_OBJECT_SIZE, std::size_t objectAlignSize = LOKI_DEFAULT_OBJECT_ALIGNMENT, template class LifetimePolicy = Loki::NoDestroy > @@ -298,6 +298,9 @@ namespace Loki // Nov. 26, 2004: re-implemented by Rich Sposato. // // $Log$ +// Revision 1.9 2005/09/26 07:33:04 syntheticpp +// move macros into LOKI_ namespace +// // Revision 1.8 2005/09/09 00:24:59 rich_sposato // Added functions to trim extra memory within allocator. Made a new_handler // function for allocator. Added deallocator function for nothrow delete diff --git a/include/loki/SmartPtr.h b/include/loki/SmartPtr.h index 4afb6c3..7266a05 100644 --- a/include/loki/SmartPtr.h +++ b/include/loki/SmartPtr.h @@ -13,8 +13,8 @@ // without express or implied warranty. //////////////////////////////////////////////////////////////////////////////// -#ifndef SMARTPTR_INC_ -#define SMARTPTR_INC_ +#ifndef LOKI_SMARTPTR_INC_ +#define LOKI_SMARTPTR_INC_ //////////////////////////////////////////////////////////////////////////////// // IMPORTANT NOTE @@ -421,7 +421,7 @@ namespace Loki // Make it depended on template parameter static const bool DependedFalse = sizeof(P*) == 0; - STATIC_CHECK(DependedFalse, This_Policy_Disallows_Value_Copying); + LOKI_STATIC_CHECK(DependedFalse, This_Policy_Disallows_Value_Copying); } static bool Release(const P&) @@ -615,7 +615,7 @@ namespace Loki // Make it depended on template parameter static const bool DependedFalse = sizeof(P*) == 0; - STATIC_CHECK(DependedFalse, ERROR_This_Policy_Does_Not_Allow_Default_Initialization); + LOKI_STATIC_CHECK(DependedFalse, ERROR_This_Policy_Does_Not_Allow_Default_Initialization); } static void OnInit(const P& val) diff --git a/include/loki/Threads.h b/include/loki/Threads.h index 38ed5b8..14cd13a 100644 --- a/include/loki/Threads.h +++ b/include/loki/Threads.h @@ -1,29 +1,29 @@ -#ifndef THREADS_H_ -#define THREADS_H_ +#ifndef LOKI_THREADS_H_ +#define LOKI_THREADS_H_ //////////////////////////////////////////////////////////////////////////////// -// macro DEFAULT_THREADING +// macro LOKI_DEFAULT_THREADING // Selects the default threading model for certain components of Loki // If you don't define it, it defaults to single-threaded -// All classes in Loki have configurable threading model; DEFAULT_THREADING +// All classes in Loki have configurable threading model; LOKI_DEFAULT_THREADING // affects only default template arguments //////////////////////////////////////////////////////////////////////////////// // $Header$ -#if defined(_WIN32) && (defined(CLASS_LEVEL_THREADING) || defined(OBJECT_LEVEL_THREADING)) +#if defined(_WIN32) && (defined(LOKI_CLASS_LEVEL_THREADING) || defined(LOKI_OBJECT_LEVEL_THREADING)) // threads only on windows #include - #define DEFAULT_THREADING_NO_OBJ_LEVEL ::Loki::ClassLevelLockable - #if defined(CLASS_LEVEL_THREADING) - #define DEFAULT_THREADING ::Loki::ClassLevelLockable + #define LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL ::Loki::ClassLevelLockable + #if defined(LOKI_CLASS_LEVEL_THREADING) + #define LOKI_DEFAULT_THREADING ::Loki::ClassLevelLockable #else - #define DEFAULT_THREADING ::Loki::ObjectLevelLockable + #define LOKI_DEFAULT_THREADING ::Loki::ObjectLevelLockable #endif #else - #define DEFAULT_THREADING ::Loki::SingleThreaded - #define DEFAULT_THREADING_NO_OBJ_LEVEL ::Loki::SingleThreaded + #define LOKI_DEFAULT_THREADING ::Loki::SingleThreaded + #define LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL ::Loki::SingleThreaded #endif #include @@ -226,6 +226,9 @@ namespace Loki #endif // $Log$ +// Revision 1.13 2005/09/26 07:33:04 syntheticpp +// move macros into LOKI_ namespace +// // Revision 1.12 2005/07/31 14:00:48 syntheticpp // make object level threading possible // diff --git a/include/loki/TypeManip.h b/include/loki/TypeManip.h index 27e1848..f876f21 100644 --- a/include/loki/TypeManip.h +++ b/include/loki/TypeManip.h @@ -15,8 +15,8 @@ // Last update, July 26, 2005 -#ifndef TYPEMANIP_INC_ -#define TYPEMANIP_INC_ +#ifndef LOKI_TYPEMANIP_INC_ +#define LOKI_TYPEMANIP_INC_ namespace Loki { @@ -264,7 +264,7 @@ struct SuperSubclassStrict // Deprecated: Use SuperSubclass class template instead. //////////////////////////////////////////////////////////////////////////////// -#define SUPERSUBCLASS(T, U) \ +#define LOKI_SUPERSUBCLASS(T, U) \ ::Loki::SuperSubclass::value //////////////////////////////////////////////////////////////////////////////// @@ -276,7 +276,7 @@ struct SuperSubclassStrict // Deprecated: Use SuperSubclassStrict class template instead. //////////////////////////////////////////////////////////////////////////////// -#define SUPERSUBCLASS_STRICT(T, U) \ +#define LOKI_SUPERSUBCLASS_STRICT(T, U) \ ::Loki::SuperSubclassStrict::value //////////////////////////////////////////////////////////////////////////////// diff --git a/include/loki/TypeTraits.h b/include/loki/TypeTraits.h index 04cce7c..99fae18 100644 --- a/include/loki/TypeTraits.h +++ b/include/loki/TypeTraits.h @@ -1,5 +1,5 @@ -#ifndef TYPETRAITS_INC_ -#define TYPETRAITS_INC_ +#ifndef LOKI_TYPETRAITS_INC_ +#define LOKI_TYPETRAITS_INC_ #include "Typelist.h" @@ -64,13 +64,13 @@ namespace Loki namespace Private { - typedef TYPELIST_4(unsigned char, unsigned short int,unsigned int, unsigned long int) + typedef LOKI_TYPELIST_4(unsigned char, unsigned short int,unsigned int, unsigned long int) StdUnsignedInts; - typedef TYPELIST_4(signed char, short int,int, long int) + typedef LOKI_TYPELIST_4(signed char, short int,int, long int) StdSignedInts; - typedef TYPELIST_3(bool, char, wchar_t) + typedef LOKI_TYPELIST_3(bool, char, wchar_t) StdOtherInts; - typedef TYPELIST_3(float, double, long double) + typedef LOKI_TYPELIST_3(float, double, long double) StdFloats; template struct AddPointer diff --git a/include/loki/Typelist.h b/include/loki/Typelist.h index db59272..59d2343 100644 --- a/include/loki/Typelist.h +++ b/include/loki/Typelist.h @@ -16,333 +16,333 @@ // Last update: October 10, 2002 //Reference -#ifndef TYPELIST_INC_ -#define TYPELIST_INC_ +#ifndef LOKI_TYPELIST_INC_ +#define LOKI_TYPELIST_INC_ #include "NullType.h" #include "TypeManip.h" //////////////////////////////////////////////////////////////////////////////// -// macros TYPELIST_1, TYPELIST_2, ... TYPELIST_50 +// macros LOKI_TYPELIST_1, LOKI_TYPELIST_2, ... LOKI_TYPELIST_50 // Each takes a number of arguments equal to its numeric suffix -// The arguments are type names. TYPELIST_NN generates a typelist containing +// The arguments are type names. LOKI_TYPELIST_NN generates a typelist containing // all types passed as arguments, in that order. -// Example: TYPELIST_2(char, int) generates a type containing char and int. +// Example: LOKI_TYPELIST_2(char, int) generates a type containing char and int. //////////////////////////////////////////////////////////////////////////////// -#define TYPELIST_1(T1) ::Loki::Typelist +#define LOKI_TYPELIST_1(T1) ::Loki::Typelist -#define TYPELIST_2(T1, T2) ::Loki::Typelist +#define LOKI_TYPELIST_2(T1, T2) ::Loki::Typelist -#define TYPELIST_3(T1, T2, T3) ::Loki::Typelist +#define LOKI_TYPELIST_3(T1, T2, T3) ::Loki::Typelist -#define TYPELIST_4(T1, T2, T3, T4) \ - ::Loki::Typelist +#define LOKI_TYPELIST_4(T1, T2, T3, T4) \ + ::Loki::Typelist -#define TYPELIST_5(T1, T2, T3, T4, T5) \ - ::Loki::Typelist +#define LOKI_TYPELIST_5(T1, T2, T3, T4, T5) \ + ::Loki::Typelist -#define TYPELIST_6(T1, T2, T3, T4, T5, T6) \ - ::Loki::Typelist +#define LOKI_TYPELIST_6(T1, T2, T3, T4, T5, T6) \ + ::Loki::Typelist -#define TYPELIST_7(T1, T2, T3, T4, T5, T6, T7) \ - ::Loki::Typelist +#define LOKI_TYPELIST_7(T1, T2, T3, T4, T5, T6, T7) \ + ::Loki::Typelist -#define TYPELIST_8(T1, T2, T3, T4, T5, T6, T7, T8) \ - ::Loki::Typelist +#define LOKI_TYPELIST_8(T1, T2, T3, T4, T5, T6, T7, T8) \ + ::Loki::Typelist -#define TYPELIST_9(T1, T2, T3, T4, T5, T6, T7, T8, T9) \ - ::Loki::Typelist +#define LOKI_TYPELIST_9(T1, T2, T3, T4, T5, T6, T7, T8, T9) \ + ::Loki::Typelist -#define TYPELIST_10(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) \ - ::Loki::Typelist +#define LOKI_TYPELIST_10(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) \ + ::Loki::Typelist -#define TYPELIST_11(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) \ - ::Loki::Typelist +#define LOKI_TYPELIST_11(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) \ + ::Loki::Typelist -#define TYPELIST_12(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) \ - ::Loki::Typelist -#define TYPELIST_13(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) \ - ::Loki::Typelist -#define TYPELIST_14(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_14(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14) \ - ::Loki::Typelist -#define TYPELIST_15(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_15(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15) \ - ::Loki::Typelist -#define TYPELIST_16(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_16(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16) \ - ::Loki::Typelist -#define TYPELIST_17(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_17(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17) \ - ::Loki::Typelist -#define TYPELIST_18(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_18(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18) \ - ::Loki::Typelist -#define TYPELIST_19(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_19(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19) \ - ::Loki::Typelist -#define TYPELIST_20(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_20(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) \ - ::Loki::Typelist -#define TYPELIST_21(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_21(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) \ - ::Loki::Typelist -#define TYPELIST_22(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_22(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) \ - ::Loki::Typelist -#define TYPELIST_23(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_23(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) \ - ::Loki::Typelist -#define TYPELIST_24(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_24(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) \ - ::Loki::Typelist -#define TYPELIST_25(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_25(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25) \ - ::Loki::Typelist -#define TYPELIST_26(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_26(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26) \ - ::Loki::Typelist -#define TYPELIST_27(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_27(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27) \ - ::Loki::Typelist -#define TYPELIST_28(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_28(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28) \ - ::Loki::Typelist -#define TYPELIST_29(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_29(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29) \ - ::Loki::Typelist -#define TYPELIST_30(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_30(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) \ - ::Loki::Typelist -#define TYPELIST_31(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_31(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) \ - ::Loki::Typelist -#define TYPELIST_32(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_32(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) \ - ::Loki::Typelist -#define TYPELIST_33(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_33(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) \ - ::Loki::Typelist -#define TYPELIST_34(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_34(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) \ - ::Loki::Typelist -#define TYPELIST_35(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_35(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35) \ - ::Loki::Typelist -#define TYPELIST_36(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_36(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36) \ - ::Loki::Typelist -#define TYPELIST_37(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_37(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37) \ - ::Loki::Typelist -#define TYPELIST_38(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_38(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37, T38) \ - ::Loki::Typelist -#define TYPELIST_39(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_39(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37, T38, T39) \ - ::Loki::Typelist -#define TYPELIST_40(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_40(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) \ - ::Loki::Typelist -#define TYPELIST_41(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_41(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) \ - ::Loki::Typelist -#define TYPELIST_42(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_42(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) \ - ::Loki::Typelist -#define TYPELIST_43(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_43(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) \ - ::Loki::Typelist -#define TYPELIST_44(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_44(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) \ - ::Loki::Typelist -#define TYPELIST_45(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_45(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T41, T42, T43, T44, T45) \ - ::Loki::Typelist -#define TYPELIST_46(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_46(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T41, T42, T43, T44, T45, T46) \ - ::Loki::Typelist -#define TYPELIST_47(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_47(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T41, T42, T43, T44, T45, T46, T47) \ - ::Loki::Typelist -#define TYPELIST_48(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_48(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T41, T42, T43, T44, T45, T46, T47, T48) \ - ::Loki::Typelist -#define TYPELIST_49(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_49(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T41, T42, T43, T44, T45, T46, T47, T48, T49) \ - ::Loki::Typelist -#define TYPELIST_50(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ +#define LOKI_TYPELIST_50(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T41, T42, T43, T44, T45, T46, T47, T48, T49, T50) \ - ::Loki::Typelist struct Append { - typedef TYPELIST_1(T) Result; + typedef LOKI_TYPELIST_1(T) Result; }; template @@ -781,7 +781,7 @@ namespace Loki //////////////////////////////////////////////////////////////////////////////// // Change log: -// June 09, 2001: Fix bug in parameter list of macros TYPELIST_23 to TYPELIST_27 +// June 09, 2001: Fix bug in parameter list of macros LOKI_TYPELIST_23 to LOKI_TYPELIST_27 // (credit due to Dave Taylor) // June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!! // November 22, 2001: fixed bug in DerivedToFront @@ -789,7 +789,7 @@ namespace Loki // Adam Wilkshire; // Friedrik Hedman who fixed the bug but didn't send the fix; // Kevin Cline who sent the first actual fix) -// May 13, 2002: TYPELIST_46 called TYPELIST_45 with only 44 parameters. +// May 13, 2002: LOKI_TYPELIST_46 called LOKI_TYPELIST_45 with only 44 parameters. // Credit due to Robert Minsk // September 16, 2002: Changed MostDerived to use the new SuperSubclass template // (rather than the SUPERSUBCLASS macro). @@ -799,4 +799,4 @@ namespace Loki // Oct 10, 2002: added MakeTypelist (SGB/MKH) //////////////////////////////////////////////////////////////////////////////// -#endif // TYPELIST_INC_ +#endif // LOKI_TYPELIST_INC_ diff --git a/include/loki/Visitor.h b/include/loki/Visitor.h index 21dc6ae..96dec6c 100644 --- a/include/loki/Visitor.h +++ b/include/loki/Visitor.h @@ -15,8 +15,8 @@ // Last update: June 20, 2001 -#ifndef VISITOR_INC_ -#define VISITOR_INC_ +#ifndef LOKI_VISITOR_INC_ +#define LOKI_VISITOR_INC_ #include "Typelist.h" #include "HierarchyGenerators.h" @@ -55,7 +55,7 @@ namespace Loki // // class SomeVisitor : // public BaseVisitor // required -// public Visitor, +// public Visitor, // public Visitor // { // public: @@ -157,7 +157,7 @@ struct DefaultCatchAll // deriving it from BaseVisitable //////////////////////////////////////////////////////////////////////////////// -#define DEFINE_VISITABLE() \ +#define LOKI_DEFINE_VISITABLE() \ virtual ReturnType Accept(::Loki::BaseVisitor& guest) \ { return AcceptImpl(*this, guest); } @@ -183,11 +183,11 @@ struct DefaultCatchAll }; //////////////////////////////////////////////////////////////////////////////// -// macro DEFINE_CYCLIC_VISITABLE +// macro LOKI_DEFINE_CYCLIC_VISITABLE // Put it in every class that you want to make visitable by a cyclic visitor //////////////////////////////////////////////////////////////////////////////// -#define DEFINE_CYCLIC_VISITABLE(SomeVisitor) \ +#define LOKI_DEFINE_CYCLIC_VISITABLE(SomeVisitor) \ virtual SomeVisitor::ReturnType Accept(SomeVisitor& guest) \ { return guest.GenericVisit(*this); } diff --git a/include/loki/static_check.h b/include/loki/static_check.h index b8a07b0..4e6228a 100644 --- a/include/loki/static_check.h +++ b/include/loki/static_check.h @@ -15,8 +15,8 @@ // Last update: June 20, 2001 -#ifndef STATIC_CHECK_INC_ -#define STATIC_CHECK_INC_ +#ifndef LOKI_STATIC_CHECK_INC_ +#define LOKI_STATIC_CHECK_INC_ namespace Loki { @@ -37,7 +37,7 @@ namespace Loki // If expr is zero, id will appear in a compile-time error message. //////////////////////////////////////////////////////////////////////////////// -#define STATIC_CHECK(expr, msg) \ +#define LOKI_STATIC_CHECK(expr, msg) \ { Loki::CompileTimeError<((expr) != 0)> ERROR_##msg; (void)ERROR_##msg; } diff --git a/src/Singleton.cpp b/src/Singleton.cpp index 86b8f27..a629d47 100644 --- a/src/Singleton.cpp +++ b/src/Singleton.cpp @@ -27,7 +27,7 @@ unsigned int Loki::Private::elements = 0; // Ensures proper destruction of objects with longevity //////////////////////////////////////////////////////////////////////////////// -void C_CALLING_CONVENTION_QUALIFIER Loki::Private::AtExitFn() +void LOKI_C_CALLING_CONVENTION_QUALIFIER Loki::Private::AtExitFn() { assert(elements > 0 && pTrackerArray != 0); // Pick the element at the top of the stack diff --git a/test/Factory/Factory.cpp b/test/Factory/Factory.cpp index 0a0e5ae..250ae42 100755 --- a/test/Factory/Factory.cpp +++ b/test/Factory/Factory.cpp @@ -52,7 +52,7 @@ PFactoryNull; typedef SingletonHolder < - Factory< AbstractProduct, int, TYPELIST_2( int, int ) > + Factory< AbstractProduct, int, LOKI_TYPELIST_2( int, int ) > > PFactory; @@ -136,12 +136,12 @@ public: // get creator functions on runntime /////////////////////////////////////////////////////////////// -typedef Functor CreateFunctor; +typedef Functor CreateFunctor; typedef SingletonHolder < - Factory< AbstractProduct, int,TYPELIST_3(CreateFunctor,int,int) > + Factory< AbstractProduct, int,LOKI_TYPELIST_3(CreateFunctor,int,int) > > PFactoryFunctorParm; @@ -226,6 +226,9 @@ int main(int argc, char *argv[]) } // $Log$ +// Revision 1.2 2005/09/26 07:33:05 syntheticpp +// move macros into LOKI_ namespace +// // Revision 1.1 2005/09/24 16:10:14 syntheticpp // move Factory example // diff --git a/test/RegressionTest/AbstractFactoryTest.h b/test/RegressionTest/AbstractFactoryTest.h index 4fae51a..3164e69 100755 --- a/test/RegressionTest/AbstractFactoryTest.h +++ b/test/RegressionTest/AbstractFactoryTest.h @@ -35,13 +35,13 @@ class BadSoldier : public Soldier {}; class BadMonster : public Monster {}; class BadSuperMonster : public SuperMonster {}; -typedef Loki::AbstractFactory AbstractEnemyFactory; +typedef Loki::AbstractFactory AbstractEnemyFactory; typedef Loki::ConcreteFactory EasyLevelEnemyFactory; + LOKI_TYPELIST_3(SillySoldier, SillyMonster, SillySuperMonster)> EasyLevelEnemyFactory; typedef Loki::ConcreteFactory HardLevelEnemyFactory; + LOKI_TYPELIST_3(BadSoldier, BadMonster, BadSuperMonster)> HardLevelEnemyFactory; class AbstractFactoryTest : public Test { diff --git a/test/RegressionTest/FactoryParmTest.h b/test/RegressionTest/FactoryParmTest.h index 52c6667..30b2c6f 100755 --- a/test/RegressionTest/FactoryParmTest.h +++ b/test/RegressionTest/FactoryParmTest.h @@ -185,90 +185,90 @@ namespace FactoryTestParmPrivate typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_1( int ) > + Factory< AbstractProduct, int, LOKI_TYPELIST_1( int ) > >Factory1; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_2( int, int ) > + Factory< AbstractProduct, int, LOKI_TYPELIST_2( int, int ) > >Factory2; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_3( int, int, int ) > + Factory< AbstractProduct, int, LOKI_TYPELIST_3( int, int, int ) > >Factory3; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_4( int, int, int, int ) > + Factory< AbstractProduct, int, LOKI_TYPELIST_4( int, int, int, int ) > >Factory4; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_5( int, int, int, int, int ) > + Factory< AbstractProduct, int, LOKI_TYPELIST_5( int, int, int, int, int ) > >Factory5; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_6( int, int, int, int, int, + Factory< AbstractProduct, int, LOKI_TYPELIST_6( int, int, int, int, int, int ) > >Factory6; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_7( int, int, int, int, int, + Factory< AbstractProduct, int, LOKI_TYPELIST_7( int, int, int, int, int, int, int ) > >Factory7; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_8( int, int, int, int, int, + Factory< AbstractProduct, int, LOKI_TYPELIST_8( int, int, int, int, int, int, int, int ) > >Factory8; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_9( int, int, int, int, int, + Factory< AbstractProduct, int, LOKI_TYPELIST_9( int, int, int, int, int, int, int, int, int ) > >Factory9; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_10( int, int, int, int, int, + Factory< AbstractProduct, int, LOKI_TYPELIST_10( int, int, int, int, int, int, int, int, int, int ) > >Factory10; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_11( int, int, int, int, int, + Factory< AbstractProduct, int, LOKI_TYPELIST_11( int, int, int, int, int, int, int, int, int, int, int ) > >Factory11; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_12( int, int, int, int, int, + Factory< AbstractProduct, int, LOKI_TYPELIST_12( int, int, int, int, int, int, int, int, int, int, int, int ) > >Factory12; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_13( int, int, int, int, int, + Factory< AbstractProduct, int, LOKI_TYPELIST_13( int, int, int, int, int, int, int, int, int, int, int, int, int ) > >Factory13; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_14( int, int, int, int, int, + Factory< AbstractProduct, int, LOKI_TYPELIST_14( int, int, int, int, int, int, int, int, int, int, int, int, int, int ) > >Factory14; typedef SingletonHolder< - Factory< AbstractProduct, int, TYPELIST_15( int, int, int, int, int, + Factory< AbstractProduct, int, LOKI_TYPELIST_15( int, int, int, int, int, int, int, int, int, int, int, int, int, int, int ) > >Factory15; @@ -419,6 +419,9 @@ public: // $Log$ +// Revision 1.5 2005/09/26 07:33:05 syntheticpp +// move macros into LOKI_ namespace +// // Revision 1.4 2005/09/24 15:25:20 syntheticpp // ove RegressionTest // diff --git a/test/RegressionTest/FunctorTest.h b/test/RegressionTest/FunctorTest.h index 720d890..c37f52f 100755 --- a/test/RegressionTest/FunctorTest.h +++ b/test/RegressionTest/FunctorTest.h @@ -37,10 +37,10 @@ public: TestFunctor testFunctor; TestClass testClass; - Functor function(testFunction); - Functor functor(testFunctor); - Functor classFunctor(&testClass,&TestClass::member); - Functor functorCopy(function); + Functor function(testFunction); + Functor functor(testFunctor); + Functor classFunctor(&testClass,&TestClass::member); + Functor functorCopy(function); Functor bindFunctor(BindFirst(function,testResult)); Functor chainFunctor(Chain(bindFunctor,bindFunctor)); diff --git a/test/RegressionTest/MSVCUnitTest.sln b/test/RegressionTest/MSVCUnitTest.sln index 70bd2ce..a9f120c 100755 --- a/test/RegressionTest/MSVCUnitTest.sln +++ b/test/RegressionTest/MSVCUnitTest.sln @@ -1,21 +1,19 @@ -Microsoft Visual Studio Solution File, Format Version 7.00 +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTest", "MSVCUnitTest.vcproj", "{79729949-F144-4098-BFE9-B6320E6AC3F6}" EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - ConfigName.0 = Debug - ConfigName.1 = Release + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 EndGlobalSection - GlobalSection(ProjectDependencies) = postSolution + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {79729949-F144-4098-BFE9-B6320E6AC3F6}.Debug|Win32.ActiveCfg = Debug|Win32 + {79729949-F144-4098-BFE9-B6320E6AC3F6}.Debug|Win32.Build.0 = Debug|Win32 + {79729949-F144-4098-BFE9-B6320E6AC3F6}.Release|Win32.ActiveCfg = Release|Win32 + {79729949-F144-4098-BFE9-B6320E6AC3F6}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {79729949-F144-4098-BFE9-B6320E6AC3F6}.Debug.ActiveCfg = Debug|Win32 - {79729949-F144-4098-BFE9-B6320E6AC3F6}.Debug.Build.0 = Debug|Win32 - {79729949-F144-4098-BFE9-B6320E6AC3F6}.Release.ActiveCfg = Release|Win32 - {79729949-F144-4098-BFE9-B6320E6AC3F6}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection EndGlobal diff --git a/test/RegressionTest/MSVCUnitTest.vcproj b/test/RegressionTest/MSVCUnitTest.vcproj index be10da2..edccd32 100755 --- a/test/RegressionTest/MSVCUnitTest.vcproj +++ b/test/RegressionTest/MSVCUnitTest.vcproj @@ -1,118 +1,200 @@ - + + Keyword="Win32Proj" + SignManifests="true" + > + Name="Win32" + /> + + + InheritedPropertySheets="UpgradeFromVC70.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + Name="VCManagedResourceCompilerTool" + /> + + + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + + InheritedPropertySheets="UpgradeFromVC70.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + Name="VCManagedResourceCompilerTool" + /> + + + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + + + + RelativePath="LokiTest.h" + > + RelativePath="Test.cpp" + > + RelativePath="UnitTest.h" + > diff --git a/test/RegressionTest/SmartPtrTest.h b/test/RegressionTest/SmartPtrTest.h index ab89a71..80ebd4d 100755 --- a/test/RegressionTest/SmartPtrTest.h +++ b/test/RegressionTest/SmartPtrTest.h @@ -187,7 +187,7 @@ public: private: typedef SmartPtr p0; typedef SmartPtr p1; - typedef SmartPtr::RefCountedMT, + typedef SmartPtr::RefCountedMT, DisallowConversion, AssertCheck, DefaultSPStorage> p2; typedef SmartPtr p3; typedef SmartPtr p4; @@ -197,7 +197,7 @@ private: typedef SmartPtr p8; typedef SmartPtr p9; - typedef SmartPtr::RefCountedMT, + typedef SmartPtr::RefCountedMT, AllowConversion, AssertCheck, DefaultSPStorage> p10; typedef SmartPtr p11; typedef SmartPtr p12; @@ -207,7 +207,7 @@ private: typedef SmartPtr p16; typedef SmartPtr p17; - typedef SmartPtr::RefCountedMT, + typedef SmartPtr::RefCountedMT, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p18; typedef SmartPtr p19; typedef SmartPtr p20; @@ -217,7 +217,7 @@ private: typedef SmartPtr p24; typedef SmartPtr p25; - typedef SmartPtr::RefCountedMT, + typedef SmartPtr::RefCountedMT, AllowConversion, AssertCheckStrict, DefaultSPStorage> p26; typedef SmartPtr p27; typedef SmartPtr p28; @@ -227,7 +227,7 @@ private: typedef SmartPtr p40; typedef SmartPtr p41; - typedef SmartPtr::RefCountedMT, + typedef SmartPtr::RefCountedMT, AllowConversion, RejectNullStatic, DefaultSPStorage> p42; typedef SmartPtr p43; typedef SmartPtr p44; @@ -237,7 +237,7 @@ private: typedef SmartPtr p48; typedef SmartPtr p49; - typedef SmartPtr::RefCountedMT, + typedef SmartPtr::RefCountedMT, DisallowConversion, RejectNullStatic, DefaultSPStorage> p50; typedef SmartPtr p51; typedef SmartPtr p52; @@ -247,7 +247,7 @@ private: typedef SmartPtr p56; typedef SmartPtr p57; - typedef SmartPtr::RefCountedMT, + typedef SmartPtr::RefCountedMT, AllowConversion, RejectNull, DefaultSPStorage> p58; typedef SmartPtr p59; typedef SmartPtr p60; @@ -257,7 +257,7 @@ private: typedef SmartPtr p64; typedef SmartPtr p65; - typedef SmartPtr::RefCountedMT, + typedef SmartPtr::RefCountedMT, DisallowConversion, RejectNull, DefaultSPStorage> p66; typedef SmartPtr p67; typedef SmartPtr p68; @@ -267,7 +267,7 @@ private: typedef SmartPtr p72; typedef SmartPtr p73; - typedef SmartPtr::RefCountedMT, + typedef SmartPtr::RefCountedMT, AllowConversion, RejectNullStrict, DefaultSPStorage> p74; typedef SmartPtr p75; typedef SmartPtr p76; @@ -277,7 +277,7 @@ private: typedef SmartPtr p80; typedef SmartPtr p81; - typedef SmartPtr::RefCountedMT, + typedef SmartPtr::RefCountedMT, DisallowConversion, RejectNullStrict, DefaultSPStorage> p82; typedef SmartPtr p83; typedef SmartPtr p84; @@ -287,7 +287,7 @@ private: typedef SmartPtr p88; typedef SmartPtr p89; - typedef SmartPtr::RefCountedMT, + typedef SmartPtr::RefCountedMT, AllowConversion, NoCheck, DefaultSPStorage> p90; typedef SmartPtr p91; typedef SmartPtr p92; @@ -297,7 +297,7 @@ private: typedef SmartPtr p96; typedef SmartPtr p97; - typedef SmartPtr::RefCountedMT, + typedef SmartPtr::RefCountedMT, DisallowConversion, NoCheck, DefaultSPStorage> p98; typedef SmartPtr p99; typedef SmartPtr p100; diff --git a/test/RegressionTest/Test.cpp b/test/RegressionTest/Test.cpp index e477247..f70e255 100755 --- a/test/RegressionTest/Test.cpp +++ b/test/RegressionTest/Test.cpp @@ -19,8 +19,8 @@ # pragma warning(disable: 4018 4097 4100 4213 4290 4512 4514 4700 4702 4710 4786 4800) #endif -//#define CLASS_LEVEL_THREADING -//#define OBJECT_LEVEL_THREADING +//#define LOKI_CLASS_LEVEL_THREADING +#define LOKI_OBJECT_LEVEL_THREADING // Some platforms might have difficulty with this // Need to ifdef around those cases. @@ -111,6 +111,9 @@ return result; // $Log$ +// Revision 1.6 2005/09/26 07:33:05 syntheticpp +// move macros into LOKI_ namespace +// // Revision 1.5 2005/09/24 15:49:40 syntheticpp // is it really binary? // diff --git a/test/RegressionTest/TypeManipTest.h b/test/RegressionTest/TypeManipTest.h index 8ca764c..b6b0790 100755 --- a/test/RegressionTest/TypeManipTest.h +++ b/test/RegressionTest/TypeManipTest.h @@ -89,23 +89,23 @@ public: testAssert("SuperSubclassStrict",r,result); - r=SUPERSUBCLASS(Base,Derived1) && - SUPERSUBCLASS(Base,Derived2) && - SUPERSUBCLASS(Base,Base) && - !SUPERSUBCLASS(Derived1,Base) && - !SUPERSUBCLASS(Derived2,Base) && - !SUPERSUBCLASS(void,Base); + r=LOKI_SUPERSUBCLASS(Base,Derived1) && + LOKI_SUPERSUBCLASS(Base,Derived2) && + LOKI_SUPERSUBCLASS(Base,Base) && + !LOKI_SUPERSUBCLASS(Derived1,Base) && + !LOKI_SUPERSUBCLASS(Derived2,Base) && + !LOKI_SUPERSUBCLASS(void,Base); - testAssert("SUPERSUBCLASS",r,result); + testAssert("LOKI_SUPERSUBCLASS",r,result); - r=SUPERSUBCLASS_STRICT(Base,Derived1) && - SUPERSUBCLASS_STRICT(Base,Derived2) && - !SUPERSUBCLASS_STRICT(Base,Base) && - !SUPERSUBCLASS_STRICT(Derived1,Base) && - !SUPERSUBCLASS_STRICT(Derived2,Base) && - !SUPERSUBCLASS_STRICT(void,Base); + r=LOKI_SUPERSUBCLASS_STRICT(Base,Derived1) && + LOKI_SUPERSUBCLASS_STRICT(Base,Derived2) && + !LOKI_SUPERSUBCLASS_STRICT(Base,Base) && + !LOKI_SUPERSUBCLASS_STRICT(Derived1,Base) && + !LOKI_SUPERSUBCLASS_STRICT(Derived2,Base) && + !LOKI_SUPERSUBCLASS_STRICT(void,Base); - testAssert("SUPERSUBCLASS_STRICT",r,result); + testAssert("LOKI_SUPERSUBCLASS_STRICT",r,result); std::cout << '\n'; } diff --git a/test/RegressionTest/TypelistTest.h b/test/RegressionTest/TypelistTest.h index 6087d29..59f93f5 100755 --- a/test/RegressionTest/TypelistTest.h +++ b/test/RegressionTest/TypelistTest.h @@ -33,13 +33,13 @@ public: using namespace Loki; using namespace Loki::TL; - typedef TYPELIST_1(char) CharList; - typedef TYPELIST_3(char,int,double) CharIntDoubleList; - typedef TYPELIST_4(char,int,double,char) CharIntDoubleCharList; - typedef TYPELIST_3(Base,Derived1,Derived2) BaseDerived1Derived2List; - typedef TYPELIST_3(Derived2,Derived1,Base) Derived2Derived1BaseList; - typedef TYPELIST_4(Base,Derived1,Base,Derived2) BaseDerived1BaseDerived2List; - typedef TYPELIST_4(Derived1,Base,Derived1,Derived2) Derived1BaseDerived1Derived2List; + typedef LOKI_TYPELIST_1(char) CharList; + typedef LOKI_TYPELIST_3(char,int,double) CharIntDoubleList; + typedef LOKI_TYPELIST_4(char,int,double,char) CharIntDoubleCharList; + typedef LOKI_TYPELIST_3(Base,Derived1,Derived2) BaseDerived1Derived2List; + typedef LOKI_TYPELIST_3(Derived2,Derived1,Base) Derived2Derived1BaseList; + typedef LOKI_TYPELIST_4(Base,Derived1,Base,Derived2) BaseDerived1BaseDerived2List; + typedef LOKI_TYPELIST_4(Derived1,Base,Derived1,Derived2) Derived1BaseDerived1Derived2List; bool r; @@ -85,30 +85,30 @@ public: // MostDerived and DerivedToFront doesn't work on MSVC 6.0 r=SameType::Result,NullType>::value && - SameType::Result,TYPELIST_1(char)>::value && + SameType::Result,LOKI_TYPELIST_1(char)>::value && SameType::Result,CharList>::value && SameType::Result,CharList>::value && - SameType::Result,TYPELIST_2(char,int)>::value && - SameType::Result,TYPELIST_4(char,char,int,double)>::value; + SameType::Result,LOKI_TYPELIST_2(char,int)>::value && + SameType::Result,LOKI_TYPELIST_4(char,char,int,double)>::value; testAssert("Append",r,result); r=SameType::Result,NullType>::value && SameType::Result,NullType>::value && SameType::Result,CharList>::value && - SameType::Result,TYPELIST_2(char,double)>::value && - SameType::Result,TYPELIST_2(char,int)>::value; + SameType::Result,LOKI_TYPELIST_2(char,double)>::value && + SameType::Result,LOKI_TYPELIST_2(char,int)>::value; testAssert("Erase",r,result); r=SameType::Result,NullType>::value && SameType::Result,NullType>::value && SameType::Result,CharList>::value && - SameType::Result,TYPELIST_2(char,double)>::value && - SameType::Result,TYPELIST_2(char,int)>::value && - SameType::Result,TYPELIST_2(int,double)>::value && - SameType::Result,TYPELIST_3(char,double,char)>::value && - SameType::Result,TYPELIST_3(char,int,char)>::value; + SameType::Result,LOKI_TYPELIST_2(char,double)>::value && + SameType::Result,LOKI_TYPELIST_2(char,int)>::value && + SameType::Result,LOKI_TYPELIST_2(int,double)>::value && + SameType::Result,LOKI_TYPELIST_3(char,double,char)>::value && + SameType::Result,LOKI_TYPELIST_3(char,int,char)>::value; testAssert("EraseAll",r,result); @@ -120,26 +120,26 @@ public: testAssert("NoDuplicates",r,result); r=SameType::Result,NullType>::value && - SameType::Result,TYPELIST_1(long)>::value && + SameType::Result,LOKI_TYPELIST_1(long)>::value && SameType::Result,CharList>::value && - SameType::Result,TYPELIST_3(long,int,double)>::value && + SameType::Result,LOKI_TYPELIST_3(long,int,double)>::value && SameType::Result,CharIntDoubleList>::value && - SameType::Result,TYPELIST_4(long,int,double,char)>::value; + SameType::Result,LOKI_TYPELIST_4(long,int,double,char)>::value; testAssert("Replace",r,result); r=SameType::Result,NullType>::value && - SameType::Result,TYPELIST_1(long)>::value && + SameType::Result,LOKI_TYPELIST_1(long)>::value && SameType::Result,CharList>::value && - SameType::Result,TYPELIST_3(long,int,double)>::value && + SameType::Result,LOKI_TYPELIST_3(long,int,double)>::value && SameType::Result,CharIntDoubleList>::value && - SameType::Result,TYPELIST_4(long,int,double,long)>::value; + SameType::Result,LOKI_TYPELIST_4(long,int,double,long)>::value; testAssert("ReplaceAll",r,result); r=SameType::Result,NullType>::value && SameType::Result,CharList>::value && - SameType::Result,TYPELIST_3(double,int,char)>::value; + SameType::Result,LOKI_TYPELIST_3(double,int,char)>::value; testAssert("Reverse",r,result); @@ -159,8 +159,8 @@ public: SameType::Result,CharIntDoubleCharList>::value && SameType::Result,Derived2Derived1BaseList>::value && SameType::Result,Derived2Derived1BaseList>::value && - SameType::Result,TYPELIST_4(Derived2,Derived1,Base,Base)>::value && - SameType::Result,TYPELIST_4(Derived2,Derived1,Derived1,Base)>::value; + SameType::Result,LOKI_TYPELIST_4(Derived2,Derived1,Base,Base)>::value && + SameType::Result,LOKI_TYPELIST_4(Derived2,Derived1,Derived1,Base)>::value; testAssert("DerivedToFront",r,result); diff --git a/test/SmallObj/SmallObjBench.cpp b/test/SmallObj/SmallObjBench.cpp index e8c37d5..b1087ee 100755 --- a/test/SmallObj/SmallObjBench.cpp +++ b/test/SmallObj/SmallObjBench.cpp @@ -1,6 +1,6 @@ -//#define CLASS_LEVEL_THREADING -//#define OBJECT_LEVEL_THREADING +//#define LOKI_CLASS_LEVEL_THREADING +//#define LOKI_OBJECT_LEVEL_THREADING #include "SmallObj.h" #include "timer.h"