add msvc8 project files

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@427 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
syntheticpp 2006-01-05 17:21:13 +00:00
parent 29e7199a27
commit 8814dc7790
6 changed files with 504 additions and 211 deletions

View file

@ -5,7 +5,7 @@
// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design // Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
// Patterns Applied". Copyright (c) 2001. Addison-Wesley. // Patterns Applied". Copyright (c) 2001. Addison-Wesley.
// Permission to use, copy, modify, distribute and sell this software for any // Permission to use, copy, modify, distribute and sell this software for any
// purpose is hereby granted without fee, provided that the above copyright // purpose is hereby granted without fee, provided that the above copyright
// notice appear in all copies and that both that copyright notice and this // notice appear in all copies and that both that copyright notice and this
// permission notice appear in supporting documentation. // permission notice appear in supporting documentation.
// The author or Addison-Wesley Longman make no representations about the // The author or Addison-Wesley Longman make no representations about the
@ -1224,6 +1224,9 @@ bool SmallObjAllocator::IsCorrupt( void ) const
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// $Log$ // $Log$
// Revision 1.23 2006/01/05 17:21:12 syntheticpp
// add msvc8 project files
//
// Revision 1.22 2006/01/05 00:23:43 syntheticpp // Revision 1.22 2006/01/05 00:23:43 syntheticpp
// always use #include <loki/...>, Thanks to Lukas Fittl // always use #include <loki/...>, Thanks to Lukas Fittl
// //

View file

@ -1,40 +1,192 @@
////////////////////////////////////////////////////////////////////////////////
// The Loki Library
// Copyright (c) 2005 by Curtis Krauskopf
// Copyright (c) 2005 by Peter Kuemmel
//
// Code covered by the MIT License
// The authors make no representations about the suitability of this software
// for any purpose. It is provided "as is" without express or implied warranty.
////////////////////////////////////////////////////////////////////////////////
// This is an example of using the SetLongevity function for both
// singletons and globally and locally defined dynamically allocated
// objects.
//
// The program defines three classes: Example, Keyboard and LogClass.
//
// The purpose of the Example class is to send a message to cout
// when an Example object is being destroyed.
//
// The Keyboard class is a singleton.
//
// The LogClass class is also a singleton.
//
// The pGlobal object is deleted using an adapter functor to
// customize Example's destruction (see destGlobal()).
// The glue that binds the adapter functor (above) with Loki's
// SetLongevity function is:
//
// Loki::Private::Adapter<Example>exampleAdapter = {&destGlobal};
// SetLongevity(pGlobal, globalPriority, exampleAdapter);
//
// An alternative Loki-compatible way of destroying pGlobal (without
// defining a global static functor) is to use the default parameter
// on SetLongevity:
//
// Example *pLocal = new Example("Destroying local Example");
// SetLongevity(pLocal, localPriority);
//
// The parameters passed by the user on main define the longevity values
// for (respectively):
// 1) The global object
// 2) The local object
// 3) The Keyboard singleton
// 4) The LogClass singleton
//
// Examples:
// longevity 1 2 3 4
// longevity 40 30 20 10
//
#include <iostream> #include <iostream>
#include <loki/Singleton.h> // for Loki::SingletonHolder
#include <loki/Singleton.h> using namespace std; // okay for small programs
using namespace Loki; // okay for small programs
// These globals allow the priority for each object to be
// set in main() but used anywhere in the program.
int globalPriority;
int localPriority;
int keyboardPriority;
int logPriority;
struct L1
// A generic example class that stores and echoes a const char.
//
class Example
{ {
L1(){std::cout << "create L1: " << this << "\n";} public:
~L1(){std::cout << "delete L1: " << this <<" \n";} Example(const char * s)
{
msg = s;
};
virtual ~Example()
{
echo(msg);
}
void echo(const char *s)
{
cout << s << endl;
}
protected:
const char *msg;
}; };
struct L2
{
L2(){std::cout << "create L2 \n";}
~L2(){std::cout << "delete L2 \n";}
};
struct L3 // A singleton Keyboard object derived from the Example class.
// Its longevity is set by the user on the command line.
//
class Keyboard : public Example
{ {
L3(){std::cout << "create L3 \n";} public:
~L3(){std::cout << "delete L3 \n";} Keyboard() : Example("Destroying Keyboard")
}; { }
}
;
int main() inline unsigned int GetLongevity(Keyboard *)
{ {
Loki::SetLongevity return keyboardPriority;
(new L1, 1); }
Loki::SetLongevity<L1, void (*)(L1*)>
(new L1, 1, Loki::Private::Deleter<L1>::Delete); typedef SingletonHolder<Keyboard, CreateUsingNew, SingletonWithLongevity> keyboard;
Loki::SetLongevity<L1, Loki::Private::Deleter<L1>::Type>
(new L1, 1, Loki::Private::Deleter<L1>::Delete);
Loki::SetLongevity(new L2, 2); // A singleton LogClass object derived from the Example class.
Loki::SetLongevity(new L1, 1); // Its longevity is set by the user on the command line.
Loki::SetLongevity(new L3, 3); //
Loki::SetLongevity(new L1, 1); class LogClass : public Example
{
std::cout << "\n"; public:
LogClass() : Example("Destroying LogClass")
{ }
}
;
inline unsigned int GetLongevity(LogClass *)
{
return logPriority;
}
typedef SingletonHolder<LogClass, CreateUsingNew, SingletonWithLongevity> LogBook;
// Instantiate a global Example object. It's not a singleton
// but because it's instantiated with new (and therefore it isn't
// automatically destroyed) it can use the SetLongevity template function.
// Its longevity is determined by the user on the command line.
//
Example* pGlobal( new Example("Destroying global Example") );
// destGlobal() is called when the pGlobal object needs to be destroyed.
static void destGlobal()
{
cout << "Going to delete pGlobal\n";
delete pGlobal;
}
void help(const char *s)
{
cout << "To use:\n";
cout << s << " par1 par2 par3 par4\n";
cout << " where each par is a number that represents the object's ";
cout << " longevity:\n";
cout << " par1: global object\n";
cout << " par2: local object\n";
cout << " par3: keyboard singleton\n";
cout << " par4: LogBook singleton\n";
cout << "Example: " << s << " 1 2 3 4" << endl;
}
int main(int argc, char *argv[])
{
if (argc != 5)
{
help(argv[0]);
return 0;
}
globalPriority = atoi(argv[1]);
localPriority = atoi(argv[2]);
keyboardPriority = atoi(argv[3]);
logPriority = atoi(argv[4]);
// Use an adapter functor to tie the destGlobal function to the
// destruction priority for pGlobal.
Loki::Private::Adapter<Example> exampleAdapter = { &destGlobal };
SetLongevity(pGlobal, globalPriority, exampleAdapter);
// Use Loki's private Deleter template function to destroy the
// pLocal object for a user-defined priority.
Example *pLocal = new Example("Destroying local Example");
SetLongevity<Example, void (*)(Example*)>(pLocal, localPriority, &Loki::Private::Deleter<Example>::Delete);
// Make the global and local objects announce their presense.
pGlobal->echo("pGlobal created during program initialization.");
pLocal->echo("pLocal created after main() started.");
// Instantiate both singletons by calling them...
LogBook::Instance().echo("LogClass singleton instantiated");
keyboard::Instance().echo("Keyboard singleton instantiated");
#if defined(__BORLANDC__) || defined(_MSC_VER)
system("PAUSE");
#endif
return 0;
} }

View file

@ -84,4 +84,9 @@ int main()
try{ u2.AddFriendGuarded(u1); } try{ u2.AddFriendGuarded(u1); }
catch (...){} catch (...){}
std::cout << "u2 countFriends: " << u2.countFriends() << "\n"; std::cout << "u2 countFriends: " << u2.countFriends() << "\n";
#if defined(__BORLANDC__) || defined(_MSC_VER)
system("PAUSE");
#endif
} }

View file

@ -1,114 +1,178 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="7.10" Version="8,00"
Name="CompareSmallObj" Name="CompareSmallObj"
ProjectGUID="{0A98B714-818C-4DD3-A07C-BDD16399F362}" ProjectGUID="{0A98B714-818C-4DD3-A07C-BDD16399F362}"
Keyword="Win32Proj"> Keyword="Win32Proj"
>
<Platforms> <Platforms>
<Platform <Platform
Name="Win32"/> Name="Win32"
/>
</Platforms> </Platforms>
<ToolFiles>
</ToolFiles>
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
OutputDirectory="Debug" OutputDirectory="Debug"
IntermediateDirectory="Debug" IntermediateDirectory="Debug"
ConfigurationType="1" ConfigurationType="1"
CharacterSet="2"> InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\include;..\include\loki;..\..\..\boost_1_33_0\" AdditionalIncludeDirectories="..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;COMPARE_BOOST_POOL" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
StringPooling="TRUE" StringPooling="true"
MinimalRebuild="TRUE" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="5" RuntimeLibrary="1"
RuntimeTypeInfo="TRUE" RuntimeTypeInfo="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="4" WarningLevel="4"
Detect64BitPortabilityProblems="TRUE" Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"/> DebugInformationFormat="3"
/>
<Tool <Tool
Name="VCCustomBuildTool"/> Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
OutputFile="$(OutDir)/CompareSmallObj.exe" OutputFile="$(OutDir)/CompareSmallObj.exe"
LinkIncremental="2" LinkIncremental="2"
GenerateDebugInformation="TRUE" GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/test.pdb" ProgramDatabaseFile="$(OutDir)/test.pdb"
SubSystem="1" SubSystem="1"
TargetMachine="1"/> TargetMachine="1"
/>
<Tool <Tool
Name="VCMIDLTool"/> Name="VCALinkTool"
/>
<Tool <Tool
Name="VCPostBuildEventTool"/> Name="VCManifestTool"
/>
<Tool <Tool
Name="VCPreBuildEventTool"/> Name="VCXDCMakeTool"
/>
<Tool <Tool
Name="VCPreLinkEventTool"/> Name="VCBscMakeTool"
/>
<Tool <Tool
Name="VCResourceCompilerTool"/> Name="VCFxCopTool"
/>
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool"/> Name="VCAppVerifierTool"
/>
<Tool <Tool
Name="VCXMLDataGeneratorTool"/> Name="VCWebDeploymentTool"
/>
<Tool <Tool
Name="VCWebDeploymentTool"/> Name="VCPostBuildEventTool"
<Tool />
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="Release" OutputDirectory="Release"
IntermediateDirectory="Release" IntermediateDirectory="Release"
ConfigurationType="1" ConfigurationType="1"
CharacterSet="2"> InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\include;..\include\loki;..\..\..\boost_1_33_0\" AdditionalIncludeDirectories="..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;COMPARE_BOOST_POOL" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="TRUE" StringPooling="true"
RuntimeLibrary="4" RuntimeLibrary="0"
RuntimeTypeInfo="TRUE" RuntimeTypeInfo="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="4" WarningLevel="4"
Detect64BitPortabilityProblems="TRUE" Detect64BitPortabilityProblems="true"
DebugInformationFormat="0"/> DebugInformationFormat="0"
/>
<Tool <Tool
Name="VCCustomBuildTool"/> Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
OutputFile="$(OutDir)/CompareSmallObj.exe" OutputFile="$(OutDir)/CompareSmallObj.exe"
LinkIncremental="1" LinkIncremental="1"
GenerateDebugInformation="TRUE" GenerateDebugInformation="true"
SubSystem="1" SubSystem="1"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
TargetMachine="1"/> TargetMachine="1"
/>
<Tool <Tool
Name="VCMIDLTool"/> Name="VCALinkTool"
/>
<Tool <Tool
Name="VCPostBuildEventTool"/> Name="VCManifestTool"
/>
<Tool <Tool
Name="VCPreBuildEventTool"/> Name="VCXDCMakeTool"
/>
<Tool <Tool
Name="VCPreLinkEventTool"/> Name="VCBscMakeTool"
/>
<Tool <Tool
Name="VCResourceCompilerTool"/> Name="VCFxCopTool"
/>
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool"/> Name="VCAppVerifierTool"
/>
<Tool <Tool
Name="VCXMLDataGeneratorTool"/> Name="VCWebDeploymentTool"
/>
<Tool <Tool
Name="VCWebDeploymentTool"/> Name="VCPostBuildEventTool"
<Tool />
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration> </Configuration>
</Configurations> </Configurations>
<References> <References>
@ -117,117 +181,96 @@
<Filter <Filter
Name="Source Files" Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{D98BEADF-A77F-476b-BAA7-41B12B269FBF}"> UniqueIdentifier="{D98BEADF-A77F-476b-BAA7-41B12B269FBF}"
>
<File <File
RelativePath="..\..\src\Singleton.cpp"> RelativePath="..\..\src\Singleton.cpp"
>
<FileConfiguration <FileConfiguration
Name="Debug|Win32"> Name="Debug|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../include/loki"/> AdditionalIncludeDirectories="../../include/loki"
/>
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32"> Name="Release|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../include/loki"/> AdditionalIncludeDirectories="../../include/loki"
/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File <File
RelativePath="..\..\src\SmallObj.cpp"> RelativePath="..\..\src\SmallObj.cpp"
>
<FileConfiguration <FileConfiguration
Name="Debug|Win32"> Name="Debug|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../include/loki"/> AdditionalIncludeDirectories="../../include/loki"
/>
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32"> Name="Release|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../include/loki"/> AdditionalIncludeDirectories="../../include/loki"
/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File <File
RelativePath=".\SmallObjBench.cpp"> RelativePath=".\SmallObjBench.cpp"
>
<FileConfiguration <FileConfiguration
Name="Debug|Win32"> Name="Debug|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../include/loki"/> AdditionalIncludeDirectories="../../include/loki"
/>
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32"> Name="Release|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../include/loki"/> AdditionalIncludeDirectories="../../include/loki"
/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File <File
RelativePath=".\timer.h"> RelativePath=".\timer.h"
>
</File> </File>
</Filter> </Filter>
<Filter <Filter
Name="Header Files" Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd" Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{7DF39E90-C717-4886-A90C-D18708A77099}"> UniqueIdentifier="{7DF39E90-C717-4886-A90C-D18708A77099}"
>
<File <File
RelativePath="..\..\include\loki\Singleton.h"> RelativePath="..\..\include\loki\Singleton.h"
>
</File> </File>
<File <File
RelativePath="..\..\include\loki\SmallObj.h"> RelativePath="..\..\include\loki\SmallObj.h"
>
</File> </File>
<File <File
RelativePath="..\..\include\loki\Threads.h"> RelativePath="..\..\include\loki\Threads.h"
>
</File> </File>
</Filter> </Filter>
<Filter <Filter
Name="Resource Files" Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{DFC2006D-7B0E-48f3-907F-2433F0935110}"> UniqueIdentifier="{DFC2006D-7B0E-48f3-907F-2433F0935110}"
</Filter> >
<Filter
Name="Boost_Pool"
Filter="">
<File
RelativePath="..\..\..\boost_1_33_0\boost\pool\detail\ct_gcd_lcm.hpp">
</File>
<File
RelativePath="..\..\..\boost_1_33_0\boost\pool\detail\gcd_lcm.hpp">
</File>
<File
RelativePath="..\..\..\boost_1_33_0\boost\pool\detail\guard.hpp">
</File>
<File
RelativePath="..\..\..\boost_1_33_0\boost\pool\detail\mutex.hpp">
</File>
<File
RelativePath="..\..\..\boost_1_33_0\boost\pool\object_pool.hpp">
</File>
<File
RelativePath="..\..\..\boost_1_33_0\boost\pool\pool.hpp">
</File>
<File
RelativePath="..\..\..\boost_1_33_0\boost\pool\pool_alloc.hpp">
</File>
<File
RelativePath="..\..\..\boost_1_33_0\boost\pool\detail\pool_construct.inc">
</File>
<File
RelativePath="..\..\..\boost_1_33_0\boost\pool\detail\pool_construct_simple.inc">
</File>
<File
RelativePath="..\..\..\boost_1_33_0\boost\pool\poolfwd.hpp">
</File>
<File
RelativePath="..\..\..\boost_1_33_0\boost\pool\simple_segregated_storage.hpp">
</File>
<File
RelativePath="..\..\..\boost_1_33_0\boost\pool\detail\singleton.hpp">
</File>
<File
RelativePath="..\..\..\boost_1_33_0\boost\pool\singleton_pool.hpp">
</File>
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>

View file

@ -1,114 +1,178 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="7.10" Version="8,00"
Name="SmallSingleton" Name="SmallSingleton"
ProjectGUID="{78536B46-8307-4AE5-933E-0CADE2887AFB}" ProjectGUID="{78536B46-8307-4AE5-933E-0CADE2887AFB}"
Keyword="Win32Proj"> Keyword="Win32Proj"
>
<Platforms> <Platforms>
<Platform <Platform
Name="Win32"/> Name="Win32"
/>
</Platforms> </Platforms>
<ToolFiles>
</ToolFiles>
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
OutputDirectory="Debug" OutputDirectory="Debug"
IntermediateDirectory="Debug" IntermediateDirectory="Debug"
ConfigurationType="1" ConfigurationType="1"
CharacterSet="2"> InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\include;..\include\loki" AdditionalIncludeDirectories="..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
StringPooling="TRUE" StringPooling="true"
MinimalRebuild="TRUE" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="5" RuntimeLibrary="1"
RuntimeTypeInfo="TRUE" RuntimeTypeInfo="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="4" WarningLevel="4"
Detect64BitPortabilityProblems="TRUE" Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"/> DebugInformationFormat="3"
/>
<Tool <Tool
Name="VCCustomBuildTool"/> Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
OutputFile="$(OutDir)/SmallSingleton.exe" OutputFile="$(OutDir)/SmallSingleton.exe"
LinkIncremental="2" LinkIncremental="2"
GenerateDebugInformation="TRUE" GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/test.pdb" ProgramDatabaseFile="$(OutDir)/test.pdb"
SubSystem="1" SubSystem="1"
TargetMachine="1"/> TargetMachine="1"
/>
<Tool <Tool
Name="VCMIDLTool"/> Name="VCALinkTool"
/>
<Tool <Tool
Name="VCPostBuildEventTool"/> Name="VCManifestTool"
/>
<Tool <Tool
Name="VCPreBuildEventTool"/> Name="VCXDCMakeTool"
/>
<Tool <Tool
Name="VCPreLinkEventTool"/> Name="VCBscMakeTool"
/>
<Tool <Tool
Name="VCResourceCompilerTool"/> Name="VCFxCopTool"
/>
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool"/> Name="VCAppVerifierTool"
/>
<Tool <Tool
Name="VCXMLDataGeneratorTool"/> Name="VCWebDeploymentTool"
/>
<Tool <Tool
Name="VCWebDeploymentTool"/> Name="VCPostBuildEventTool"
<Tool />
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="Release" OutputDirectory="Release"
IntermediateDirectory="Release" IntermediateDirectory="Release"
ConfigurationType="1" ConfigurationType="1"
CharacterSet="2"> InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\include;..\include\loki" AdditionalIncludeDirectories="..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="TRUE" StringPooling="true"
RuntimeLibrary="4" RuntimeLibrary="0"
RuntimeTypeInfo="TRUE" RuntimeTypeInfo="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="4" WarningLevel="4"
Detect64BitPortabilityProblems="TRUE" Detect64BitPortabilityProblems="true"
DebugInformationFormat="0"/> DebugInformationFormat="0"
/>
<Tool <Tool
Name="VCCustomBuildTool"/> Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
OutputFile="$(OutDir)/SmallSingleton.exe" OutputFile="$(OutDir)/SmallSingleton.exe"
LinkIncremental="1" LinkIncremental="1"
GenerateDebugInformation="TRUE" GenerateDebugInformation="true"
SubSystem="1" SubSystem="1"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
TargetMachine="1"/> TargetMachine="1"
/>
<Tool <Tool
Name="VCMIDLTool"/> Name="VCALinkTool"
/>
<Tool <Tool
Name="VCPostBuildEventTool"/> Name="VCManifestTool"
/>
<Tool <Tool
Name="VCPreBuildEventTool"/> Name="VCXDCMakeTool"
/>
<Tool <Tool
Name="VCPreLinkEventTool"/> Name="VCBscMakeTool"
/>
<Tool <Tool
Name="VCResourceCompilerTool"/> Name="VCFxCopTool"
/>
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool"/> Name="VCAppVerifierTool"
/>
<Tool <Tool
Name="VCXMLDataGeneratorTool"/> Name="VCWebDeploymentTool"
/>
<Tool <Tool
Name="VCWebDeploymentTool"/> Name="VCPostBuildEventTool"
<Tool />
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration> </Configuration>
</Configurations> </Configurations>
<References> <References>
@ -117,71 +181,92 @@
<Filter <Filter
Name="Source Files" Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{BFF4AEA3-8EE0-4150-A20E-4A2B41BEF2F2}"> UniqueIdentifier="{BFF4AEA3-8EE0-4150-A20E-4A2B41BEF2F2}"
>
<File <File
RelativePath="..\..\src\Singleton.cpp"> RelativePath="..\..\src\Singleton.cpp"
>
<FileConfiguration <FileConfiguration
Name="Debug|Win32"> Name="Debug|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../include/loki"/> AdditionalIncludeDirectories="../../include/loki"
/>
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32"> Name="Release|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../include/loki"/> AdditionalIncludeDirectories="../../include/loki"
/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File <File
RelativePath="..\..\src\SmallObj.cpp"> RelativePath="..\..\src\SmallObj.cpp"
>
<FileConfiguration <FileConfiguration
Name="Debug|Win32"> Name="Debug|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../include/loki"/> AdditionalIncludeDirectories="../../include/loki"
/>
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32"> Name="Release|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../include/loki"/> AdditionalIncludeDirectories="../../include/loki"
/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File <File
RelativePath=".\SmallSingleton.cpp"> RelativePath=".\SmallSingleton.cpp"
>
<FileConfiguration <FileConfiguration
Name="Debug|Win32"> Name="Debug|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../include/loki"/> AdditionalIncludeDirectories="../../include/loki"
/>
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32"> Name="Release|Win32"
>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../include/loki"/> AdditionalIncludeDirectories="../../include/loki"
/>
</FileConfiguration> </FileConfiguration>
</File> </File>
</Filter> </Filter>
<Filter <Filter
Name="Header Files" Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd" Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{1EC2C51F-E58B-4aca-BA46-1652627A1C16}"> UniqueIdentifier="{1EC2C51F-E58B-4aca-BA46-1652627A1C16}"
>
<File <File
RelativePath="..\..\include\loki\Singleton.h"> RelativePath="..\..\include\loki\Singleton.h"
>
</File> </File>
<File <File
RelativePath="..\..\include\loki\SmallObj.h"> RelativePath="..\..\include\loki\SmallObj.h"
>
</File> </File>
<File <File
RelativePath="..\..\include\loki\Threads.h"> RelativePath="..\..\include\loki\Threads.h"
>
</File> </File>
</Filter> </Filter>
<Filter <Filter
Name="Resource Files" Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{7382056C-47B1-45eb-85F8-CB0489ED355F}"> UniqueIdentifier="{7382056C-47B1-45eb-85F8-CB0489ED355F}"
>
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>

View file

@ -76,4 +76,9 @@ int main()
CType1 ctype1; CType1 ctype1;
CBase* cdyn = &ctype1; CBase* cdyn = &ctype1;
cdyn->Accept(cvisitor); cdyn->Accept(cvisitor);
#if defined(__BORLANDC__) || defined(_MSC_VER)
system("PAUSE");
#endif
} }