move macros into LOKI_ namespace
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@269 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
82a749919e
commit
6e99716c13
32 changed files with 480 additions and 382 deletions
|
@ -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<Product*,TYPELIST_2(int,int)> CreateFunctor;
|
||||
typedef Functor<Product*,LOKI_TYPELIST_2(int,int)> 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
|
||||
//
|
||||
|
|
|
@ -35,13 +35,13 @@ class BadSoldier : public Soldier {};
|
|||
class BadMonster : public Monster {};
|
||||
class BadSuperMonster : public SuperMonster {};
|
||||
|
||||
typedef Loki::AbstractFactory<TYPELIST_3(Soldier, Monster, SuperMonster)> AbstractEnemyFactory;
|
||||
typedef Loki::AbstractFactory<LOKI_TYPELIST_3(Soldier, Monster, SuperMonster)> AbstractEnemyFactory;
|
||||
|
||||
typedef Loki::ConcreteFactory<AbstractEnemyFactory, Loki::OpNewFactoryUnit,
|
||||
TYPELIST_3(SillySoldier, SillyMonster, SillySuperMonster)> EasyLevelEnemyFactory;
|
||||
LOKI_TYPELIST_3(SillySoldier, SillyMonster, SillySuperMonster)> EasyLevelEnemyFactory;
|
||||
|
||||
typedef Loki::ConcreteFactory<AbstractEnemyFactory, Loki::OpNewFactoryUnit,
|
||||
TYPELIST_3(BadSoldier, BadMonster, BadSuperMonster)> HardLevelEnemyFactory;
|
||||
LOKI_TYPELIST_3(BadSoldier, BadMonster, BadSuperMonster)> HardLevelEnemyFactory;
|
||||
|
||||
class AbstractFactoryTest : public Test
|
||||
{
|
||||
|
|
|
@ -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
|
||||
//
|
||||
|
|
|
@ -37,10 +37,10 @@ public:
|
|||
TestFunctor testFunctor;
|
||||
TestClass testClass;
|
||||
|
||||
Functor<void,TYPELIST_1(bool &)> function(testFunction);
|
||||
Functor<void,TYPELIST_1(bool &)> functor(testFunctor);
|
||||
Functor<void,TYPELIST_1(bool &)> classFunctor(&testClass,&TestClass::member);
|
||||
Functor<void,TYPELIST_1(bool &)> functorCopy(function);
|
||||
Functor<void,LOKI_TYPELIST_1(bool &)> function(testFunction);
|
||||
Functor<void,LOKI_TYPELIST_1(bool &)> functor(testFunctor);
|
||||
Functor<void,LOKI_TYPELIST_1(bool &)> classFunctor(&testClass,&TestClass::member);
|
||||
Functor<void,LOKI_TYPELIST_1(bool &)> functorCopy(function);
|
||||
Functor<void,NullType> bindFunctor(BindFirst(function,testResult));
|
||||
Functor<void> chainFunctor(Chain(bindFunctor,bindFunctor));
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,118 +1,200 @@
|
|||
<?xml version="1.0" encoding = "Windows-1252"?>
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.00"
|
||||
Version="8,00"
|
||||
Name="UnitTest"
|
||||
ProjectGUID="{79729949-F144-4098-BFE9-B6320E6AC3F6}"
|
||||
Keyword="Win32Proj">
|
||||
Keyword="Win32Proj"
|
||||
SignManifests="true"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../include/noncc"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
BufferSecurityCheck="TRUE"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/UnitTest.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/UnitTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories="../../include/noncc"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="TRUE"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="../../include/noncc"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/UnitTest.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="LokiTest.h">
|
||||
RelativePath="LokiTest.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Test.cpp">
|
||||
RelativePath="Test.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="UnitTest.h">
|
||||
RelativePath="UnitTest.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
|
|
@ -187,7 +187,7 @@ public:
|
|||
private:
|
||||
typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, AssertCheck, DefaultSPStorage> p0;
|
||||
typedef SmartPtr<TestClass, RefCounted, DisallowConversion, AssertCheck, DefaultSPStorage> p1;
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
DisallowConversion, AssertCheck, DefaultSPStorage> p2;
|
||||
typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, AssertCheck, DefaultSPStorage> p3;
|
||||
typedef SmartPtr<TestClass, RefLinked, DisallowConversion, AssertCheck, DefaultSPStorage> p4;
|
||||
|
@ -197,7 +197,7 @@ private:
|
|||
|
||||
typedef SmartPtr<TestClass, DeepCopy, AllowConversion, AssertCheck, DefaultSPStorage> p8;
|
||||
typedef SmartPtr<TestClass, RefCounted, AllowConversion, AssertCheck, DefaultSPStorage> p9;
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
AllowConversion, AssertCheck, DefaultSPStorage> p10;
|
||||
typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, AssertCheck, DefaultSPStorage> p11;
|
||||
typedef SmartPtr<TestClass, RefLinked, AllowConversion, AssertCheck, DefaultSPStorage> p12;
|
||||
|
@ -207,7 +207,7 @@ private:
|
|||
|
||||
typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p16;
|
||||
typedef SmartPtr<TestClass, RefCounted, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p17;
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
DisallowConversion, AssertCheckStrict, DefaultSPStorage> p18;
|
||||
typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p19;
|
||||
typedef SmartPtr<TestClass, RefLinked, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p20;
|
||||
|
@ -217,7 +217,7 @@ private:
|
|||
|
||||
typedef SmartPtr<TestClass, DeepCopy, AllowConversion, AssertCheckStrict, DefaultSPStorage> p24;
|
||||
typedef SmartPtr<TestClass, RefCounted, AllowConversion, AssertCheckStrict, DefaultSPStorage> p25;
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
AllowConversion, AssertCheckStrict, DefaultSPStorage> p26;
|
||||
typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, AssertCheckStrict, DefaultSPStorage> p27;
|
||||
typedef SmartPtr<TestClass, RefLinked, AllowConversion, AssertCheckStrict, DefaultSPStorage> p28;
|
||||
|
@ -227,7 +227,7 @@ private:
|
|||
|
||||
typedef SmartPtr<TestClass, DeepCopy, AllowConversion, RejectNullStatic, DefaultSPStorage> p40;
|
||||
typedef SmartPtr<TestClass, RefCounted, AllowConversion, RejectNullStatic, DefaultSPStorage> p41;
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
AllowConversion, RejectNullStatic, DefaultSPStorage> p42;
|
||||
typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, RejectNullStatic, DefaultSPStorage> p43;
|
||||
typedef SmartPtr<TestClass, RefLinked, AllowConversion, RejectNullStatic, DefaultSPStorage> p44;
|
||||
|
@ -237,7 +237,7 @@ private:
|
|||
|
||||
typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, RejectNullStatic, DefaultSPStorage> p48;
|
||||
typedef SmartPtr<TestClass, RefCounted, DisallowConversion, RejectNullStatic, DefaultSPStorage> p49;
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
DisallowConversion, RejectNullStatic, DefaultSPStorage> p50;
|
||||
typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, RejectNullStatic, DefaultSPStorage> p51;
|
||||
typedef SmartPtr<TestClass, RefLinked, DisallowConversion, RejectNullStatic, DefaultSPStorage> p52;
|
||||
|
@ -247,7 +247,7 @@ private:
|
|||
|
||||
typedef SmartPtr<TestClass, DeepCopy, AllowConversion, RejectNull, DefaultSPStorage> p56;
|
||||
typedef SmartPtr<TestClass, RefCounted, AllowConversion, RejectNull, DefaultSPStorage> p57;
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
AllowConversion, RejectNull, DefaultSPStorage> p58;
|
||||
typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, RejectNull, DefaultSPStorage> p59;
|
||||
typedef SmartPtr<TestClass, RefLinked, AllowConversion, RejectNull, DefaultSPStorage> p60;
|
||||
|
@ -257,7 +257,7 @@ private:
|
|||
|
||||
typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, RejectNull, DefaultSPStorage> p64;
|
||||
typedef SmartPtr<TestClass, RefCounted, DisallowConversion, RejectNull, DefaultSPStorage> p65;
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
DisallowConversion, RejectNull, DefaultSPStorage> p66;
|
||||
typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, RejectNull, DefaultSPStorage> p67;
|
||||
typedef SmartPtr<TestClass, RefLinked, DisallowConversion, RejectNull, DefaultSPStorage> p68;
|
||||
|
@ -267,7 +267,7 @@ private:
|
|||
|
||||
typedef SmartPtr<TestClass, DeepCopy, AllowConversion, RejectNullStrict, DefaultSPStorage> p72;
|
||||
typedef SmartPtr<TestClass, RefCounted, AllowConversion, RejectNullStrict, DefaultSPStorage> p73;
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
AllowConversion, RejectNullStrict, DefaultSPStorage> p74;
|
||||
typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, RejectNullStrict, DefaultSPStorage> p75;
|
||||
typedef SmartPtr<TestClass, RefLinked, AllowConversion, RejectNullStrict, DefaultSPStorage> p76;
|
||||
|
@ -277,7 +277,7 @@ private:
|
|||
|
||||
typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, RejectNullStrict, DefaultSPStorage> p80;
|
||||
typedef SmartPtr<TestClass, RefCounted, DisallowConversion, RejectNullStrict, DefaultSPStorage> p81;
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
DisallowConversion, RejectNullStrict, DefaultSPStorage> p82;
|
||||
typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, RejectNullStrict, DefaultSPStorage> p83;
|
||||
typedef SmartPtr<TestClass, RefLinked, DisallowConversion, RejectNullStrict, DefaultSPStorage> p84;
|
||||
|
@ -287,7 +287,7 @@ private:
|
|||
|
||||
typedef SmartPtr<TestClass, DeepCopy, AllowConversion, NoCheck, DefaultSPStorage> p88;
|
||||
typedef SmartPtr<TestClass, RefCounted, AllowConversion, NoCheck, DefaultSPStorage> p89;
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
AllowConversion, NoCheck, DefaultSPStorage> p90;
|
||||
typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, NoCheck, DefaultSPStorage> p91;
|
||||
typedef SmartPtr<TestClass, RefLinked, AllowConversion, NoCheck, DefaultSPStorage> p92;
|
||||
|
@ -297,7 +297,7 @@ private:
|
|||
|
||||
typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, NoCheck, DefaultSPStorage> p96;
|
||||
typedef SmartPtr<TestClass, RefCounted, DisallowConversion, NoCheck, DefaultSPStorage> p97;
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
|
||||
DisallowConversion, NoCheck, DefaultSPStorage> p98;
|
||||
typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, NoCheck, DefaultSPStorage> p99;
|
||||
typedef SmartPtr<TestClass, RefLinked, DisallowConversion, NoCheck, DefaultSPStorage> p100;
|
||||
|
|
|
@ -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?
|
||||
//
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
|
|
@ -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<Append<NullType,NullType>::Result,NullType>::value &&
|
||||
SameType<Append<NullType,char>::Result,TYPELIST_1(char)>::value &&
|
||||
SameType<Append<NullType,char>::Result,LOKI_TYPELIST_1(char)>::value &&
|
||||
SameType<Append<NullType,CharList>::Result,CharList>::value &&
|
||||
SameType<Append<CharList,NullType>::Result,CharList>::value &&
|
||||
SameType<Append<CharList,int>::Result,TYPELIST_2(char,int)>::value &&
|
||||
SameType<Append<CharList,CharIntDoubleList>::Result,TYPELIST_4(char,char,int,double)>::value;
|
||||
SameType<Append<CharList,int>::Result,LOKI_TYPELIST_2(char,int)>::value &&
|
||||
SameType<Append<CharList,CharIntDoubleList>::Result,LOKI_TYPELIST_4(char,char,int,double)>::value;
|
||||
|
||||
testAssert("Append",r,result);
|
||||
|
||||
r=SameType<Erase<NullType,char>::Result,NullType>::value &&
|
||||
SameType<Erase<CharList,char>::Result,NullType>::value &&
|
||||
SameType<Erase<CharList,long>::Result,CharList>::value &&
|
||||
SameType<Erase<CharIntDoubleList,int>::Result,TYPELIST_2(char,double)>::value &&
|
||||
SameType<Erase<CharIntDoubleList,double>::Result,TYPELIST_2(char,int)>::value;
|
||||
SameType<Erase<CharIntDoubleList,int>::Result,LOKI_TYPELIST_2(char,double)>::value &&
|
||||
SameType<Erase<CharIntDoubleList,double>::Result,LOKI_TYPELIST_2(char,int)>::value;
|
||||
|
||||
testAssert("Erase",r,result);
|
||||
|
||||
r=SameType<EraseAll<NullType,char>::Result,NullType>::value &&
|
||||
SameType<EraseAll<CharList,char>::Result,NullType>::value &&
|
||||
SameType<EraseAll<CharList,long>::Result,CharList>::value &&
|
||||
SameType<EraseAll<CharIntDoubleList,int>::Result,TYPELIST_2(char,double)>::value &&
|
||||
SameType<EraseAll<CharIntDoubleList,double>::Result,TYPELIST_2(char,int)>::value &&
|
||||
SameType<EraseAll<CharIntDoubleCharList,char>::Result,TYPELIST_2(int,double)>::value &&
|
||||
SameType<EraseAll<CharIntDoubleCharList,int>::Result,TYPELIST_3(char,double,char)>::value &&
|
||||
SameType<EraseAll<CharIntDoubleCharList,double>::Result,TYPELIST_3(char,int,char)>::value;
|
||||
SameType<EraseAll<CharIntDoubleList,int>::Result,LOKI_TYPELIST_2(char,double)>::value &&
|
||||
SameType<EraseAll<CharIntDoubleList,double>::Result,LOKI_TYPELIST_2(char,int)>::value &&
|
||||
SameType<EraseAll<CharIntDoubleCharList,char>::Result,LOKI_TYPELIST_2(int,double)>::value &&
|
||||
SameType<EraseAll<CharIntDoubleCharList,int>::Result,LOKI_TYPELIST_3(char,double,char)>::value &&
|
||||
SameType<EraseAll<CharIntDoubleCharList,double>::Result,LOKI_TYPELIST_3(char,int,char)>::value;
|
||||
|
||||
testAssert("EraseAll",r,result);
|
||||
|
||||
|
@ -120,26 +120,26 @@ public:
|
|||
testAssert("NoDuplicates",r,result);
|
||||
|
||||
r=SameType<Replace<NullType,char,long>::Result,NullType>::value &&
|
||||
SameType<Replace<CharList,char,long>::Result,TYPELIST_1(long)>::value &&
|
||||
SameType<Replace<CharList,char,long>::Result,LOKI_TYPELIST_1(long)>::value &&
|
||||
SameType<Replace<CharList,int,long>::Result,CharList>::value &&
|
||||
SameType<Replace<CharIntDoubleList,char,long>::Result,TYPELIST_3(long,int,double)>::value &&
|
||||
SameType<Replace<CharIntDoubleList,char,long>::Result,LOKI_TYPELIST_3(long,int,double)>::value &&
|
||||
SameType<Replace<CharIntDoubleList,long,char[16]>::Result,CharIntDoubleList>::value &&
|
||||
SameType<Replace<CharIntDoubleCharList,char,long>::Result,TYPELIST_4(long,int,double,char)>::value;
|
||||
SameType<Replace<CharIntDoubleCharList,char,long>::Result,LOKI_TYPELIST_4(long,int,double,char)>::value;
|
||||
|
||||
testAssert("Replace",r,result);
|
||||
|
||||
r=SameType<ReplaceAll<NullType,char,long>::Result,NullType>::value &&
|
||||
SameType<ReplaceAll<CharList,char,long>::Result,TYPELIST_1(long)>::value &&
|
||||
SameType<ReplaceAll<CharList,char,long>::Result,LOKI_TYPELIST_1(long)>::value &&
|
||||
SameType<ReplaceAll<CharList,int,long>::Result,CharList>::value &&
|
||||
SameType<ReplaceAll<CharIntDoubleList,char,long>::Result,TYPELIST_3(long,int,double)>::value &&
|
||||
SameType<ReplaceAll<CharIntDoubleList,char,long>::Result,LOKI_TYPELIST_3(long,int,double)>::value &&
|
||||
SameType<ReplaceAll<CharIntDoubleList,long,char[16]>::Result,CharIntDoubleList>::value &&
|
||||
SameType<ReplaceAll<CharIntDoubleCharList,char,long>::Result,TYPELIST_4(long,int,double,long)>::value;
|
||||
SameType<ReplaceAll<CharIntDoubleCharList,char,long>::Result,LOKI_TYPELIST_4(long,int,double,long)>::value;
|
||||
|
||||
testAssert("ReplaceAll",r,result);
|
||||
|
||||
r=SameType<Reverse<NullType>::Result,NullType>::value &&
|
||||
SameType<Reverse<CharList>::Result,CharList>::value &&
|
||||
SameType<Reverse<CharIntDoubleList>::Result,TYPELIST_3(double,int,char)>::value;
|
||||
SameType<Reverse<CharIntDoubleList>::Result,LOKI_TYPELIST_3(double,int,char)>::value;
|
||||
|
||||
testAssert("Reverse",r,result);
|
||||
|
||||
|
@ -159,8 +159,8 @@ public:
|
|||
SameType<DerivedToFront<CharIntDoubleCharList>::Result,CharIntDoubleCharList>::value &&
|
||||
SameType<DerivedToFront<BaseDerived1Derived2List>::Result,Derived2Derived1BaseList>::value &&
|
||||
SameType<DerivedToFront<Derived2Derived1BaseList>::Result,Derived2Derived1BaseList>::value &&
|
||||
SameType<DerivedToFront<BaseDerived1BaseDerived2List>::Result,TYPELIST_4(Derived2,Derived1,Base,Base)>::value &&
|
||||
SameType<DerivedToFront<Derived1BaseDerived1Derived2List>::Result,TYPELIST_4(Derived2,Derived1,Derived1,Base)>::value;
|
||||
SameType<DerivedToFront<BaseDerived1BaseDerived2List>::Result,LOKI_TYPELIST_4(Derived2,Derived1,Base,Base)>::value &&
|
||||
SameType<DerivedToFront<Derived1BaseDerived1Derived2List>::Result,LOKI_TYPELIST_4(Derived2,Derived1,Derived1,Base)>::value;
|
||||
|
||||
testAssert("DerivedToFront",r,result);
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue