diff --git a/ApacheConnector/ApacheConnector.progen b/ApacheConnector/ApacheConnector.progen
new file mode 100644
index 000000000..2105ee912
--- /dev/null
+++ b/ApacheConnector/ApacheConnector.progen
@@ -0,0 +1,17 @@
+vc.project.guid = 9866EE28-0612-4746-BD35-3B15B0AF7267
+vc.project.name = ApacheConnector
+vc.project.target = mod_poco
+vc.project.type = library
+vc.project.pocobase = ..
+vc.project.outdir = ${vc.project.pocobase}
+vc.project.platforms = Win32, x64
+vc.project.configurations = debug_shared, release_shared
+vc.project.prototype = ApacheConnector_vs90.vcproj
+vc.project.compiler.include = ..\\Foundation\\include;..\\Net\\include;..\\Util\\include
+vc.project.compiler.defines =
+vc.project.compiler.defines.shared = ApacheHandlers_EXPORTS
+vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
+vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
+vc.project.linker.dependencies.Win32 = libapr-1.lib libaprutil-1.lib libhttpd.lib
+vc.project.linker.dependencies.x64 = libapr-1.lib libaprutil-1.lib libhttpd.lib
+vc.solution.create = true
diff --git a/ApacheConnector/ApacheConnector_VS71.sln b/ApacheConnector/ApacheConnector_VS71.sln
new file mode 100644
index 000000000..37d88f2ad
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_VS71.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ApacheConnector", "ApacheConnector_vs71.vcproj", "{9866EE28-0612-4746-BD35-3B15B0AF7267}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ debug_shared = debug_shared
+ release_shared = release_shared
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared.ActiveCfg = debug_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared.Build.0 = debug_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared.ActiveCfg = release_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared.Build.0 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/ApacheConnector/ApacheConnector_VS71.vcproj b/ApacheConnector/ApacheConnector_VS71.vcproj
new file mode 100644
index 000000000..9ea2b9085
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_VS71.vcproj
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/ApacheConnector_VS80.sln b/ApacheConnector/ApacheConnector_VS80.sln
new file mode 100644
index 000000000..2113a4f7b
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_VS80.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ApacheConnector", "ApacheConnector_vs80.vcproj", "{9866EE28-0612-4746-BD35-3B15B0AF7267}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Win32 = debug_shared|Win32
+ release_shared|Win32 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|Win32.Build.0 = release_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ApacheConnector/ApacheConnector_VS80.vcproj b/ApacheConnector/ApacheConnector_VS80.vcproj
new file mode 100644
index 000000000..0462480f5
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_VS80.vcproj
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/ApacheConnector_vs100.sln b/ApacheConnector/ApacheConnector_vs100.sln
new file mode 100644
index 000000000..c34927b6b
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_vs100.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ApacheConnector", "ApacheConnector_vs100.vcxproj", "{9866EE28-0612-4746-BD35-3B15B0AF7267}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Win32 = debug_shared|Win32
+ release_shared|Win32 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|Win32.Build.0 = release_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ApacheConnector/ApacheConnector_vs100.vcxproj b/ApacheConnector/ApacheConnector_vs100.vcxproj
new file mode 100644
index 000000000..2900de385
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_vs100.vcxproj
@@ -0,0 +1,133 @@
+
+
+
+
+ debug_shared
+ Win32
+
+
+ release_shared
+ Win32
+
+
+
+ ApacheConnector
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}
+ ApacheConnector
+ Win32Proj
+
+
+
+ DynamicLibrary
+ MultiByte
+
+
+ DynamicLibrary
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.40219.1
+ ..\bin\
+ obj\$(Configuration)\
+ true
+ ..\bin\
+ obj\$(Configuration)\
+ false
+ mod_pocod
+ mod_poco
+
+
+
+ Disabled
+ .\include;..\Foundation\include;..\Net\include;..\Util\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;ApacheHandlers_EXPORTS;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ Level3
+ EditAndContinue
+ Default
+ %(DisableSpecificWarnings)
+
+
+ libapr-1.lib;libaprutil-1.lib;libhttpd.lib;%(AdditionalDependencies)
+ ..\bin\mod_pocod.dll
+ true
+ true
+ ..\bin\mod_pocod.pdb
+ ..\lib;%(AdditionalLibraryDirectories)
+ Console
+ ..\lib\mod_pocod.lib
+ MachineX86
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\Foundation\include;..\Net\include;..\Util\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;ApacheHandlers_EXPORTS;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ libapr-1.lib;libaprutil-1.lib;libhttpd.lib;%(AdditionalDependencies)
+ ..\bin\mod_poco.dll
+ true
+ false
+ ..\lib;%(AdditionalLibraryDirectories)
+ Console
+ true
+ true
+ ..\lib\mod_poco.lib
+ MachineX86
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/ApacheConnector_vs100.vcxproj.filters b/ApacheConnector/ApacheConnector_vs100.vcxproj.filters
new file mode 100644
index 000000000..0301c105e
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_vs100.vcxproj.filters
@@ -0,0 +1,57 @@
+
+
+
+
+ {1b41dc76-2d5c-4abc-9fcf-40bf92616da2}
+
+
+ {f4221366-b450-4113-b43d-1303b840e629}
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/ApacheConnector/ApacheConnector_vs90.sln b/ApacheConnector/ApacheConnector_vs90.sln
new file mode 100644
index 000000000..10d8df6a0
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_vs90.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ApacheConnector", "ApacheConnector_vs90.vcproj", "{9866EE28-0612-4746-BD35-3B15B0AF7267}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Win32 = debug_shared|Win32
+ release_shared|Win32 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|Win32.Build.0 = release_shared|Win32
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ApacheConnector/ApacheConnector_vs90.vcproj b/ApacheConnector/ApacheConnector_vs90.vcproj
new file mode 100644
index 000000000..034044736
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_vs90.vcproj
@@ -0,0 +1,193 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/ApacheConnector_x64_vs100.sln b/ApacheConnector/ApacheConnector_x64_vs100.sln
new file mode 100644
index 000000000..1c1949c34
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_x64_vs100.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ApacheConnector", "ApacheConnector_x64_vs100.vcxproj", "{9866EE28-0612-4746-BD35-3B15B0AF7267}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|x64 = debug_shared|x64
+ release_shared|x64 = release_shared|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|x64.Build.0 = debug_shared|x64
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|x64.Deploy.0 = debug_shared|x64
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|x64.ActiveCfg = release_shared|x64
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|x64.Build.0 = release_shared|x64
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|x64.Deploy.0 = release_shared|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ApacheConnector/ApacheConnector_x64_vs100.vcxproj b/ApacheConnector/ApacheConnector_x64_vs100.vcxproj
new file mode 100644
index 000000000..b6a277775
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_x64_vs100.vcxproj
@@ -0,0 +1,133 @@
+
+
+
+
+ debug_shared
+ x64
+
+
+ release_shared
+ x64
+
+
+
+ ApacheConnector
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}
+ ApacheConnector
+ Win32Proj
+
+
+
+ DynamicLibrary
+ MultiByte
+
+
+ DynamicLibrary
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.40219.1
+ ..\bin64\
+ obj64\$(Configuration)\
+ true
+ ..\bin64\
+ obj64\$(Configuration)\
+ false
+ mod_poco64d
+ mod_poco64
+
+
+
+ Disabled
+ .\include;..\Foundation\include;..\Net\include;..\Util\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;ApacheHandlers_EXPORTS;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ Level3
+ ProgramDatabase
+ Default
+ %(DisableSpecificWarnings)
+
+
+ libapr-1.lib;libaprutil-1.lib;libhttpd.lib;%(AdditionalDependencies)
+ ..\bin64\mod_poco64d.dll
+ true
+ true
+ ..\bin64\mod_poco64d.pdb
+ ..\lib64;%(AdditionalLibraryDirectories)
+ Console
+ ..\lib64\mod_pocod.lib
+ MachineX64
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\Foundation\include;..\Net\include;..\Util\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;ApacheHandlers_EXPORTS;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ libapr-1.lib;libaprutil-1.lib;libhttpd.lib;%(AdditionalDependencies)
+ ..\bin64\mod_poco64.dll
+ true
+ false
+ ..\lib64;%(AdditionalLibraryDirectories)
+ Console
+ true
+ true
+ ..\lib64\mod_poco.lib
+ MachineX64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/ApacheConnector_x64_vs100.vcxproj.filters b/ApacheConnector/ApacheConnector_x64_vs100.vcxproj.filters
new file mode 100644
index 000000000..be7507947
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_x64_vs100.vcxproj.filters
@@ -0,0 +1,57 @@
+
+
+
+
+ {8ea424b5-ec7e-439b-a7be-1597c51e51ed}
+
+
+ {bcfc1d48-58d4-4a01-9e80-15f35f162748}
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/ApacheConnector/ApacheConnector_x64_vs90.sln b/ApacheConnector/ApacheConnector_x64_vs90.sln
new file mode 100644
index 000000000..57e107e02
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_x64_vs90.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ApacheConnector", "ApacheConnector_x64_vs90.vcproj", "{9866EE28-0612-4746-BD35-3B15B0AF7267}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|x64 = debug_shared|x64
+ release_shared|x64 = release_shared|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|x64.Build.0 = debug_shared|x64
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.debug_shared|x64.Deploy.0 = debug_shared|x64
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|x64.ActiveCfg = release_shared|x64
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|x64.Build.0 = release_shared|x64
+ {9866EE28-0612-4746-BD35-3B15B0AF7267}.release_shared|x64.Deploy.0 = release_shared|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ApacheConnector/ApacheConnector_x64_vs90.vcproj b/ApacheConnector/ApacheConnector_x64_vs90.vcproj
new file mode 100644
index 000000000..f0f9ebc54
--- /dev/null
+++ b/ApacheConnector/ApacheConnector_x64_vs90.vcproj
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/Makefile b/ApacheConnector/Makefile
new file mode 100644
index 000000000..eefcce048
--- /dev/null
+++ b/ApacheConnector/Makefile
@@ -0,0 +1,28 @@
+#
+# Makefile
+#
+# $Id: //poco/1.4/ApacheConnector/Makefile#2 $
+#
+# Makefile for ApacheConnector
+#
+
+include $(POCO_BASE)/build/rules/global
+
+SYSFLAGS += -I/usr/include/apache2 \
+ -I/usr/include/apr-1.0 -I/usr/include/apr-1 -I/usr/include/apr-0
+
+ifeq ($(OSNAME),Darwin)
+SHAREDLIBLINKEXT = .so
+DYLIB += -flat_namespace -undefined suppress
+endif
+
+objects = ApacheRequestHandlerFactory \
+ ApacheServerRequest ApacheServerResponse \
+ ApacheStream ApacheConnector ApacheChannel \
+ ApacheApplication ApacheChannel
+
+target = mod_poco
+target_version = 1
+target_libs = PocoUtil PocoNet PocoXML PocoFoundation
+
+include $(POCO_BASE)/build/rules/dylib
diff --git a/ApacheConnector/dependencies b/ApacheConnector/dependencies
new file mode 100644
index 000000000..afd736493
--- /dev/null
+++ b/ApacheConnector/dependencies
@@ -0,0 +1,4 @@
+Net
+Util
+XML
+Foundation
diff --git a/ApacheConnector/doc/ApacheConnectorUserGuide.page b/ApacheConnector/doc/ApacheConnectorUserGuide.page
new file mode 100644
index 000000000..b045dc54e
--- /dev/null
+++ b/ApacheConnector/doc/ApacheConnectorUserGuide.page
@@ -0,0 +1,148 @@
+POCO ApacheConnector User Guide
+POCO ApacheConnector
+
+!!!Introduction
+ApacheConnector (<[mod_poco]>) is an Apache module that allows one to write Apache server extensions using
+the POCO Net HTTPServer framework. Almost any subclass of Poco::Net::HTTPRequestHandler written
+for Poco::Net::HTTPServer can be used with ApacheConnector. For this to work, the request handler
+subclass, together with its factory (Poco::Net::HTTPRequestHandlerFactory) must be contained
+in a shared library. The ApacheConnector uses the Poco::ClassLoader to load request handler
+factories from shared libraries.
+
+!!!Adding ApacheConnector to Apache
+ApacheConnector is implemented as an ordinary Apache 2 module, named <[mod_poco]>.
+To add <[mod_poco]> to Apache, add the following entry to the Apache configuration
+file (usually <[httpd.conf]>):
+
+ LoadModule poco_module modules/mod_pocod.so
+----
+
+!!!Configuring ApacheConnector
+ApacheConnector must be able to find shared libraries containing request handler, as well
+as optional configuration files. ApacheConnector provides an Poco::Util::Application class
+to request handlers that can be used to access configuration data, loaded from configuration
+files.
+
+!!Request Handler Configuration
+
+To have the ApacheConnector load a request handler class, the <[AddPocoRequestHandler]> directive
+is used in the Apache configuration file:
+
+ AddPocoRequestHandler ...
+----
+
+The first argument specifies the name of the request handler factory class. The second argument
+contains the path of the shared library containing the request handler.
+The third (and optionally following) argument(s) specify the URI paths handled by the
+request handler. For example:
+
+ AddPocoRequestHandler TimeRequestHandlerFactory p:/Poco/ApacheConnector/samples/TimeServer/bin/TimeServerd.dll /time
+----
+
+loads the TimeRequestHandlerFactory from TimeServerd.dll. Whenever a request for a URI starting with "/time"
+is sent by a client, this request will be handled by the TimeRequestHandler.
+
+!!Configuration Files
+ApacheConnector can also load POCO configuration files (.ini, .properties or .xml) for later use by
+request handlers. This is done using the <[AddPocoConfig]> directive:
+
+ AddPocoConfig
+----
+
+where specifies the full path to the configuration file.
+
+In a request handler, the configuration properties loaded this way can be accessed using:
+
+ Poco::Util::Application& app = Poco::Util::Application::instance();
+ std::string myProp = app.config().getString("MyProperty");
+----
+
+!!!Logging in Request Handlers
+ApacheConnector provides a special logging channel that logs to Apache's error log file.
+This channel is set as the root channel when the ApacheConnector is loaded, so every
+logger will automatically inherit this channel.
+
+
+!!!A Sample Request Handler
+Following is a sample for a request handler implementation. The complete sample project can be found in the
+<[samples]> subdirectory of the ApacheConnector directory.
+
+ #include "Poco/Net/HTTPServer.h"
+ #include "Poco/Net/HTTPRequestHandler.h"
+ #include "Poco/Net/HTTPRequestHandlerFactory.h"
+ #include "Poco/Net/HTTPServerRequest.h"
+ #include "Poco/Net/HTTPServerResponse.h"
+ #include "Poco/Timestamp.h"
+ #include "Poco/DateTimeFormatter.h"
+ #include "Poco/DateTimeFormat.h"
+ #include "Poco/ClassLibrary.h"
+
+
+ using Poco::Net::HTTPRequestHandler;
+ using Poco::Net::HTTPRequestHandlerFactory;
+ using Poco::Net::HTTPServerRequest;
+ using Poco::Net::HTTPServerResponse;
+ using Poco::Timestamp;
+ using Poco::DateTimeFormatter;
+ using Poco::DateTimeFormat;
+
+
+ class TimeRequestHandler: public HTTPRequestHandler
+ /// Return a HTML document with the current date and time.
+ {
+ public:
+ TimeRequestHandler()
+ {
+ }
+
+ void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response)
+ {
+ Timestamp now;
+ std::string dt(DateTimeFormatter::format(now, DateTimeFormat::SORTABLE_FORMAT));
+
+ response.setChunkedTransferEncoding(true);
+ response.setContentType("text/html");
+
+ std::ostream& ostr = response.send();
+ ostr << "TimeServer powered by POCO ApacheConnector ";
+ ostr << " ";
+ ostr << "";
+ ostr << dt;
+ ostr << "
";
+ }
+ };
+
+
+ class TimeRequestHandlerFactory: public HTTPRequestHandlerFactory
+ {
+ public:
+ TimeRequestHandlerFactory()
+ {
+ }
+
+ HTTPRequestHandler* createRequestHandler(const HTTPServerRequest& request)
+ {
+ return new TimeRequestHandler;
+ }
+ };
+
+
+ POCO_BEGIN_MANIFEST(HTTPRequestHandlerFactory)
+ POCO_EXPORT_CLASS(TimeRequestHandlerFactory)
+ POCO_END_MANIFEST
+----
+
+Both the TimeRequestHandler class and the TimeRequestHandlerFactory class are the same as for
+an ordinary Poco::Net::HTTPServer. The only addition in this sample is the definition
+of the class loader manifest, which allows the ApacheConnector to load the TimeRequestHandlerFactory
+class from the shared library.
+
+To run this sample, the following directives must be added to the Apache configuration files:
+
+ LoadModule poco_module p:/Poco/ApacheConnector/bin/mod_poco.so
+ AddPocoRequestHandler TimeRequestHandlerFactory p:/Poco/ApacheConnector/samples/TimeServer/bin/TimeServer.dll /time
+----
+
+You'll have to change the paths to <[mod_poco.so]> and <[TimeServer.dll]> to match your
+own environment.
+To test the sample, simply direct your favorite web browser to .
diff --git a/ApacheConnector/include/ApacheApplication.h b/ApacheConnector/include/ApacheApplication.h
new file mode 100644
index 000000000..0aabd1eae
--- /dev/null
+++ b/ApacheConnector/include/ApacheApplication.h
@@ -0,0 +1,78 @@
+//
+// ApacheApplication.h
+//
+// $Id: //poco/1.4/ApacheConnector/include/ApacheApplication.h#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef ApacheConnector_ApacheApplication_INCLUDED
+#define ApacheConnector_ApacheApplication_INCLUDED
+
+
+#include "ApacheRequestHandlerFactory.h"
+#include "Poco/Util/Application.h"
+#include "Poco/Mutex.h"
+
+
+class ApacheApplication: public Poco::Util::Application
+{
+public:
+ ApacheApplication();
+ /// Creates the ApacheApplication and sets the
+ /// ApacheChannel as the root logger channel.
+
+ ~ApacheApplication();
+ /// Destroys the ApacheApplication.
+
+ void setup();
+ /// Initializes the application if called for the first
+ /// time; does nothing in later calls.
+
+ ApacheRequestHandlerFactory& factory();
+ /// Returns the ApacheRequestHandlerFactory.
+
+ static ApacheApplication& instance();
+ /// Returns the application instance.
+
+private:
+ bool _ready;
+ ApacheRequestHandlerFactory _factory;
+ Poco::FastMutex _mutex;
+};
+
+
+//
+// inlines
+//
+inline ApacheRequestHandlerFactory& ApacheApplication::factory()
+{
+ return _factory;
+}
+
+
+#endif // ApacheConnector_ApacheApplication_INCLUDED
diff --git a/ApacheConnector/include/ApacheChannel.h b/ApacheConnector/include/ApacheChannel.h
new file mode 100644
index 000000000..8cf3f266a
--- /dev/null
+++ b/ApacheConnector/include/ApacheChannel.h
@@ -0,0 +1,52 @@
+//
+// ApacheChannel.h
+//
+// $Id: //poco/1.4/ApacheConnector/include/ApacheChannel.h#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef ApacheConnector_ApacheChannel_INCLUDED
+#define ApacheConnector_ApacheChannel_INCLUDED
+
+
+#include "Poco/Channel.h"
+
+
+class ApacheChannel: public Poco::Channel
+ /// This class implements a logging channel
+ /// that uses the Apache logging facilities.
+{
+public:
+ ApacheChannel();
+ ~ApacheChannel();
+
+ void log(const Poco::Message& msg);
+};
+
+
+#endif // ApacheConnector_ApacheChannel_INCLUDED
diff --git a/ApacheConnector/include/ApacheConnector.h b/ApacheConnector/include/ApacheConnector.h
new file mode 100644
index 000000000..4fa9d5f03
--- /dev/null
+++ b/ApacheConnector/include/ApacheConnector.h
@@ -0,0 +1,108 @@
+//
+// ApacheConnector.h
+//
+// $Id: //poco/1.4/ApacheConnector/include/ApacheConnector.h#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef ApacheConnector_ApacheConnector_INCLUDED
+#define ApacheConnector_ApacheConnector_INCLUDED
+
+
+#include
+
+
+struct request_rec;
+class ApacheServerRequest;
+
+
+class ApacheRequestRec
+ /// This class wraps an Apache request_rec.
+{
+public:
+ ApacheRequestRec(request_rec* _pRec);
+ /// Creates the ApacheRequestRec;
+
+ bool haveRequestBody();
+ /// Returns true if the request contains a body.
+
+ int readRequest(char* buffer, int length);
+ /// Read up to length bytes from request body into buffer.
+ /// Returns the number of bytes read, 0 if eof or -1 if an error occured.
+
+ void writeResponse(const char* buffer, int length);
+ /// Writes the given characters as response to the given request_rec.
+
+ void addHeader(const std::string& key, const std::string& value);
+ /// Adds the given key / value pair to the outgoing headers of the
+ /// http response.
+
+ void setContentType(const std::string& mediaType);
+ /// Sets the response content type.
+
+ void redirect(const std::string& uri, int status);
+ /// Redirects the response to the given uri.
+
+ void sendErrorResponse(int status);
+ /// Sends an error response with the given HTTP status code.
+
+ int sendFile(const std::string& path, unsigned int fileSize, const std::string& mediaType);
+ /// Sends the file given by fileName as response.
+
+ void copyHeaders(ApacheServerRequest& request);
+ /// Copies the request uri and header fields from the Apache request
+ /// to the ApacheServerRequest.
+
+private:
+ request_rec* _pRec;
+};
+
+
+class ApacheConnector
+ /// This class provides static methods wrapping the
+ /// Apache API.
+{
+public:
+ enum LogLevel
+ {
+ PRIO_FATAL = 1, /// A fatal error. The application will most likely terminate. This is the highest priority.
+ PRIO_CRITICAL, /// A critical error. The application might not be able to continue running successfully.
+ PRIO_ERROR, /// An error. An operation did not complete successfully, but the application as a whole is not affected.
+ PRIO_WARNING, /// A warning. An operation completed with an unexpected result.
+ PRIO_NOTICE, /// A notice, which is an information with just a higher priority.
+ PRIO_INFORMATION, /// An informational message, usually denoting the successful completion of an operation.
+ PRIO_DEBUG, /// A debugging message.
+ PRIO_TRACE /// A tracing message. This is the lowest priority.
+ };
+
+ static void log(const char* file, int line, int level, int status, const char* text);
+ /// Log the given message.
+};
+
+
+#endif // ApacheConnector_ApacheConnector_INCLUDED
diff --git a/ApacheConnector/include/ApacheRequestHandlerFactory.h b/ApacheConnector/include/ApacheRequestHandlerFactory.h
new file mode 100644
index 000000000..d746c0e22
--- /dev/null
+++ b/ApacheConnector/include/ApacheRequestHandlerFactory.h
@@ -0,0 +1,77 @@
+//
+// ApacheRequestHandlerFactory.h
+//
+// $Id: //poco/1.4/ApacheConnector/include/ApacheRequestHandlerFactory.h#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef ApacheConnector_ApacheRequestHandlerFactory_INCLUDED
+#define ApacheConnector_ApacheRequestHandlerFactory_INCLUDED
+
+
+#include "ApacheServerRequest.h"
+#include "Poco/Net/HTTPRequestHandlerFactory.h"
+#include "Poco/ClassLoader.h"
+#include "Poco/Mutex.h"
+#include
+
+
+class ApacheRequestHandlerFactory: public Poco::Net::HTTPRequestHandlerFactory
+{
+public:
+ ApacheRequestHandlerFactory();
+ /// Constructs the ApacheRequestHandlerFactory
+
+ ~ApacheRequestHandlerFactory();
+ /// Destructor of the ApacheRequestHandlerFactory
+
+ Poco::Net::HTTPRequestHandler* createRequestHandler(const Poco::Net::HTTPServerRequest& request);
+ /// Creates a new request handler for the given HTTP request.
+
+ bool mustHandle(const std::string& uri);
+ /// Returns 1 if the given uri must be handled by the
+ /// poco_mapper module, 0 otherwise.
+
+ void handleURIs(const std::string& uris);
+ /// Parses the given string for dllName, factoryName and the URIs to handle
+ /// by the request-handler
+
+ void addRequestHandlerFactory(const std::string& dllPath, const std::string& factoryName, const std::string& uri);
+ /// Adds the request handler from the given dll with the given name and
+ /// registers that handler with the given uri
+
+private:
+ typedef std::map RequestHandlerFactories;
+
+ RequestHandlerFactories _requestHandlers;
+ Poco::ClassLoader _loader;
+ Poco::FastMutex _mutex;
+};
+
+
+#endif // ApacheConnector_ApacheRequestHandlerFactory_INCLUDED
diff --git a/ApacheConnector/include/ApacheServerRequest.h b/ApacheConnector/include/ApacheServerRequest.h
new file mode 100644
index 000000000..ef05f6dd7
--- /dev/null
+++ b/ApacheConnector/include/ApacheServerRequest.h
@@ -0,0 +1,120 @@
+//
+// ApacheServerRequest.h
+//
+// $Id: //poco/1.4/ApacheConnector/include/ApacheServerRequest.h#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef ApacheConnector_ApacheServerRequest_INCLUDED
+#define ApacheConnector_ApacheServerRequest_INCLUDED
+
+
+#include "ApacheConnector.h"
+#include "ApacheStream.h"
+#include "Poco/Net/HTTPServerRequest.h"
+#include
+
+
+class ApacheServerResponse;
+
+
+class ApacheServerRequest: public Poco::Net::HTTPServerRequest
+{
+public:
+ ApacheServerRequest(
+ ApacheRequestRec* pApacheRequest,
+ const char* serverName,
+ int serverPort,
+ const char* clientName,
+ int clientPort);
+ /// Creates a new ApacheServerRequest.
+
+ ~ApacheServerRequest();
+ /// Destroys the ApacheServerRequest.
+
+ std::istream& stream();
+ /// Returns the input stream for reading
+ /// the request body.
+ ///
+ /// The stream is valid until the HTTPServerRequest
+ /// object is destroyed.
+
+ bool expectContinue() const;
+ /// Returns true if the client expects a
+ /// 100 Continue response.
+
+ const Poco::Net::SocketAddress& clientAddress() const;
+ /// Returns the client's address.
+
+ const Poco::Net::SocketAddress& serverAddress() const;
+ /// Returns the server's address.
+
+ const Poco::Net::HTTPServerParams& serverParams() const;
+ /// Returns a reference to the server parameters.
+
+ Poco::Net::HTTPServerResponse& response() const;
+ /// Returns a reference to the associated response
+
+protected:
+ void setResponse(ApacheServerResponse* pResponse);
+
+private:
+ ApacheRequestRec* _pApacheRequest;
+ ApacheServerResponse* _pResponse;
+ ApacheInputStream* _pStream;
+ Poco::Net::SocketAddress _serverAddress;
+ Poco::Net::SocketAddress _clientAddress;
+
+ friend class ApacheServerResponse;
+};
+
+
+//
+// inlines
+//
+inline std::istream& ApacheServerRequest::stream()
+{
+ poco_check_ptr (_pStream);
+
+ return *_pStream;
+}
+
+
+inline const Poco::Net::SocketAddress& ApacheServerRequest::clientAddress() const
+{
+ return _clientAddress;
+}
+
+
+inline const Poco::Net::SocketAddress& ApacheServerRequest::serverAddress() const
+{
+ return _serverAddress;
+}
+
+
+#endif // ApacheConnector_ApacheServerRequest_INCLUDED
diff --git a/ApacheConnector/include/ApacheServerResponse.h b/ApacheConnector/include/ApacheServerResponse.h
new file mode 100644
index 000000000..c24bab31a
--- /dev/null
+++ b/ApacheConnector/include/ApacheServerResponse.h
@@ -0,0 +1,144 @@
+//
+// ApacheServerResponse.h
+//
+// $Id: //poco/1.4/ApacheConnector/include/ApacheServerResponse.h#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef ApacheConnector_ApacheServerResponse_INCLUDED
+#define ApacheConnector_ApacheServerResponse_INCLUDED
+
+
+#include "ApacheConnector.h"
+#include "ApacheStream.h"
+#include "Poco/Net/Net.h"
+#include "Poco/Net/HTTPServerResponse.h"
+
+
+class ApacheServerRequest;
+
+
+class ApacheServerResponse: public Poco::Net::HTTPServerResponse
+ /// This subclass of HTTPResponse is used for
+ /// representing server-side HTTP responses for apache.
+ ///
+ /// A ApacheServerResponse is passed to the
+ /// handleRequest() method of HTTPRequestHandler.
+ ///
+ /// handleRequest() must set a status code
+ /// and optional reason phrase, set headers
+ /// as necessary, and provide a message body.
+{
+public:
+ ApacheServerResponse(ApacheServerRequest* pRequest);
+ /// Creates the ApacheServerResponse.
+
+ ~ApacheServerResponse();
+ /// Destroys the ApacheServerResponse.
+
+ void sendContinue();
+ /// Sends a 100 Continue response to the
+ /// client.
+
+ void sendErrorResponse(int status);
+ /// Sends an error response with the given
+ /// status back to the client.
+
+ std::ostream& send();
+ /// Sends the response header to the client and
+ /// returns an output stream for sending the
+ /// response body.
+ ///
+ /// The returned stream is valid until the response
+ /// object is destroyed.
+ ///
+ /// Must not be called after sendFile(), sendBuffer()
+ /// or redirect() has been called.
+
+ void sendFile(const std::string& path, const std::string& mediaType);
+ /// Sends the response header to the client, followed
+ /// by the content of the given file.
+ ///
+ /// Must not be called after send(), sendBuffer()
+ /// or redirect() has been called.
+ ///
+ /// Throws a FileNotFoundException if the file
+ /// cannot be found, or an OpenFileException if
+ /// the file cannot be opened.
+
+ void sendBuffer(const void* pBuffer, std::size_t length);
+ /// Sends the response header to the client, followed
+ /// by the contents of the given buffer.
+ ///
+ /// The Content-Length header of the response is set
+ /// to length and chunked transfer encoding is disabled.
+ ///
+ /// If both the HTTP message header and body (from the
+ /// given buffer) fit into one single network packet, the
+ /// complete response can be sent in one network packet.
+ ///
+ /// Must not be called after send(), sendFile()
+ /// or redirect() has been called.
+
+ void redirect(const std::string& uri, Poco::Net::HTTPResponse::HTTPStatus status);
+ /// Sets the status code, which must be one of
+ /// HTTP_MOVED_PERMANENTLY (301), HTTP_FOUND (302),
+ /// or HTTP_SEE_OTHER (303),
+ /// and sets the "Location" header field
+ /// to the given URI, which according to
+ /// the HTTP specification, must be absolute.
+ ///
+ /// Must not be called after send() has been called.
+
+ void requireAuthentication(const std::string& realm);
+ /// Sets the status code to 401 (Unauthorized)
+ /// and sets the "WWW-Authenticate" header field
+ /// according to the given realm.
+
+ bool sent() const;
+ /// Returns true if the response (header) has been sent.
+
+private:
+ void initApacheOutputStream();
+ /// Initializes the ApacheOutputStram
+
+ ApacheOutputStream* _pStream;
+ ApacheRequestRec* _pApacheRequest;
+};
+
+
+//
+// inlines
+//
+inline bool ApacheServerResponse::sent() const
+{
+ return _pStream != 0;
+}
+
+
+#endif // ApacheConnector_ApacheServerResponse_INCLUDED
diff --git a/ApacheConnector/include/ApacheStream.h b/ApacheConnector/include/ApacheStream.h
new file mode 100644
index 000000000..8b26c9c8b
--- /dev/null
+++ b/ApacheConnector/include/ApacheStream.h
@@ -0,0 +1,125 @@
+//
+// ApacheStream.h
+//
+// $Id: //poco/1.4/ApacheConnector/include/ApacheStream.h#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef ApacheConnector_ApacheStream_INCLUDED
+#define ApacheConnector_ApacheStream_INCLUDED
+
+
+#include "ApacheConnector.h"
+#include "Poco/BufferedStreamBuf.h"
+#include
+#include
+
+
+class ApacheStreamBuf: public Poco::BufferedStreamBuf
+ /// This is the streambuf class used for reading from and writing to a socket.
+{
+public:
+ ApacheStreamBuf(ApacheRequestRec* pApacheRequest, bool haveData = false);
+ /// Creates a ApacheStreamBuf with the given socket.
+
+ ~ApacheStreamBuf();
+ /// Destroys the SocketStreamBuf.
+
+protected:
+ int readFromDevice(char* buffer, std::streamsize length);
+ int writeToDevice(const char* buffer, std::streamsize length);
+
+private:
+ enum
+ {
+ STREAM_BUFFER_SIZE = 1024
+ };
+
+ ApacheRequestRec* _pApacheRequest;
+ bool _haveData;
+};
+
+
+class ApacheIOS: public virtual std::ios
+ /// The base class for ApacheStream, ApacheInputStream and
+ /// ApacheOutputStream.
+ ///
+ /// This class is needed to ensure the correct initialization
+ /// order of the stream buffer and base classes.
+{
+public:
+ ApacheIOS(ApacheRequestRec* pApacheRequest, bool haveData = false);
+ /// Creates the ApacheIOS with the given socket.
+
+ ~ApacheIOS();
+ /// Destroys the ApacheIOS.
+ ///
+ /// Flushes the buffer, but does not close the socket.
+
+ ApacheStreamBuf* rdbuf();
+ /// Returns a pointer to the internal ApacheStreamBuf.
+
+ void close();
+ /// Flushes the stream.
+
+protected:
+ ApacheStreamBuf _buf;
+};
+
+
+class ApacheOutputStream: public ApacheIOS, public std::ostream
+ /// An output stream for writing to an Apache response.
+{
+public:
+ ApacheOutputStream(ApacheRequestRec* pApacheRequest);
+ /// Creates the ApacheOutputStream with the given socket.
+
+ ~ApacheOutputStream();
+ /// Destroys the ApacheOutputStream.
+ ///
+ /// Flushes the buffer.
+};
+
+
+class ApacheInputStream: public ApacheIOS, public std::istream
+ /// An input stream for reading from an Apache request.
+ ///
+ /// Using formatted input from a ApacheInputStream
+ /// is not recommended, due to the read-ahead behavior of
+ /// istream with formatted reads.
+{
+public:
+ ApacheInputStream(ApacheRequestRec* pApacheRequest);
+ /// Creates the ApacheInputStream with the given socket.
+
+ ~ApacheInputStream();
+ /// Destroys the ApacheInputStream.
+};
+
+
+#endif // ApacheConnector_ApacheStream_INCLUDED
diff --git a/ApacheConnector/samples/FormServer/FormServer.progen b/ApacheConnector/samples/FormServer/FormServer.progen
new file mode 100644
index 000000000..649dcc751
--- /dev/null
+++ b/ApacheConnector/samples/FormServer/FormServer.progen
@@ -0,0 +1,11 @@
+vc.project.guid = ${vc.project.guidFromName}
+vc.project.name = ${vc.project.baseName}
+vc.project.target = ${vc.project.name}
+vc.project.type = executable
+vc.project.pocobase = ..\\..\\..
+vc.project.platforms = Win32, x64
+vc.project.configurations = debug_shared, release_shared
+vc.project.prototype = ${vc.project.name}_vs90.vcproj
+vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
+vc.project.linker.dependencies.Win32 = libapr-1.lib libaprutil-1.lib libhttpd.lib
+vc.project.linker.dependencies.x64 = libapr-1.lib libaprutil-1.lib libhttpd.lib
diff --git a/ApacheConnector/samples/FormServer/FormServer_vs100.vcxproj b/ApacheConnector/samples/FormServer/FormServer_vs100.vcxproj
new file mode 100644
index 000000000..92327b2de
--- /dev/null
+++ b/ApacheConnector/samples/FormServer/FormServer_vs100.vcxproj
@@ -0,0 +1,115 @@
+
+
+
+
+ debug_shared
+ Win32
+
+
+ release_shared
+ Win32
+
+
+
+ FormServer
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}
+ FormServer
+ Win32Proj
+
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.40219.1
+ bin\
+ obj\$(Configuration)\
+ true
+ bin\
+ obj\$(Configuration)\
+ false
+ FormServerd
+ FormServer
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ Level3
+ EditAndContinue
+ Default
+ %(DisableSpecificWarnings)
+
+
+ libapr-1.lib;libaprutil-1.lib;libhttpd.lib;%(AdditionalDependencies)
+ bin\FormServerd.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin\FormServerd.pdb
+ Console
+ MachineX86
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ libapr-1.lib;libaprutil-1.lib;libhttpd.lib;%(AdditionalDependencies)
+ bin\FormServer.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX86
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/samples/FormServer/FormServer_vs100.vcxproj.filters b/ApacheConnector/samples/FormServer/FormServer_vs100.vcxproj.filters
new file mode 100644
index 000000000..4e8f111ab
--- /dev/null
+++ b/ApacheConnector/samples/FormServer/FormServer_vs100.vcxproj.filters
@@ -0,0 +1,17 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {f15b6455-ee37-47e9-adb8-a9f91180df9b}
+
+
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/ApacheConnector/samples/FormServer/FormServer_vs71.vcproj b/ApacheConnector/samples/FormServer/FormServer_vs71.vcproj
new file mode 100644
index 000000000..216483663
--- /dev/null
+++ b/ApacheConnector/samples/FormServer/FormServer_vs71.vcproj
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/samples/FormServer/FormServer_vs80.vcproj b/ApacheConnector/samples/FormServer/FormServer_vs80.vcproj
new file mode 100644
index 000000000..41b35fcfc
--- /dev/null
+++ b/ApacheConnector/samples/FormServer/FormServer_vs80.vcproj
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/samples/FormServer/FormServer_vs90.vcproj b/ApacheConnector/samples/FormServer/FormServer_vs90.vcproj
new file mode 100644
index 000000000..291895c16
--- /dev/null
+++ b/ApacheConnector/samples/FormServer/FormServer_vs90.vcproj
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/samples/FormServer/FormServer_x64_vs100.vcxproj b/ApacheConnector/samples/FormServer/FormServer_x64_vs100.vcxproj
new file mode 100644
index 000000000..9c81fb0f2
--- /dev/null
+++ b/ApacheConnector/samples/FormServer/FormServer_x64_vs100.vcxproj
@@ -0,0 +1,115 @@
+
+
+
+
+ debug_shared
+ x64
+
+
+ release_shared
+ x64
+
+
+
+ FormServer
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}
+ FormServer
+ Win32Proj
+
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.40219.1
+ bin64\
+ obj64\$(Configuration)\
+ true
+ bin64\
+ obj64\$(Configuration)\
+ false
+ FormServerd
+ FormServer
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ Level3
+ ProgramDatabase
+ Default
+ %(DisableSpecificWarnings)
+
+
+ libapr-1.lib;libaprutil-1.lib;libhttpd.lib;%(AdditionalDependencies)
+ bin64\FormServerd.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin64\FormServerd.pdb
+ Console
+ MachineX64
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ libapr-1.lib;libaprutil-1.lib;libhttpd.lib;%(AdditionalDependencies)
+ bin64\FormServer.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX64
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/samples/FormServer/FormServer_x64_vs100.vcxproj.filters b/ApacheConnector/samples/FormServer/FormServer_x64_vs100.vcxproj.filters
new file mode 100644
index 000000000..e7682b35c
--- /dev/null
+++ b/ApacheConnector/samples/FormServer/FormServer_x64_vs100.vcxproj.filters
@@ -0,0 +1,17 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {274d01a8-2c80-4883-9261-c41efe4e0328}
+
+
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/ApacheConnector/samples/FormServer/FormServer_x64_vs90.vcproj b/ApacheConnector/samples/FormServer/FormServer_x64_vs90.vcproj
new file mode 100644
index 000000000..9d5734caa
--- /dev/null
+++ b/ApacheConnector/samples/FormServer/FormServer_x64_vs90.vcproj
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/samples/FormServer/Makefile b/ApacheConnector/samples/FormServer/Makefile
new file mode 100644
index 000000000..3d7e50154
--- /dev/null
+++ b/ApacheConnector/samples/FormServer/Makefile
@@ -0,0 +1,17 @@
+#
+# Makefile
+#
+# $Id: //poco/1.4/ApacheConnector/samples/FormServer/Makefile#1 $
+#
+# Makefile for Poco ApacheConnector sample
+#
+
+include $(POCO_BASE)/build/rules/global
+
+objects = FormServer
+
+target = FormServer
+target_version = 1
+target_libs = PocoFoundation PocoNet
+
+include $(POCO_BASE)/build/rules/dylib
diff --git a/ApacheConnector/samples/FormServer/src/FormServer.cpp b/ApacheConnector/samples/FormServer/src/FormServer.cpp
new file mode 100644
index 000000000..04992d352
--- /dev/null
+++ b/ApacheConnector/samples/FormServer/src/FormServer.cpp
@@ -0,0 +1,206 @@
+//
+// FormServer.cpp
+//
+// $Id: //poco/1.4/ApacheConnector/samples/FormServer/src/FormServer.cpp#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/Net/HTTPServer.h"
+#include "Poco/Net/HTTPRequestHandler.h"
+#include "Poco/Net/HTTPRequestHandlerFactory.h"
+#include "Poco/Net/HTTPServerRequest.h"
+#include "Poco/Net/HTTPServerResponse.h"
+#include "Poco/Net/HTMLForm.h"
+#include "Poco/Net/PartHandler.h"
+#include "Poco/CountingStream.h"
+#include "Poco/NullStream.h"
+#include "Poco/StreamCopier.h"
+#include "Poco/ClassLibrary.h"
+
+
+using Poco::Net::HTTPRequestHandler;
+using Poco::Net::HTTPRequestHandlerFactory;
+using Poco::Net::HTTPServerRequest;
+using Poco::Net::HTTPServerResponse;
+using Poco::Net::MessageHeader;
+using Poco::Net::HTMLForm;
+using Poco::Net::NameValueCollection;
+using Poco::CountingInputStream;
+using Poco::NullOutputStream;
+using Poco::StreamCopier;
+
+
+class MyPartHandler: public Poco::Net::PartHandler
+{
+public:
+ MyPartHandler():
+ _length(0)
+ {
+ }
+
+ void handlePart(const MessageHeader& header, std::istream& stream)
+ {
+ _type = header.get("Content-Type", "(unspecified)");
+ if (header.has("Content-Disposition"))
+ {
+ std::string disp;
+ NameValueCollection params;
+ MessageHeader::splitParameters(header["Content-Disposition"], disp, params);
+ _name = params.get("name", "(unnamed)");
+ _fileName = params.get("filename", "(unnamed)");
+ }
+
+ CountingInputStream istr(stream);
+ NullOutputStream ostr;
+ StreamCopier::copyStream(istr, ostr);
+ _length = istr.chars();
+ }
+
+ int length() const
+ {
+ return _length;
+ }
+
+ const std::string& name() const
+ {
+ return _name;
+ }
+
+ const std::string& fileName() const
+ {
+ return _fileName;
+ }
+
+ const std::string& contentType() const
+ {
+ return _type;
+ }
+
+private:
+ int _length;
+ std::string _type;
+ std::string _name;
+ std::string _fileName;
+};
+
+
+class FormRequestHandler: public HTTPRequestHandler
+ /// Return a HTML document with the current date and time.
+{
+public:
+ FormRequestHandler()
+ {
+ }
+
+ void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response)
+ {
+ MyPartHandler partHandler;
+ HTMLForm form(request, request.stream(), partHandler);
+
+ response.setChunkedTransferEncoding(true);
+ response.setContentType("text/html");
+
+ std::ostream& ostr = response.send();
+
+ ostr <<
+ "\n"
+ "\n"
+ "POCO Form Server Sample \n"
+ "\n"
+ "\n"
+ "POCO Form Server Sample \n"
+ "GET Form \n"
+ "\n"
+ "POST Form \n"
+ "\n"
+ "File Upload \n"
+ "\n";
+
+ ostr << "Request \n";
+ ostr << "Method: " << request.getMethod() << " \n";
+ ostr << "URI: " << request.getURI() << " \n";
+ NameValueCollection::ConstIterator it = request.begin();
+ NameValueCollection::ConstIterator end = request.end();
+ for (; it != end; ++it)
+ {
+ ostr << it->first << ": " << it->second << " \n";
+ }
+ ostr << "
";
+
+ if (!form.empty())
+ {
+ ostr << "Form \n";
+ it = form.begin();
+ end = form.end();
+ for (; it != end; ++it)
+ {
+ ostr << it->first << ": " << it->second << " \n";
+ }
+ ostr << "
";
+ }
+
+ if (!partHandler.name().empty())
+ {
+ ostr << "Upload \n";
+ ostr << "Name: " << partHandler.name() << " \n";
+ ostr << "File Name: " << partHandler.fileName() << " \n";
+ ostr << "Type: " << partHandler.contentType() << " \n";
+ ostr << "Size: " << partHandler.length() << " \n";
+ ostr << "
";
+ }
+ ostr << "\n";
+ }
+};
+
+
+class FormRequestHandlerFactory: public HTTPRequestHandlerFactory
+{
+public:
+ FormRequestHandlerFactory()
+ {
+ }
+
+ HTTPRequestHandler* createRequestHandler(const HTTPServerRequest& request)
+ {
+ return new FormRequestHandler;
+ }
+};
+
+
+POCO_BEGIN_MANIFEST(HTTPRequestHandlerFactory)
+ POCO_EXPORT_CLASS(FormRequestHandlerFactory)
+POCO_END_MANIFEST
diff --git a/ApacheConnector/samples/Makefile b/ApacheConnector/samples/Makefile
new file mode 100644
index 000000000..c3fddce22
--- /dev/null
+++ b/ApacheConnector/samples/Makefile
@@ -0,0 +1,13 @@
+#
+# Makefile
+#
+# $Id: //poco/1.4/ApacheConnector/samples/Makefile#1 $
+#
+# Makefile for Poco ApacheConnector Samples
+#
+
+.PHONY: projects
+clean all: projects
+projects:
+ $(MAKE) -C TimeServer $(MAKECMDGOALS)
+ $(MAKE) -C FormServer $(MAKECMDGOALS)
diff --git a/ApacheConnector/samples/TimeServer/Makefile b/ApacheConnector/samples/TimeServer/Makefile
new file mode 100644
index 000000000..44f9da759
--- /dev/null
+++ b/ApacheConnector/samples/TimeServer/Makefile
@@ -0,0 +1,17 @@
+#
+# Makefile
+#
+# $Id: //poco/1.4/ApacheConnector/samples/TimeServer/Makefile#1 $
+#
+# Makefile for Poco ApacheConnector sample
+#
+
+include $(POCO_BASE)/build/rules/global
+
+objects = TimeServer
+
+target = TimeServer
+target_version = 1
+target_libs = PocoFoundation PocoNet
+
+include $(POCO_BASE)/build/rules/dylib
diff --git a/ApacheConnector/samples/TimeServer/TimeServer.progen b/ApacheConnector/samples/TimeServer/TimeServer.progen
new file mode 100644
index 000000000..649dcc751
--- /dev/null
+++ b/ApacheConnector/samples/TimeServer/TimeServer.progen
@@ -0,0 +1,11 @@
+vc.project.guid = ${vc.project.guidFromName}
+vc.project.name = ${vc.project.baseName}
+vc.project.target = ${vc.project.name}
+vc.project.type = executable
+vc.project.pocobase = ..\\..\\..
+vc.project.platforms = Win32, x64
+vc.project.configurations = debug_shared, release_shared
+vc.project.prototype = ${vc.project.name}_vs90.vcproj
+vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include
+vc.project.linker.dependencies.Win32 = libapr-1.lib libaprutil-1.lib libhttpd.lib
+vc.project.linker.dependencies.x64 = libapr-1.lib libaprutil-1.lib libhttpd.lib
diff --git a/ApacheConnector/samples/TimeServer/TimeServer_vs100.vcxproj b/ApacheConnector/samples/TimeServer/TimeServer_vs100.vcxproj
new file mode 100644
index 000000000..cc3272fb4
--- /dev/null
+++ b/ApacheConnector/samples/TimeServer/TimeServer_vs100.vcxproj
@@ -0,0 +1,115 @@
+
+
+
+
+ debug_shared
+ Win32
+
+
+ release_shared
+ Win32
+
+
+
+ TimeServer
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}
+ TimeServer
+ Win32Proj
+
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.40219.1
+ bin\
+ obj\$(Configuration)\
+ true
+ bin\
+ obj\$(Configuration)\
+ false
+ TimeServerd
+ TimeServer
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ Level3
+ EditAndContinue
+ Default
+ %(DisableSpecificWarnings)
+
+
+ libapr-1.lib;libaprutil-1.lib;libhttpd.lib;%(AdditionalDependencies)
+ bin\TimeServerd.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin\TimeServerd.pdb
+ Console
+ MachineX86
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ libapr-1.lib;libaprutil-1.lib;libhttpd.lib;%(AdditionalDependencies)
+ bin\TimeServer.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX86
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/samples/TimeServer/TimeServer_vs100.vcxproj.filters b/ApacheConnector/samples/TimeServer/TimeServer_vs100.vcxproj.filters
new file mode 100644
index 000000000..2cc56c090
--- /dev/null
+++ b/ApacheConnector/samples/TimeServer/TimeServer_vs100.vcxproj.filters
@@ -0,0 +1,17 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {29521eeb-44f6-411c-86be-29354be3718e}
+
+
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/ApacheConnector/samples/TimeServer/TimeServer_vs71.vcproj b/ApacheConnector/samples/TimeServer/TimeServer_vs71.vcproj
new file mode 100644
index 000000000..33305e1f3
--- /dev/null
+++ b/ApacheConnector/samples/TimeServer/TimeServer_vs71.vcproj
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/samples/TimeServer/TimeServer_vs80.vcproj b/ApacheConnector/samples/TimeServer/TimeServer_vs80.vcproj
new file mode 100644
index 000000000..a7e1a5008
--- /dev/null
+++ b/ApacheConnector/samples/TimeServer/TimeServer_vs80.vcproj
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/samples/TimeServer/TimeServer_vs90.vcproj b/ApacheConnector/samples/TimeServer/TimeServer_vs90.vcproj
new file mode 100644
index 000000000..c70b1f230
--- /dev/null
+++ b/ApacheConnector/samples/TimeServer/TimeServer_vs90.vcproj
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/samples/TimeServer/TimeServer_x64_vs100.vcxproj b/ApacheConnector/samples/TimeServer/TimeServer_x64_vs100.vcxproj
new file mode 100644
index 000000000..0832c1ff9
--- /dev/null
+++ b/ApacheConnector/samples/TimeServer/TimeServer_x64_vs100.vcxproj
@@ -0,0 +1,115 @@
+
+
+
+
+ debug_shared
+ x64
+
+
+ release_shared
+ x64
+
+
+
+ TimeServer
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}
+ TimeServer
+ Win32Proj
+
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.40219.1
+ bin64\
+ obj64\$(Configuration)\
+ true
+ bin64\
+ obj64\$(Configuration)\
+ false
+ TimeServerd
+ TimeServer
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ Level3
+ ProgramDatabase
+ Default
+ %(DisableSpecificWarnings)
+
+
+ libapr-1.lib;libaprutil-1.lib;libhttpd.lib;%(AdditionalDependencies)
+ bin64\TimeServerd.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin64\TimeServerd.pdb
+ Console
+ MachineX64
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ libapr-1.lib;libaprutil-1.lib;libhttpd.lib;%(AdditionalDependencies)
+ bin64\TimeServer.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX64
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/samples/TimeServer/TimeServer_x64_vs100.vcxproj.filters b/ApacheConnector/samples/TimeServer/TimeServer_x64_vs100.vcxproj.filters
new file mode 100644
index 000000000..2519b90b7
--- /dev/null
+++ b/ApacheConnector/samples/TimeServer/TimeServer_x64_vs100.vcxproj.filters
@@ -0,0 +1,17 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {2b9f99c8-e72f-4c5b-8970-bc695d6b055d}
+
+
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/ApacheConnector/samples/TimeServer/TimeServer_x64_vs90.vcproj b/ApacheConnector/samples/TimeServer/TimeServer_x64_vs90.vcproj
new file mode 100644
index 000000000..f99791c69
--- /dev/null
+++ b/ApacheConnector/samples/TimeServer/TimeServer_x64_vs90.vcproj
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ApacheConnector/samples/TimeServer/src/TimeServer.cpp b/ApacheConnector/samples/TimeServer/src/TimeServer.cpp
new file mode 100644
index 000000000..9c41565f4
--- /dev/null
+++ b/ApacheConnector/samples/TimeServer/src/TimeServer.cpp
@@ -0,0 +1,95 @@
+//
+// TimeServer.cpp
+//
+// $Id: //poco/1.4/ApacheConnector/samples/TimeServer/src/TimeServer.cpp#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/Net/HTTPServer.h"
+#include "Poco/Net/HTTPRequestHandler.h"
+#include "Poco/Net/HTTPRequestHandlerFactory.h"
+#include "Poco/Net/HTTPServerRequest.h"
+#include "Poco/Net/HTTPServerResponse.h"
+#include "Poco/Timestamp.h"
+#include "Poco/DateTimeFormatter.h"
+#include "Poco/DateTimeFormat.h"
+#include "Poco/ClassLibrary.h"
+
+
+using Poco::Net::HTTPRequestHandler;
+using Poco::Net::HTTPRequestHandlerFactory;
+using Poco::Net::HTTPServerRequest;
+using Poco::Net::HTTPServerResponse;
+using Poco::Timestamp;
+using Poco::DateTimeFormatter;
+using Poco::DateTimeFormat;
+
+
+class TimeRequestHandler: public HTTPRequestHandler
+ /// Return a HTML document with the current date and time.
+{
+public:
+ TimeRequestHandler()
+ {
+ }
+
+ void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response)
+ {
+ Timestamp now;
+ std::string dt(DateTimeFormatter::format(now, DateTimeFormat::SORTABLE_FORMAT));
+
+ response.setChunkedTransferEncoding(true);
+ response.setContentType("text/html");
+
+ std::ostream& ostr = response.send();
+ ostr << "TimeServer powered by POCO ApacheConnector ";
+ ostr << " ";
+ ostr << "";
+ ostr << dt;
+ ostr << "
";
+ }
+};
+
+
+class TimeRequestHandlerFactory: public HTTPRequestHandlerFactory
+{
+public:
+ TimeRequestHandlerFactory()
+ {
+ }
+
+ HTTPRequestHandler* createRequestHandler(const HTTPServerRequest& request)
+ {
+ return new TimeRequestHandler;
+ }
+};
+
+
+POCO_BEGIN_MANIFEST(HTTPRequestHandlerFactory)
+ POCO_EXPORT_CLASS(TimeRequestHandlerFactory)
+POCO_END_MANIFEST
diff --git a/ApacheConnector/samples/dependencies b/ApacheConnector/samples/dependencies
new file mode 100644
index 000000000..afd736493
--- /dev/null
+++ b/ApacheConnector/samples/dependencies
@@ -0,0 +1,4 @@
+Net
+Util
+XML
+Foundation
diff --git a/ApacheConnector/samples/samples.progen b/ApacheConnector/samples/samples.progen
new file mode 100644
index 000000000..0f89bb2de
--- /dev/null
+++ b/ApacheConnector/samples/samples.progen
@@ -0,0 +1,6 @@
+vc.project.platforms = Win32, x64
+vc.project.configurations = debug_shared, release_shared
+vc.solution.create = true
+vc.solution.include = \
+ FormServer\\FormServer;\
+ TimeServer\\TimeServer
diff --git a/ApacheConnector/samples/samples_vs100.sln b/ApacheConnector/samples/samples_vs100.sln
new file mode 100644
index 000000000..ff0f719ba
--- /dev/null
+++ b/ApacheConnector/samples/samples_vs100.sln
@@ -0,0 +1,29 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FormServer", "FormServer\FormServer_vs100.vcxproj", "{CD77A9BA-6E9B-39EF-801A-1C7E66B19106}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TimeServer", "TimeServer\TimeServer_vs100.vcxproj", "{59EDFD20-9968-30F7-9532-44C08DA58C6E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Win32 = debug_shared|Win32
+ release_shared|Win32 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|Win32.Build.0 = release_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.Build.0 = release_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ApacheConnector/samples/samples_vs71.sln b/ApacheConnector/samples/samples_vs71.sln
new file mode 100644
index 000000000..24f996792
--- /dev/null
+++ b/ApacheConnector/samples/samples_vs71.sln
@@ -0,0 +1,29 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FormServer", "FormServer\FormServer_vs71.vcproj", "{CD77A9BA-6E9B-39EF-801A-1C7E66B19106}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TimeServer", "TimeServer\TimeServer_vs71.vcproj", "{59EDFD20-9968-30F7-9532-44C08DA58C6E}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ debug_shared = debug_shared
+ release_shared = release_shared
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared.ActiveCfg = debug_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared.Build.0 = debug_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared.ActiveCfg = release_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared.Build.0 = release_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared.ActiveCfg = debug_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared.Build.0 = debug_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared.ActiveCfg = release_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared.Build.0 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/ApacheConnector/samples/samples_vs80.sln b/ApacheConnector/samples/samples_vs80.sln
new file mode 100644
index 000000000..8c4960b35
--- /dev/null
+++ b/ApacheConnector/samples/samples_vs80.sln
@@ -0,0 +1,29 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FormServer", "FormServer\FormServer_vs80.vcproj", "{CD77A9BA-6E9B-39EF-801A-1C7E66B19106}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TimeServer", "TimeServer\TimeServer_vs80.vcproj", "{59EDFD20-9968-30F7-9532-44C08DA58C6E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Win32 = debug_shared|Win32
+ release_shared|Win32 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|Win32.Build.0 = release_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.Build.0 = release_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ApacheConnector/samples/samples_vs90.sln b/ApacheConnector/samples/samples_vs90.sln
new file mode 100644
index 000000000..caa80a5ef
--- /dev/null
+++ b/ApacheConnector/samples/samples_vs90.sln
@@ -0,0 +1,29 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FormServer", "FormServer\FormServer_vs90.vcproj", "{CD77A9BA-6E9B-39EF-801A-1C7E66B19106}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TimeServer", "TimeServer\TimeServer_vs90.vcproj", "{59EDFD20-9968-30F7-9532-44C08DA58C6E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Win32 = debug_shared|Win32
+ release_shared|Win32 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|Win32.Build.0 = release_shared|Win32
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.Build.0 = release_shared|Win32
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ApacheConnector/samples/samples_x64_vs100.sln b/ApacheConnector/samples/samples_x64_vs100.sln
new file mode 100644
index 000000000..c420f18f2
--- /dev/null
+++ b/ApacheConnector/samples/samples_x64_vs100.sln
@@ -0,0 +1,29 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FormServer", "FormServer\FormServer_x64_vs100.vcxproj", "{CD77A9BA-6E9B-39EF-801A-1C7E66B19106}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TimeServer", "TimeServer\TimeServer_x64_vs100.vcxproj", "{59EDFD20-9968-30F7-9532-44C08DA58C6E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|x64 = debug_shared|x64
+ release_shared|x64 = release_shared|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|x64.Build.0 = debug_shared|x64
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|x64.Deploy.0 = debug_shared|x64
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|x64.ActiveCfg = release_shared|x64
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|x64.Build.0 = release_shared|x64
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|x64.Deploy.0 = release_shared|x64
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|x64.Build.0 = debug_shared|x64
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|x64.Deploy.0 = debug_shared|x64
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|x64.ActiveCfg = release_shared|x64
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|x64.Build.0 = release_shared|x64
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|x64.Deploy.0 = release_shared|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ApacheConnector/samples/samples_x64_vs90.sln b/ApacheConnector/samples/samples_x64_vs90.sln
new file mode 100644
index 000000000..b2fb8ab13
--- /dev/null
+++ b/ApacheConnector/samples/samples_x64_vs90.sln
@@ -0,0 +1,29 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FormServer", "FormServer\FormServer_x64_vs90.vcproj", "{CD77A9BA-6E9B-39EF-801A-1C7E66B19106}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TimeServer", "TimeServer\TimeServer_x64_vs90.vcproj", "{59EDFD20-9968-30F7-9532-44C08DA58C6E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|x64 = debug_shared|x64
+ release_shared|x64 = release_shared|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|x64.Build.0 = debug_shared|x64
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.debug_shared|x64.Deploy.0 = debug_shared|x64
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|x64.ActiveCfg = release_shared|x64
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|x64.Build.0 = release_shared|x64
+ {CD77A9BA-6E9B-39EF-801A-1C7E66B19106}.release_shared|x64.Deploy.0 = release_shared|x64
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|x64.Build.0 = debug_shared|x64
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|x64.Deploy.0 = debug_shared|x64
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|x64.ActiveCfg = release_shared|x64
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|x64.Build.0 = release_shared|x64
+ {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|x64.Deploy.0 = release_shared|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ApacheConnector/src/ApacheApplication.cpp b/ApacheConnector/src/ApacheApplication.cpp
new file mode 100644
index 000000000..e5b3830e8
--- /dev/null
+++ b/ApacheConnector/src/ApacheApplication.cpp
@@ -0,0 +1,75 @@
+//
+// ApacheApplication.cpp
+//
+// $Id: //poco/1.4/ApacheConnector/src/ApacheApplication.cpp#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "ApacheApplication.h"
+#include "ApacheChannel.h"
+#include "Poco/Logger.h"
+#include "Poco/SingletonHolder.h"
+#include
+
+
+using Poco::Logger;
+using Poco::FastMutex;
+
+
+ApacheApplication::ApacheApplication():
+ _ready(false)
+{
+ Logger::root().setChannel(new ApacheChannel);
+}
+
+
+ApacheApplication::~ApacheApplication()
+{
+ Logger::shutdown();
+}
+
+
+void ApacheApplication::setup()
+{
+ FastMutex::ScopedLock lock(_mutex);
+
+ if (!_ready)
+ {
+ std::vector cmdLine;
+ cmdLine.push_back("mod_poco");
+ init(cmdLine);
+ _ready = true;
+ }
+}
+
+
+ApacheApplication& ApacheApplication::instance()
+{
+ static Poco::SingletonHolder sh;
+ return *sh.get();
+}
diff --git a/ApacheConnector/src/ApacheChannel.cpp b/ApacheConnector/src/ApacheChannel.cpp
new file mode 100644
index 000000000..4c8d603de
--- /dev/null
+++ b/ApacheConnector/src/ApacheChannel.cpp
@@ -0,0 +1,51 @@
+//
+// ApacheApplication.cpp
+//
+// $Id: //poco/1.4/ApacheConnector/src/ApacheChannel.cpp#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "ApacheChannel.h"
+#include "ApacheConnector.h"
+#include "Poco/Message.h"
+
+
+ApacheChannel::ApacheChannel()
+{
+}
+
+
+ApacheChannel::~ApacheChannel()
+{
+}
+
+
+void ApacheChannel::log(const Poco::Message& msg)
+{
+ ApacheConnector::log(msg.getSource().c_str(), 0, msg.getPriority(), 0, msg.getText().c_str());
+}
diff --git a/ApacheConnector/src/ApacheConnector.cpp b/ApacheConnector/src/ApacheConnector.cpp
new file mode 100644
index 000000000..62eb29ba8
--- /dev/null
+++ b/ApacheConnector/src/ApacheConnector.cpp
@@ -0,0 +1,309 @@
+//
+// ApacheConnector.cpp
+//
+// $Id: //poco/1.4/ApacheConnector/src/ApacheConnector.cpp#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "ApacheConnector.h"
+#include "ApacheApplication.h"
+#include "ApacheServerRequest.h"
+#include "ApacheServerResponse.h"
+#include "ApacheRequestHandlerFactory.h"
+#include "Poco/Net/HTTPRequestHandler.h"
+#include
+#include "httpd.h"
+#include "http_connection.h"
+#include "http_config.h"
+#include "http_core.h"
+#include "http_protocol.h"
+#include "http_log.h"
+#include "apr.h"
+#include "apr_lib.h"
+#include "apr_strings.h"
+#include "apr_buckets.h"
+#include "apr_file_info.h"
+#include "apr_hash.h"
+#define APR_WANT_STRFUNC
+#include "apr_want.h"
+#include "http_request.h"
+#include "util_filter.h"
+
+
+using Poco::Net::HTTPServerRequest;
+using Poco::Net::HTTPServerResponse;
+using Poco::Net::HTTPRequestHandler;
+using Poco::Net::HTTPResponse;
+
+
+extern "C" module AP_MODULE_DECLARE_DATA poco_module;
+
+
+ApacheRequestRec::ApacheRequestRec(request_rec* pRec):
+ _pRec(pRec)
+{
+}
+
+
+bool ApacheRequestRec::haveRequestBody()
+{
+ return ap_should_client_block(_pRec) != 0;
+}
+
+
+int ApacheRequestRec::readRequest(char* buffer, int length)
+{
+ return ap_get_client_block(_pRec, buffer, length);
+}
+
+
+void ApacheRequestRec::writeResponse(const char* buffer, int length)
+{
+ ap_rwrite(buffer, length, _pRec);
+}
+
+
+void ApacheRequestRec::redirect(const std::string& uri, int status)
+{
+ apr_table_set(_pRec->headers_out, "Location", uri.c_str());
+ _pRec->connection->keepalive = AP_CONN_CLOSE;
+ _pRec->status = status;
+ ap_set_keepalive(_pRec);
+ ap_send_error_response(_pRec, 0);
+}
+
+
+void ApacheRequestRec::sendErrorResponse(int status)
+{
+ _pRec->connection->keepalive = AP_CONN_CLOSE;
+ _pRec->status = status;
+ ap_set_keepalive(_pRec);
+
+ ap_send_error_response(_pRec, 0);
+}
+
+
+void ApacheRequestRec::addHeader(const std::string& key, const std::string& value)
+{
+ const apr_array_header_t *arr = apr_table_elts(_pRec->headers_out);
+ apr_table_add(const_cast(reinterpret_cast(arr)), key.c_str(), value.c_str());
+}
+
+
+void ApacheRequestRec::setContentType(const std::string& mediaType)
+{
+ ap_set_content_type(_pRec, mediaType.c_str());
+}
+
+
+int ApacheRequestRec::sendFile(const std::string& path, unsigned int fileSize, const std::string& mediaType)
+{
+ apr_file_t *thefile = 0;
+ apr_finfo_t finfo;
+ apr_size_t nBytes;
+
+ // setting content-type
+ ap_set_content_type(_pRec, mediaType.c_str());
+
+ // opening file
+ if (apr_file_open(&thefile, path.c_str(), APR_READ, APR_UREAD | APR_GREAD, _pRec->pool) == APR_SUCCESS)
+ {
+ // getting fileinfo
+ apr_file_info_get(&finfo, APR_FINFO_NORM, thefile);
+
+ // setting last-updated & co
+ ap_update_mtime(_pRec, finfo.mtime);
+ ap_set_last_modified(_pRec);
+ ap_set_content_length(_pRec, fileSize);
+
+ // sending file
+ ap_send_fd(thefile, _pRec, 0, fileSize, &nBytes);
+
+ // well done
+ return 0;
+ }
+
+ // file not opened successfully -> produce an exception in C++ code
+ return 1;
+}
+
+
+void ApacheRequestRec::copyHeaders(ApacheServerRequest& request)
+{
+ const apr_array_header_t* arr = apr_table_elts(_pRec->headers_in);
+ const apr_table_entry_t* elts = (const apr_table_entry_t *)arr->elts;
+
+ request.setMethod(_pRec->method);
+ request.setURI(_pRec->unparsed_uri);
+
+ // iterating over raw-headers and printing them
+ for (int i = 0; i < arr->nelts; i++)
+ {
+ request.add(elts[i].key, elts[i].val);
+ }
+}
+
+
+void ApacheConnector::log(const char* file, int line, int level, int status, const char *text)
+{
+ ap_log_error(file, line, level, 0, NULL, "%s", text);
+}
+
+
+extern "C" int ApacheConnector_handler(request_rec *r)
+{
+ ApacheRequestRec rec(r);
+ ApacheApplication& app(ApacheApplication::instance());
+
+ try
+ {
+ // ensure application is ready
+ app.setup();
+
+ // if the ApacheRequestHandler declines handling - we stop
+ // request handling here and let other modules do their job!
+ if (!app.factory().mustHandle(r->uri))
+ return DECLINED;
+
+ apr_status_t rv;
+ if ((rv = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)))
+ return rv;
+
+ std::auto_ptr pRequest(new ApacheServerRequest(
+ &rec,
+ r->connection->local_ip,
+ r->connection->local_addr->port,
+ r->connection->remote_ip,
+ r->connection->remote_addr->port));
+
+ std::auto_ptr pResponse(new ApacheServerResponse(pRequest.get()));
+
+ // add header information to request
+ rec.copyHeaders(*pRequest);
+
+ try
+ {
+ std::auto_ptr pHandler(app.factory().createRequestHandler(*pRequest));
+
+ if (pHandler.get())
+ {
+ pHandler->handleRequest(*pRequest, *pResponse);
+ }
+ else
+ {
+ pResponse->sendErrorResponse(HTTP_NOT_IMPLEMENTED);
+ }
+ }
+ catch (...)
+ {
+ pResponse->sendErrorResponse(HTTP_INTERNAL_SERVER_ERROR);
+ throw;
+ }
+ }
+ catch (Poco::Exception& exc)
+ {
+ ApacheConnector::log(__FILE__, __LINE__, ApacheConnector::PRIO_ERROR, 0, exc.displayText().c_str());
+ }
+ catch (...)
+ {
+ ApacheConnector::log(__FILE__, __LINE__, ApacheConnector::PRIO_ERROR, 0, "Unknown exception");
+ }
+ return OK;
+}
+
+
+extern "C" void ApacheConnector_register_hooks(apr_pool_t *p)
+{
+ ap_hook_handler(ApacheConnector_handler, NULL, NULL, APR_HOOK_MIDDLE);
+}
+
+
+extern "C" const char* ApacheConnector_uris(cmd_parms *cmd, void *in_dconf, const char *in_str)
+{
+ try
+ {
+ ApacheApplication::instance().factory().handleURIs(in_str);
+ }
+ catch (Poco::Exception& exc)
+ {
+ ApacheConnector::log(__FILE__, __LINE__, ApacheConnector::PRIO_ERROR, 0, exc.displayText().c_str());
+ }
+ catch (...)
+ {
+ ApacheConnector::log(__FILE__, __LINE__, ApacheConnector::PRIO_ERROR, 0, "Unknown exception");
+ }
+ return 0;
+}
+
+
+extern "C" const char* ApacheConnector_config(cmd_parms *cmd, void *in_dconf, const char *in_str)
+{
+ try
+ {
+ ApacheApplication::instance().loadConfiguration(in_str);
+ }
+ catch (Poco::Exception& exc)
+ {
+ ApacheConnector::log(__FILE__, __LINE__, ApacheConnector::PRIO_ERROR, 0, exc.displayText().c_str());
+ }
+ catch (...)
+ {
+ ApacheConnector::log(__FILE__, __LINE__, ApacheConnector::PRIO_ERROR, 0, "Unknown exception");
+ }
+ return 0;
+}
+
+
+extern "C" const command_rec ApacheConnector_cmds[] =
+{
+ AP_INIT_RAW_ARGS(
+ "AddPocoRequestHandler",
+ reinterpret_cast(ApacheConnector_uris),
+ NULL,
+ RSRC_CONF,
+ "POCO RequestHandlerFactory class name followed by shared library path followed by a list of ' ' separated URIs that must be handled by this module."),
+ AP_INIT_RAW_ARGS(
+ "AddPocoConfig",
+ reinterpret_cast(ApacheConnector_config),
+ NULL,
+ RSRC_CONF,
+ "Path of the POCO configuration file."),
+ { NULL }
+};
+
+
+module AP_MODULE_DECLARE_DATA poco_module =
+{
+ STANDARD20_MODULE_STUFF,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ ApacheConnector_cmds,
+ ApacheConnector_register_hooks
+};
diff --git a/ApacheConnector/src/ApacheRequestHandlerFactory.cpp b/ApacheConnector/src/ApacheRequestHandlerFactory.cpp
new file mode 100644
index 000000000..18e1832ca
--- /dev/null
+++ b/ApacheConnector/src/ApacheRequestHandlerFactory.cpp
@@ -0,0 +1,136 @@
+//
+// ApacheRequestHandlerFactory.cpp
+//
+// $Id: //poco/1.4/ApacheConnector/src/ApacheRequestHandlerFactory.cpp#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "ApacheRequestHandlerFactory.h"
+#include "ApacheConnector.h"
+#include "Poco/Net/HTTPRequestHandler.h"
+#include "Poco/StringTokenizer.h"
+#include "Poco/Manifest.h"
+#include "Poco/File.h"
+#include
+
+
+using Poco::StringTokenizer;
+using Poco::FastMutex;
+
+
+ApacheRequestHandlerFactory::ApacheRequestHandlerFactory()
+{
+}
+
+
+ApacheRequestHandlerFactory::~ApacheRequestHandlerFactory()
+{
+}
+
+
+Poco::Net::HTTPRequestHandler* ApacheRequestHandlerFactory::createRequestHandler(const Poco::Net::HTTPServerRequest& request)
+{
+ FastMutex::ScopedLock lock(_mutex);
+
+ // only if the given uri is found in _uris we are
+ // handling this request.
+ RequestHandlerFactories::iterator it = _requestHandlers.begin();
+ RequestHandlerFactories::iterator itEnd = _requestHandlers.end();
+ std::string uri = request.getURI();
+
+ // if any uri in our map is found at the beginning of the given
+ // uri -> then we handle it!!
+ for (; it != itEnd; it++)
+ {
+ if (uri.find(it->first) == 0 || it->first.find(uri) == 0)
+ {
+ return it->second->createRequestHandler(request);
+ }
+ }
+
+ return 0;
+}
+
+
+void ApacheRequestHandlerFactory::handleURIs(const std::string& uris)
+{
+ FastMutex::ScopedLock lock(_mutex);
+
+ StringTokenizer st(uris, " ", StringTokenizer::TOK_TRIM);
+ StringTokenizer::Iterator it = st.begin();
+ StringTokenizer::Iterator itEnd = st.end();
+ std::string factoryName = (*it);
+ it++;
+ std::string dllName = (*it);
+ it++;
+
+ for (; it != itEnd; it++)
+ {
+ addRequestHandlerFactory(dllName, factoryName, *it);
+ }
+}
+
+
+void ApacheRequestHandlerFactory::addRequestHandlerFactory(const std::string& dllPath, const std::string& factoryName, const std::string& uri)
+{
+ try
+ {
+ _loader.loadLibrary(dllPath);
+ Poco::Net::HTTPRequestHandlerFactory* pFactory = _loader.classFor(factoryName).create();
+ _requestHandlers.insert(std::make_pair(uri, pFactory));
+ }
+ catch (Poco::Exception& exc)
+ {
+ ApacheConnector::log(__FILE__, __LINE__, ApacheConnector::PRIO_ERROR, 0, exc.displayText().c_str());
+ }
+}
+
+
+bool ApacheRequestHandlerFactory::mustHandle(const std::string& uri)
+{
+ FastMutex::ScopedLock lock(_mutex);
+
+ // only if the given uri is found in _uris we are
+ // handling this request.
+ RequestHandlerFactories::iterator it = _requestHandlers.begin();
+ RequestHandlerFactories::iterator itEnd = _requestHandlers.end();
+
+ // if any uri in our map is found at the beginning of the given
+ // uri -> then we handle it!!
+ for (; it != itEnd; it++)
+ {
+ // dealing with both cases:
+ // handler is registered with: /download
+ // uri: /download/xyz
+ // uri: /download
+ if (uri.find(it->first) == 0 || it->first.find(uri) == 0)
+ return true;
+ }
+
+ return false;
+}
diff --git a/ApacheConnector/src/ApacheServerRequest.cpp b/ApacheConnector/src/ApacheServerRequest.cpp
new file mode 100644
index 000000000..a836f74ad
--- /dev/null
+++ b/ApacheConnector/src/ApacheServerRequest.cpp
@@ -0,0 +1,82 @@
+//
+// ApacheServerRequest.cpp
+//
+// $Id: //poco/1.4/ApacheConnector/src/ApacheServerRequest.cpp#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "ApacheServerRequest.h"
+#include "ApacheServerResponse.h"
+#include "ApacheRequestHandlerFactory.h"
+#include "Poco/Exception.h"
+#include
+
+
+ApacheServerRequest::ApacheServerRequest(
+ ApacheRequestRec* pApacheRequest,
+ const char* serverName,
+ int serverPort,
+ const char* clientName,
+ int clientPort):
+ _pApacheRequest(pApacheRequest),
+ _pResponse(0),
+ _pStream(new ApacheInputStream(_pApacheRequest)),
+ _serverAddress(serverName, serverPort),
+ _clientAddress(clientName, clientPort)
+{
+}
+
+
+ApacheServerRequest::~ApacheServerRequest()
+{
+ delete _pStream;
+}
+
+
+const Poco::Net::HTTPServerParams& ApacheServerRequest::serverParams() const
+{
+ throw Poco::NotImplementedException("No HTTPServerParams available in Apache modules.");
+}
+
+
+Poco::Net::HTTPServerResponse& ApacheServerRequest::response() const
+{
+ return *_pResponse;
+}
+
+
+void ApacheServerRequest::setResponse(ApacheServerResponse* pResponse)
+{
+ _pResponse = pResponse;
+}
+
+
+bool ApacheServerRequest::expectContinue() const
+{
+ return false;
+}
diff --git a/ApacheConnector/src/ApacheServerResponse.cpp b/ApacheConnector/src/ApacheServerResponse.cpp
new file mode 100644
index 000000000..3906bac8b
--- /dev/null
+++ b/ApacheConnector/src/ApacheServerResponse.cpp
@@ -0,0 +1,151 @@
+//
+// ApacheServerResponse.cpp
+//
+// $Id: //poco/1.4/ApacheConnector/src/ApacheServerResponse.cpp#3 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "ApacheServerResponse.h"
+#include "ApacheServerRequest.h"
+#include "ApacheStream.h"
+#include "ApacheConnector.h"
+#include "Poco/Net/HTTPCookie.h"
+#include "Poco/File.h"
+#include "Poco/Exception.h"
+#include
+#include
+
+
+using Poco::File;
+using Poco::OpenFileException;
+using Poco::Net::HTTPCookie;
+
+
+ApacheServerResponse::ApacheServerResponse(ApacheServerRequest* pRequest):
+ _pStream(0),
+ _pApacheRequest(pRequest->_pApacheRequest)
+{
+ setVersion(pRequest->getVersion());
+ setKeepAlive(pRequest->getKeepAlive());
+
+ pRequest->setResponse(this);
+}
+
+
+ApacheServerResponse::~ApacheServerResponse()
+{
+ delete _pStream;
+}
+
+
+void ApacheServerResponse::initApacheOutputStream()
+{
+ poco_assert (!_pStream);
+
+ _pApacheRequest->setContentType(getContentType());
+
+ std::vector cookies;
+ getCookies(cookies);
+
+ std::size_t cnt = cookies.size();
+ for (int c = 0; c < cnt; c++)
+ {
+ _pApacheRequest->addHeader("Set-Cookie", cookies[c].toString());
+ }
+
+ _pStream = new ApacheOutputStream(_pApacheRequest);
+}
+
+
+void ApacheServerResponse::sendContinue()
+{
+ // should be handled by Apache
+}
+
+
+std::ostream& ApacheServerResponse::send()
+{
+ poco_assert (!_pStream);
+
+ initApacheOutputStream();
+
+ return *_pStream;
+}
+
+
+void ApacheServerResponse::sendFile(const std::string& path, const std::string& mediaType)
+{
+ poco_assert (!_pStream);
+
+ initApacheOutputStream();
+
+ File f(path);
+ if (_pApacheRequest->sendFile(path, static_cast(f.getSize()), mediaType) != 0)
+ throw OpenFileException(path);
+}
+
+
+void ApacheServerResponse::sendBuffer(const void* pBuffer, std::size_t length)
+{
+ poco_assert (!_pStream);
+
+ initApacheOutputStream();
+
+ _pStream->write(static_cast(pBuffer), static_cast(length));
+}
+
+
+void ApacheServerResponse::redirect(const std::string& uri, HTTPStatus status)
+{
+ poco_assert (!_pStream);
+
+ initApacheOutputStream();
+
+ try
+ {
+ _pApacheRequest->redirect(uri, status);
+ }
+ catch (Poco::Exception&)
+ {
+ ApacheConnector::log(__FILE__, __LINE__, 7 , 0, "caught exception in ApacheServerResponse::redirect - ignoring\n");
+ }
+}
+
+
+void ApacheServerResponse::sendErrorResponse(int status)
+{
+ initApacheOutputStream();
+
+ _pApacheRequest->sendErrorResponse(status);
+}
+
+
+void ApacheServerResponse::requireAuthentication(const std::string& realm)
+{
+ // should be handled by Apache
+}
diff --git a/ApacheConnector/src/ApacheStream.cpp b/ApacheConnector/src/ApacheStream.cpp
new file mode 100644
index 000000000..3ec484045
--- /dev/null
+++ b/ApacheConnector/src/ApacheStream.cpp
@@ -0,0 +1,142 @@
+//
+// ApacheStream.h
+//
+// $Id: //poco/1.4/ApacheConnector/src/ApacheStream.cpp#2 $
+//
+// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "ApacheStream.h"
+#include "ApacheConnector.h"
+#include "Poco/Exception.h"
+
+
+using Poco::BufferedStreamBuf;
+
+
+//
+// ApacheStreamBuf
+//
+
+
+ApacheStreamBuf::ApacheStreamBuf(ApacheRequestRec* pApacheRequest, bool haveData):
+ BufferedStreamBuf(STREAM_BUFFER_SIZE, std::ios::in | std::ios::out),
+ _pApacheRequest(pApacheRequest),
+ _haveData(haveData)
+{
+}
+
+
+ApacheStreamBuf::~ApacheStreamBuf()
+{
+}
+
+
+int ApacheStreamBuf::readFromDevice(char* buffer, std::streamsize len)
+{
+ if (_haveData)
+ return _pApacheRequest->readRequest(buffer, static_cast(len));
+ else
+ return 0;
+}
+
+
+int ApacheStreamBuf::writeToDevice(const char* buffer, std::streamsize length)
+{
+ _pApacheRequest->writeResponse(buffer, length);
+ return length;
+}
+
+
+//
+// ApacheIOS
+//
+
+
+ApacheIOS::ApacheIOS(ApacheRequestRec* pApacheRequest, bool haveData):
+ _buf(pApacheRequest, haveData)
+{
+ poco_ios_init(&_buf);
+}
+
+
+ApacheIOS::~ApacheIOS()
+{
+ try
+ {
+ _buf.sync();
+ }
+ catch (...)
+ {
+ }
+}
+
+
+ApacheStreamBuf* ApacheIOS::rdbuf()
+{
+ return &_buf;
+}
+
+
+void ApacheIOS::close()
+{
+ _buf.sync();
+}
+
+
+//
+// ApacheOutputStream
+//
+
+
+ApacheOutputStream::ApacheOutputStream(ApacheRequestRec* pApacheRequest):
+ ApacheIOS(pApacheRequest),
+ std::ostream(&_buf)
+{
+}
+
+
+ApacheOutputStream::~ApacheOutputStream()
+{
+}
+
+
+//
+// ApacheInputStream
+//
+
+
+ApacheInputStream::ApacheInputStream(ApacheRequestRec* pApacheRequest):
+ ApacheIOS(pApacheRequest, pApacheRequest->haveRequestBody()),
+ std::istream(&_buf)
+{
+}
+
+
+ApacheInputStream::~ApacheInputStream()
+{
+}
diff --git a/CHANGELOG b/CHANGELOG
new file mode 100644
index 000000000..2c30e1b48
--- /dev/null
+++ b/CHANGELOG
@@ -0,0 +1,1695 @@
+This is the changelog file for the POCO C++ Libraries.
+
+Release 1.4.4 (2012-04-??)
+==========================
+
+- ZipStream now builds correctly in unbundled build.
+- added proxy digest authentication support to Net library
+- integrated MySQL BLOB fixes from Franky Braem.
+- use standard OpenSSL import libraries (libeay32.lib, ssleay32.lib) for Crypto and
+ NetSSL_OpenSSL Visual Studio project files.
+- fixed a potential buffer corruption issue in Poco::Net::SecureStreamSocket if lazy
+ handshake is enabled and the first attempt to complete the handshake fails
+- Poco::DateTimeParser::tryParse() without format specifier now correctly parses ISO8601
+ date/times with fractional seconds.
+
+
+Release 1.4.3p1 (2012-01-23)
+============================
+
+- fixed SF# 3476926: RegDeleteKeyEx not available on Windows XP 32-bit
+
+
+Release 1.4.3 (2012-01-16)
+==========================
+
+- fixed a compilation error with Data/MySQL on QNX.
+- fixed Util project files for WinCE (removed sources not compileable on CE)
+- removed MD2 license text from Ackowledgements document
+- fixed iPhone build config for Xcode 4.2 (compiler name changed to llvm-g++)
+- Poco::Util::XMLConfiguration: delimiter char (default '.') is now configurable.
+ This allows for working with XML documents having element names with '.' in them.
+- Poco::Util::OptionProcessor: Required option arguments can now be specified as
+ separate command line arguments, as in "--option value" in addition to the
+ "--option=value" format.
+- Poco::Util::HelpFormatter: improved option help formatting if indentation has
+ been set explicitely.
+- added Mail sample to NetSSL_OpenSSL, showing use of Poco::Net::SecureSMTPClientSession.
+- added additional read() overloads to Poco::Net::HTMLForm.
+- fixed SF# 3440769: Poco::Net::HTTPResponse doesn't like Amazon EC2 cookies.
+- added support for requiring TLSv1 to Poco::Net::Context.
+- added an additional constructor to Poco::Net::HTTPBasicCredentials, allowing
+ the object to be created from a string containing a base64-encoded, colon-separated
+ username and password.
+- Poco::Zip::ZipStreamBuf: fixed a crash if CM_STORE was used.
+- Added setContentLength64() and getContentLength64() to Poco::Net::HTTPMessage.
+- added Poco::Environment::osDisplayName().
+- fixed SF# 3463096: WinService leaves dangling handles (open() now does not reopen the
+ service handle if it's already open)
+- fixed SF# 3426537: WinRegistryConfiguration can't read virtualized keys
+- added Poco::Buffer::resize()
+- fixed SF# 3441822: thread safety issue in HTTPClientSession:
+ always use getaddrinfo() instead of gethostbyname() on all platforms supporting it
+- added version resource to POCO DLLs
+- fixed SF# 3440599: Dir Path in Quotes in PATH cause PathTest::testFind to fail.
+- fixed SF# 3406030: Glob::collect problem
+- added Poco::Util::AbstractConfiguration::enableEvents()
+- Poco::AtomicCounter now uses GCC builtins with GCC 4.1 or newer
+ (contributed by Alexey Milovidov)
+- made Poco::Logger::formatDump() public as it may be useful for others as well
+ (SF# 3453446)
+- Poco::Net::DialogSocket now has a proper copy constructor (SF# 3414602)
+- Poco::Net::MessageHeader and Poco::Net::HTMLForm now limit the maximum number of
+ fields parsed from a message to prevent certain kinds of denial-of-service
+ attacks. The field limit can be changed with the new method setFieldLimit().
+ The default limit is 100.
+- Poco::NumberFormatter, Poco::NumberParser and Poco::format() now always use the
+ classic ("C") locale to format and parse floating-point numbers.
+- added Poco::StreamCopier::copyStream64(), Poco::StreamCopier::copyStreamUnbuffered64()
+ and Poco::StreamCopier::copyToString64(). These functions use a 64-bit integer
+ to count the number of bytes copied.
+- upgraded internal zlib to 1.2.5
+- upgraded internal sqlite to 3.7.9
+- XML: integrated bugfix for Expat bug# 2958794 (memory leak in poolGrow)
+- Added support for HTTP Digest authentication (based on a contribution by
+ Anton V. Yabchinskiy (arn at bestmx dot ru)). For information on how
+ to use this, see the Poco::Net::HTTPCredentials, Poco::Net::HTTPDigestCredentials
+ and Poco::Net::HTTPAuthenticationParams classes.
+- Poco::Net::HTTPStreamFactory and Poco::Net::HTTPSStreamFactory now support Basic
+ and Digest authentication. Username and password must be provided in the URI.
+- added Poco::Net::WebSocket, supporting the WebSocket protocol as described in RFC 6455
+- NetSSL_OpenSSL: added client-side support for Server Name Indication.
+ Poco::Net::SecureSocketImpl::connectSSL() now calls SSL_set_tlsext_host_name()
+ if its available (OpenSSL 9.8.6f and later).
+- added Poco::Net::HTTPClientSession::proxyConnect() (factored out from
+ Poco::Net::HTTPSClientSession::connect())
+- added Poco::Process::kill(const Poco::ProcessHandle&) which is preferable to
+ kill(pid) on Windows, as process IDs on Windows may be reused.
+- fixed SF# 3471463: Compiler warnings with -Wformat
+- Poco::Util::Application::run() now catches and logs exceptions thrown in initialize()
+- Fixed a WinCE-specific bug in Poco::Util::ServerApplication where uninitialize() would
+ be called twice.
+- fixed SF# 3471957: WinRegistryKey::deleteKey() unable to delete alt views
+- Added additional constructor to Poco::ScopedLock and Poco::ScopedLockWithUnlock
+ accepting a timeout as second argument.
+- Added Poco::Logger::parseLevel()
+- Poco::format(): an argument that does not match the format
+ specifier no longer results in a BadCastException. The string [ERRFMT] is
+ written to the result string instead.
+- PageCompiler: added createSession page attribute.
+
+
+Release 1.4.2p1 (2011-09-24)
+============================
+
+- On Linux, the RTLD_DEEPBIND option is no longer passed to dlopen().
+ This change was introduced in 1.4.2 to solve a specific problem one customer
+ was having. Unfortunately, it leads to problems with RTTI.
+- It's now possible to pass flags (SHLIB_GLOBAL, SHLIB_LOCAL) to
+ Poco::SharedLibrary::load() (and the constructor implicitly calling load()),
+ controlling the mode flags (RTLD_GLOBAL, RTLD_LOCAL) passed to dlopen().
+ On platforms not using dlopen(), these flags are ignored.
+- fixed SF# 3400267: Path_WIN32.cpp bug
+
+
+Release 1.4.2 (2011-08-28)
+==========================
+
+- added Poco::DateTimeFormat::ISO8601_FRAC_FORMAT
+- added new Poco::DateTimeFormatter and Poco::DateTimeParser format specifier:
+ %s for seconds with optional fractions of a second
+- fixed a problem with ioctl() on BSD platforms (including OS X) where the
+ second argument to ioctl() is unsigned long instead of int, causing bad
+ things on a OS X 64-bit kernel.
+- fixed a potential endless loop when enumerating IPv6 network addresses
+ (reported by Laurent Carcagno)
+- new compile-time config option on Windows to set thread names in
+ debugger. Enable with -DPOCO_WIN32_DEBUGGER_THREAD_NAMES. Available
+ only in debug builds.
+- Cipher can now create Base64 and HexBinary encoded output without linefeeds
+ (suitable for use in cookies, etc.)
+- added Poco::Path::popFrontDirectory()
+- improved VxWorks support
+- IPv6 fixes: added proper scope id handling in IPAddress, SocketAddress
+ and related classes.
+- Added Poco::Net::ServerSocket::bind6() which allows control over the
+ IPPROTO_IPV6/IPV6_V6ONLY socket option.
+- Removed Poco::MD2Engine class due to licensing issues (the
+ license for the MD2 code from RSA only allows non-commercial
+ use). Note that the MD4 and MD5 code from RSA does not have
+ this issue.
+- fixed a Net HTTP client testsuite issue where some tests might
+ have failed due to prematurely aborted connections by
+ the HTTPTestServer.
+- Poco::Net::SocketAddress: when there is more than one address
+ returned by a DNS lookup for a name, IPv4 addresses will be
+ preferred to IPv6 ones.
+- NetworkInterface::list() now also returns IPv4 interfaces on Windows when
+ built with -DPOCO_HAVE_IPv6
+- XMLWriter: fixed a bug with attribute namespaces (no namespace prefix
+ written if attribute namespace is the same as element namespace)
+- fixed SF# 3378588: Mismatched new[]/delete (in RSAEncryptImpl and RSADecryptImpl)
+- fixed SF# 3212954 (OpenSSLInitializer::uninitialize() crash) and
+ SF# 3196862 (Static OpenSSLInitializer instance causes Windows deadlocks) by
+ removing the static Poco::Crypto::OpenSSLInitializer instance. Automatic OpenSSL
+ initialization is now done through Poco::Crypto::Cipher, Poco::Crypto::CipherKey,
+ Poco::Crypto::X509Certificate, Poco::Net::Context classes; however, it is still
+ recommended to call Poco::Crypto::initializeCrypto() and
+ Poco::Crypto::uninitializeCrypto() early at application startup, and late at
+ shutdown respectively (or Poco::Net::initializeSSL()/Poco::Net::uninitializeSSL()
+ if the NetSSL library is used) to avoid multiple full OpenSSL init/uninit cycles
+ during application runtime.
+- Poco::Logger now also support a symbolic log level "none"
+ (for use with setLevel()) that disables logging completely
+ for that Logger (equivalent to setLevel(0)).
+- Added experimental Android support, using the existing gmake-based
+ build system.
+- fixed SF# 3288584: DateTimeFormatter link error
+- fixed SF# 3187117: Typo in InflatingInputStream doc
+- fixed SF# 3309731: _WIN32_WCE comparison should be with 0x600 not 600
+- fixed SF# 3393026: RegularExpression.h identical enum value
+- fixed SF# 3274222: AtomicCounter's postfix operators aren't atomic on Windows
+- fixed SF# 3317177: Handle leak on windows
+- fixed SF# 3181882: Poco::URI::getPathEtc() double-encodes query
+- fixed SF# 3379935: ThreadPool Start Bug
+- fixed SF# 3354451: Poco::Format::parsePrec never sets the precision to zero
+- fixed SF# 3387258: _MAX_PATH used but unknown in Path_WIN32
+- fixed a problem in RSAKeyImpl where direct access to the RSA in a EVP_PKEY
+ would no longer work in recent OpenSSL versions. Using EVP_PKEY_get1_RSA()
+ fixes the issue.
+- added Poco::Crypto::EncryptingInputStream, Poco::Crypto::EncryptingOutputStream,
+ Poco::Crypto::DecryptingInputStream and Poco::Crypto::DecryptingOutputStream.
+- fixed SF# 3148126: HTTPSClientSession destructor (!) throws an IOException
+- fixed SF# 3178098: Add constructor to Poco::TemporaryFile to specify directory
+- fixed SF# 3175310: Absolute path when device
+- fixed SF# 3301207: Guided tour example contradicts apidoc (API doc was wrong)
+- Poco::Net::HTTPMessage::setContentLength() and Poco::Net::HTTPMessage::getContentLength() now
+ use std::streamsize instead of int. This enables 64-bit Content-Length support at least
+ on 64-bit platforms.
+- fixed SF# 3177530: TemporaryFile::tempName() + glob bug on xp
+- fixed SF# 3177372: FileChannel documentation inconsistency
+- added %E format specifier to Poco::PattermFormatter (epoch time in seconds
+ since midnight, January 1 1970)
+- On Windows, Poco::Util::ServerApplication now supports a /description command
+ line argument for specifying a service description (together with /registerService)
+- added Poco::Util::WinService::setDescription() and
+ Poco::Util::WinService::getDescription()
+- fixed SF# 3155477: Incorrect URI path handling
+- fixed SF# 3309736: Extended Exception macros to set default exception code
+ new macro is named POCO_DECLARE_EXCEPTION_CODE
+- added getter functions for modulus and exponents to Poco::Crypto::RSAKey.
+- added Poco::Net::SocketAddress::operator == () and
+ Poco::Net::SocketAddress::operator != ()
+- fixed SF# 3182746: IPAddress.cpp IPv6 bug on big-endian
+- fixed SF# 3196961: Unix daemon fails to loadConfiguration() if started from cwd
+- fixed SF# 3393700: NotificationCenter may call a removed observer and crash.
+- Reworked implementation of the events framework (Poco::BasicEvent and friends).
+ The framework is now completely multithreading save (even in the case that
+ an event subscriber object unsubscribes and is deleted while an event is
+ being dispatched). Also, the restriction that any object can only register
+ one delegate for each event has been removed. For most cases, dispatching
+ events should be faster, as dispatching an event now needs less dynamic memory
+ allocations.
+- fixed SF# 3178109: getNodeByPath() changes:
+ getNodeByPath() and getNodeByPathNS() have been moved to Poco::XML::Node.
+ Furthermore, when invoked on a Poco::XML::Document, the behavior has changed
+ so that the document element is now included when traversing the path (previously,
+ traversal would start at the document element, now it starts at the document).
+ The path expression can now start with a double-slash, which results in a recursive
+ search for the path's first element in the DOM tree.
+- fixed SF# 3382935: String data being truncated using ODBC, and
+ SF# 2921813: Wrong implementation of the ODBC string binding
+
+
+Release 1.4.1p1 (2011-02-08)
+============================
+
+- Poco::Mutex is now a recursive mutex again on Linux
+ (this was caused by an unfortunate feature test for
+ PTHREAD_MUTEX_RECURSIVE which did not work on Linux
+ as PTHREAD_MUTEX_RECURSIVE is an enum value and not
+ a macro)
+- Poco::Net::SecureSocketImpl::abort() now only shuts
+ down the underlying socket connection and does not free
+ the SSL object, due to multithreading issues.
+
+
+Release 1.4.1 (2011-01-29)
+==========================
+
+- fixed SF# 3150223: Poco::BinaryReader cannot read std::vector correctly
+- fixed SF# 3146326: SharedMemory issue
+- made Poco::Net::HTTPSession::abort() virtual
+- added Poco::Net::SecureStreamSocket::abort() to immediately close
+ a SSL/TLS connection without performing an orderly SSL/TLS shutdown.
+- fixed SF# 3148126: HTTPSClientSession destructor (!) throws an IOException.
+ Added try/catch block to Poco::Net::SecureSocketImpl destructor.
+- added additional constructor to Poco::Net::HTTPSClientSession, taking
+ both a socket and a session object.
+- Poco::Net::HTTPSession::abort() now also can be used with a
+ Poco::Net::HTTPSClientSession.
+- fixed SF# 3148045: make clean and distclean issues
+- changed Data library names on Unix/Linux platforms to
+ match the names on Windows (PocoSQLite -> PocoDataSQLite,
+ PocoMySQL -> PocoDataMySQL, PocoODBC -> PocoDataODBC)
+- added additional options to configure script
+- added additional documentation to Poco::Net::HTTPClientSession
+- Poco::Net::HTTPClientSession::receiveResponse() closes the connection
+ if an exception is thrown while reading the response header.
+ This ensures that a new connection will be set up for the next request
+ if persistent connections are used.
+- improved Poco::Net::MultipartDecoder performance by reading directly from streambuf
+- improved performance of Poco::Base64Encoder, Poco::Base64Decoder,
+ Poco::HexBinaryEncoder and Poco::HexBinaryDecoder by working directly with the
+ given stream's streambuf.
+- improved performance of MessageHeader::read() by reading directly from streambuf
+ instead of istream.
+- it is now possible to specify additional MIME part header fields
+ for a MIME part through the Poco::Net::PartSource class.
+- upgraded SQLite to release 3.7.4
+- added experimental VxWorks support for VxWorks 5.5.1/Tornado 2.2 and
+ newer. Please see the VxWorks Platform Notes in the reference documentation
+ for more information. Currently, the VxWorks is untested; full support
+ will be available in release 1.4.2.
+- fixed SF# 3165918: Poco::DynamicAny fails to convert from string to float
+- fixed SF# 3165910: Poco::Net::MessageHeader does not accept HTTP conforming header
+- made Poco::Task::cancel() virtual so that tasks can implement custom
+ cancellation behavior.
+- added optional argument to Poco::Util::WinRegistryKey constructor
+ to specify additional flags (in addition to KEY_READ and KEY_WRITE)
+ for the samDesired argument of RegOpenKeyEx() or RegCreateKeyEx().
+- improved Poco::BasicEvent::notify() performance by avoiding an unnecessary heap
+ allocation.
+- added additional well-known port numbers to Poco::URI: rtsp, sip, sips, xmpp.
+- added Poco::Net::MediaType::matchesRange()
+- improved invalid socket handling: a Poco::Net::InvalidSocketException is
+ now thrown instead of an assertion when an operation is attempted on a closed or
+ otherwise uninitialized socket.
+
+
+Release 1.4.0 (2010-12-14)
+==========================
+
+- SSLManager: documentation fixes, code cleanup
+- SSLManager: renamed PrivateKeyPassPhrase event to PrivateKeyPassphraseRequired
+- added HTTPServerRequestImpl::socket() to get access to the underlying socket
+- added Socket::secure() to find out whether a given socket supports SSL/TLS
+- added SecureStreamSocket::havePeerCertificate()
+- NetSSL: added support for turning off extended certificate validation (hostname matching)
+- fixed SF# 2941228: ICMPClient::ping() issues on Mac OS X
+- fixed SF# 2941231: ICMPEventArgs out of bounds array access
+- added PageCompiler sample
+- added missing newline at end of xmlparse.c
+- Poco::Glob can now be used with an empty pattern which will match nothing (patch from Kim Graesman)
+- added support for HTTP proxy authentication (Basic authentication only)
+- fixed SF# 2958959: XMLWriter must encode CR, LF and TAB in attribute values as character entities.
+- HTMLForm now supports PUT requests as well (see )
+- fixed SF# #2970521: FileOutputStream and file permissions.
+ (also fixed in File class)
+- removed an unused (and wrong) default parameter from EventImpl constructor for WIN32.
+- added full support for session caching to NetSSL_OpenSSL
+- fixed SF# 2984454: Poco::Util::Timer::scheduleAtFixedRate() works incorrectly
+- fixed a bug in Poco::Util::Timer that could lead to high CPU load if
+ the system clock is moved forward.
+- added system.nodeId to SystemConfiguration
+- added a note to Poco::Util::ServerApplication documentation regarding
+ creation of threads
+- added Poco::Net::IPAddress::broadcast() and Poco::Net::IPAddress::wildcard() to
+ create broadcast (255.255.255.255) and wildcard (0.0.0.0) addresses.
+- fixed SF# 2916154: Poco::Net::IPAddress::isLoopback() only works for 127.0.0.1.
+- added build configuration for iPhone Simulator
+- GNU Make based build system provides new variables: POCO_HOST_BINDIR, POCO_HOST_BINPATH,
+ POCO_HOST_LIBDIR, POCO_HOST_LIBPATH and POCO_TARGET_* equivalents.
+- Application::initialize() and Application::uninitialize() will now be called from within run().
+ This solves various issues with uninitialize() not being called, or being called inappropriately
+ from the Application destructor.
+ Please note that this change will break applications that use the Application class,
+ but only call init() and not run().
+- added /startup option to specify startup mode for Windows services (automatic or manual)
+- fixed SF# 2967354: SecureSocketImpl shutdown/close problem
+- fixed SF# 3006340: LinearHashTable grows even if key already exists
+- fixed a particularly nasty Windows error handling issue that manifested itself on WinCE:
+ WSAGetLastError() would be called after a std::string was created. The string creation could result
+ in a heap operation which called a Windows API to allocate memory. This would reset the
+ GetLastError() error code. Since WSAGetLastError() is just an alias for GetLastError(), the actual
+ error code from the socket operation would be lost.
+- upgraded SQLite to 3.7.3
+- added --header-prefix option to PageCompiler
+- fixed SF# 3003875: SQLite data binding is broken
+- fixed SF# 2993988: Issue with multiple calls to open()/close() on File*Stream
+- fixed SF# 2990256: HTMLForm and file uploads
+- fixed SF# 2969227: DateTimeParser bug
+- fixed SF# 2966698: Socket connect with timeout issue
+- fixed SF# 2981041: Bind NULL to a query (patch supplied)
+- fixed SF# 2961419: UTF8Encoding::convert() doesn't work properly in DEBUG mode
+- fixed SF# 2957068: Timeout value not picked up by proxy in HTTPSClientSession
+- fixed NetSSL_OpenSSL test runner for Poco::Util::Application class changes
+- Poco::AbstractEvent, Poco::AbstractCache and related classes now accept a Mutex class as additional template argument.
+ Poco::NullMutex can be used if no synchronization is desired.
+- Added Poco::AbstractEvent::empty() to check whether an event has registered delegates.
+- Poco::URI now correctly handles IPv6 addresses.
+- Added Poco::Nullable class template.
+- Added Poco::NullMutex, a no-op mutex to be used as template argument for template classes
+ taking a mutex policy argument.
+- Poco::XML::XMLWriter: fixed a namespace handling issue that occured with startPrefixMapping() and endPrefixMapping()
+- Poco::Net::Context now allows for loading certificates and private keys from Poco::Crypto::X509Certificate objects
+ and Poco::Crypto::RSAKey objects.
+- Poco::Crypto::RSAKey no longer uses temporary files for stream operations. Memory buffers are used instead.
+- fixed SF# 2957865: added Poco::UUID::tryParse()
+- All Zip classes now use Poco::File[Input|Output]Stream instead of std::[i|o]fstream.
+ UTF-8 filenames will now be handled correctly on Windows.
+- fixed SF# 2902029: zlib flush support (Z_SYNC_FLUSH)
+- added Poco::TextBufferIterator class
+- fixed SF# 2977249: Use epoll instead select under Linux
+ Socket::select() and Socket::poll() will use epoll under Linux if the Net library is compiled
+ with -DPOCO_HAVE_FD_EPOLL. This is the default for the Linux build configuration (but not for
+ the various build configurations targeting embedded Linux platforms).
+- fixed SF# 2941664: Memory leak in DeflatingStream with zero-length streams (also fixed some other potential,
+ but unlikely, memory leaks)
+- fixed SF# 2946457: added RejectCertificateHandler
+- fixed SF# 2946621: Poco::Path bug with POCO_WIN32_UTF8
+- fixed SF# 2929805: Environment::nodeId() does not work if no eth0 device exists
+- Environment::nodeId() no longer throws if no hardware ethernet address can be determined.
+ It returns an all-zero address instead.
+- Added additional classification functions to Poco::Unicode class; made classification functions inline.
+- added Ascii class for ASCII character classification.
+ Methods of the Ascii class are now used instead of the
+ standard library functions (std::isspace(), etc.) due to
+ possible inconsistent results or assertions when the
+ standard library functions are used with character codes
+ outside the ASCII range.
+- Poco::Net::MailMessage: fixed a bug in StringPartHandler that resulted in incorrect handling of non-ASCII data if
+ char is signed.
+- Improved Poco::Net::SMTPClientSession compatibility with various mail servers when using AUTH_LOGIN authentication.
+- Added CRAM-SHA1 support to Poco::Net::SMTPClientSession
+- Poco::Net::SMTPClientSession now also supports login with AUTH PLAIN.
+- Added Poco::Net::SecureSMTPClientSession class, supporting STARTTLS for secure SMTP connections.
+- fixed an issue with SharedMemory on POSIX systems, where a shared memory region would be deleted
+ despite the server flag set to true (see http://pocoproject.org/forum/viewtopic.php?f=12&t=3494).
+- PageCompiler: added a new page context directive, to allow passing custom context objects to the
+ request handler.
+- fixed StreamSocketImpl::sendBytes() for non-blocking sockets
+- added Poco::Net::DialogSocket::receiveRawBytes(), which should be used instead of receiveBytes() due to internal
+ buffering by DialogSocket.
+- DOMParser: FEATURE_WHITESPACE has been renamed to FEATURE_FILTER_WHITESPACE (which now matches the underlying URI)
+ and is now handled correctly (previously we did the exact reverse thing)
+- added Poco::Util::AbstractConfiguration::remove() to remove a configuration property; added removeRaw() implementations
+ to all implementations (contributions by Daniel Hobi and Alexey Shults).
+- fixed NetSSL_OpenSSL compilation error on Windows with OpenSSL 1.0
+- Added optional FIPS mode support to NetSSL_OpenSSL (contributed by Lior Okman).
+ If OpenSSL has been configured and built with FIPS support, then FIPS support can
+ be enabled by calling Poco::Crypto::OpenSSLInitializer::enableFIPSMode(true); or
+ by setting the fips property in the OpenSSL configuration to true (see Poco::Net::SSLManager
+ for details).
+- fixed SF# 3031530: Ping and possible no timeout
+- added Poco::Net::SocketReactor::onBusy(), called whenever at least one notification will
+ be dispatched.
+- fixed SF# 3034863: Compiler warning in net/IPAddress.h with poco 1.3.2
+- added support for CRAM-SHA1 authentication to SMTPClientSession
+- Poco::format(): arguments can now be addressed by their index, e.g. %[2]d
+- Poco::Util::Timer::cancel() now accepts an optional boolean argument.
+ If true is passed, cancel() waits until the task queue has been purged.
+ Otherwise, it returns immediately and works asynchronously, as before.
+- Poco::Net::HTTPServerResponse::redirect() now accepts an optional additional
+ argument to specify the HTTP status code for the redirection.
+- fixed a warning (BinaryReader.cpp) and error (ThreadLocal.cpp) in Foundation when compiling with Visual Studio 2010
+- fixed a wrong exception in Poco::Net::POP3ClientSession
+- Poco::Net::FTPClientSession and Poco::Net::SMTPClientSession now set the error code in exceptions they throw
+- fixed a potential race condition with terminating a Windows service based on Poco::Util::ServerApplication
+- fixed a bug in global build configuration file: explicitly setting POCO_CONFIG did not work on Solaris platforms,
+ as it was always overridden by the automatically determined configuration.
+- Added support for MinGW cross builds on Linux.
+- Changed location of statically linked build products in the gmake-based build system.
+ Statically linked executables are now in bin/$(OSNAME)/$(OSARCH)/static and no longer
+ have the _s suffix
+- The POCO_VERSION macro now is in its own header file, "Poco/Version.h". It is no longer
+ available through "Poco/Foundation.h".
+- added Poco::Net::HTTPCookie::escape() and Poco::Net::HTTPCookie::unescape().
+- fixed SF# 3021173: Thread (POSIX) returns uninitialised value for OS priority
+- fixed SF# 3040870: ThreadPool has no function to get assigned name
+- fixed SF# 3044303: Can't use own config file on Solaris & OSARCH_64BITS ignored
+- fixed SF# 2943896: AsyncChannel::log blocks
+- fixed a bug in Poco::Util::WinRegistryKey::getInt():
+ The size variable passed to RegQueryValueExW() should be initialized to the size
+ of the output buffer.
+- Added rudimentary support for compiling with Clang 2.0 (Xcode 4) on Mac OS X.
+- New build configurations for Mac OS X: Darwin32 and Darwin64 for explicit
+ 32-bit and 64-bit builds. Note that the default Darwin build configuration
+ will build 64-bit on Snow Leopard and 32-bit on Leopard, but will always place
+ build products in Darwin/i386. The new Darwin32 and Darwin64 configurations
+ will use the correct directories.
+- fixed SF# 3051598: Bug in URL encoding
+- Poco::ThreadPool::stopAll() (and thus also the destructor) will now wait for each
+ pooled thread to terminate before returning. This fixes an issue with creating
+ and orderly shutting down a thread pool in a plugin. Previously, a pooled thread
+ in a thread pool created by a dynamically loaded library might still be running
+ when the plugin's shared library was unloaded, resulting in Bad Things happening.
+ This can now no longer happen. As a downside, a pooled thread that fails to
+ finish will block stopAll() and the destructor forever.
+- NetSSL_OpenSSL: for a SecureStreamSocket, available() now returns the number of bytes that
+ are pending in the SSL buffer (SSL_pending()), not the actual socket buffer.
+- Added Poco::Net::HTTPClientSession::secure() to check for a secure connection.
+- Poco::Net::HTTPRequest::setHost() now does not include the port number in the Host header
+ if it's either 80 or 443.
+- log messages can now optionally include source file path and line number
+- Poco::PatternFormatter can format source file path and line number (%U, %u)
+- logging macros (poco_information(), etc.) now use __LINE__ and __FILE__
+- new logging macros that incorporate Poco::format(): poco_information_f1(logger, format, arg) with up to 4 arguments
+- added Poco::Net::HTTPSession::attachSessionData() and Poco::Net::HTTPSession::sessionData()
+ to attach arbitrary data to a HTTP session.
+- added additional constructors to zlib stream classes that allow passing
+ a windowBits parameter to the underlying zlib library.
+- fixed a potential error handling issue in Poco::Net::SecureSocketImpl.
+- fixed SF# 3110272: RSACipherImpl bug.
+- fixed SF# 3081677: ConfigurationView's getRaw not retrieving xml attributes.
+- added basic support for Canonical XML and better pretty-printing support to Poco::XML::XMLWriter.
+- Poco::Util::AbstractConfiguration now supports events fired when changing or
+ removing properties.
+- XML: added support for finding DOM nodes by XPath-like
+ expressions. Only a very minimal subset of XPath is supported.
+ See Poco::XML::Element::getNodeByPath(), Poco::XML::Element::getNodeByPathNS()
+ and the same methods in Poco::XML::Document.
+- Poco::Timer: If the callback takes longer to execute than the
+ timer interval, the callback function will not be called until the next
+ proper interval. The number of skipped invocations since the last
+ invocation will be recorded and can be obtained by the callback
+ by calling skipped().
+- Poco::BinaryReader and Poco::BinaryWriter now support reading and
+ writing std::vectors of the supported basic types. Also, strings
+ can now be written in a different encoding (a Poco::TextEncoding
+ can be optionally passed to the constructor).
+- Poco::UUID::nil() and Poco::UUID::isNil() have been renamed to
+ Poco::UUID::null() and Poco::UUID::isNull(), respectively, to avoid
+ issues with Objective-C++ projects on Mac OS X and iOS where nil is
+ a system-provided macro.
+- Crypto bugfixes: RSACipherImpl now pads every block of data, not just the
+ last (or last two).
+- Improved Crypto testsuite by adding new tests
+- Added new Visual Studio project configurations: debug_static_mt and release_static_mt
+ (linking with static runtime libraries). The existing configurations debug_static
+ and release_static have been renamed to debug_static_md and release_static_md, respectively.
+ The suffixes of the static libraries have also changed. The static_md configurations
+ now build libraries with suffixes md[d], while the libraries built by the static_mt
+ configurations have mt[d] suffixes.
+- Added Visual Studio project files for 64-bit builds.
+- Added Visual Studio 2010 project files.
+- Removed the use of local static objects in various methods due to
+ their construction not being threadsafe (and thus leading to
+ potential race conditions) on Windows/Visual C++.
+- Fixed some warning on 64-bit Windows builds.
+- The name of the Data connector libraries have changed. They are now
+ named PocoDataMySQL, PocoDataODBC and PocoDataSQLite.
+- fixed SF# 3125498: Linux NetworkInterface::list() doesn't return IPv6 IPs
+- fixed SF# 3125457: IPv6 IPAddress tests are wrong
+- Added initialization functions for the NetSSL_OpenSSL and Crypto libraries.
+ These should be called instead of relying on automatic initialization,
+ implemented with static initializer objects, as this won't work with
+ statically linked executables (where the linker won't include the
+ static initializer object).
+ The functions are Poco::Crypto::initializeCrypto(), Poco::Crypto::uninitializeCrypto(),
+ Poco::Net::initializeSSL() and Poco::Net::uninitializeSSL().
+ Applications using Crypto and/or NetSSL should call these methods appropriately at
+ program startup and shutdown.
+ Note: In release 1.3.6, similar functions have been added to the Net library.
+
+
+Release 1.3.6p2 (2010-01-15)
+============================
+
+- fixed an issue in the Windows implementation Poco::RWLock, where
+ tryReadLock() sometimes would return false even if no writers
+ were using the lock (fix contributed by Bjrn Carlsson)
+- added Poco::Environment::libraryVersion().
+- fixed SF# 2919461: Context ignores parameter cypherList
+- removed an unused enum from RSACipherImpl.cpp (Crypto)
+- integrated a new expat patch for CVE-2009-3560.
+- fixed SF# 2926458: SSL Context Problem. The Poco::Net::Context
+ class now makes sure that OpenSSL is properly initialized.
+- updated iPhone build configuration (contributed by Martin York)
+- fixed SF# 1815124 (reopened): XML Compile failed on VS7.1 with
+ XML_UNICODE_WCHAR_T
+- fixed SF# 2932647: FTPClientSession::getWorkingDirectory() returns a bad result
+
+
+Release 1.3.6p1 (2009-12-21)
+============================
+
+- added support for using external zlib, pcre, expat and sqlite3 instead of
+ bundled ones (-DPOCO_UNBUNDLED, configure --unbundled)
+- fixed SF# 2911407: Add sh4 support
+- fixed SF# 2912746: RSAKey::EXP_LARGE doesn't work
+- fixed SF# 2904119: abstractstrategy uses std::set but do not includes it
+- fixed SF# 2909946: localtime NULL pointer
+- fixed SF# 2914986: potential expat DoS security issues (CVE-2009-3560 and CVE-2009-3720)
+- fixed SF# 2916305: SSL Manager crashes
+- fixed SF# 2903676: Tuple TypeHander does not handle composites.
+
+
+Release 1.3.6 (2009-11-24)
+==========================
+
+- added Environment::processorCount()
+- added POCO_VERSION macro to Poco/Foundation.h
+- fixed SF# 2807527: Poco::Timer bug for long startInterval/periodic interval
+- fixed a bug similar to SF# 2807527 in Poco::Util::Timer.
+- fixed SF# 2795395: Constructor doesn't treat the params "key" and "iv"
+- fixed SF# 2804457: DateTime::checkLimit looks wrong
+- fixed SF# 2804546: DateTimeParser requires explicit RFC1123 format
+- added ReleaseArrayPolicy to Poco::SharedPtr
+- upgraded to SQLite 3.6.20
+- fixed SF# 2782709: Missing semicolons in "Logger.h" convenience
+- fixed SF# 2526407: DefaultStrategy.h ++it instead of it++ in a loop
+- fixed SF# 2502235: Poco STLPort patch
+- fixed SF# 2186643: Data::Statement::reset() not implemented in 1.3.3
+- fixed SF# 2164227: Allow File opened read only by FileInputSteam to be writable
+- fixed SF# 2791934: use of char_traits::copy in BufferedStreamBuf::underflow
+- fixed SF# 2807750: Support additional SQL types in SQLite
+- fixed documentation bugs in Timed/PriorityNotificationQueue
+- fixed SF# 2828401: Deadlock in SocketReactor/NotificationCenter (also fixes patch# 1956490)
+ NotificationCenter now uses a std::vector internally instead of a std::list, and the mutex is
+ no longer held while notifications are sent to observers.
+- fixed SF# 2835206: File_WIN32 not checking aganist INVALID_HANDLE_VALUE
+- fixed SF# 2841812: Posix ThreadImpl::sleepImpl throws exceptions on EINTR
+- fixed SF# 2839579: simple DoS for SSL TCPServer, HTTPS server
+ No SSL handshake is performed during accept() - the handshake is delayed until
+ sendBytes(), receiveBytes() or completeHandshake() is called for the first time.
+ This also allows for better handshake and certificate validation when using
+ nonblocking connections.
+- fixed SF# 2836049: Possible handle leak in FileStream
+ If sync() fails, close() now simply set's the stream's bad bit.
+ In any case, close() closes the file handle/descriptor.
+- fixed SF# 2814451: NetSSL: receiveBytes crashes if socket is closed
+- added a workaround for Vista service network initialization issue
+ (an Windows service using the Net library running under Vista will
+ crash in the call to WSAStartup() done in NetworkInitializer).
+ Workaround is to call WSAStartup() in the application's main().
+ Automatic call to WSAStartup() in the Net library can now be disabled
+ by compiling Net with -DPOCO_NET_NO_AUTOMATIC_WSASTARTUP. Also
+ the new Poco::Net::initializeNetwork() and Poco::Net::uninitializeNetwork()
+ functions can be used to call WSAStartup() and WSACleanup(), respectively,
+ in a platform-independent way (on platforms other than Windows, these
+ functions will simply do nothing).
+- added VCexpress build script support (contributed by Jolyon Wright)
+- fixed SF# 2851052: Poco::DirectoryIterator copy constructor is broken
+- fixed SF# 2851197: IPAddress ctor throw keyword missing
+- added Poco::ProtocolException
+- PageCompiler improvements: new tags, support for buffered output, etc.
+- better error reporting in Data MySQL connector (patch #2881270 by Jan "HanzZ" Kaluza)
+- fixed SF# 1892462: FTPClient:Choose explicitely between EPSV and PASV
+- fixed SF# 2806365: Option for PageCompiler to write output to different dir
+- fixed a documentation bug (wrong sample code) in Process::launch() documentation
+- added --header-output-dir option to PageCompiler
+- fixed SF# 2849144: Zip::Decompress notifications error
+- SAXParser has a new feature: "http://www.appinf.com/features/enable-partial-reads".
+ See ParserEngine::setEnablePartialReads() for a description of what this does.
+- fixed SF# 2876179: MySQL Signed/Unsigned value bug
+- fixed SF# 2877970: possible bug in timer task
+- fixed SF# 2874104: wrong parsing empty http headers
+- fixed SF# 2860694: Incorrect return code from SecureStreamSocketImpl::sendBytes
+- fixed SF# 2849750: Possible bug with XMLWriter?
+- added MailMessage::encodeWord() to support RFC 2047 word encoded
+ mail header fields when sending out mail containing non-ASCII
+ characters.
+- fixed SF# 2890975: SMTPClientSession bug with 7BIT encoding
+- fixed an issue with retrieving the value of socket options on Windows 7.
+ Before obtaining the value of a socket, we now initialize the variable receiving the
+ socket option value to zero.
+- fixed SF# 2836141: Documentation errors
+- fixed SF# 2864232: Socket::select() does not detect closed sockets on windows
+- fixed SF# 2812143: Socket::select() should check socket descriptors...
+- fixed SF# 2801750: NetworkInterface forName returns wrong subnetMask
+- fixed SF# 2816315: Problem with POSIX Thread::sleepImpl
+- fixed SF# 2795646: IPv6 address parsing bug
+- fixed #0000092: ServerApplication::waitForTerminationRequest(), SIGINT and GDB.
+ Poco::Util::ServerApplication::waitForTerminationRequest() no longer registers a
+ signal handler for SIGINT if the environment variable POCO_ENABLE_DEBUGGER
+ is defined.
+- fixed SF# 2896070: Poco::Net::Context with non-ASCII paths
+- added Unicode Surrogate support to Poco::UTF16Encoding.
+ See Poco::TextEncoding::queryConvert() and Poco::TextEncoding::sequenceLength()
+ for how this is implemented. Contributed by Philippe Cuvillier.
+- fixed SF# 2897650: [branch 1.3.6] Net.SocketAddress won't compile for CYGWIN
+- fixed SF# 2896161: Building on Windows fails when basedir has space in it
+- fixed SF# 2864380: Memory leak when using secure sockets
+- NetSSL_OpenSSL: the SSL/TLS session cache is now disabled by default and
+ can be enabled per Context using Poco::Net::Context::enableSessionCache().
+- fixed SF# 2899039: Wrong DST handling in LocalDateTime
+- added RWLock::ScopedReadLock and RWLock::ScopedWriteLock (contributed by Marc Chevrier)
+- added Thread::TID type, as well as Thread::tid() and Thread::currentTid() to obtain the native
+ thread handle/ID
+- added Zip file comment support
+- On Windows, Poco::SharedLibrary::load() now uses LoadLibraryEx instead of LoadLibrary
+ and uses the LOAD_WITH_ALTERED_SEARCH_PATH if an absolute path is specified. This will
+ add the directory containing the library to the search path for DLLs that the
+ loaded library depends upon.
+- Mac OS X build settings now match those used by default Xcode projects, making linking the
+ POCO libs to Xcode projects easier
+- Replaced use of std::valarray in Poco::Net::ICMPEventArgs with std::vector due to issues with
+ std::valarray together with STDCXX debug mode on OS X
+
+
+Release 1.3.5 (2009-05-11)
+==========================
+
+- fixed SF# 2779410: Poco::Data::ODBC::HandleException impovement
+- fixed wrong exception text for Poco::UnhandledException
+- Fixed a problem with SSL shutdown that causes clients (web browsers)
+ to hang when the server attempts to perform a clean SSL shutdown. We now call
+ SSL_shutdown() once, even if the shutdown is not complete after the first call.
+- added Poco::Crypto::X509Certificate::save()
+- fixed a bug in Poco::Zip::Decompress that results in wrong paths for extracted files
+- fixed a bug in Poco::Zip::ZipManipulator where the Zip file was opened in text format
+ on Windows.
+- added Poco::Crypto::X509Certificate::issuedBy() to verify certificate chain.
+- fixed 0000089: Thread::sleep() on Linux is extremely inaccurate
+- added methods to extract the contents of specific fields from the
+ subject and issuer distinguished names of a certificate.
+
+
+Release 1.3.4 (2009-04-21)
+==========================
+
+- fixed SF# 2611804: PropertyFileConfiguration continuation lines
+- fixed SF# 2529788: ServerApplication::beDaemon() broken
+- fixed SF# 2445467: Bug in Thread_WIN32.cpp
+- Improved performance of HTTP Server by removing some
+ string copy operations
+- fixed SF# 2310735: HTTPServer: Keep-Alive only works with send()
+- fixed appinf.com IP address in Net testsuite
+- fixed RFC-00188: NumberFormatter and float/double numbers
+- added --pidfile option to ServerApplication on Unix
+- fixed SF# 2499504: Bug in Win32_Thread when using from dll (fixed also for POSIX threads)
+- fixed SF# 2465794: HTTPServerRequestImpl memory leak
+- fixed SF# 2583934: Zip: No Unix permissions set
+- the NetSSL_OpenSSL library has been heavily refactored
+- added NumberFormatter::append*() and DateTimeFormatter::append() functions
+- use NumberFormatter::append() and DateTimeFormatter::append() instead of format() where
+ it makes sense to gain some performance
+- added system.dateTime and system.pid to Poco::Util::SystemConfiguration
+- added %F format specifier (fractional seconds/microseconds) to DateTimeFormatter,
+ DateTimeParser and PatternFormatter.
+- fixed SF# 2630476: Thread_POSIX::setStackSize() failure with g++ 4.3
+- fixed SF# 2679279: Handling of -- option broken
+- added compile options to reduce memory footprint of statically linked applications
+ by excluding various classes from automatically being linked.
+ See the POCO_NO_* macros in Poco/Config.h.
+- fixed SF# 2644940: on Windows the COMPUTER-NAME and the HOSTNAME can be different
+- added DNS::hostName() function
+- added build configuration for iPhone (using Apple's SDK)
+- basic support for AIX 5.x/xlC 8
+- fixed a bug resulting in a badly formatted exception message with IOException
+ thrown due to a socket-related error
+- fixed SF# 2644718: NetworkInterface name conflict in MinGW
+- added a missing #include to CryptoTransform.h
+- fixed SF# 2635377: HTTPServer::HTTPServer should take AutoPtr
+- replaced plain pointers with smart pointers in some interfaces
+- upgraded to sqlite 3.6.13
+- improved Data::SQLite error reporting
+- Poco::Glob now works with UTF-8 encoded strings and supports case-insensitive comparison.
+ This also fixes SF# 1944831: Glob::glob on windows should be case insensitve
+- added Twitter client sample to Net library
+- Fixed SF# 2513643: Seg fault in Poco::UTF8::toLower on 64-bit Linux
+- Poco::Data::SessionPool: the janitor can be disabled by specifying a zero idle time.
+- added Poco::Data::SessionPool::customizeSession()
+- added support for different SQLite transaction modes (DEFERRED, IMMEDIATE, EXCLUSIVE)
+- fixed a few wrong #if POCO_HAVE_IPv6 in the Net library
+- added support for creating an initialized, but unconnected StreamSocket.
+- added File::isDevice()
+- added family() member function to SocketAddress,
+- Data::SQLite: added support for automatic retries if the database is locked
+- XMLConfiguration is now writable
+- fixed an IPv6 implementation for Windows bug in HostEntry
+- Timer class improvement: interval between callback is no longer influenced by the
+ time needed to execute the callback.
+- added PriorityNotificationQueue and TimedNotificationQueue classes to Foundation.
+ These are variants of the NotificationQueue class that support priority and
+ timestamp-tagged notifications.
+- added Poco::Util::Timer class. This implements a timer that can schedule different
+ tasks at different times, using only one thread.
+- the signatures of Poco::NotificationQueue and Poco::NotificationCenter member functions
+ have been changed to accept a Poco::Notification::Ptr instead of Poco::Notification*
+ to improve exception safety. This change should be transparent and fully backwards
+ compatible. The signature of the methods returning a Poco::Notification* have not been
+ changed for backwards compatibility. It is recommended, that any Notification* obtained
+ should be immediately assigned to a Notification::Ptr.
+- SQLite::SessionImpl::isTransaction() now uses sqlite3_get_autocommit() to find out
+ about the transaction state.
+- refactored Crypto library to make it independent from NetSSL_OpenSSL.
+- added support for RSA-MD5 digital signatures to Crypto library.
+- removed SSLInitializer from NetSSL library (now moved to Crypto library)
+- added build configs for static libraries to Crypto library
+- OpenSSL now depends on Crypto library (which makes more sense than
+ vice versa, as it was before). Poco::Net::X509Certificate is now
+ a subclass of Poco::Crypto::X509Certificate (adding the verify()
+ member function) and the Poco::Net::SSLInitializer class was
+ moved to Poco::Crypto::OpenSSLInitializer.
+- added build configs for static libraries to Zip
+- added batch mode to CppUnit::WinTestRunner.
+ WinTestRunnerApp supports a batch mode, which runs the
+ test using the standard text-based TestRunner from CppUnit.
+ To enable batch mode, start the application with the "/b"
+ or "/B" command line argument. Optionally, a path to a file
+ where the test output will be written to may be given:
+ "/b:" or "/B:".
+ When run in batch mode, the exit code of the application
+ will denote test success (0) or failure (1).
+- testsuites now also work for static builds on Windows
+- The IPv6 support for Windows now basically works (Net library compiled with POCO_HAVE_IPv6)
+- fixed a potential error when shutting down openssl in a statically linked application
+- added static build configs to Data library
+- added Poco::AtomicCounter class, which uses OS-specific APIs for atomic (thread-safe)
+ manipulation of counter values.
+- Poco::RefCountedObject and Poco::SharedPtr now use Poco::AtomicCounter for
+ reference counting
+- fixed SF# 2765569: LoadConfiguration failing from current directory
+
+
+Release 1.3.3p1 (2008-10-09)
+============================
+
+- Fixed SF# 2153031: 1.3.3 Crypto won't compile on 64-bit Linux
+- Fixed a warning in MySQL connector
+- Updated README
+- The global Makefile in the Zip archive is no longer broken
+
+
+Release 1.3.3 (2008-10-07)
+==========================
+
+- Threads now have optional user-settable stack size (if the OS supports that feature)
+- Events now support simplified delegate syntax based on delegate function template.
+ See Poco::AbstractEvent documentation for new syntax.
+- Cache supports new access expire strategy.
+- Upgraded to SQLite 3.6.2
+- Upgraded to PCRE 7.8
+- added HttpOnly support to Poco::Net::HTTPCookie
+- NetworkInterface now has displayName() member (useful only on Windows)
+- Poco::Util::WinRegistryKey now has a read-only mode
+- Poco::Util::WinRegistryKey::deleteKey() can now recursively delete registry keys
+- Poco::File::created() now returns 0 if the creation date/time is not known, as
+ it's the case on most Unix platforms (including Linux).
+ On FreeBSD and Mac OS X, it returns the real creation time.
+- Time interval based log file rotation (Poco::FileChannel) now works
+ correctly. Since there's no reliable and portable way to find out the creation
+ date of a file (Windows has the tunneling "feature", most Unixes don't provide
+ the creation date), the creation/rotation date of the log file is written into
+ the log file as the first line.
+- added Environment::nodeId() for obtaining the Ethernet address of the system
+ (this is now also used by UUIDGenerator - the corresponding code from UUIDGenerator
+ was moved into Environment)
+- added a release policy argument to SharedPtr template
+- Socket::select() will no longer throw an InvalidArgumentException
+ on Windows when called with no sockets at all. If all three socket
+ sets are empty, Socket::select() will return 0 immediately.
+- SocketReactor::run() now catches exceptions and reports them via
+ the ErrorHandler.
+- SocketReactor has a new IdleNotification, which will be posted when
+ the SocketReactor has no sockets to handle.
+- added referenceCount() method to Poco::SharedPtr.
+- POCO now builds with GCC 4.3 (but there are some stupid warnings:
+ "suggest parentheses around && within ||".
+- Solution and project files for Visual Studio 2008 are included
+- The Zip library is now officially part of the standard POCO release.
+- The Crypto library (based on OpenSSL) has been added. The original code
+ was kindly contributed by Ferdinand Beyer.
+- A Data Connector to MySQL, contributed by Sergey Kholodilov, is now part
+ of the POCO release.
+- fixed SF# 1859738: AsyncChannel stall
+- fixed SF# 1815124: XML Compile failed on VS7.1 with XML_UNICODE_WCHAR_T
+- fixed SF# 1867340: Net and NetSSL additional dependency not set - ws2_32.lib
+- fixed SF# 1871946: no exception thrown on error
+- fixed SF# 1881113: LinearHashTable does not conform to stl iterators
+- fixed SF# 1899808: HTMLForm.load() should call clear() first
+- fixed SF# 2030074: Cookie problem with .NET server
+- fixed SF# 2009707: small bug in Net/ICMPPacketImpl.cpp
+- fixed SF# 1988579: Intel Warning: invalid multibyte character sequence
+- fixed SF# 2007486: Please clarify license for Data/samples/*
+- fixed SF# 1985180: Poco::Net::DNS multithreading issue
+- fixed SF# 1968106: DigestOutputStream losing data
+- fixed SF# 1980478: FileChannel loses messages with "archive"="timestamp"
+- fixed SF# 1906481: mingw build WC_NO_BEST_FIT_CHARS is not defined
+- fixed SF# 1916763: Bug in Activity?
+- fixed SF# 1956300: HTTPServerConnection hanging
+- fixed SF# 1963214: Typo in documentation for NumberParser::parseFloat
+- fixed SF# 1981865: Cygwin Makefile lacks ThreadTarget.cpp
+- fixed SF# 1981130: pointless comparison of unsigned integer with zero
+- fixed SF# 1943728: POCO_APP_MAIN namespace issue
+- fixed SF# 1981139: initial value of reference to non-const must be an lvalue
+- fixed SF# 1995073: setupRegistry is broken if POCO_WIN32_UTF8 enabled
+- fixed SF# 1981125: std::swap_ranges overloading resolution failed
+- fixed SF# 2019857: Memory leak in Data::ODBC Extractor
+- fixed SF# 1916761: Bug in Stopwatch?
+- fixed SF# 1951443: NetworkInterface::list BSD/QNX no netmask and broadcast addr
+- fixed SF# 1935310: Unhandled characters in Windows1252Encoding
+- fixed SF# 1948361: a little bug for win32
+- fixed SF# 1896482: tryReadLock intermittent error
+- workaround for SF# 1959059: Poco::SignalHandler deadlock
+ the SignalHandler can now be disabled globally by adding a
+ #define POCO_NO_SIGNAL_HANDLER to Poco/Config.h
+- fixed SF# 2012050: Configuration key created on read access
+- fixed SF# 1895483: PCRE - possible buffer overflow
+- fixed SF# 2062835: Logfile _creationDate is wrong
+- fixed SF# 2118943: out_of_bound access in Poco::Data::BLOB:rawContent
+- fixed SF# 2121732: Prevent InvalidArgumentException in SocketReactor
+- fixed SF# 1891132: Poco::Data::StatementImpl::executeWithLimit is not correct
+- fixed SF# 1951604: POCO refuses to compile with g++ 4.3.0
+- fixed SF# 1954327: CYGWIN's pthread does not define PTHREAD_STACK_MIN
+- fixed SF# 2124636: Discrepancy between FileWIN32(U)::handleLastError
+- fixed SF# 1558300: MinGW/MSYS Builds
+- fixed SF# 2123266: Memory leak under QNX6 with dinkum library
+- fixed SF# 2140411: ScopedUnlock documentation bug
+- fixed SF# 2036460: UUID regression tests are failing on Linux with g++ 4.3.1
+- fixed SF# 2150438: Tuple TypeHandler position increment size is wrong
+
+
+Release 1.3.2 (2008-02-04)
+==========================
+
+Foundation, XML, Net, Util:
+- added POCO_NO_SHAREDMEMORY to Config.h
+- POCO_NO_WSTRING now really disables all wide string related calls
+- added template specialization for string hashfunction (performance)
+- XML parser performance improvements (SAX parser is now up to 40 % faster
+- added parseMemoryNP() to XMLReader and friends
+- URIStreamOpener improvement: redirect logic is now in URIStreamOpener.
+ this enables support for redirects from http to https.
+- added support for temporary redirects and useproxy return code
+- added getBlocking() to Socket
+- added File::isHidden()
+- better WIN64 support (AMD64 and IA64 platforms are recognized)
+- added support for timed lock operations to [Fast]Mutex
+- SharedLibrary: dlopen() is called with RTLD_GLOBAL instead of RTLD_LOCAL
+ (see http://gcc.gnu.org/faq.html#dso)
+- Poco::Timer threads can now run with a specified priority
+- added testcase for SF# 1774351
+- fixed SF# 1784772: Message::swap omits _tid mem
+- fixed SF# 1790894: IPAddress(addr,family) doesn't fail on invalid address
+- fixed SF# 1804395: Constructor argument name wrong
+- fixed SF# 1806807: XMLWriter::characters should ignore empty strings
+- fixed SF# 1806994: property application.runAsService set too late
+- fixed SF# 1828908: HTMLForm does not encode '+'
+- fixed SF# 1831871: Windows configuration file line endings not correct.
+- fixed SF# 1845545: TCP server hangs on shutdown
+- fixed SF# 1846734: Option::validator() does not behave according to doc
+- fixed SF# 1856567: Assertion in DateTimeParser::tryParse()
+- fixed SF# 1864832: HTTP server sendFile() uses incorrect date
+- HTTPServerResponseImpl now always sets the Date header automatically
+ in the constructor.
+- fixed SF# 1787667: DateTimeFormatter and time related classes
+ (also SF# 1800031: The wrong behavior of time related classes)
+- fixed SF# 1829700: TaskManager::_taskList contains tasks that never started
+- fixed SF# 1834127: Anonymous enums in Tuple.h result in invalid C++
+- fixed SF# 1834130: RunnableAdapter::operator= not returning a value
+- fixed SF# 1873924: Add exception code to NetException
+- fixed SF# 1873929: SMTPClientSession support for name in sender field
+- logging performance improvements (PatternFormatter)
+- fixed SF# 1883871: TypeList operator < fails for tuples with duplicate values
+- CYGWIN build works again (most things work but Foundation testsuite still fails)
+- new build configuration for Digi Embedded Linux (ARM9, uclibc)
+- new build configuration for PowerPC Linux
+
+Data:
+- fixed SF# 1724388: ODBC Diagnostics
+- fixed SF# 1804797: ODBC Statement multiple execution fails
+- fixed SF# 1803435: SessionPool onJanitorTimer called too often?
+- fixed SF# 1851997: Undefined Behavior in ODBC::Preparation
+- updated SQlite to 3.5.5
+
+
+Release 1.3.1 (2007-08-08)
+==========================
+
+Foundation, XML, Net, Util:
+- DynamicAny fixes for char conversions
+- fixed SF# 1733362: Strange timeout handling in SocketImpl::poll and Socket::select
+- fixed SF patch# 1728912: crash in POCO on Solaris
+- fixed SF# 1732138: Bug in WinRegistryConfiguration::getString
+- fixed SF# 1730790: Reference counting breaks NetworkInterface::list()
+- fixed SF# 1720733: Poco::SignalHandler bug
+- fixed SF# 1718724: Poco::StreamCopier::copyStream loops forever
+- fixed SF# 1718437: HashMap bug
+- changed LinearHashTable iterator implementation. less templates -> good thing.
+- fixed SF# 1733964: DynamicAny compile error
+- UUIDGenerator: fixed infinite loop with non ethernet interfaces
+- updated expat to 2.0.1
+- fixed SF# 1730566: HTTP server throws exception
+- Glob supports symbolic links (additional flag to control behavior)
+- fixed a problem with non blocking connect in NetSSL_OpenSSL
+ (see http://www.appinf.com/poco/wiki/tiki-view_forum_thread.php?comments_parentId=441&topics_threshold=0&topics_offset=29&topics_sort_mode=commentDate_desc&topics_find=&forumId=6)
+- fixed a problem with SSL renegotiation in NetSSL_OpenSSL (thanks to Sanjay Chouksey for the fix)
+- fixed SF# 1714753: NetSSL_OpenSSL: HTTPS connections fail with wildcard certs
+- HTTPClientSession: set Host header only if it's not already set (proposed by EHL)
+- NetworkInterface (Windows): Loopback interface now has correct netmask;
+ interfaces that do not have an IP address assigned are no longer reported.
+- Fixes for VC++ W4 warnings from EHL
+- SharedMemory: first constructor has an additional "server" parameter
+ Setting to true does not unlink the shared memory region when the SharedMemory object is destroyed. (Alessandro Oliveira Ungaro)
+- fixed SF# 1768231: MemoryPool constructor
+
+Data:
+- fixed SF# 1739989: Data::RecordSet::operator = () (in 1.3 branch)
+- fixed SF# 1747525: SQLite, Transactions and Session Pooling (in 1.3 branch)
+- upgraded to SQLite 3.4.1
+
+
+Release 1.3.0 (2007-05-07)
+==========================
+
+- added HashMap, HashSet classes
+- the HashFunction class template has been changed in an incompatible
+ way. The member function formerly named hash() is now the function
+ call operator. If you have defined your own HashFunction classes,
+ you have to update your code. Sorry for the inconvenience.
+- added Poco::Tuple
+- added AbstractCache::getAllKeys(), improved performance of the get operation
+- fixed AbstractCache::size() to do cache replacement before returning the size
+- added additional match() method to RegularExpression and documented the fact that the simple
+ match() method internally sets RE_ANCHORED and RE_NOTEMPTY.
+- added ExpirationDecorator template. Decorates data types so that they can be used with UniqueExpireCaches
+- added operator ! to AutoPtr and SharedPtr
+- Buffer uses std::size_t instead of int
+- Exception::what() now returns exception name instead of message
+- added poco_ndc_dbg() macro (same as poco_ndc(), but only enabled in debug builds)
+- added Environment::get(name, defaultValue);
+- Foundation.h now includes Config.h at the very beginning.
+- added replace() and replaceInPlace() to Poco/String.h
+- added AutoPtr::assign() and SharedPtr::assign()
+- added operator () to AbstractEvent
+- gcc Makefiles now strip release builds
+- Void now has a == and != operator
+- Base64Encoder and HexBinaryEncoder now support an unlimited line length
+ (no newlines written), by specifying a line length of 0
+- NumberParser now has stricter syntax requirements: garbage following a number leads to a SyntaxException
+ (Thanks to phireis@gmail.com for the suggestion)
+- fixed SF# 1676830: Don't use -rpath in libraries
+- fixed SF# 1670279: AbstractConfiguration::unckeckedExpand crash
+- fixed a warning in Hashtable
+- HTTPClientSession now uses a keepAliveTimeout for better persistent connection handling
+- added DateTime::makeUTC() and DateTime::makeLocal()
+- added another constructor to LocalDateTime
+- POCO_WIN32_UTF8 is ignored on non-Windows platforms
+- fixed a timeout bug (with NetSSL) in HTTPSession
+- AsyncChannel is automatically opened with first log()
+- minor fix to NotificationQueue sample (reported by Laszlo Keresztfalvi)
+- added File::canExecute() and File::setExecutable()
+- added SharedMemory class to Foundation
+- added FileStream, FileInputStream, FileOutputStream to Foundation
+- added NodeAppender class to XML for faster DOM tree creation
+- HTTPServerRequest and HTTPServerResponse are now abstract base classes,
+ actual functionality has moved into HTTPServerRequestImpl and
+ HTTPServerResponseImpl. This allows us to plug other HTTP servers
+ into POCO.
+- added DynamicAny class to Foundation
+- replaced std::fstream with Poco::FileStream across POCO.
+- added Poco::Checksum class to Foundation.
+- fixed SF# 1700811: conflict in threadpool
+- bugfix: File::moveTo() does not work if the target is a directory
+- File::copyTo() and File::moveTo() now copy/move directories recursively
+- refactored NetworkInterface (now using pimpl idiom);
+ added broadcast address and netmask support
+- fixed SF# 1688982: POP3ClientSession fails when retrieving mails with attachment
+- fixed SF# 1655104: Enhance Poco::TextEncoding functionality
+- added Poco::Condition class, implementing a POSIX-style condition variable
+- fixed a bug in File::create() for Windows
+- added poco_static_assert (imported from boost)
+- added Thread::join(timeout) and Thread::tryJoin()
+- ClassLoader support for named manifests (see ClassLibrary.h - POCO_EXPORT_NAMED_MANIFEST)
+- POCO_WIN32_UTF8: UNICODE #define is no longer required (and no longer
+ automatically defined in POCO_WIN32_UTF8 is defined)
+- PCRE: upgraded to PCRE version 7.1
+- fixed SF# 1682162: Suggestion on thread priority
+- fixed SF# 1613460: MSVC/STLPort warnings
+- fixed SF# 1709358: Format double percent std::String bug
+- added WindowsConsoleChannel class to Foundation
+- added AutoPtr::unsafeCast<>() and SharedPtr::unsafeCast<>()
+- fixed SF# 1708552: Failed to build on arm and powerpc
+- fixed SF$ 1708529: Failed to build using GCC 4.3: missing #includes
+- fixed SF# 1710053: LogStream proposal
+- fixed a bug involving empty root directories in Windows DirectoryIterator implementation
+ (see http://www.appinf.com/poco/wiki/tiki-view_forum_thread.php?comments_parentId=343&forumId=6)
+- robustness improvements to ActiveMethod - removed the opportunity for memory leaks in
+ case something goes while invoking the method
+- made C library usage more C++-like - use C++ headers (e.g. ) instead of
+ C ones (). Also, use C library functions in std namespace.
+- added Unicode and UTF8String for improved Unicode support.
+ The Unicode class can be used to obtain the Unicode properties of a character.
+ The UTF8 class provides case insensitive comparison and case conversion
+ for UTF-8 encoded strings.
+- added UnWindows.h header file, replaced all #include with #include "Poco/UnWindows.h".
+ See the Poco/UnWindows.h header file for a rationale and explanations.
+- fixed SF# 1713820: StreamSocketImpl::sendBytes sends too many bytes
+- File::copyTo(): on Windows, the copy now always has the read-only flag reset, to be consistent
+ with other platforms.
+- With Microsoft Visual C++, the necessary POCO libraries are now implicitly linked when
+ the corresponding header files are included (#pragma comment(lib, "PocoXYZ.lib") is used).
+ To disable this, compile POCO with the preprocessor symbol POCO_NO_AUTOMATIC_LIBS #define'd
+ (see Poco/Foundation.h and Poco/Config.h).
+- The Visual Studio project files for the POCO libraries now include configurations
+ for building static libraries.
+
+
+Release 1.2.9 (2007-02-26)
+==========================
+
+- fixed a formatting problem in Util::HelpFormatter
+- HTTPClientSession::sendRequest() now attempts to send the complete request in one network packet.
+- improved network performance of ChunkedOutputStream: chunk size and chunk data
+ are sent in one network packet if possible
+- fixed SF# 1655035: Wrong expires field calculation in HTTPCookie
+ (thanks to Sergey N. Yatskevich for this and other fixes)
+- fixed SF# 1655049: Fix discrepancy of a code to the description
+- fixed SF# 1655170: Poco::Timezone::standardName() problem on WIN32
+- fixed SF# 1629095: POCO_WIN32_UTF8 problem
+ There is a new function Path::transcode() that can be used to convert a path (or any other string)
+ from UTF-8 to the current Windows code page. This string can the be passed as a filename
+ to an fstream or fopen(). This function only does the conversion on Windows,
+ and only, if POCO_WIN32_UTF8 is defined. Otherwise, it simply returns the unmodified argument.
+- fixed SF# 1659607: Probably a bug in Poco::Net::DialogSocket
+- HTTPServer network performance improvement: responses that fit into a single network packet
+ sent with HTTPServerResponse::sendFile() or the new HTTPServerResponse::sendBuffer() are
+ sent in only one packet.
+- added HTTPServerResponse::sendBuffer()
+- HTTPServer now sends a Bad Request response if it fails to parse the HTTP request header.
+- HTTPServer now sends an Internal Server Error response if the request handler throws an
+ exception prior to sending a response.- enabled TCP_NODELAY per default on TCPServer/HTTPServer
+- fixed a bug in HTTP persistent connection handling
+ (server does not send Connection: close when it reaches connection maximum)
+- HTMLForm - POST submission of URL encoded form no longer uses chunked transfer encoding
+ (thus improving interoperability with certain web servers)
+- integrated Environment.cpp from Main (missing get(var, default))
+- added missing AutoPtr include to Util/Application
+ (and using Poco::AutoPtr is no longer necessary for POCO_APP_MAIN macro)
+- fixed SF# 1635420: Per Regents of the University of Calfornia letter,
+ remove advertising from BSD licensed parts
+- fixed SF# 1633133: MultipartWriter writes superluous CR-LF at beginning
+
+
+Release 1.2.8 (2007-01-04)
+==========================
+
+- fixed SF# 1613906: Util/Application.h and GCC 3.3
+- fixed a byte order issue (failed test) in IPv6 address formatting
+- fixed SF# 1626640: Poco::Net::SocketReactor bug
+- fixed client side chunked transfer encoding handling
+- fixed client side persistent connection handling
+- fixed SF# 1623536: HTTP Server Chunked Transfer Encoding Bug
+- improved HTTP server exception text
+- fixed SF# 1616294: KeepAlive HTTPServerSession patch
+- fixed SF# 1616296: Trivial Poco::TaskCustomNotification patch
+- fixed SF# 1619282: PurgeStrategy bug fix
+- fixed SF# 1620855: Format problem
+ there is a new format specifier %z for std::size_t, as well as a new
+ flag ? for %d, %i, %o, %x meaning any signed or unsigned integer
+
+
+Release 1.2.7 (2006-12-07)
+==========================
+
+- Poco::File: fixed root directory handling
+- fixed UUIDGenerator documentation
+- clarified Application::setUnixOptions() documentation
+- fixes for issue [SOAPLite Transport 0000023]: SOAP Transport Listener should be able to use existing HTTPServer instance
+- fixing mantis issues 13, 14, 15, 16, 17, 18, 19, 21
+- fixed SF# 1597022: Signed/unsigned warning in StringTokenizer::operator[]
+- fixed SF# 1598601: Message::op= leaks
+- fixed SF# 1605960: PatternFormatter crashes on custom property
+- fixed SF# 1605950: Memory leak in Logger sample code
+- fixed SF# 1591635: Copy Paste Error in sample code
+- fixed SF# 1591512: SMTPClientSession response stream
+- fixed SF #1592776: LayeredConfiguration: getRaw should enumerate in reverse order
+- SF Patch # 1599848 ] VS 2005 Util build fails
+- Logger::dump() now uses std::size_t instead of int for buffer size
+- LayeredConfiguration now supports a priority value for each configuration.
+ Also, it's possible to specify for each configuration added whether it
+ should be writeable.
+- ServerApplication: cd to root directory only if running as a daemon
+- added Message::swap()
+- improvements to build system:
+ global Makefile has correct dependencies for samples
+ on Windows, samples build after libraries are ready
+ configure supports --no-wstring and --no-fpenvironment flags
+ build system supports POCO_FLAGS environment variable for compiler flags
+- RemoteGen: fixed error handling for write protected files (SystemException)
+ fixing integral constant overflow messages with large cache expiration, m_ support for type serializers,
+ case-insensitive comparison added
+
+
+Release 1.2.6 (2006-11-19)
+==========================
+
+- added additional match() method to RegularExpression and documented the fact that the simple
+ match() method internally sets RE_ANCHORED and RE_NOTEMPTY.
+- added ExpirationDecorator template. Decorates data types so that they can be used with UniqueExpireCaches
+- added operator ! to AutoPtr and SharedPtr
+- Buffer uses std::size_t instead of int
+- added poco_ndc_dbg() macro (same as poco_ndc(), but only enabled in debug builds)
+- Foundation.h now includes Config.h at the very beginning.
+- added AutoPtr::assign() and SharedPtr::assign()
+- added operator () to AbstractEvent
+- gcc Makefiles now strip release builds
+- documentation improvements
+
+
+Release 1.2.5 (2006-10-23)
+==========================
+
+- Improved LoggingConfigurator: channel creation and configuration is now a two-step process.
+ This means that the previous problems with PropertyFileConfiguration and IniFileConfiguration when referencing other channels are solved.
+- improved options handling: better handling of (non) ambiguities.
+ If both an option named "help" and one named "helper" is specified, this no longer causes ambiguity errors.
+- added check for duplicate option definition
+- ThreadPool bugfix: fixed a crash that occurs on Linux multiprocessor machines
+ (caused by an thread unsafe string assignment corrupting the heap...)
+ (SF# 1575315)
+- improved ThreadPool performance
+- XML now compiles with -DXML_UNICODE_WCHAR_T (SF# 1575174)
+- fixed SF# 1572757: HTML forms can have more than one key/value pair with the same name
+- got rid of the dynamic casts in Events, Events/Cache: simpler/faster Delegate < operator,
+ prevents some rare dynamic casts error from occuring when using StrategyCollection with Caches
+- improvements to Logger and LoggingConfigurator:
+ * added Logger::unsafeGet()
+ * added Logger::setProperty(loggerName, propertyName, value)
+ * LoggingConfigurator now correctly (re)configures existing Loggers
+ (prior to this change, if a Logger named "a.b.c" existed before
+ the LoggingConfigurator started its work, and the LoggingConfigurator
+ configured a Logger named "a.b", then "a.b.c" would not inherit
+ the new configuration).
+- improvements to SplitterChannel and EventLogChannel configuration
+- improved LoggingRegistry exception messages
+- MessageHeader::read() is more liberal with malformed message headers.
+ This fixes problems with certain network cameras sending malformed HTTP headers.
+
+
+Release 1.2.4 (2006-10-02)
+==========================
+
+- some code beautifying and improvements to comments
+- DOMParser now automatically sets FEATURE_NAMESPACE_PREFIXES
+- fixed SF #1567051: DOMBuilder/DOMParser/NamespaceStrategy bug
+- fixed SF #1567364: POCO_APP_MAIN
+- added Document::getElementById() (two-argument) and getElementByIdNS()
+- added another test for DOMParser
+- added AutoPtr::isNull() (to be consistent with SharedPtr)
+- this release again compiles on PA-RISC HP-UX systems with aCC
+- added CMAKE support files contributed by Andrew J. P. Maclean
+
+
+Release 1.2.3 (2006-09-14)
+==========================
+
+- configure script now checks if (auto)selected configuration is supported
+- fixed SF #1552904: NamedEvent bug?
+- fixed SF #1552787: POCO not handling EINTR
+- fixed SF #1552846: Random::~Random uses scalar delete
+- fixed SF #1552987: TLSSlot should explicitly default-construct _value
+- IPAddress no longer accepts an empty address string
+- split up Observer.h into AbstractObserver.h and Observer.h
+- added NObserver class template which supports an AutoPtr
+ argument for the notification callback
+- changed EchoServer sample to use NObserver
+- some Windows-specific files were missing in the tarballs
+
+
+Release 1.2.2 (2006-09-01)
+==========================
+
+- fixed SF # 1549973: NotificationCenter::hasObservers() returns wrong result
+- fixed a memory leak in EchoServer sample
+- fixed SocketReactor TimeoutNotification bug (SF #1549365, SocketNotifier::addObserver() incorrect behavior)
+- fixed SF# 1549513: MultipartReader does not work with Unix-style linefeeds
+- MailMessage and HTMLForm: processing of multipart messages will no longer fail if a PartHandler does not read all data from the part stream.
+- added additional test case (Unix-style line ends) to MultipartReaderTest
+
+
+Release 1.2.1 (2006-08-29)
+==========================
+
+- fixed Config.h header (no more #undefs)
+
+Release 1.2.0 (2006-08-29)
+==========================
+
+- DateTime fixes: Julian Day is no longer stored internally.
+ Times (hours, minutes, seconds, ...) are now always taken from an utcValue (if available) and not from the Julian day.
+ The Julian day is only used for calculating year, month and day (except when the Julian day is the only thing we have)
+ This helps us get rid of rounding errors that the Julian Day arithmetic introduced.- on Windows, UUIDGenerator no longer uses Netbios, but GetAdaptersInfo instead
+- The main Makefile now has correct dependencies
+- updated poco-doc.pl with latest version by Caleb Epstein
+- fixed SF #1542722: InflatingInputStream: buffer error
+- improved Windows UTF-8 support
+- added Logger::names()
+- added configure script and make install target
+- XMLWriter bugfix: pretty-print bug with characters() and rawCharacters()
+- improvements to build system: support builds outside of source tree
+- added header doc conversion tool contributed by Caleb Epstein
+- fixed SF #1542618 (build/config/Linux patch)
+- bugfix: BinaryReader/BinaryWriter BOM is now 16 bits, as documented
+- fixed SF #1542247 (Compiler warning from OptionCallback)
+- fixed SF #1542253 (ServerApplication::handleOption doesn't call Application::handleOption)
+- added Application::stopOptionsProcessing()
+- updated samples
+- Util::Application command line handling now supports:
+ * argument validation (Option::validator(); see Validator, IntValidator, RegExpValidator)
+ * binding of argument values to config properties (Option::binding())
+ * callbacks for arguments (Option::callback())
+ * checking of required parameters
+- changed header file locations:
+ Foundation headers are now in Poco (#include "Poco/Foundation.h")
+ XML headers are now in Poco/XML, Poco/SAX and Poco/DOM (#include "Poco/XML/XML.h")
+ Util headers are now in Poco/Util (#include "Poco/Util/Util.h")
+ etc.
+ Unfortunately, this change will break existing code. However, fixing the code is
+ a matter of a few global search/replace operations and can be done quickly.
+ On the plus side, POCO is now a much better citizen when used with other
+ libraries.
+- changed namespaces:
+ Foundation is now Poco
+ XML is now Poco::XML
+ Util is now Poco::Util
+ Net is now Poco::Net
+- removed namespace macros
+- fixed some warnings reported by gcc -Wall -Wextra
+- fixed AutoPtr and LayeredConfiguration documentation
+- improved StreamSocket::receiveBytes() doc
+- added Pipe and PipeStream classes
+- added support for I/O redirection (pipes) to Process::launch()
+- added LogStream class (ostream interface to Logger)
+- improved Makefiles (no more double-building if clean all is specified)
+- added CppUnit and DateTime testsuite contributions by Andrew Marlow
+- improved Cygwin and minimal MinGW support
+- FileChannel: gzip compression if archived files now runs in a background thread (SF #1537481)
+- POCO now compiles with large (64-bit) file support on Linux (SF #1536634)
+- added format() function, which provides typesafe sprintf-like functionality (SF #1327621)
+- added File::isLink()
+- bugfix: dangling symbolic links in a directory no longer cause recursive remove to fail with file not found error
+- added Void class (useful as argument to ActiveMethod)
+- ActiveResult now supports exceptions
+- bugfix: Timezone::utcOffset() and Timezone::dst() returned wrong values on Unix platforms (SF #1535428)
+- added ActiveDispatcher class
+- added ActiveStarter class, which is a policy used by ActiveMethod for starting methods
+- ActiveRunnable moved to its own header file
+- ThreadPool: added startWithPriority(), which allows for running threads with a different priority
+- added error handling to dir sample
+- added additional test case to HTTPServer test suite- HTMLForm: should now work with request methods other than POST and GET (all non-POST requests are treated the same as GET)
+- clarified HTMLForm documentation
+- HTMLForm bugfix: uploaded files no longer end up in value; PartHandler is called instead
+- NameValueCollection: added get(name, defaultValue)
+- added HTTPFormServer sample
+- added Foundation::HashTable and SimpleHashTable
+- added Net::HTTPSessionFactory
+- improvements to AutoPtr and SharedPtr
+- improvements to namespaces handling in XMLWriter
+- Foundation Cache: fixed add implementation to match the docu: a 2nd add will now simply overwrite existing entries
+- added DateTime::isValid()
+- added Exception::rethrow() (virtual, must be overridden by all subclasses)
+- Timer can now use a user-supplied ThreadPool
+- added rethrow() to exception classes
+- Net: made some constructors explicit
+- Net: added SocketAddress constructor to HTTPClientSession
+- Net: added HTTPSession::networkException() to check for exceptions swallowed by stream classes
+- Net: added single string argument constructor to SocketAddress.
+- Net: improved HTTPClientSession error handling (no more "Invalid HTTP version string" exceptions when the server prematurely closes the connection due to too much load)
+- Net: improved HTTPSession error handling. Exceptions while sending and receiving data are stored for later retrieval and no longer get lost since streambufs swallow them.
+- Net: added HTTPLoadTest sample
+- fixed a bug when opening logfiles on Unix platforms causing an existing logfile to be truncated
+- bugfix: log file purge intervals given in months did not work, due to a stupid typo
+- added RawSocket and ICMP classes
+- UUID: fixed a doc formatting bug
+- NetworkInterface::list() now includes loopback interface on Windows (SF #1460309)
+- made Exception::message() and Exception::nested() inline
+- added Net::UnsupportedRedirectException
+- HTTPStreamFactory throws an UnsupportedRedirectException if it encounters a redirect to https
+- HTTP: fixed bad 100 Continue handling in client and server code
+- added CONTRIBUTORS file
+
+
+Release 1.1.2 (2006-07-07)
+==========================
+
+- Changed license to Boost license
+- DBlite and NetSSL have been removed from the Boost-licensed release.
+ Please contact Applied Informatics (info@appinf.com) if you're interested in them.
+
+
+Release 1.1.1 (2006-04-03)
+==========================
+
+- NetSSL_OpenSSL now supports separate certificate verification
+ settings for client and server.
+- fixed SF #1460309 (enumerating network interfaces failed on 64bit Linux)
+- TCPServer no longer crashes if accept() fails
+
+
+Release 1.1.0 (2006-03-23)
+==========================
+
+- events no longer require awkward += new syntax
+- source code and documentation cleanups
+- basic support for new compilers and platforms
+
+
+Release 1.1b2 (2006-03-04)
+==========================
+
+- made NetSSL threadsafe (added locking callbacks for OpenSSL)
+- improved OpenSSL initialization (random generator seeding)
+- various changes to improve compatibility with various platforms
+
+
+Release 1.1b1 (2006-03-03)
+==========================
+
+- New Events package in Foundation. The package supports C#-style event handling
+- New Cache package in Foundation: a templates-based caching framework
+- added Any class to Foundation
+- added DBLite library
+- fixed a memory leak with layered configurations in the application
+- made POCO_DLL the default (unless POCO_STATIC is #defined)
+ It is no longer necessary to specify POCO_DLL in projects that use Poco
+ (SourceForge Patch #1408231 and Feature Request #1407575).
+- added Buffer template class to Foundation
+- added the UnicodeConverter utility class. This is mainly used for Windows Unicode support and probably of little use for anything else.
+- added Path::resolve()
+- added Windows Unicode support. This calls the Unicode variant of the Windows API functions.
+ For this to work, all strings must be UTF-8 encoded and POCO_WIN32_UTF8 must be defined in all compilation units.
+- added StreamCopier::copyToString()
+- added URIStreamOpener::unregisterStreamFactory() and new variants of URIStreamOpener::open() that also work with filesystem paths.
+ This fixes SourceForge Bug #1409064 and Feature Request #1409062.
+- added NodeIterator::currentNodeNP() to XML library
+- added some sanity checks to UTF8Encoding::convert()
+- added NetSSL - SSL support for Net library, based on OpenSSL
+- console output of processes launched with Process::launch() is now visible
+
+
+Release 1.0.0 (2006-01-19)
+==========================
+
+- removed unnecessary console output from ProcessTest
+- documentation fixes
+
+
+Release 1.0b2 (2006-01-16)
+==========================
+
+- added ProcessHandle class
+- Process::launch() now returns a ProcessHandle instead of a process ID.
+ This fixes a potential problem on Windows with Process::wait() when
+ the process terminates before wait() is called.
+- added SplitterChannel::close()
+- added Logger::destroy()
+- added POP3ClientSession::deleteMessage()
+- added test for Process::launch()
+- documentation fixes
+
+
+Release 1.0b1 (2006-01-09)
+==========================
+
+- improved recognition of Windows paths in Path::parseGuess()
+- added setCurrentLineNumber()/getCurrentLineNumber() to CountingStreamBuf
+- improvememts to StreamTokenizer and Token; fixed documentation
+- added a workaround for some strange istream behaviour with VS 2005 and FTPClientSessionTest
+- improved exception/error reporting in cppunit
+- added POP3ClientSession
+- added Process::launch() and Process::wait()
+- added Mail sample
+- added MailStream and SMTPClientSession classes
+- renamed some methods in DialogSocket to make them more general
+- NullPartHandler has moved out of HTMLForm.cpp into a separate file
+- Base64Encoder now always writes \r\n line ends
+- MessageHeader::quote has an optional addition arg controlling the treatment of whitespace
+- bugfix: MultipartReader had a problem with empty lines (\r\n sequences) in a part
+- added MailMessage and MailRecipient classes
+- added text encoding support for Windows-1252 codepage
+
+
+Release 1.0a1 (2006-01-03) [internal]
+=====================================
+
+- mediaType is used consistently to refer to a MIME media type (some occurences of contentType and mimeType have been replaced)
+- moved MediaType::quote() to MessageHeader and made it public
+- added MultipartWriter::stream()
+- Renamed AttachmentSource to PartSource and AttachmentHandler to PartHandler
+- SIGPIPE is always blocked in main thread on Unix systems
+- added EchoServer sample
+- fixed a bug in SocketImpl::setBlocking() - did exactly the opposite (value to ioctl was wrong)
+- fixed a memory leak in NotificationQueue sample
+- added comparison operators to Socket so that Sockets can be used as keys in maps
+- added Socket::setBlocking()
+- added StreamSocket::connectNB() (non-blocking connect)
+- added Observer::accepts()
+- added SocketReactor, SocketConnector and SocketAcceptor classes to support event-based socket programming
+- NamespacePrefixesStrategy now uses expat's XML_SetReturnNSTriplet().
+ The previously used separate namespace handling code has been removed.
+ This improves performance if NamespacePrefixesStrategy is used (both the n
+ amespaces and namespace-prefixes SAX2 features are used)
+- upgraded expat to 2.0 pre-release (2005-12-27) snapshot
+- added TeeInputStream and TeeOutputStream classes
+- added download sample for URIStreamOpener
+- renamed registerOpener() to registerFactory() in HTTPStreamFactory and FTPStreamFactory
+- added LineEndingConverter streams
+- added FTPClientSession
+- code and documentation clean-up
+- added DialogSocket class
+- reorganized HTTP test suites
+- added FTPClientSession and FTPStreamFactory
+- added DialogSocket class
+
+
+Release 0.96.1 (2005-12-28)
+===========================
+
+- fixed a memory leak caused by a bug in Microsoft's stream implementation (see the comment in Foundation/StreamUtil.h for an explanation)
+- added samples for Net library
+- added uptime() and startTime() to Util::Application
+- added DateTimeFormatter::format() for Timespan
+- added ErrorHandler class and better exception handling for threads
+- added poco_debugger() and poco_debugger_msg() macros
+- added project and solution files for Visual Studio 2005 (due to some bugs/leaks in Microsofts standard library - see
+ http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=e08bd793-3fef-40ff-adda-ed313e0eafcc
+ we do not recommend using this for production purposes)
+- fixed two problems with out-of-range string iterator in Path (the testsuite triggered an assertion in VC++ 8.0)
+- fixed mac line endings in a few files
+- added a workaround to the class loader that fixes strange behavior with VC++ 8.0. There seems to be a problem with typeid() not returning a valid typeinfo under certain circumstances.
+- added buffer allocator argument to buffered stream buffer templates
+- added buffer pools to HTTP to reduce memory fragmentation and to improve performance
+- added Net to Windows build.cmd script
+- added swap() to various classes that already support assignment
+- added a null pointer check in DOMWriter::writeNode()
+- fixed documentation in BinaryWriter.h and BinaryReader.h
+- added explicit support for network byte order to BinaryReader and BinaryWriter
+- added basic support for FreeBSD (needs more testing)
+- BinaryReader: renamed readRawData() to readRaw() to be consistent with BinaryWriter::writeRaw()
+- added support for uppercase output to HexBinaryEncoder.
+- added MediaType class
+- added QuotedPrintableEncoder and QuotedPrintableDecoder classes
+- renamed ObjectFactory to Instantiator. This should prevent the confusion caused by DynamicFactory and ObjectFactory. Sorry for the inconvenience if you are already using this.
+- AttachmentSource::filename() now returns const string&
+- added StringAttachmentSource
+- replaced old-style C casts with C++ casts in NetworkInterface.cpp
+- MutexImpl (WIN32): replaced InitializeCriticalSection with InitializeCriticalSectionAndSpinCount, which should increase performance on multiprocessor or multicore systems when many locks are used.
+- fixed a problem with STLport 5.0 when compiling StreamTokenizer
+- HTTPStreamOpener now also works with no-path URIs (like http://www.appinf.com)
+- fixed wrong delete usage (plain delete instead of delete [] was used in a few cases)
+- fixed a handle leak in WinTestRunner
+
+
+Release 0.95.4 (2005-11-07)
+===========================
+
+- fixed #1348006 and #1348005
+
+
+Release 0.95.3 (2005-10-28) [internal]
+======================================
+
+- updated build scripts (patch #1339015)
+- added support for AMD64 platforms (patch #1339015)
+- MultipartWriter creates its own boundary if an empty string is passed in as boundary
+- made MultipartWriter::createBoundary() public
+- fixed wrong documentation for DateTimeFormat::HTTP_FORMAT
+- added support for HTTP Basic authentication
+- added support for HTTP Cookies
+- added support for HTML forms
+
+
+Release 0.95.2 (2005-10-22) [internal]
+======================================
+
+- fixed a potential problems with streams when close in destructor fails (added try..catch block around close in destructors)
+- added HTTPServer & friends
+- added hasIdleThreads() method to NotificationQueue
+- added TCPServer and friend
+- added support for HTTP proxies to HTTPClientSession and HTTPStreamOpener
+- fixed documentation bugs (Mutex.h, ClassLoader.h)
+
+
+Relesae 0.95.1 (2005-10-15) [internal]
+======================================
+
+- Tasks can now throw custom notifications (contributed by Alex Fabijanic)
+- renamed URIFileStreamFactory to FileStreamFactory
+- added a few methods to URI (setPathEtc(), getPathEtc(), getPathAndQuery())
+- added new exception classes
+- fixed some documentation
+- added basic checks when reading a MessageHeader from a stream
+- added HTTP classes (testsuite still incomplete)
+- added MessageHeader, NameValueCollection, MultipartReader and MultipartWriter classes
+- added Timespan::useconds()
+- added ClassLoader::isLibraryLoaded()
+- Socket classes use Timespan::useconds() to fill struct timeval
+- added DatagramSocket, MulticastSocket and NetworkInterface classes
+- added socket classes and related basic stuff
+- added additonal constructor/assign to Timespan- added BasicBufferedBidirectionalStreamBuf
+- fixed a potential MT issue in Base64Decoder
+- code beautifying in [Un]BufferedStreamBuf
+- more improvements to ClassLoader
+- code cleanup and naming convention fixes (changed all *Imp classes to *Impl for consistency)
+
+
+Release 0.94.1 (2005-09-30) [internal]
+======================================
+
+- added MetaSingleton (based on a contribution by Alex Fabijanic)
+- added ClassLoader::create()
+- added ClassLoader::instance()
+- code clean-ups in FileChannel and related classes
+- added SimpleFileChannel
+- RotateAtTimeStrategy:
+ ::getNextRollover() rewritten (buggy)
+- DateTime
+ microseconds assert corrected
+ asserts in computeGregorian() (except for year - see comment in computeGregorian())
+ milliseconds calculation modified in computeGregorian()
+ microseconds assigned in computeGregorian()
+ normalize() and checkLimit() private functions to correct cases of overflow for milli/microseconds
+- LocalDateTime: added timestamp() method
+- FileChannel:
+ added "times" property (used to determine whether to use UTC or local time with RotateAtTimeStrategy)
+ ::setProperty() modified (whenever "times" property is set, methods setRotation and setArchive are
+ reinvoked to reflect the change)
+- FileChannel: added support for archived file compression and archived file purging
+- FileChannel tests modified
+- FileChannel: put LogFile, RotateStrategy and ArchiveStrategy into their own files
+- Message: added thread id field
+- PatternFormatter: added %I specifier for thread id
+- ThreadPool: PooledThread can be assigned a name
+- TaskManager: task name is reflected in thread name
+- fixed LocalDateTime::operator - (const Timespan&) [#0000004]
+- upon startup all loggers' channels are set to a console channel
+- improved search for application configuration files (see loadConfiguration()).
+- added Glob class (fixes #1249700)
+- upgraded to zlib 1.2.3 (fixes #1261712)
+- added Logger::dump()
+- fixed a wrong condition in Logger::log(const Message&)
+- Path::find() now also works with relative paths in addition to plain file names
+- added Path(const Path&, const Path&) constructor
+- added SharedPtr template
+- added Path::tryParse()
+- SAXParser::parse()/EntityResolverImpl now works for both URIs and local filesystem paths (fixes #1254812)
+
+
+Release 0.93.1 (2005-08-01)
+===========================
+
+This release contains various new features, improvements and bugfixes:
+- bugfix: UUIDGenerator throws an exception if no connected ethernet adapter can
+ be found (and thus no MAC address can be obtained)
+- added UUIDGenerator::createOne() method
+- added error handling to UUID sample application
+- added relational (==, !=, <, <=, >, >=) and arithmetic operators (+, -, +=, -=) to DateTime
+- added LocalDateTime class
+- added support for LocalDateTime to DateTimeParser and DateTimeFormatter
+- added enqueueUrgentNotification() to NotificationQueue
+- added support for timezone specifiers (%z, %Z) to PatternFormatter
+- added [] operator and count() to StringTokenizer
+- added elapsed() and isElapsed() to Timestamp
+- added tzd() to Timezone
+- added WinRegistryKey and WinService classes (Windows only)
+- added index operator and count() to StringTokenizer
+- added day/time-based log rotation (thanks to Alex Fabijanic), minor improvements to DateTimeParser
+- support for Mac OS X 10.4/gcc 4.0.0
+- added NamedMutex and NamedEvent
+- added Process::kill()
+- added NoPermissionException
+- added Task and TaskManager classes
+- added ServerApplication class
+- bugfix: EventLogChannel - _logFile was not properly initialized in one constructor
+- bugfix: File::createDirectories did not work for hierarchies deeper than three
+- added Util::FilesystemConfiguration
+- documented logging policy: log() must open channel if it hasn't been opened yet
+- FileChannel::log() opens channel if necessary
+- the application reference passed to initialize() and reinitialize() is no longer const
+- improved application logging initialization
+- fixed a problem with configuration view and property placeholders
+- fixed Util build configuration for Visual Studio
+- improved application samples
+- fixed documentation for Semaphore class
+
+
+Release 0.92.1 (2005-05-09)
+===========================
+
+This release introduces the Util library that provides support for
+configuration file parsing (different file formats), command line
+argument processing, logging configuration and a framework for
+command line/server applications.
+There have also been various changes to the Foundation library:
+- a new RefCountedObject class that acts as a base class for
+ various classes that use reference counting
+- some missing members have been added to the AutoPtr template
+- various improvements and bugfixes to the Logging framework, as well as
+ new LoggingFactory and LoggingRegistry classses, and a NullChannel class
+- the SignalHandler class (Unix platforms only)
+- ObjectFactory and DynamicFactory template classes
+- the Path::find method for searching a file in a list of directories
+- various new Exception classes
+
+
+Release 0.91.4 (2005-04-11)
+===========================
+
+This is mainly a maintenance release that adds support for QNX Neutrino
+and OpenVMS. There are also minor bugfixes and improvements.
+
+The Unix build system has been modified to work on QNX Neutrino.
+The OpenVMS build system has been fixed and works now.
+Some missing #include's have been added for QNX Neutrino.
+Foundation/String.h: icompare now supports comparison with const char*;
+the classic C version of isspace() has been used in a few places instead of the
+C++ version, this has been fixed.
+Foundation/Exception.h: IllegalStateException added.
+
+
+Release 0.91.3 (2005-03-19)
+===========================
+
+This is a maintenance release that adds support for Solaris/Sun Forte C++.
+No new features have been added.
+
+An implementation of FPEnvironment for Solaris has been included.
+All stream classes have been modified to work around an initialization
+problem that surfaced with Sun's C++ compiler when using STLport.
+Source-code compatibility with the previous release is not affected. Various
+minor changes, mostly adding missing #include's for Solaris.
+
+
+Release 0.91.2 (2005-02-27)
+===========================
+
+Minor improvements to the Unix build system. No actual changes in the
+libraries.
+
+
+Release 0.91.1 (2005-02-21)
+===========================
+
+This is the first public release of the C++ Portable Components.
+The release does not contain all features planned for the later 1.0 release
+(the NET library is missing, for example), but is already quite usable.
+Please refer to the README file for more information and instructions for
+building the libraries.
+
+
+--
+$Id: //poco/1.4/dist/CHANGELOG#59 $
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
new file mode 100644
index 000000000..6abeaaeb2
--- /dev/null
+++ b/CONTRIBUTORS
@@ -0,0 +1,26 @@
+Guenter Obiltschnig
+Alex Fabijanic
+Peter Schojer
+Ferdinand Beyer
+Krzysztof Burghardt
+Claus Dabringer
+Caleb Epstein
+Eran Hammer-Lahav
+Chris Johnson
+Sergey Kholodilov
+Ryan Kraay
+Larry Lewis
+Andrew J. P. Maclean
+Andrew Marlow
+Paschal Mushubi
+Jiang Shan
+David Shawley
+Sergey Skorokhodov
+Tom Tan <>
+Sergey N. Yatskevich
+Marc Chevrier
+Philippe Cuvillier
+Marian Krivos
+
+--
+$Id: //poco/1.4/dist/CONTRIBUTORS#2 $
diff --git a/CppParser/CppParser.progen b/CppParser/CppParser.progen
new file mode 100644
index 000000000..47f027b89
--- /dev/null
+++ b/CppParser/CppParser.progen
@@ -0,0 +1,17 @@
+vc.project.guid = C77B9D92-EC91-11DA-A4CE-005056C00008
+vc.project.name = CppParser
+vc.project.target = Poco${vc.project.name}
+vc.project.type = library
+vc.project.pocobase = ..
+vc.project.outdir = ${vc.project.pocobase}
+vc.project.platforms = Win32, x64
+vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
+vc.project.prototype = CppParser_vs90.vcproj
+vc.project.compiler.include = ..\\Foundation\\include
+vc.project.compiler.defines =
+vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS
+vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
+vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
+vc.project.linker.dependencies =
+vc.solution.create = true
+vc.solution.include = testsuite\\TestSuite
diff --git a/CppParser/CppParser_vs100.sln b/CppParser/CppParser_vs100.sln
new file mode 100644
index 000000000..af8c2aeeb
--- /dev/null
+++ b/CppParser/CppParser_vs100.sln
@@ -0,0 +1,60 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppParser", "CppParser_vs100.vcxproj", "{C77B9D92-EC91-11DA-A4CE-005056C00008}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs100.vcxproj", "{C79112BD-EC91-11DA-A4CE-005056C00008}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C77B9D92-EC91-11DA-A4CE-005056C00008} = {C77B9D92-EC91-11DA-A4CE-005056C00008}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Win32 = debug_shared|Win32
+ release_shared|Win32 = release_shared|Win32
+ debug_static_mt|Win32 = debug_static_mt|Win32
+ release_static_mt|Win32 = release_static_mt|Win32
+ debug_static_md|Win32 = debug_static_md|Win32
+ release_static_md|Win32 = release_static_md|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.Build.0 = release_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.Build.0 = release_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.Build.0 = release_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.Build.0 = release_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/CppParser/CppParser_vs100.vcxproj b/CppParser/CppParser_vs100.vcxproj
new file mode 100644
index 000000000..ecd82a306
--- /dev/null
+++ b/CppParser/CppParser_vs100.vcxproj
@@ -0,0 +1,308 @@
+
+
+
+
+ debug_shared
+ Win32
+
+
+ debug_static_md
+ Win32
+
+
+ debug_static_mt
+ Win32
+
+
+ release_shared
+ Win32
+
+
+ release_static_md
+ Win32
+
+
+ release_static_mt
+ Win32
+
+
+
+ CppParser
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}
+ CppParser
+ Win32Proj
+
+
+
+ StaticLibrary
+ MultiByte
+
+
+ StaticLibrary
+ MultiByte
+
+
+ StaticLibrary
+ MultiByte
+
+
+ StaticLibrary
+ MultiByte
+
+
+ DynamicLibrary
+ MultiByte
+
+
+ DynamicLibrary
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.40219.1
+ ..\bin\
+ obj\$(Configuration)\
+ true
+ ..\bin\
+ obj\$(Configuration)\
+ false
+ ..\lib\
+ obj\$(Configuration)\
+ ..\lib\
+ obj\$(Configuration)\
+ ..\lib\
+ obj\$(Configuration)\
+ ..\lib\
+ obj\$(Configuration)\
+ PocoCppParserd
+ PocoCppParsermdd
+ PocoCppParsermtd
+ PocoCppParser
+ PocoCppParsermd
+ PocoCppParsermt
+
+
+
+ Disabled
+ .\include;..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;CppParser_EXPORTS;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ Level3
+ EditAndContinue
+ Default
+ %(DisableSpecificWarnings)
+
+
+ %(AdditionalDependencies)
+ ..\bin\PocoCppParserd.dll
+ true
+ true
+ ..\bin\PocoCppParserd.pdb
+ ..\lib;%(AdditionalLibraryDirectories)
+ Console
+ ..\lib\PocoCppParserd.lib
+ MachineX86
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;CppParser_EXPORTS;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ %(AdditionalDependencies)
+ ..\bin\PocoCppParser.dll
+ true
+ false
+ ..\lib;%(AdditionalLibraryDirectories)
+ Console
+ true
+ true
+ ..\lib\PocoCppParser.lib
+ MachineX86
+
+
+
+
+ Disabled
+ .\include;..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebug
+ true
+ true
+ true
+ true
+
+ ..\lib\PocoCppParsermtd.pdb
+ Level3
+ EditAndContinue
+ Default
+ %(DisableSpecificWarnings)
+
+
+ ..\lib\PocoCppParsermtd.lib
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ ..\lib\PocoCppParsermt.lib
+
+
+
+
+ Disabled
+ .\include;..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ ..\lib\PocoCppParsermdd.pdb
+ Level3
+ EditAndContinue
+ Default
+ %(DisableSpecificWarnings)
+
+
+ ..\lib\PocoCppParsermdd.lib
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ ..\lib\PocoCppParsermd.pdb
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ %(AdditionalDependencies)
+ ..\lib\PocoCppParsermd.lib
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppParser/CppParser_vs100.vcxproj.filters b/CppParser/CppParser_vs100.vcxproj.filters
new file mode 100644
index 000000000..953f97587
--- /dev/null
+++ b/CppParser/CppParser_vs100.vcxproj.filters
@@ -0,0 +1,135 @@
+
+
+
+
+ {fe377055-0525-44e6-acc7-8d7b1f6c3eab}
+
+
+ {217c0ad9-ad83-4781-9937-3cd83b413b56}
+
+
+ {3952c193-998f-4899-bbd1-3fdd17661c10}
+
+
+ {b956ea7f-4ced-4a5f-9e27-ed5236d5aad4}
+
+
+ {c2c26550-40a8-4cee-9f8f-d9e18530d4ba}
+
+
+ {2422599c-57fd-475a-9fda-4a981d3645f3}
+
+
+ {aa2c1c4c-dbf1-4818-aeeb-d5d8b82d7f77}
+
+
+ {4ec2c692-a128-4bae-8906-3b341dfc867e}
+
+
+ {778a11b1-307d-4120-af80-2af792b2699a}
+
+
+
+
+ CppParser\Header Files
+
+
+ CppParser\Header Files
+
+
+ CppParser\Header Files
+
+
+ CppParser\Header Files
+
+
+ CppParser\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Attributes\Header Files
+
+
+ Attributes\Header Files
+
+
+
+
+ CppParser\Source Files
+
+
+ CppParser\Source Files
+
+
+ CppParser\Source Files
+
+
+ CppParser\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Attributes\Source Files
+
+
+ Attributes\Source Files
+
+
+
\ No newline at end of file
diff --git a/CppParser/CppParser_vs71.sln b/CppParser/CppParser_vs71.sln
new file mode 100644
index 000000000..9715f341d
--- /dev/null
+++ b/CppParser/CppParser_vs71.sln
@@ -0,0 +1,50 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppParser", "CppParser_vs71.vcproj", "{C77B9D92-EC91-11DA-A4CE-005056C00008}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs71.vcproj", "{C79112BD-EC91-11DA-A4CE-005056C00008}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C77B9D92-EC91-11DA-A4CE-005056C00008} = {C77B9D92-EC91-11DA-A4CE-005056C00008}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ debug_shared = debug_shared
+ release_shared = release_shared
+ debug_static_mt = debug_static_mt
+ release_static_mt = release_static_mt
+ debug_static_md = debug_static_md
+ release_static_md = release_static_md
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared.ActiveCfg = debug_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared.Build.0 = debug_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared.ActiveCfg = release_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared.Build.0 = release_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt.ActiveCfg = debug_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt.Build.0 = debug_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt.ActiveCfg = release_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt.Build.0 = release_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md.ActiveCfg = debug_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md.Build.0 = debug_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md.ActiveCfg = release_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md.Build.0 = release_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared.ActiveCfg = debug_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared.Build.0 = debug_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared.ActiveCfg = release_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared.Build.0 = release_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt.ActiveCfg = debug_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt.Build.0 = debug_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt.ActiveCfg = release_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt.Build.0 = release_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md.ActiveCfg = debug_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md.Build.0 = debug_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md.ActiveCfg = release_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md.Build.0 = release_static_md|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/CppParser/CppParser_vs71.vcproj b/CppParser/CppParser_vs71.vcproj
new file mode 100644
index 000000000..834e0acf8
--- /dev/null
+++ b/CppParser/CppParser_vs71.vcproj
@@ -0,0 +1,458 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppParser/CppParser_vs80.sln b/CppParser/CppParser_vs80.sln
new file mode 100644
index 000000000..801539e08
--- /dev/null
+++ b/CppParser/CppParser_vs80.sln
@@ -0,0 +1,60 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppParser", "CppParser_vs80.vcproj", "{C77B9D92-EC91-11DA-A4CE-005056C00008}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs80.vcproj", "{C79112BD-EC91-11DA-A4CE-005056C00008}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C77B9D92-EC91-11DA-A4CE-005056C00008} = {C77B9D92-EC91-11DA-A4CE-005056C00008}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Win32 = debug_shared|Win32
+ release_shared|Win32 = release_shared|Win32
+ debug_static_mt|Win32 = debug_static_mt|Win32
+ release_static_mt|Win32 = release_static_mt|Win32
+ debug_static_md|Win32 = debug_static_md|Win32
+ release_static_md|Win32 = release_static_md|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.Build.0 = release_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.Build.0 = release_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.Build.0 = release_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.Build.0 = release_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/CppParser/CppParser_vs80.vcproj b/CppParser/CppParser_vs80.vcproj
new file mode 100644
index 000000000..cb2369251
--- /dev/null
+++ b/CppParser/CppParser_vs80.vcproj
@@ -0,0 +1,479 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppParser/CppParser_vs90.sln b/CppParser/CppParser_vs90.sln
new file mode 100644
index 000000000..a91919cef
--- /dev/null
+++ b/CppParser/CppParser_vs90.sln
@@ -0,0 +1,60 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppParser", "CppParser_vs90.vcproj", "{C77B9D92-EC91-11DA-A4CE-005056C00008}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs90.vcproj", "{C79112BD-EC91-11DA-A4CE-005056C00008}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C77B9D92-EC91-11DA-A4CE-005056C00008} = {C77B9D92-EC91-11DA-A4CE-005056C00008}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Win32 = debug_shared|Win32
+ release_shared|Win32 = release_shared|Win32
+ debug_static_mt|Win32 = debug_static_mt|Win32
+ release_static_mt|Win32 = release_static_mt|Win32
+ debug_static_md|Win32 = debug_static_md|Win32
+ release_static_md|Win32 = release_static_md|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.Build.0 = release_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.Build.0 = release_static_md|Win32
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.Build.0 = release_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|Win32.Deploy.0 = release_shared|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.Build.0 = release_static_md|Win32
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/CppParser/CppParser_vs90.vcproj b/CppParser/CppParser_vs90.vcproj
new file mode 100644
index 000000000..1b405f97c
--- /dev/null
+++ b/CppParser/CppParser_vs90.vcproj
@@ -0,0 +1,478 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppParser/CppParser_x64_vs100.sln b/CppParser/CppParser_x64_vs100.sln
new file mode 100644
index 000000000..588744ebf
--- /dev/null
+++ b/CppParser/CppParser_x64_vs100.sln
@@ -0,0 +1,60 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppParser", "CppParser_x64_vs100.vcxproj", "{C77B9D92-EC91-11DA-A4CE-005056C00008}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs100.vcxproj", "{C79112BD-EC91-11DA-A4CE-005056C00008}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C77B9D92-EC91-11DA-A4CE-005056C00008} = {C77B9D92-EC91-11DA-A4CE-005056C00008}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|x64 = debug_shared|x64
+ release_shared|x64 = release_shared|x64
+ debug_static_mt|x64 = debug_static_mt|x64
+ release_static_mt|x64 = release_static_mt|x64
+ debug_static_md|x64 = debug_static_md|x64
+ release_static_md|x64 = release_static_md|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|x64.Build.0 = debug_shared|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|x64.Deploy.0 = debug_shared|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|x64.ActiveCfg = release_shared|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|x64.Build.0 = release_shared|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|x64.Deploy.0 = release_shared|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|x64.Build.0 = release_static_mt|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|x64.Build.0 = debug_static_md|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|x64.ActiveCfg = release_static_md|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|x64.Build.0 = release_static_md|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|x64.Deploy.0 = release_static_md|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|x64.Build.0 = debug_shared|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|x64.Deploy.0 = debug_shared|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|x64.ActiveCfg = release_shared|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|x64.Build.0 = release_shared|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|x64.Deploy.0 = release_shared|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|x64.Build.0 = release_static_mt|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|x64.Build.0 = debug_static_md|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|x64.ActiveCfg = release_static_md|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|x64.Build.0 = release_static_md|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|x64.Deploy.0 = release_static_md|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/CppParser/CppParser_x64_vs100.vcxproj b/CppParser/CppParser_x64_vs100.vcxproj
new file mode 100644
index 000000000..dc3e478f0
--- /dev/null
+++ b/CppParser/CppParser_x64_vs100.vcxproj
@@ -0,0 +1,306 @@
+
+
+
+
+ debug_shared
+ x64
+
+
+ debug_static_md
+ x64
+
+
+ debug_static_mt
+ x64
+
+
+ release_shared
+ x64
+
+
+ release_static_md
+ x64
+
+
+ release_static_mt
+ x64
+
+
+
+ CppParser
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}
+ CppParser
+ Win32Proj
+
+
+
+ StaticLibrary
+ MultiByte
+
+
+ StaticLibrary
+ MultiByte
+
+
+ StaticLibrary
+ MultiByte
+
+
+ StaticLibrary
+ MultiByte
+
+
+ DynamicLibrary
+ MultiByte
+
+
+ DynamicLibrary
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.40219.1
+ ..\bin64\
+ obj64\$(Configuration)\
+ true
+ ..\bin64\
+ obj64\$(Configuration)\
+ false
+ ..\lib64\
+ obj64\$(Configuration)\
+ ..\lib64\
+ obj64\$(Configuration)\
+ ..\lib64\
+ obj64\$(Configuration)\
+ ..\lib64\
+ obj64\$(Configuration)\
+ PocoCppParser64d
+ PocoCppParsermdd
+ PocoCppParsermtd
+ PocoCppParser64
+ PocoCppParsermd
+ PocoCppParsermt
+
+
+
+ Disabled
+ .\include;..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;CppParser_EXPORTS;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ Level3
+ ProgramDatabase
+ Default
+ %(DisableSpecificWarnings)
+
+
+ %(AdditionalDependencies)
+ ..\bin64\PocoCppParser64d.dll
+ true
+ true
+ ..\bin64\PocoCppParser64d.pdb
+ ..\lib64;%(AdditionalLibraryDirectories)
+ Console
+ ..\lib64\PocoCppParserd.lib
+ MachineX64
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;CppParser_EXPORTS;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ %(AdditionalDependencies)
+ ..\bin64\PocoCppParser64.dll
+ true
+ false
+ ..\lib64;%(AdditionalLibraryDirectories)
+ Console
+ true
+ true
+ ..\lib64\PocoCppParser.lib
+ MachineX64
+
+
+
+
+ Disabled
+ .\include;..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebug
+ true
+ true
+ true
+ true
+
+ ..\lib64\PocoCppParsermtd.pdb
+ Level3
+ ProgramDatabase
+ Default
+ %(DisableSpecificWarnings)
+
+
+ ..\lib64\PocoCppParsermtd.lib
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ ..\lib64\PocoCppParsermt.lib
+
+
+
+
+ Disabled
+ .\include;..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ ..\lib64\PocoCppParsermdd.pdb
+ Level3
+ ProgramDatabase
+ Default
+ %(DisableSpecificWarnings)
+
+
+ ..\lib64\PocoCppParsermdd.lib
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ ..\lib64\PocoCppParsermd.lib
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppParser/CppParser_x64_vs100.vcxproj.filters b/CppParser/CppParser_x64_vs100.vcxproj.filters
new file mode 100644
index 000000000..ec04a8e0f
--- /dev/null
+++ b/CppParser/CppParser_x64_vs100.vcxproj.filters
@@ -0,0 +1,135 @@
+
+
+
+
+ {19215921-761d-464e-af27-28d7c93a63f2}
+
+
+ {c2372101-9da3-4395-a2f0-7468d31e32f3}
+
+
+ {63b47522-0c86-4023-a401-9cb9a667725a}
+
+
+ {036225b5-e214-42dc-bde5-8106bcdd1750}
+
+
+ {e415005a-799a-477c-b4fa-135a9aacac35}
+
+
+ {f9df1cea-79ac-415a-b540-7e6d6a8049ef}
+
+
+ {841b696e-ac52-444a-86f5-e39516c8048b}
+
+
+ {175f1410-2e70-4d6f-9ade-092ed4060be9}
+
+
+ {35e35cae-d099-414e-bb49-70b4b3cb956a}
+
+
+
+
+ CppParser\Header Files
+
+
+ CppParser\Header Files
+
+
+ CppParser\Header Files
+
+
+ CppParser\Header Files
+
+
+ CppParser\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Symbol Table\Header Files
+
+
+ Attributes\Header Files
+
+
+ Attributes\Header Files
+
+
+
+
+ CppParser\Source Files
+
+
+ CppParser\Source Files
+
+
+ CppParser\Source Files
+
+
+ CppParser\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Symbol Table\Source Files
+
+
+ Attributes\Source Files
+
+
+ Attributes\Source Files
+
+
+
\ No newline at end of file
diff --git a/CppParser/CppParser_x64_vs90.sln b/CppParser/CppParser_x64_vs90.sln
new file mode 100644
index 000000000..4533182db
--- /dev/null
+++ b/CppParser/CppParser_x64_vs90.sln
@@ -0,0 +1,60 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppParser", "CppParser_x64_vs90.vcproj", "{C77B9D92-EC91-11DA-A4CE-005056C00008}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs90.vcproj", "{C79112BD-EC91-11DA-A4CE-005056C00008}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C77B9D92-EC91-11DA-A4CE-005056C00008} = {C77B9D92-EC91-11DA-A4CE-005056C00008}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|x64 = debug_shared|x64
+ release_shared|x64 = release_shared|x64
+ debug_static_mt|x64 = debug_static_mt|x64
+ release_static_mt|x64 = release_static_mt|x64
+ debug_static_md|x64 = debug_static_md|x64
+ release_static_md|x64 = release_static_md|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|x64.Build.0 = debug_shared|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_shared|x64.Deploy.0 = debug_shared|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|x64.ActiveCfg = release_shared|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|x64.Build.0 = release_shared|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_shared|x64.Deploy.0 = release_shared|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|x64.Build.0 = release_static_mt|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|x64.Build.0 = debug_static_md|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|x64.ActiveCfg = release_static_md|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|x64.Build.0 = release_static_md|x64
+ {C77B9D92-EC91-11DA-A4CE-005056C00008}.release_static_md|x64.Deploy.0 = release_static_md|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|x64.Build.0 = debug_shared|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_shared|x64.Deploy.0 = debug_shared|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|x64.ActiveCfg = release_shared|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|x64.Build.0 = release_shared|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_shared|x64.Deploy.0 = release_shared|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|x64.Build.0 = release_static_mt|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|x64.Build.0 = debug_static_md|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|x64.ActiveCfg = release_static_md|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|x64.Build.0 = release_static_md|x64
+ {C79112BD-EC91-11DA-A4CE-005056C00008}.release_static_md|x64.Deploy.0 = release_static_md|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/CppParser/CppParser_x64_vs90.vcproj b/CppParser/CppParser_x64_vs90.vcproj
new file mode 100644
index 000000000..14e528418
--- /dev/null
+++ b/CppParser/CppParser_x64_vs90.vcproj
@@ -0,0 +1,483 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppParser/Makefile b/CppParser/Makefile
new file mode 100644
index 000000000..888a156aa
--- /dev/null
+++ b/CppParser/Makefile
@@ -0,0 +1,21 @@
+#
+# Makefile
+#
+# $Id: //poco/1.3/CppParser/Makefile#1 $
+#
+# Makefile for Poco CppParser
+#
+
+include $(POCO_BASE)/build/rules/global
+
+SHAREDOPT_CXX += -DCppParser_EXPORTS
+
+objects = CppToken Decl Enum EnumValue Function NameSpace Parameter \
+ Parser Struct Symbol Tokenizer TypeDef Utility Variable \
+ Attributes AttributesParser
+
+target = PocoCppParser
+target_version = $(LIBVERSION)
+target_libs = PocoFoundation
+
+include $(POCO_BASE)/build/rules/lib
diff --git a/CppParser/dependencies b/CppParser/dependencies
new file mode 100644
index 000000000..2e8175e4e
--- /dev/null
+++ b/CppParser/dependencies
@@ -0,0 +1 @@
+Foundation
diff --git a/CppParser/include/Poco/CppParser/Attributes.h b/CppParser/include/Poco/CppParser/Attributes.h
new file mode 100644
index 000000000..3823fe892
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/Attributes.h
@@ -0,0 +1,141 @@
+//
+// Attributes.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Attributes.h#1 $
+//
+// Library: CppParser
+// Package: Attributes
+// Module: Attributes
+//
+// Definition of the Attributes class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_Attributes_INCLUDED
+#define CppParser_Attributes_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class CppParser_API Attributes
+ /// This class stores attributes for a symbol table entry.
+ /// Attributes are simple name-value pairs, where both
+ /// name and values are strings.
+{
+public:
+ typedef std::map AttrMap;
+ typedef AttrMap::const_iterator Iterator;
+
+ Attributes();
+ /// Creates the Attributes object.
+
+ Attributes(const Attributes& attrs);
+ /// Creates the Attributes object by copying another one.
+
+ ~Attributes();
+ /// Destroys the Attributes object.
+
+ Attributes& operator = (const Attributes& attrs);
+ /// Assignment operator.
+
+ bool has(const std::string& name) const;
+ /// Returns true if an attribute with the given name exists.
+
+ std::string getString(const std::string& name) const;
+ /// Returns the attribute's value as a string.
+ ///
+ /// Throws a Poco::NotFoundException if the attribute does not exist.
+
+ std::string getString(const std::string& name, const std::string& defaultValue) const;
+ /// Returns the attribute's value as a string, if it exists.
+ /// Returns the defaultValue if the attribute does not exist.
+
+ int getInt(const std::string& name) const;
+ /// Returns the attribute's value as an integer.
+ ///
+ /// Throws a Poco::NotFoundException if the attribute does not exist.
+ /// Throws a Poco::SyntaxException if the stored value is not an integer.
+
+ int getInt(const std::string& name, int defaultValue) const;
+ /// Returns the attribute's value as an integer, if it exists.
+ /// Returns the defaultValue if the attribute does not exist.
+ ///
+ /// Throws a Poco::SyntaxException if the stored value is not an integer.
+
+ bool getBool(const std::string& name) const;
+ /// Returns the attribute's value as a boolean.
+ /// The returned value is 'true', iff the stored value is not "false".
+ ///
+ /// Throws a Poco::NotFoundException if the attribute does not exist.
+
+ bool getBool(const std::string& name, bool defaultValue) const;
+ /// Returns the attribute's value as a boolean, if it exists.
+ /// The returned value is 'true', iff the stored value is not "false".
+
+ void set(const std::string& name, const std::string& value);
+ /// Sets the value of an attribute.
+
+ const std::string& operator [] (const std::string& name) const;
+ std::string& operator [] (const std::string& name);
+
+ Iterator begin() const;
+ Iterator end() const;
+
+ void clear();
+ /// Clears all attributes.
+
+private:
+ AttrMap _map;
+};
+
+
+//
+// inlines
+//
+inline Attributes::Iterator Attributes::begin() const
+{
+ return _map.begin();
+}
+
+
+inline Attributes::Iterator Attributes::end() const
+{
+ return _map.end();
+}
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_Attributes_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/AttributesParser.h b/CppParser/include/Poco/CppParser/AttributesParser.h
new file mode 100644
index 000000000..4016ca6c9
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/AttributesParser.h
@@ -0,0 +1,136 @@
+//
+// AttributesParser.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/AttributesParser.h#1 $
+//
+// Library: CppParser
+// Package: Attributes
+// Module: AttributesParser
+//
+// Definition of the AttributesParser class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_AttributesParser_INCLUDED
+#define CppParser_AttributesParser_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/CppParser/Tokenizer.h"
+#include "Poco/CppParser/Attributes.h"
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class CppParser_API AttributesParser
+ /// A parser for POCO-style C++ attributes.
+ ///
+ /// Using a special comment syntax, C++ declarations for
+ /// structs/classes, functions, types, etc. can be annotated
+ /// with attributes.
+ ///
+ /// Attributes always come immediately before the symbol that
+ /// is being annotated, and are written inside special comments
+ /// with the syntax:
+ /// //@ [,...]
+ /// where is
+ /// =
+ /// is a valid C++ identifier, or two identifiers separated by
+ /// a period (struct accessor notation).
+ /// is a string, integer, bool literal, or a complex value
+ /// in the form
+ /// {=[,=...]}
+{
+public:
+ AttributesParser(Attributes& attrs, std::istream& istr);
+ /// Creates the AttributesParser.
+
+ ~AttributesParser();
+ /// Destroys the AttributesParser.
+
+ void parse();
+ /// Parses attributes.
+
+protected:
+ void setAttribute(const std::string& name, const std::string& value);
+ const Poco::Token* parseAttributes(const Poco::Token* pNext);
+ const Poco::Token* parseAttribute(const Poco::Token* pNext);
+ const Poco::Token* parseComplexAttribute(const Token* pNext, const std::string& id);
+ const Poco::Token* parseIdentifier(const Poco::Token* pNext, std::string& id);
+ const Poco::Token* next();
+ static bool isIdentifier(const Poco::Token* pToken);
+ static bool isOperator(const Poco::Token* pToken, int kind);
+ static bool isLiteral(const Poco::Token* pToken);
+ static bool isEOF(const Poco::Token* pToken);
+
+private:
+ Attributes& _attrs;
+ Tokenizer _tokenizer;
+ std::string _id;
+};
+
+
+//
+// inlines
+//
+inline const Poco::Token* AttributesParser::next()
+{
+ return _tokenizer.next();
+}
+
+
+inline bool AttributesParser::isEOF(const Poco::Token* pToken)
+{
+ return pToken->is(Token::EOF_TOKEN);
+}
+
+
+inline bool AttributesParser::isIdentifier(const Poco::Token* pToken)
+{
+ return pToken->is(Poco::Token::IDENTIFIER_TOKEN) || pToken->is(Poco::Token::KEYWORD_TOKEN);
+}
+
+
+inline bool AttributesParser::isOperator(const Poco::Token* pToken, int kind)
+{
+ return pToken->is(Poco::Token::OPERATOR_TOKEN) && pToken->asInteger() == kind;
+}
+
+
+inline bool AttributesParser::isLiteral(const Poco::Token* pToken)
+{
+ return pToken->is(Poco::Token::STRING_LITERAL_TOKEN) || pToken->is(Poco::Token::INTEGER_LITERAL_TOKEN);
+}
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_AttributesParser_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/CppParser.h b/CppParser/include/Poco/CppParser/CppParser.h
new file mode 100644
index 000000000..32c2dd911
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/CppParser.h
@@ -0,0 +1,91 @@
+//
+// CppParser.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/CppParser.h#2 $
+//
+// Library: CppParser
+// Package: CppParser
+// Module: CppParser
+//
+// Basic definitions for the Poco CppParser library.
+// This file must be the first file included by every other CppParser
+// header file.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_CppParser_INCLUDED
+#define CppParser_CppParser_INCLUDED
+
+
+#include "Poco/Foundation.h"
+
+
+//
+// The following block is the standard way of creating macros which make exporting
+// from a DLL simpler. All files within this DLL are compiled with the CppParser_EXPORTS
+// symbol defined on the command line. this symbol should not be defined on any project
+// that uses this DLL. This way any other project whose source files include this file see
+// CppParser_API functions as being imported from a DLL, wheras this DLL sees symbols
+// defined with this macro as being exported.
+//
+#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(POCO_DLL)
+ #if defined(CppParser_EXPORTS)
+ #define CppParser_API __declspec(dllexport)
+ #else
+ #define CppParser_API __declspec(dllimport)
+ #endif
+#endif
+
+
+#if !defined(CppParser_API)
+ #define CppParser_API
+#endif
+
+
+//
+// Automatically link CppParser library.
+//
+#if defined(_MSC_VER)
+ #if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(CppParser_EXPORTS)
+ #if defined(POCO_DLL)
+ #if defined(_DEBUG)
+ #pragma comment(lib, "PocoCppParserd.lib")
+ #else
+ #pragma comment(lib, "PocoCppParser.lib")
+ #endif
+ #else
+ #if defined(_DEBUG)
+ #pragma comment(lib, "PocoCppParsermtd.lib")
+ #else
+ #pragma comment(lib, "PocoCppParsermt.lib")
+ #endif
+ #endif
+ #endif
+#endif
+
+#endif // CppParser_CppParser_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/CppToken.h b/CppParser/include/Poco/CppParser/CppToken.h
new file mode 100644
index 000000000..9b02c30db
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/CppToken.h
@@ -0,0 +1,293 @@
+//
+// CppToken.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/CppToken.h#2 $
+//
+// Library: CppParser
+// Package: CppParser
+// Module: CppToken
+//
+// Definition of the CppToken class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_CppToken_INCLUDED
+#define CppParser_CppToken_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/Token.h"
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class CppParser_API CppToken: public Poco::Token
+ /// The base class for all C++ tokens.
+{
+public:
+ CppToken();
+ ~CppToken();
+
+protected:
+ void syntaxError(const std::string& expected, const std::string& actual);
+};
+
+
+class CppParser_API OperatorToken: public CppToken
+{
+public:
+ enum Tokens
+ {
+ OP_OPENBRACKET = 1, // [
+ OP_CLOSBRACKET, // ]
+ OP_OPENPARENT, // (
+ OP_CLOSPARENT, // )
+ OP_OPENBRACE, // {
+ OP_CLOSBRACE, // }
+ OP_LT, // <
+ OP_LE, // <=
+ OP_SHL, // <<
+ OP_SHL_ASSIGN, // <<=
+ OP_GT, // >
+ OP_GE, // >=
+ OP_SHR, // >>
+ OP_SHR_ASSIGN, // >>=
+ OP_ASSIGN, // =
+ OP_EQ, // ==
+ OP_NOT, // !
+ OP_NE, // !=
+ OP_BITAND, // &
+ OP_BITAND_ASSIGN, // &=
+ OP_AND, // &&
+ OP_BITOR, // |
+ OP_BITOR_ASSIGN, // |=
+ OP_OR, // ||
+ OP_XOR, // ^
+ OP_XOR_ASSIGN, // ^=
+ OP_COMPL, // ~
+ OP_ASTERISK, // *
+ OP_ASTERISK_ASSIGN, // *=
+ OP_SLASH, // /
+ OP_SLASH_ASSIGN, // /=
+ OP_PLUS, // +
+ OP_PLUS_ASSIGN, // +=
+ OP_INCR, // ++
+ OP_MINUS, // -
+ OP_MINUS_ASSIGN, // -=
+ OP_DECR, // --
+ OP_ARROW, // ->
+ OP_MOD, // %
+ OP_MOD_ASSIGN, // %=
+ OP_COMMA, // ,
+ OP_PERIOD, // .
+ OP_TRIPLE_PERIOD, // ...
+ OP_COLON, // :
+ OP_DBL_COLON, // ::
+ OP_SEMICOLON, // ;
+ OP_QUESTION // ?
+ };
+
+ OperatorToken();
+ ~OperatorToken();
+ Poco::Token::Class tokenClass() const;
+ bool start(char c, std::istream& istr);
+ void finish(std::istream& istr);
+ int asInteger() const;
+
+private:
+ typedef std::map OpMap;
+
+ OpMap _opMap;
+};
+
+
+class CppParser_API IdentifierToken: public CppToken
+{
+public:
+ enum Keywords
+ {
+ KW_AND = 1,
+ KW_AND_EQ,
+ KW_ASM,
+ KW_AUTO,
+ KW_BITAND,
+ KW_BITOR,
+ KW_BOOL,
+ KW_BREAK,
+ KW_CASE,
+ KW_CATCH,
+ KW_CHAR,
+ KW_CLASS,
+ KW_COMPL,
+ KW_CONST,
+ KW_CONST_CAST,
+ KW_CONTINUE,
+ KW_DEFAULT,
+ KW_DELETE,
+ KW_DO,
+ KW_DOUBLE,
+ KW_DYNAMIC_CAST,
+ KW_ELSE,
+ KW_ENUM,
+ KW_EXPLICIT,
+ KW_EXPORT,
+ KW_EXTERN,
+ KW_FALSE,
+ KW_FLOAT,
+ KW_FOR,
+ KW_FRIEND,
+ KW_GOTO,
+ KW_IF,
+ KW_INLINE,
+ KW_INT,
+ KW_LONG,
+ KW_MUTABLE,
+ KW_NAMESPACE,
+ KW_NEW,
+ KW_NOT,
+ KW_NOT_EQ,
+ KW_OPERATOR,
+ KW_OR,
+ KW_OR_EQ,
+ KW_PRIVATE,
+ KW_PROTECTED,
+ KW_PUBLIC,
+ KW_REGISTER,
+ KW_REINTERPRET_CAST,
+ KW_RETURN,
+ KW_SHORT,
+ KW_SIGNED,
+ KW_SIZEOF,
+ KW_STATIC,
+ KW_STATIC_CAST,
+ KW_STRUCT,
+ KW_SWITCH,
+ KW_TEMPLATE,
+ KW_THIS,
+ KW_THROW,
+ KW_TRUE,
+ KW_TRY,
+ KW_TYPEDEF,
+ KW_TYPEID,
+ KW_TYPENAME,
+ KW_UNION,
+ KW_UNSIGNED,
+ KW_USING,
+ KW_VIRTUAL,
+ KW_VOID,
+ KW_VOLATILE,
+ KW_WCHAR_T,
+ KW_WHILE,
+ KW_XOR,
+ KW_XOR_EQ
+ };
+
+ IdentifierToken();
+ ~IdentifierToken();
+ Poco::Token::Class tokenClass() const;
+ bool start(char c, std::istream& istr);
+ void finish(std::istream& istr);
+ int asInteger() const;
+
+private:
+ typedef std::map KWMap;
+
+ KWMap _kwMap;
+};
+
+
+class CppParser_API StringLiteralToken: public CppToken
+{
+public:
+ StringLiteralToken();
+ ~StringLiteralToken();
+ Poco::Token::Class tokenClass() const;
+ bool start(char c, std::istream& istr);
+ void finish(std::istream& istr);
+ std::string asString() const;
+};
+
+
+class CppParser_API CharLiteralToken: public CppToken
+{
+public:
+ CharLiteralToken();
+ ~CharLiteralToken();
+ Poco::Token::Class tokenClass() const;
+ bool start(char c, std::istream& istr);
+ void finish(std::istream& istr);
+ char asChar() const;
+};
+
+
+class CppParser_API NumberLiteralToken: public CppToken
+{
+public:
+ NumberLiteralToken();
+ ~NumberLiteralToken();
+ Poco::Token::Class tokenClass() const;
+ bool start(char c, std::istream& istr);
+ void finish(std::istream& istr);
+ int asInteger() const;
+ double asFloat() const;
+
+private:
+ bool _isFloat;
+};
+
+
+class CppParser_API CommentToken: public CppToken
+{
+public:
+ CommentToken();
+ ~CommentToken();
+ Poco::Token::Class tokenClass() const;
+ bool start(char c, std::istream& istr);
+ void finish(std::istream& istr);
+ std::string asString() const;
+};
+
+
+class CppParser_API PreprocessorToken: public CppToken
+{
+public:
+ PreprocessorToken();
+ ~PreprocessorToken();
+ Poco::Token::Class tokenClass() const;
+ bool start(char c, std::istream& istr);
+ void finish(std::istream& istr);
+};
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_CppToken_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/Decl.h b/CppParser/include/Poco/CppParser/Decl.h
new file mode 100644
index 000000000..d10656ab5
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/Decl.h
@@ -0,0 +1,84 @@
+//
+// Decl.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Decl.h#1 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Decl
+//
+// Definition of the Decl class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_Decl_INCLUDED
+#define CppParser_Decl_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/CppParser/Symbol.h"
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class CppParser_API Decl: public Symbol
+ /// This class represents a simple declaration in a C++ source file.
+ /// It is a base class for Function, TypeDef or Variable.
+{
+public:
+ Decl(const std::string& decl, NameSpace* pNameSpace);
+ /// Creates the Decl.
+
+ ~Decl();
+ /// Destroys the Decl.
+
+ const std::string& declaration() const;
+ /// Returns the declaration.
+
+ std::string toString() const;
+
+protected:
+ std::string _decl;
+};
+
+
+//
+// inlines
+//
+inline const std::string& Decl::declaration() const
+{
+ return _decl;
+}
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_Decl_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/Enum.h b/CppParser/include/Poco/CppParser/Enum.h
new file mode 100644
index 000000000..c143e1ca1
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/Enum.h
@@ -0,0 +1,99 @@
+//
+// Enum.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Enum.h#1 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Enum
+//
+// Definition of the Enum class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_Enum_INCLUDED
+#define CppParser_Enum_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/CppParser/Symbol.h"
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class EnumValue;
+
+
+class CppParser_API Enum: public Symbol
+ /// This class represents an enum declaration.
+ ///
+ /// An enumeration has an optional name and
+ /// a collection of EnumValues.
+{
+public:
+ typedef std::vector Values;
+ typedef Values::const_iterator Iterator;
+
+ Enum(const std::string& name, NameSpace* pNameSpace);
+ /// Creates the Enum.
+ ///
+ /// If name is the empty string, an internal name
+ /// in the form #AnonEnum (where is a unique integer)
+ /// will be assigned.
+
+ ~Enum();
+ /// Destroys the Enum.
+
+ void addValue(EnumValue* pValue);
+ /// Adds an enum value. The Enum takes ownership of the value.
+
+ Iterator begin() const;
+ /// Returns an iterator for iterating over the Enum's EnumValue's.
+
+ Iterator end() const;
+ /// Returns an iterator for iterating over the Enum's EnumValue's.
+
+ Symbol::Kind kind() const;
+ std::string toString() const;
+
+protected:
+ static std::string processName(const std::string& name);
+
+private:
+ Values _values;
+ static int _count;
+};
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_Enum_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/EnumValue.h b/CppParser/include/Poco/CppParser/EnumValue.h
new file mode 100644
index 000000000..4320c7624
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/EnumValue.h
@@ -0,0 +1,88 @@
+//
+// EnumValue.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/EnumValue.h#1 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: EnumValue
+//
+// Definition of the EnumValue class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_EnumValue_INCLUDED
+#define CppParser_EnumValue_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/CppParser/Symbol.h"
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class Enum;
+
+
+class CppParser_API EnumValue: public Symbol
+ /// This class represents an enumeration value
+ /// inside an enum declaration.
+{
+public:
+ EnumValue(const std::string& name, const std::string& value, Enum* pEnum);
+ /// Creates the EnumValue, using the name and a value, which may be empty.
+
+ virtual ~EnumValue();
+ /// Destroys the EnumValue.
+
+ const std::string& value() const;
+ /// Returns the value, which may be empty.
+
+ Symbol::Kind kind() const;
+ std::string toString() const;
+
+private:
+ std::string _value;
+};
+
+
+//
+// inlines
+//
+inline const std::string& EnumValue::value() const
+{
+ return _value;
+}
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_EnumValue_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/Function.h b/CppParser/include/Poco/CppParser/Function.h
new file mode 100644
index 000000000..e621667d0
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/Function.h
@@ -0,0 +1,168 @@
+//
+// Function.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Function.h#1 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Function
+//
+// Definition of the Function class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_Function_INCLUDED
+#define CppParser_Function_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/CppParser/Decl.h"
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class Parameter;
+
+
+class CppParser_API Function: public Decl
+ /// This class represents a (member) function declaration.
+{
+public:
+ enum Flags
+ {
+ FN_STATIC = 1, /// The function is static.
+ FN_VIRTUAL = 2, /// The function is virtual.
+ FN_INLINE = 4, /// The function is inline.
+ FN_CONST = 8, /// The function is const.
+ FN_TEMPLATE = 16, /// The function is a template.
+ FN_PURE_VIRTUAL = 32 /// The function is pure virtual.
+ };
+
+ typedef std::vector Parameters;
+ typedef Parameters::const_iterator Iterator;
+
+ Function(const std::string& decl, NameSpace* pNameSpace);
+ /// Creates the Function.
+
+ ~Function();
+ /// Destroys the Function.
+
+ void addParameter(Parameter* pParam);
+ /// Adds a parameter to the function.
+
+ const std::string& getReturnParameter() const;
+
+ Iterator begin() const;
+ /// Returns an iterator for iterating over the Function's Parameter's.
+
+ Iterator end() const;
+ /// Returns an iterator for iterating over the Function's Parameter's.
+
+ void makeInline();
+ /// Sets the FN_INLINE flag.
+
+ void makeConst();
+ /// Sets the FN_CONST flag.
+
+ void makePureVirtual();
+ /// Sets the FN_PURE_VIRTUAL flag.
+
+ int flags() const;
+ /// Returns the function's flags.
+
+ bool isConstructor() const;
+ /// Returns true iff the function is a constructor.
+
+ bool isDestructor() const;
+ /// Returns true iff the function is a destructor.
+
+ bool isMethod() const;
+ /// Returns true iff the function is a method (it's part of
+ /// a Struct and it's neither a constructor nor a destructor).
+
+ bool isFunction() const;
+ /// Returns true iff the function is not a member of a class
+ /// (a freestanding function).
+
+ bool isConst() const;
+ /// Returns true iff the method is const.
+
+ int countParameters() const;
+ /// Returns the number of parameters.
+
+ std::string signature() const;
+ /// Returns the signature of the function.
+
+ bool isVirtual() const;
+ /// Returns true if the method is virtual. Also examines base
+ /// classes to check for a virtual function with the same
+ /// signature.
+
+ Function* getOverridden() const;
+ /// If the function is virtual and overrides a function in a
+ /// base class, the base class function is returned.
+ /// Otherwise, null is returned.
+
+ Symbol::Kind kind() const;
+ std::string toString() const;
+
+private:
+ Parameters _params;
+ int _flags;
+ std::string _retParam;
+};
+
+
+//
+// inlines
+//
+inline int Function::flags() const
+{
+ return _flags;
+}
+
+
+inline const std::string& Function::getReturnParameter() const
+{
+ return _retParam;
+}
+
+
+inline bool Function::isConst() const
+{
+ return (flags() & FN_CONST) != 0;
+}
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_Function_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/NameSpace.h b/CppParser/include/Poco/CppParser/NameSpace.h
new file mode 100644
index 000000000..09f514d84
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/NameSpace.h
@@ -0,0 +1,160 @@
+//
+// NameSpace.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/NameSpace.h#2 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: NameSpace
+//
+// Definition of the NameSpace class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_NameSpace_INCLUDED
+#define CppParser_NameSpace_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/CppParser/Symbol.h"
+#include
+#include
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class CppParser_API NameSpace: public Symbol
+ /// This class represents a namespace.
+{
+public:
+ typedef std::multimap SymbolTable;
+ typedef SymbolTable::const_iterator Iterator;
+ typedef std::map AliasMap;
+ typedef std::vector NameSpaceVec;
+
+ NameSpace();
+ /// Creates the NameSpace.
+
+ NameSpace(const std::string& name, NameSpace* pNameSpace = 0);
+ /// Creates the NameSpace.
+
+ ~NameSpace();
+ /// Destroys the NameSpace.
+
+ void addSymbol(Symbol* pSymbol);
+ /// Adds a symbol to the namespace.
+
+ void importSymbol(const std::string& fullName);
+ /// Imports a symbol from another namespace (using ).
+
+ void importNameSpace(const std::string& nameSpace);
+ /// Imports a namespace (using namespace ).
+
+ Iterator begin() const;
+ /// Returns an iterator for iterating over the NameSpace's Symbol's.
+
+ Iterator end() const;
+ /// Returns an iterator for iterating over the NameSpace's Symbol's.
+
+ Symbol* lookup(const std::string& name) const;
+ /// Looks up the given name in the symbol table
+ /// and returns the corresponsing symbol, or null
+ /// if no symbol can be found. The name can include
+ /// a namespace.
+
+ static NameSpace* root();
+ /// Returns the root namespace. Never delete this one!
+
+ void nameSpaces(SymbolTable& table) const;
+ /// Fills the symbol table with all namespaces.
+
+ void typeDefs(SymbolTable& table) const;
+ /// Fills the symbol table with all type definitions.
+
+ void enums(SymbolTable& table) const;
+ /// Fills the symbol table with all enums.
+
+ void classes(SymbolTable& table) const;
+ /// Fills the symbol table with all classes and structs.
+
+ void functions(SymbolTable& table) const;
+ /// Fills the symbol table with all functions.
+
+ void variables(SymbolTable& table) const;
+ /// Fills the symbol table with all variables.
+
+ const AliasMap& importedSymbols() const;
+ /// Returns a const reference to a SymbolTable containing all
+ /// imported symbols.
+
+ const NameSpaceVec& importedNameSpaces() const;
+ /// Returns a vector containing all imported namespaces.
+
+ Symbol::Kind kind() const;
+ std::string toString() const;
+
+private:
+ Symbol* lookup(const std::string& name, std::set& alreadyVisited) const;
+ /// Looks up the given name in the symbol table
+ /// and returns the corresponsing symbol, or null
+ /// if no symbol can be found. The name can include
+ /// a namespace.
+
+protected:
+ void extract(Symbol::Kind kind, SymbolTable& table) const;
+ static void splitName(const std::string& name, std::string& head, std::string& tail);
+
+private:
+ SymbolTable _symbols;
+ AliasMap _importedSymbols;
+ NameSpaceVec _importedNameSpaces;
+};
+
+
+//
+// inlines
+//
+inline const NameSpace::AliasMap& NameSpace::importedSymbols() const
+{
+ return _importedSymbols;
+}
+
+
+inline const NameSpace::NameSpaceVec& NameSpace::importedNameSpaces() const
+{
+ return _importedNameSpaces;
+}
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_NameSpace_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/Parameter.h b/CppParser/include/Poco/CppParser/Parameter.h
new file mode 100644
index 000000000..076a287ff
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/Parameter.h
@@ -0,0 +1,164 @@
+//
+// Parameter.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Parameter.h#1 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Parameter
+//
+// Definition of the Parameter class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_Parameter_INCLUDED
+#define CppParser_Parameter_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/CppParser/Decl.h"
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class Function;
+
+
+class CppParser_API Parameter: public Decl
+ /// This class represents a parameter to a function.
+{
+public:
+ Parameter(const std::string& decl, Function* pFunction);
+ /// Creates the Parameter.
+
+ ~Parameter();
+ /// Destroys the Parameter.
+
+ Symbol::Kind kind() const;
+
+ bool isReference() const;
+ /// Returns true iff the parameter is a reference.
+
+ bool isPointer() const;
+ /// Returns true iff the parameter is a pointer.
+
+ bool isConst() const;
+ /// Returns true iff the parameter is const.
+
+ bool hasDefaultValue() const;
+ /// Returns true if a defaultvalue was set at this parameter,
+ /// Example: const std::string& data = std::string("default").
+
+ const std::string& declType() const;
+ /// Returns the type of the parameter without const and & if present.
+ ///
+ /// Example: a type const std::string& -> std::string, a type const std::string* returns std::string
+
+ const std::string& defaultValue() const;
+ /// If hasDefaultValue() returns true, this method returns the default value, i.e. all data found between
+ /// the opening and closing bracket of the init string.
+ ///
+ /// Example: for const std::string& data = std::string("default") it will return "default",
+ /// for = std::string() it will return a zero length string, for = ComplexClass(13,12, "test", 0);
+ /// it will return 13,12, "test", 0.
+
+ const std::string& defaultDecl() const;
+ /// If hasDefaultValue() returns true, this method returns the
+ /// default value declaration.
+ ///
+ /// Example: for const std::string& data = std::string("default") it will return std::string("default").
+
+ static bool vectorType(const std::string& type, NameSpace* pNS);
+
+private:
+ std::string handleDecl(const std::string& decl);
+ /// Removes initialization values, adds param Names if they are missing
+
+private:
+ std::string _type;
+ bool _isRef;
+ bool _isPointer;
+ bool _isConst;
+ bool _hasDefaultValue;
+ std::string _defaultValue;
+ std::string _defaultDecl;
+ static int _count;
+};
+
+
+//
+// inlines
+//
+inline const std::string& Parameter::declType() const
+{
+ return _type;
+}
+
+
+inline bool Parameter::isReference() const
+{
+ return _isRef;
+}
+
+
+inline bool Parameter::isConst() const
+{
+ return _isConst;
+}
+
+
+inline bool Parameter::isPointer() const
+{
+ return _isPointer;
+}
+
+
+inline bool Parameter::hasDefaultValue() const
+{
+ return _hasDefaultValue;
+}
+
+
+inline const std::string& Parameter::defaultValue() const
+{
+ return _defaultValue;
+}
+
+
+inline const std::string& Parameter::defaultDecl() const
+{
+ return _defaultDecl;
+}
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_Parameter_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/Parser.h b/CppParser/include/Poco/CppParser/Parser.h
new file mode 100644
index 000000000..54b360206
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/Parser.h
@@ -0,0 +1,149 @@
+//
+// Parser.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Parser.h#3 $
+//
+// Library: CppParser
+// Package: CppParser
+// Module: Parser
+//
+// Definition of the Parser class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_Parser_INCLUDED
+#define CppParser_Parser_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/CppParser/Tokenizer.h"
+#include "Poco/CppParser/Symbol.h"
+#include "Poco/CppParser/NameSpace.h"
+#include "Poco/CountingStream.h"
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class Enum;
+class Struct;
+class Function;
+
+
+class CppParser_API Parser
+ /// A minimal parser for C++ (header files).
+ ///
+ /// The parser reads a (preprocessed) source or header file and
+ /// builds a symbol table containing as much information as
+ /// the parser is able to extract from the file.
+ ///
+ /// A special comment syntax is used for inline API documentation.
+ ///
+ /// A comment starting with three consecutive slashes (///) contains
+ /// API documentation for a symbol (class, function, typedef, enum, etc.).
+ /// API documentation comments always come after the declaration, with the
+ /// exception of structs and classes, where the comments are expected
+ /// immediately before the opening brace.
+{
+public:
+ Parser(NameSpace::SymbolTable& gst, const std::string& file, std::istream& istr);
+ /// Creates the Parser.
+
+ ~Parser();
+ /// Destroys the Parser.
+
+ void parse();
+ /// Parses the file.
+
+protected:
+ const Poco::Token* parseFile(const Poco::Token* pNext);
+ const Poco::Token* parseNameSpace(const Poco::Token* pNext);
+ const Poco::Token* parseClass(const Poco::Token* pNext);
+ const Poco::Token* parseClass(const Poco::Token* pNext, std::string& decl);
+ const Poco::Token* parseTemplate(const Poco::Token* pNext);
+ const Poco::Token* parseTemplateArgs(const Poco::Token* pNext, std::string& decl);
+ const Poco::Token* parseVarFunc(const Poco::Token* pNext);
+ const Poco::Token* parseVarFunc(const Poco::Token* pNext, std::string& decl);
+ const Poco::Token* parseFriend(const Poco::Token* pNext);
+ const Poco::Token* parseExtern(const Poco::Token* pNext);
+ const Poco::Token* parseTypeDef(const Poco::Token* pNext);
+ const Poco::Token* parseUsing(const Poco::Token* pNext);
+ const Poco::Token* parseFunc(const Poco::Token* pNext, std::string& decl);
+ const Poco::Token* parseParameters(const Poco::Token* pNext, Function* pFunc);
+ const Poco::Token* parseBlock(const Poco::Token* pNext);
+ const Poco::Token* parseEnum(const Poco::Token* pNext);
+ const Poco::Token* parseEnumValue(const Poco::Token* pNext, Enum* pEnum);
+ const Poco::Token* parseBaseClassList(const Poco::Token* pNext, Struct* pClass);
+ const Poco::Token* parseClassMembers(const Poco::Token* pNext, Struct* pClass);
+ const Poco::Token* parseAccess(const Poco::Token* pNext);
+ const Poco::Token* parseIdentifier(const Poco::Token* pNext, std::string& id);
+
+ void addSymbol(Symbol* pSymbol, int lineNumber, bool addGST = true);
+ void pushNameSpace(NameSpace* pNameSpace, int lineNumber, bool addGST = true);
+ void popNameSpace();
+ NameSpace* currentNameSpace() const;
+
+ static bool isIdentifier(const Poco::Token* pToken);
+ static bool isOperator(const Poco::Token* pToken, int kind);
+ static bool isKeyword(const Poco::Token* pToken, int kind);
+ static bool isEOF(const Poco::Token* pToken);
+ static void expectOperator(const Poco::Token* pToken, int kind, const std::string& msg);
+ static void syntaxError(const std::string& msg);
+ static void append(std::string& decl, const std::string& token);
+ static void append(std::string& decl, const Poco::Token* pToken);
+
+ const Poco::Token* next();
+ const Poco::Token* nextPreprocessed();
+ const Poco::Token* nextToken();
+
+private:
+ typedef std::vector NSStack;
+
+ NameSpace::SymbolTable& _gst;
+ Poco::CountingInputStream _istr;
+ Tokenizer _tokenizer;
+ std::string _file;
+ std::string _path;
+ std::string _currentPath;
+ bool _inFile;
+ std::string _package;
+ std::string _library;
+ NSStack _nsStack;
+ Symbol* _pCurrentSymbol;
+ Symbol::Access _access;
+ std::string _doc;
+ std::string _attrs;
+};
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_Parser_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/Struct.h b/CppParser/include/Poco/CppParser/Struct.h
new file mode 100644
index 000000000..5f8eb2191
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/Struct.h
@@ -0,0 +1,208 @@
+//
+// Struct.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Struct.h#1 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Struct
+//
+// Definition of the Struct class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_Struct_INCLUDED
+#define CppParser_Struct_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/CppParser/NameSpace.h"
+#include
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class Function;
+
+
+class CppParser_API Struct: public NameSpace
+ /// This class represents a struct or class declaration.
+{
+public:
+ enum Flags
+ {
+ FN_TEMPLATE = 1,
+ FN_INLINE = 2, // when the whole class is inlined in a c++ file
+ FN_TEMPLATE_SPECIALIZATION = 4
+ };
+
+ struct Base
+ {
+ Symbol::Access access;
+ bool isVirtual;
+ std::string name;
+ Struct* pClass;
+ };
+
+ typedef std::vector BaseClasses;
+ typedef BaseClasses::const_iterator BaseIterator;
+ typedef std::vector StructVec;
+ typedef StructVec::const_iterator DerivedIterator;
+ typedef std::vector Functions;
+ typedef std::set FunctionSet;
+ typedef std::set StructSet;
+
+ Struct(const std::string& decl, bool isClass, NameSpace* pNameSpace);
+ /// Creates the Struct.
+
+ ~Struct();
+ /// Destroys the Struct.
+
+ void addBase(const std::string&, Symbol::Access access, bool isVirtual);
+ /// Adds a base class.
+
+ BaseIterator baseBegin() const;
+ /// Returns an iterator for iterating over all base classes.
+
+ BaseIterator baseEnd() const;
+ /// Returns an iterator for iterating over all base classes.
+
+ void fixupBases();
+ /// Adds pointers for all base classes.
+
+ void addDerived(Struct* pClass);
+ /// Adds a derived class.
+
+ DerivedIterator derivedBegin() const;
+ /// Returns an iterator for iterating over all derived classes.
+
+ DerivedIterator derivedEnd() const;
+ /// Returns an iterator for iterating over all derived classes.
+
+ const std::string& declaration() const;
+ /// Returns the declaration.
+
+ int flags() const;
+ /// Returns the struct's flags.
+
+ void makeInline();
+ /// Changes the class to a inline class, i.e. definition and implementation are hidden in a cpp file.
+
+ bool isInline() const;
+ /// Returns true if the complete class is inlined in a cpp file.
+
+ void constructors(Functions& functions) const;
+ /// Returns all constructors, sorted by their parameter count.
+
+ Function* destructor() const;
+ /// Returns the destructor, or NULL if no
+ /// destructor is defined.
+
+ void methods(Symbol::Access access, Functions& functions) const;
+ /// Returns all functions with the given access.
+
+ void inheritedMethods(FunctionSet& functions) const;
+ /// Returns all inherited methods.
+
+ void bases(std::set& bases) const;
+ /// Returns all base classes.
+
+ void derived(StructSet& derived) const;
+ /// Returns all derived classes.
+
+ Function* findFunction(const std::string& signature) const;
+ /// Finds a function with the given signature.
+
+ bool hasVirtualDestructor() const;
+ /// Returns true if the class CppParser_API or one if its base classes
+ /// has a virtual destructor.
+
+ bool isClass() const;
+ /// Returns true iff the struct was declared as class.
+
+ bool isDerived() const;
+ /// Returns true iff the struct or class is derived from another struct or class.
+
+ Symbol::Kind kind() const;
+ std::string toString() const;
+
+private:
+ std::string _decl;
+ BaseClasses _bases;
+ StructVec _derived;
+ int _flags;
+ bool _isClass;
+};
+
+
+//
+// inlines
+//
+inline const std::string& Struct::declaration() const
+{
+ return _decl;
+}
+
+
+inline int Struct::flags() const
+{
+ return _flags;
+}
+
+
+inline bool Struct::isClass() const
+{
+ return _isClass;
+}
+
+
+inline void Struct::makeInline()
+{
+ _flags |= FN_INLINE;
+}
+
+
+inline bool Struct::isInline() const
+{
+ return (_flags & FN_INLINE) != 0;
+}
+
+
+inline bool Struct::isDerived() const
+{
+ return !_bases.empty();
+}
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_Struct_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/Symbol.h b/CppParser/include/Poco/CppParser/Symbol.h
new file mode 100644
index 000000000..312383cfe
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/Symbol.h
@@ -0,0 +1,278 @@
+//
+// Symbol.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Symbol.h#1 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Symbol
+//
+// Definition of the Symbol class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_Symbol_INCLUDED
+#define CppParser_Symbol_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/CppParser/Attributes.h"
+#include "Poco/Foundation.h"
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class NameSpace;
+
+
+class CppParser_API Symbol
+ /// This is the base class for all symbols in the symbol table.
+ ///
+ /// Every symbol has a unique ID (int) and a namespace (which
+ /// may be null).
+{
+public:
+ enum Kind
+ {
+ SYM_ENUM, /// An enumeration
+ SYM_ENUM_VALUE, /// An enumeration value
+ SYM_FUNCTION, /// A (member) function
+ SYM_NAMESPACE, /// A namespace
+ SYM_PARAMETER, /// A function parameter
+ SYM_STRUCT, /// A struct or class
+ SYM_TYPEDEF, /// A typedef
+ SYM_VARIABLE /// A (member) variable
+ };
+
+ enum Access
+ {
+ ACC_PUBLIC, /// public access
+ ACC_PROTECTED, /// protected access
+ ACC_PRIVATE /// private access
+ };
+
+ Symbol();
+ /// Creates the Symbol and assigns the symbol
+ /// a unique ID.
+
+ Symbol(const std::string& name, NameSpace* pNameSpace = 0);
+ /// Creates the Symbol and assigns the symbol
+ /// a unique ID.
+
+ virtual ~Symbol();
+ /// Destroys the Symbol.
+
+ int id() const;
+ /// Returns the symbol's unique ID.
+
+ const std::string& name() const;
+ /// Returns the symbol's (local) name.
+
+ NameSpace* nameSpace() const;
+ /// Returns the symbol's namespace which
+ /// may be null.
+
+ void setAccess(Access v);
+ /// Sets the symbol's access.
+
+ Access getAccess() const;
+ /// Returns the symbol's access.
+
+ void setDocumentation(const std::string& text);
+ /// Sets the symbol's documentation.
+
+ void addDocumentation(const std::string& text);
+ /// Adds text to the symbol's documentation.
+
+ const std::string& getDocumentation() const;
+ /// Returns the symbol's documentation.
+
+ void setFile(const std::string& path);
+ /// Sets the file where the symbol is declared.
+
+ const std::string& getFile() const;
+ /// Returns the file where the symbol is defined.
+
+ void setLineNumber(int line);
+ /// Sets the line number of the symbol's declaration.
+
+ int getLineNumber() const;
+ /// Returns the line number of the symbol's declaration.
+
+ void setPackage(const std::string& package);
+ /// Sets the symbol's package.
+
+ const std::string& getPackage() const;
+ /// Returns the symbol's package.
+
+ void setLibrary(const std::string& library);
+ /// Sets the symbol's library.
+
+ const std::string& getLibrary() const;
+ /// Returns the symbol's library.
+
+ const Attributes& attrs() const;
+ /// Returns the symbol's attributes.
+
+ const Attributes& getAttributes() const;
+ /// Returns the symbol's attributes.
+
+ void setAttributes(const Attributes& attrs);
+ /// Sets the symbol's attributes.
+
+ std::string fullName() const;
+ /// Returns the symbol's fully qualified name.
+
+ static std::string extractName(const std::string& decl);
+ /// Extracts the name from the declaration.
+
+ virtual Kind kind() const = 0;
+ /// Returns the symbol's kind.
+
+ virtual std::string toString() const = 0;
+ /// Returns a string representation of the symbol.
+
+ bool isPublic() const;
+ /// Returns true iff the symbol is public.
+
+ bool isProtected() const;
+ /// Returns true iff the symbol is public.
+
+ bool isPrivate() const;
+ /// Returns true iff the symbol is public.
+
+protected:
+ static bool isIdent(char c);
+ static bool hasAttr(const std::string& decl, const std::string& attr);
+
+private:
+ Symbol(const Symbol&);
+ Symbol& operator = (const Symbol&);
+
+ int _id;
+ std::string _name;
+ NameSpace* _pNameSpace;
+ Access _access;
+ std::string _documentation;
+ std::string _file;
+ int _line;
+ std::string _package;
+ std::string _library;
+ Attributes _attrs;
+
+ static int _nextId;
+};
+
+
+//
+// inlines
+//
+inline int Symbol::id() const
+{
+ return _id;
+}
+
+
+inline const std::string& Symbol::name() const
+{
+ return _name;
+}
+
+
+inline const std::string& Symbol::getDocumentation() const
+{
+ return _documentation;
+}
+
+
+inline Symbol::Access Symbol::getAccess() const
+{
+ return _access;
+}
+
+
+inline NameSpace* Symbol::nameSpace() const
+{
+ return _pNameSpace;
+}
+
+
+inline const std::string& Symbol::getFile() const
+{
+ return _file;
+}
+
+
+inline int Symbol::getLineNumber() const
+{
+ return _line;
+}
+
+
+inline const std::string& Symbol::getPackage() const
+{
+ return _package;
+}
+
+
+inline const std::string& Symbol::getLibrary() const
+{
+ return _library;
+}
+
+
+inline const Attributes& Symbol::attrs() const
+{
+ return _attrs;
+}
+
+
+inline bool Symbol::isPublic() const
+{
+ return _access == ACC_PUBLIC;
+}
+
+
+inline bool Symbol::isProtected() const
+{
+ return _access == ACC_PROTECTED;
+}
+
+
+inline bool Symbol::isPrivate() const
+{
+ return _access == ACC_PRIVATE;
+}
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_Symbol_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/Tokenizer.h b/CppParser/include/Poco/CppParser/Tokenizer.h
new file mode 100644
index 000000000..63c02495f
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/Tokenizer.h
@@ -0,0 +1,66 @@
+//
+// Tokenizer.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Tokenizer.h#1 $
+//
+// Library: CppParser
+// Package: CppParser
+// Module: Tokenizer
+//
+// Definition of the Tokenizer class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_Tokenizer_INCLUDED
+#define CppParser_Tokenizer_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/StreamTokenizer.h"
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class CppParser_API Tokenizer: public Poco::StreamTokenizer
+ /// A Tokenizer for C++.
+{
+public:
+ Tokenizer(std::istream& istr);
+ /// Creates the Tokenizer.
+
+ ~Tokenizer();
+ /// Destroys the Tokenizer.
+};
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_Tokenizer_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/TypeDef.h b/CppParser/include/Poco/CppParser/TypeDef.h
new file mode 100644
index 000000000..026484e21
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/TypeDef.h
@@ -0,0 +1,71 @@
+//
+// TypeDef.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/TypeDef.h#2 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: TypeDef
+//
+// Definition of the TypeDef class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_TypeDef_INCLUDED
+#define CppParser_TypeDef_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/CppParser/Decl.h"
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class CppParser_API TypeDef: public Decl
+ /// This class represents a type definition (typedef).
+{
+public:
+ TypeDef(const std::string& decl, NameSpace* pNameSpace);
+ /// Creates the TypeDef.
+
+ ~TypeDef();
+ /// Destroys the TypeDef.
+
+ Symbol::Kind kind() const;
+
+ std::string baseType() const;
+ /// Returns the underlying base type.
+};
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_TypeDef_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/Utility.h b/CppParser/include/Poco/CppParser/Utility.h
new file mode 100644
index 000000000..2856c0b01
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/Utility.h
@@ -0,0 +1,107 @@
+//
+// Utility.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Utility.h#1 $
+//
+// Library: CppParser
+// Package: CppParser
+// Module: Utility
+//
+// Definition of the Utility class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_Utility_INCLUDED
+#define CppParser_Utility_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/CppParser/NameSpace.h"
+#include
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class CppParser_API Utility
+ /// Various helpers for parsing and analyzing C++ header files.
+{
+public:
+ class CppParser_API FwdDeclBlock
+ {
+ public:
+ std::string beginNameSpaceDecl; // contains either $(NS)_BEGIN or the namespace x { decl
+ std::string endNameSpaceDecl; // contains either $(NS)_END or the closing brackets }
+ std::vector classDecls; // contains strings of the form "class X;"
+ };
+
+ static void parse(const std::string& file, NameSpace::SymbolTable& st, const std::string& exec, const std::string& options, const std::string& path);
+ /// Preprocesses and parses the file. The resulting symboltable has base class references already fixed,
+
+ static void parseDir(const std::vector & includePattern, const std::vector & excludePattern, NameSpace::SymbolTable& st, const std::string& exec, const std::string& options, const std::string& path);
+ /// Preprocesses and parses all files specified by the include pattern (e.g.: p:/poco/Foundation/include/*/*.h) minus the ones defined in the exclude pattern
+
+ static void fixup(NameSpace::SymbolTable& st);
+ /// Fixes all base pointers in the symbol table
+
+ static void detectPrefixAndIncludes(const std::string& origHFile, std::vector& lines, std::string& prefix);
+ /// This method is poco coding style specific! It looks for a $(PREFIX)_BEGIN and extracts from it a prefix, also include files and fwd declarations are extracted from the h file.
+
+ static void removeFile(const std::string& preprocessedfile);
+ /// Tries to remove the file. If it fails, the error is silently ignored.
+
+protected:
+ static std::string preprocessFile(const std::string& file, const std::string& exec, const std::string& options, const std::string& path);
+ /// Preprocess the include file with name file. Parameter exec must contain the name of the preprocessor binary (e.g.: "cl" for Visual Studio).
+ /// Parameter options contains the flag for the preprocessor, and parameter path sets the environment PATH settings during preprocessing.
+ /// Returns the name of the created file or throws an exception.
+
+ static void parseOnly(const std::string& file, NameSpace::SymbolTable& st, const std::string& preprocessedFile, bool removePreprocessedFile = true);
+ /// Parses the file, throws an exception if anything goes wrong.
+
+ static void buildFileList(std::set& files, const std::vector& includePattern, const std::vector& excludePattern);
+ /// Searches all files that match the defined patterns and inserts them into files.
+private:
+ Utility();
+ ~Utility();
+ Utility(const Utility&);
+ Utility& operator=(const Utility&);
+
+};
+
+
+std::string CppParser_API replace(const std::string& input, const std::string& oldToken, const std::string& newToken);
+ /// Replaces in character input all oldTokens with the newToken
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_Utility_INCLUDED
diff --git a/CppParser/include/Poco/CppParser/Variable.h b/CppParser/include/Poco/CppParser/Variable.h
new file mode 100644
index 000000000..6c61ef2ad
--- /dev/null
+++ b/CppParser/include/Poco/CppParser/Variable.h
@@ -0,0 +1,114 @@
+//
+// Variable.h
+//
+// $Id: //poco/1.3/CppParser/include/Poco/CppParser/Variable.h#2 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Variable
+//
+// Definition of the Variable class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParser_Variable_INCLUDED
+#define CppParser_Variable_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "Poco/CppParser/Decl.h"
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class CppParser_API Variable: public Decl
+ /// This class represents (member) variable declaration.
+{
+public:
+ enum Flags
+ {
+ VAR_STATIC = 1, /// The variable is static.
+ VAR_MUTABLE = 2, /// The variable is mutable.
+ VAR_VOLATILE = 4, /// The variable is volatile.
+ VAR_CONST = 8 /// The variable is const.
+ };
+
+ Variable(const std::string& decl, NameSpace* pNameSpace);
+ /// Creates the Variable.
+
+ ~Variable();
+ /// Destroys the Variable.
+
+ int flags() const;
+ /// Returns the variable's flags.
+
+ bool isPointer() const;
+ /// Returns true iff the variable holds a pointer.
+
+ Symbol::Kind kind() const;
+
+ const std::string& declType() const;
+ /// Returns the type of the parameter without const and & if present.
+ ///
+ /// Example: a type const std::string& -> std::string, a type const std::string* returns std::string
+
+
+private:
+ int _flags;
+ bool _isPointer;
+ std::string _type;
+};
+
+
+//
+// inlines
+//
+inline int Variable::flags() const
+{
+ return _flags;
+}
+
+
+inline bool Variable::isPointer() const
+{
+ return _isPointer;
+}
+
+
+inline const std::string& Variable::declType() const
+{
+ return _type;
+}
+
+
+} } // namespace Poco::CppParser
+
+
+#endif // CppParser_Variable_INCLUDED
diff --git a/CppParser/src/Attributes.cpp b/CppParser/src/Attributes.cpp
new file mode 100644
index 000000000..a03b04459
--- /dev/null
+++ b/CppParser/src/Attributes.cpp
@@ -0,0 +1,168 @@
+//
+// Attributes.cpp
+//
+// $Id: //poco/1.3/CppParser/src/Attributes.cpp#1 $
+//
+// Library: CppParser
+// Package: Attributes
+// Module: Attributes
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/Attributes.h"
+#include "Poco/NumberParser.h"
+#include "Poco/Exception.h"
+#include
+
+
+using Poco::NumberParser;
+
+
+namespace Poco {
+namespace CppParser {
+
+
+Attributes::Attributes()
+{
+}
+
+
+Attributes::Attributes(const Attributes& attrs)
+{
+ _map = attrs._map;
+}
+
+
+Attributes::~Attributes()
+{
+}
+
+
+Attributes& Attributes::operator = (const Attributes& attrs)
+{
+ AttrMap map(attrs._map);
+ std::swap(_map, map);
+ return *this;
+}
+
+
+bool Attributes::has(const std::string& name) const
+{
+ return _map.find(name) != _map.end();
+}
+
+
+std::string Attributes::getString(const std::string& name) const
+{
+ AttrMap::const_iterator it = _map.find(name);
+ if (it != _map.end())
+ return it->second;
+ else
+ throw Poco::NotFoundException(name);
+}
+
+
+std::string Attributes::getString(const std::string& name, const std::string& defaultValue) const
+{
+ AttrMap::const_iterator it = _map.find(name);
+ if (it != _map.end())
+ return it->second;
+ else
+ return defaultValue;
+}
+
+
+int Attributes::getInt(const std::string& name) const
+{
+ AttrMap::const_iterator it = _map.find(name);
+ if (it != _map.end())
+ return NumberParser::parse(it->second);
+ else
+ throw Poco::NotFoundException(name);
+}
+
+
+int Attributes::getInt(const std::string& name, int defaultValue) const
+{
+ AttrMap::const_iterator it = _map.find(name);
+ if (it != _map.end())
+ return NumberParser::parse(it->second);
+ else
+ return defaultValue;
+}
+
+
+bool Attributes::getBool(const std::string& name) const
+{
+ AttrMap::const_iterator it = _map.find(name);
+ if (it != _map.end())
+ return it->second != "false";
+ else
+ throw Poco::NotFoundException(name);
+}
+
+
+bool Attributes::getBool(const std::string& name, bool defaultValue) const
+{
+ AttrMap::const_iterator it = _map.find(name);
+ if (it != _map.end())
+ return it->second != "false";
+ else
+ return defaultValue;
+}
+
+
+void Attributes::set(const std::string& name, const std::string& value)
+{
+ _map[name] = value;
+}
+
+
+const std::string& Attributes::operator [] (const std::string& name) const
+{
+ AttrMap::const_iterator it = _map.find(name);
+ if (it != _map.end())
+ return it->second;
+ else
+ throw Poco::NotFoundException(name);
+}
+
+
+std::string& Attributes::operator [] (const std::string& name)
+{
+ return _map[name];
+}
+
+
+void Attributes::clear()
+{
+ _map.clear();
+}
+
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/src/AttributesParser.cpp b/CppParser/src/AttributesParser.cpp
new file mode 100644
index 000000000..9ec6bb3ba
--- /dev/null
+++ b/CppParser/src/AttributesParser.cpp
@@ -0,0 +1,169 @@
+//
+// AttributesParser.cpp
+//
+// $Id: //poco/1.3/CppParser/src/AttributesParser.cpp#1 $
+//
+// Library: CppParser
+// Package: Attributes
+// Module: AttributesParser
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/AttributesParser.h"
+#include "Poco/CppParser/CppToken.h"
+#include "Poco/Exception.h"
+
+
+using Poco::Token;
+using Poco::SyntaxException;
+
+
+namespace Poco {
+namespace CppParser {
+
+
+AttributesParser::AttributesParser(Attributes& attrs, std::istream& istr):
+ _attrs(attrs),
+ _tokenizer(istr)
+{
+}
+
+
+AttributesParser::~AttributesParser()
+{
+}
+
+
+void AttributesParser::parse()
+{
+ const Token* pNext = next();
+ if (!isEOF(pNext))
+ {
+ pNext = parseAttributes(pNext);
+ }
+ if (!isEOF(pNext))
+ throw Poco::SyntaxException("extra tokens found in attribute declaration");
+}
+
+
+const Token* AttributesParser::parseAttributes(const Token* pNext)
+{
+ pNext = parseAttribute(pNext);
+ while (isOperator(pNext, OperatorToken::OP_COMMA) || isIdentifier(pNext))
+ {
+ if (!isIdentifier(pNext)) pNext = next();
+ pNext = parseAttribute(pNext);
+ }
+ return pNext;
+}
+
+
+const Token* AttributesParser::parseAttribute(const Token* pNext)
+{
+ std::string id;
+ std::string value;
+ pNext = parseIdentifier(pNext, id);
+ if (isOperator(pNext, OperatorToken::OP_ASSIGN))
+ {
+ pNext = next();
+ if (isOperator(pNext, OperatorToken::OP_OPENBRACE))
+ {
+ pNext = parseComplexAttribute(pNext, id);
+ }
+ else if (isIdentifier(pNext) || isLiteral(pNext))
+ {
+ value = pNext->asString();
+ pNext = next();
+ }
+ else throw SyntaxException("bad attribute declaration");
+ }
+ setAttribute(id, value);
+ return pNext;
+}
+
+
+const Token* AttributesParser::parseComplexAttribute(const Token* pNext, const std::string& id)
+{
+ poco_assert_dbg (isOperator(pNext, OperatorToken::OP_OPENBRACE));
+
+ pNext = next();
+ std::string oldId(_id);
+ if (!_id.empty())
+ {
+ _id.append(".");
+ _id.append(id);
+ }
+ else _id = id;
+ pNext = parseAttributes(pNext);
+ _id = oldId;
+ if (isOperator(pNext, OperatorToken::OP_CLOSBRACE))
+ pNext = next();
+ else
+ throw SyntaxException("bad attribute declaration");
+
+ return pNext;
+}
+
+
+const Token* AttributesParser::parseIdentifier(const Token* pNext, std::string& id)
+{
+ if (isIdentifier(pNext))
+ {
+ id = pNext->asString();
+ pNext = next();
+ while (isOperator(pNext, OperatorToken::OP_PERIOD))
+ {
+ id.append(".");
+ pNext = next();
+ if (isIdentifier(pNext))
+ {
+ id.append(pNext->asString());
+ pNext = next();
+ }
+ else throw SyntaxException("identifier expected");
+ }
+ return pNext;
+ }
+ else throw SyntaxException("identifier expected");
+}
+
+
+void AttributesParser::setAttribute(const std::string& name, const std::string& value)
+{
+ std::string n;
+ if (!_id.empty())
+ {
+ n.append(_id);
+ n.append(".");
+ }
+ n.append(name);
+ _attrs.set(n, value);
+}
+
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/src/CppToken.cpp b/CppParser/src/CppToken.cpp
new file mode 100644
index 000000000..c7ad5ab9a
--- /dev/null
+++ b/CppParser/src/CppToken.cpp
@@ -0,0 +1,749 @@
+//
+// CppToken.cpp
+//
+// $Id: //poco/1.3/CppParser/src/CppToken.cpp#4 $
+//
+// Library: CppParser
+// Package: CppParser
+// Module: CppToken
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/CppToken.h"
+#include "Poco/Exception.h"
+#include
+#include
+
+
+using Poco::Token;
+using Poco::SyntaxException;
+
+
+namespace Poco {
+namespace CppParser {
+
+
+CppToken::CppToken()
+{
+}
+
+
+CppToken::~CppToken()
+{
+}
+
+
+void CppToken::syntaxError(const std::string& expected, const std::string& actual)
+{
+ std::string msg("expected: ");
+ msg.append(expected);
+ msg.append(", got: ");
+ msg.append(actual);
+ throw SyntaxException(msg);
+}
+
+
+OperatorToken::OperatorToken()
+{
+ int i = 1;
+ _opMap["["] = i++;
+ _opMap["]"] = i++;
+ _opMap["("] = i++;
+ _opMap[")"] = i++;
+ _opMap["{"] = i++;
+ _opMap["}"] = i++;
+ _opMap["<"] = i++;
+ _opMap["<="] = i++;
+ _opMap["<<"] = i++;
+ _opMap["<<="] = i++;
+ _opMap[">"] = i++;
+ _opMap[">="] = i++;
+ _opMap[">>"] = i++;
+ _opMap[">>="] = i++;
+ _opMap["="] = i++;
+ _opMap["=="] = i++;
+ _opMap["!"] = i++;
+ _opMap["!="] = i++;
+ _opMap["&"] = i++;
+ _opMap["&="] = i++;
+ _opMap["&&"] = i++;
+ _opMap["|"] = i++;
+ _opMap["|="] = i++;
+ _opMap["||"] = i++;
+ _opMap["^"] = i++;
+ _opMap["^="] = i++;
+ _opMap["~"] = i++;
+ _opMap["*"] = i++;
+ _opMap["*="] = i++;
+ _opMap["/"] = i++;
+ _opMap["/="] = i++;
+ _opMap["+"] = i++;
+ _opMap["+="] = i++;
+ _opMap["++"] = i++;
+ _opMap["-"] = i++;
+ _opMap["-="] = i++;
+ _opMap["--"] = i++;
+ _opMap["->"] = i++;
+ _opMap["%"] = i++;
+ _opMap["%="] = i++;
+ _opMap[","] = i++;
+ _opMap["."] = i++;
+ _opMap["..."] = i++;
+ _opMap[":"] = i++;
+ _opMap["::"] = i++;
+ _opMap[";"] = i++;
+ _opMap["?"] = i++;
+}
+
+
+OperatorToken::~OperatorToken()
+{
+}
+
+
+Token::Class OperatorToken::tokenClass() const
+{
+ return Token::OPERATOR_TOKEN;
+}
+
+
+bool OperatorToken::start(char c, std::istream& istr)
+{
+ _value = c;
+ char next = (char) istr.peek();
+ switch (_value[0])
+ {
+ case '[':
+ case ']':
+ case '(':
+ case ')':
+ case '{':
+ case '}':
+ case '<':
+ case '>':
+ case '=':
+ case '!':
+ case '&':
+ case '|':
+ case '*':
+ case '+':
+ case '-':
+ case '^':
+ case '~':
+ case ',':
+ case ':':
+ case ';':
+ case '%':
+ case '?':
+ return true;
+ case '.':
+ return !(next >= '0' && next <= '9');
+ case '/':
+ return !(next == '/' || next == '*');
+ default:
+ return false;
+ }
+}
+
+
+void OperatorToken::finish(std::istream& istr)
+{
+ int next = (char) istr.peek();
+ switch (_value[0])
+ {
+ case '(':
+ case ')':
+ case '{':
+ case '}':
+ case '[':
+ case ']':
+ case ';':
+ case '?':
+ case '~':
+ case ',':
+ break;
+ case '.':
+ if (next == '.')
+ {
+ _value += (char) istr.get();
+ if (istr.peek() != '.') syntaxError(".", std::string(1, (char) istr.peek()));
+ _value += (char) istr.get();
+ }
+ break;
+ case ':':
+ if (next == ':') _value += (char) istr.get();
+ break;
+ case '<':
+ if (next == '<')
+ {
+ _value += (char) istr.get();
+ next = (char) istr.peek();
+ }
+ if (next == '=') _value += (char) istr.get();
+ break;
+ case '>':
+ if (next == '>')
+ {
+ _value += (char) istr.get();
+ next = (char) istr.peek();
+ }
+ if (next == '=') _value += (char) istr.get();
+ break;
+ case '&':
+ if (next == '&' || next == '=') _value += (char) istr.get();
+ break;
+ case '|':
+ if (next == '|' || next == '=') _value += (char) istr.get();
+ break;
+ case '+':
+ if (next == '+' || next == '=') _value += (char) istr.get();
+ break;
+ case '-':
+ if (next == '-' || next == '=' || next == '>') _value += (char) istr.get();
+ break;
+ case '=':
+ case '!':
+ case '*':
+ case '/':
+ case '^':
+ case '%':
+ if (next == '=') _value += (char) istr.get();
+ break;
+ default:
+ poco_bugcheck();
+ }
+}
+
+
+int OperatorToken::asInteger() const
+{
+ OpMap::const_iterator it = _opMap.find(_value);
+ if (it != _opMap.end())
+ return it->second;
+ else
+ return 0;
+}
+
+
+IdentifierToken::IdentifierToken()
+{
+ int i = 1;
+ _kwMap["and"] = i++;
+ _kwMap["and_eq"] = i++;
+ _kwMap["asm"] = i++;
+ _kwMap["auto"] = i++;
+ _kwMap["bitand"] = i++;
+ _kwMap["bitor"] = i++;
+ _kwMap["bool"] = i++;
+ _kwMap["break"] = i++;
+ _kwMap["case"] = i++;
+ _kwMap["catch"] = i++;
+ _kwMap["char"] = i++;
+ _kwMap["class"] = i++;
+ _kwMap["compl"] = i++;
+ _kwMap["const"] = i++;
+ _kwMap["const_cast"] = i++;
+ _kwMap["continue"] = i++;
+ _kwMap["default"] = i++;
+ _kwMap["delete"] = i++;
+ _kwMap["do"] = i++;
+ _kwMap["double"] = i++;
+ _kwMap["dynamic_cast"] = i++;
+ _kwMap["else"] = i++;
+ _kwMap["enum"] = i++;
+ _kwMap["explicit"] = i++;
+ _kwMap["export"] = i++;
+ _kwMap["extern"] = i++;
+ _kwMap["false"] = i++;
+ _kwMap["float"] = i++;
+ _kwMap["for"] = i++;
+ _kwMap["friend"] = i++;
+ _kwMap["goto"] = i++;
+ _kwMap["if"] = i++;
+ _kwMap["inline"] = i++;
+ _kwMap["int"] = i++;
+ _kwMap["long"] = i++;
+ _kwMap["mutable"] = i++;
+ _kwMap["namespace"] = i++;
+ _kwMap["new"] = i++;
+ _kwMap["not"] = i++;
+ _kwMap["not_eq"] = i++;
+ _kwMap["operator"] = i++;
+ _kwMap["or"] = i++;
+ _kwMap["or_eq"] = i++;
+ _kwMap["private"] = i++;
+ _kwMap["protected"] = i++;
+ _kwMap["public"] = i++;
+ _kwMap["register"] = i++;
+ _kwMap["reinterpret_cast"] = i++;
+ _kwMap["return"] = i++;
+ _kwMap["short"] = i++;
+ _kwMap["signed"] = i++;
+ _kwMap["sizeof"] = i++;
+ _kwMap["static"] = i++;
+ _kwMap["static_cast"] = i++;
+ _kwMap["struct"] = i++;
+ _kwMap["switch"] = i++;
+ _kwMap["template"] = i++;
+ _kwMap["this"] = i++;
+ _kwMap["throw"] = i++;
+ _kwMap["true"] = i++;
+ _kwMap["try"] = i++;
+ _kwMap["typedef"] = i++;
+ _kwMap["typeid"] = i++;
+ _kwMap["typename"] = i++;
+ _kwMap["union"] = i++;
+ _kwMap["unsigned"] = i++;
+ _kwMap["using"] = i++;
+ _kwMap["virtual"] = i++;
+ _kwMap["void"] = i++;
+ _kwMap["volatile"] = i++;
+ _kwMap["wchar_t"] = i++;
+ _kwMap["while"] = i++;
+ _kwMap["xor"] = i++;
+ _kwMap["xor_eq"] = i++;
+}
+
+
+IdentifierToken::~IdentifierToken()
+{
+}
+
+
+Token::Class IdentifierToken::tokenClass() const
+{
+ return asInteger() ? Token::KEYWORD_TOKEN : Token::IDENTIFIER_TOKEN;
+}
+
+
+bool IdentifierToken::start(char c, std::istream& istr)
+{
+ _value = c;
+ return (c >= 'A' && c <= 'Z') ||
+ (c >= 'a' && c <= 'z') ||
+ (c == '_' || c == '$');
+}
+
+
+void IdentifierToken::finish(std::istream& istr)
+{
+ int next = (char) istr.peek();
+ while ((next >= 'A' && next <= 'Z') ||
+ (next >= 'a' && next <= 'z') ||
+ (next >= '0' && next <= '9') ||
+ (next == '_' || next == '$'))
+ {
+ _value += (char) istr.get();
+ next = istr.peek();
+ }
+}
+
+
+int IdentifierToken::asInteger() const
+{
+ KWMap::const_iterator it = _kwMap.find(_value);
+ if (it != _kwMap.end())
+ return it->second;
+ else
+ return 0;
+}
+
+
+StringLiteralToken::StringLiteralToken()
+{
+}
+
+
+StringLiteralToken::~StringLiteralToken()
+{
+}
+
+
+Token::Class StringLiteralToken::tokenClass() const
+{
+ return Token::STRING_LITERAL_TOKEN;
+}
+
+
+bool StringLiteralToken::start(char c, std::istream& istr)
+{
+ _value = c;
+ return c == '"';
+}
+
+
+void StringLiteralToken::finish(std::istream& istr)
+{
+ int next = istr.peek();
+ while (next != -1 && next != '"' && next != '\n' && next != '\r')
+ {
+ if (next == '\\') _value += (char) istr.get();
+ _value += (char) istr.get();
+ next = istr.peek();
+ }
+ if (next == '"')
+ {
+ next = istr.get();
+ _value += (char) next;
+ }
+ else throw SyntaxException("Unterminated string literal");
+}
+
+
+std::string StringLiteralToken::asString() const
+{
+ std::string result;
+ std::string::const_iterator it = _value.begin();
+ std::string::const_iterator end = _value.end();
+ if (it != end)
+ {
+ if (*it == '"') ++it;
+ while (it != end && *it != '"')
+ {
+ if (*it == '\\') ++it;
+ if (it != end) result += *it++;
+ }
+ }
+ return result;
+}
+
+
+CharLiteralToken::CharLiteralToken()
+{
+}
+
+
+CharLiteralToken::~CharLiteralToken()
+{
+}
+
+
+Token::Class CharLiteralToken::tokenClass() const
+{
+ return Token::CHAR_LITERAL_TOKEN;
+}
+
+
+bool CharLiteralToken::start(char c, std::istream& istr)
+{
+ _value = c;
+ return c == '\'';
+}
+
+
+void CharLiteralToken::finish(std::istream& istr)
+{
+ int next = istr.peek();
+ while (next != -1 && next != '\'' && next != '\n' && next != '\r')
+ {
+ if (next == '\\') _value += (char) istr.get();
+ _value += (char) istr.get();
+ next = istr.peek();
+ }
+ if (next == '\'')
+ {
+ next = istr.get();
+ _value += (char) next;
+ }
+ else throw SyntaxException("Unterminated character literal");
+}
+
+
+char CharLiteralToken::asChar() const
+{
+ char result('\0');
+ std::string::const_iterator it = _value.begin();
+ std::string::const_iterator end = _value.end();
+ if (it != end)
+ {
+ if (*it == '\'') ++it;
+ while (it != end && *it != '\'')
+ {
+ if (*it == '\\') ++it;
+ if (it != end) result = *it++;
+ }
+ }
+ return result;
+}
+
+
+NumberLiteralToken::NumberLiteralToken():
+ _isFloat(false)
+{
+}
+
+
+NumberLiteralToken::~NumberLiteralToken()
+{
+}
+
+
+Token::Class NumberLiteralToken::tokenClass() const
+{
+ return _isFloat ? Token::FLOAT_LITERAL_TOKEN : Token::INTEGER_LITERAL_TOKEN;
+}
+
+
+bool NumberLiteralToken::start(char c, std::istream& istr)
+{
+ _value = c;
+ int next = istr.peek();
+ return (c >= '0' && c <= '9') ||
+ (c == '.' && next >= '0' && next <= '9');
+}
+
+
+void NumberLiteralToken::finish(std::istream& istr)
+{
+ int next = istr.peek();
+ _isFloat = false;
+ if (_value[0] != '.') // starts with digit
+ {
+ if (next == 'x')
+ {
+ _value += (char) istr.get();
+ next = istr.peek();
+ while (std::isxdigit(next))
+ {
+ _value += (char) istr.get();
+ next = istr.peek();
+ }
+ while (next == 'L' || next == 'l' || next == 'U' || next == 'u')
+ {
+ _value += (char) istr.get();
+ next = istr.peek();
+ }
+ return;
+ }
+ while (next >= '0' && next <= '9')
+ {
+ _value += (char) istr.get();
+ next = istr.peek();
+ }
+ if (next == '.')
+ {
+ next = istr.get();
+ next = istr.peek();
+ if (next != '.')
+ {
+ _isFloat = true;
+ _value += '.';
+ }
+ else // double period
+ {
+ istr.unget();
+ }
+ }
+ }
+ else
+ {
+ _isFloat = true;
+ _value += istr.get();
+ next = istr.peek();
+ }
+ while (next >= '0' && next <= '9')
+ {
+ _value += (char) istr.get();
+ next = istr.peek();
+ }
+ if (next == 'e' || next == 'E')
+ {
+ _isFloat = true;
+ _value += (char) istr.get();
+ next = istr.peek();
+ if (next == '+' || next == '-')
+ {
+ _value += (char) istr.get();
+ next = istr.peek();
+ }
+ if (next >= '0' && next <= '9')
+ {
+ while (next >= '0' && next <= '9')
+ {
+ _value += (char) istr.get();
+ next = istr.peek();
+ }
+ }
+ else
+ {
+ std::string s(1, (char) next);
+ syntaxError("digit", s);
+ }
+ }
+ if (_isFloat)
+ {
+ if (next == 'L' || next == 'l' || next == 'F' || next == 'f')
+ _value += (char) istr.get();
+ }
+ else
+ {
+ while (next == 'L' || next == 'l' || next == 'U' || next == 'u')
+ {
+ _value += (char) istr.get();
+ next = istr.peek();
+ }
+ }
+}
+
+
+int NumberLiteralToken::asInteger() const
+{
+ return static_cast(strtol(_value.c_str(), 0, 0));
+
+}
+
+
+double NumberLiteralToken::asFloat() const
+{
+ return strtod(_value.c_str(), 0);
+}
+
+
+CommentToken::CommentToken()
+{
+}
+
+
+CommentToken::~CommentToken()
+{
+}
+
+
+Token::Class CommentToken::tokenClass() const
+{
+ return (_value.length() > 2 && _value[2] == '/') ? Token::SPECIAL_COMMENT_TOKEN : Token::COMMENT_TOKEN;
+}
+
+
+bool CommentToken::start(char c, std::istream& istr)
+{
+ _value = c;
+ int next = istr.peek();
+ return c == '/' && (next == '*' || next == '/');
+}
+
+
+void CommentToken::finish(std::istream& istr)
+{
+ int next = istr.peek();
+ if (next == '/')
+ {
+ while (next != -1 && next != '\r' && next != '\n')
+ {
+ _value += (char) istr.get();
+ next = istr.peek();
+ }
+ }
+ else
+ {
+ _value += (char) istr.get(); // *
+ next = istr.peek();
+ while (next != -1)
+ {
+ next = istr.get();
+ _value += (char) next;
+ if (next == '*' && istr.peek() == '/')
+ {
+ _value += (char) istr.get();
+ break;
+ }
+ }
+ }
+}
+
+
+std::string CommentToken::asString() const
+{
+ if (_value.length() > 2 && _value[2] == '/')
+ return _value.substr(3);
+ else
+ return _value.substr(2);
+}
+
+
+PreprocessorToken::PreprocessorToken()
+{
+}
+
+
+PreprocessorToken::~PreprocessorToken()
+{
+}
+
+
+Token::Class PreprocessorToken::tokenClass() const
+{
+ return Token::PREPROCESSOR_TOKEN;
+}
+
+
+bool PreprocessorToken::start(char c, std::istream& istr)
+{
+ _value = c;
+ return c == '#';
+}
+
+
+void PreprocessorToken::finish(std::istream& istr)
+{
+ int pb = -1;
+ int next = istr.peek();
+ while (next != -1 && next != '\r' && next != '\n')
+ {
+ if (next == '\\')
+ {
+ istr.get();
+ int p = istr.peek();
+ if (p == '\r')
+ {
+ istr.get();
+ if (istr.peek() == '\n')
+ p = istr.get();
+ next = p;
+ }
+ else if (p == '\n')
+ {
+ next = p;
+ }
+ else
+ {
+ pb = next;
+ }
+ }
+ if (next != -1)
+ {
+ _value += (char) (pb != -1 ? pb : istr.get());
+ next = istr.peek();
+ pb = -1;
+ }
+ }
+}
+
+
+} } // namespace Poco::CppParser
+
diff --git a/CppParser/src/Decl.cpp b/CppParser/src/Decl.cpp
new file mode 100644
index 000000000..721034442
--- /dev/null
+++ b/CppParser/src/Decl.cpp
@@ -0,0 +1,64 @@
+//
+// Decl.cpp
+//
+// $Id: //poco/1.3/CppParser/src/Decl.cpp#2 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Decl
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/Decl.h"
+#include "Poco/String.h"
+
+
+namespace Poco {
+namespace CppParser {
+
+
+Decl::Decl(const std::string& decl, NameSpace* pNameSpace):
+ Symbol(extractName(decl), pNameSpace),
+ _decl(Poco::trim(decl))
+{
+}
+
+
+Decl::~Decl()
+{
+}
+
+
+std::string Decl::toString() const
+{
+ return _decl;
+}
+
+
+} } // namespace Poco::CppParser
+
diff --git a/CppParser/src/Enum.cpp b/CppParser/src/Enum.cpp
new file mode 100644
index 000000000..bb4f96402
--- /dev/null
+++ b/CppParser/src/Enum.cpp
@@ -0,0 +1,115 @@
+//
+// Enum.cpp
+//
+// $Id: //poco/1.3/CppParser/src/Enum.cpp#1 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Enum
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/Enum.h"
+#include "Poco/CppParser/EnumValue.h"
+#include "Poco/NumberFormatter.h"
+#include
+
+
+using Poco::NumberFormatter;
+
+
+namespace Poco {
+namespace CppParser {
+
+
+int Enum::_count = 0;
+
+
+Enum::Enum(const std::string& name, NameSpace* pNameSpace):
+ Symbol(processName(name), pNameSpace)
+{
+}
+
+
+Enum::~Enum()
+{
+}
+
+
+void Enum::addValue(EnumValue* pValue)
+{
+ poco_check_ptr (pValue);
+
+ _values.push_back(pValue);
+}
+
+
+Enum::Iterator Enum::begin() const
+{
+ return _values.begin();
+}
+
+
+Enum::Iterator Enum::end() const
+{
+ return _values.end();
+}
+
+
+std::string Enum::processName(const std::string& name)
+{
+ if (name.empty())
+ {
+ std::string result("#AnonEnum");
+ result.append(NumberFormatter::format0(_count++, 4));
+ return result;
+ }
+ else return name;
+}
+
+
+Symbol::Kind Enum::kind() const
+{
+ return Symbol::SYM_ENUM;
+}
+
+
+std::string Enum::toString() const
+{
+ std::ostringstream ostr;
+ ostr << "enum " << name() << "\n{\n";
+ for (Iterator it = begin(); it != end(); ++it)
+ {
+ ostr << "\t" << (*it)->toString() << "\n";
+ }
+ ostr << "};";
+ return ostr.str();
+}
+
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/src/EnumValue.cpp b/CppParser/src/EnumValue.cpp
new file mode 100644
index 000000000..177b8d10f
--- /dev/null
+++ b/CppParser/src/EnumValue.cpp
@@ -0,0 +1,76 @@
+//
+// EnumValue.cpp
+//
+// $Id: //poco/1.3/CppParser/src/EnumValue.cpp#1 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: EnumValue
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/EnumValue.h"
+#include "Poco/CppParser/Enum.h"
+
+
+namespace Poco {
+namespace CppParser {
+
+
+EnumValue::EnumValue(const std::string& name, const std::string& value, Enum* pEnum):
+ Symbol(name, pEnum->nameSpace()),
+ _value(value)
+{
+ pEnum->addValue(this);
+}
+
+
+EnumValue::~EnumValue()
+{
+}
+
+
+Symbol::Kind EnumValue::kind() const
+{
+ return Symbol::SYM_ENUM_VALUE;
+}
+
+
+std::string EnumValue::toString() const
+{
+ std::string result(name());
+ if (!_value.empty())
+ {
+ result.append(" = ");
+ result.append(_value);
+ }
+ return result;
+}
+
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/src/Function.cpp b/CppParser/src/Function.cpp
new file mode 100644
index 000000000..24ef7200f
--- /dev/null
+++ b/CppParser/src/Function.cpp
@@ -0,0 +1,248 @@
+//
+// Function.cpp
+//
+// $Id: //poco/1.3/CppParser/src/Function.cpp#3 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Function
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/Function.h"
+#include "Poco/CppParser/Parameter.h"
+#include "Poco/CppParser/NameSpace.h"
+#include "Poco/CppParser/Struct.h"
+#include "Poco/CppParser/Utility.h"
+#include "Poco/String.h"
+#include
+#include
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+Function::Function(const std::string& decl, NameSpace* pNameSpace):
+ Decl(decl, pNameSpace),
+ _flags(0),
+ _retParam()
+{
+ if (hasAttr(decl, "static"))
+ _flags |= FN_STATIC;
+ if (hasAttr(decl, "virtual"))
+ _flags |= FN_VIRTUAL;
+ if (hasAttr(decl, "inline"))
+ _flags |= FN_INLINE;
+ if (hasAttr(decl, "template"))
+ _flags |= FN_TEMPLATE;
+
+ if (isMethod() || isFunction())
+ {
+ // parse the decl
+ std::size_t pos = decl.rfind(name());
+ _retParam = decl.substr(0, pos-1);
+ // eliminate static, virtual, inline, template
+ _retParam = replace(_retParam, "static ", "");
+ _retParam = replace(_retParam, "virtual ", "");
+ _retParam = replace(_retParam, "inline ", "");
+ if (_flags & FN_TEMPLATE)
+ {
+ std::size_t pos = _retParam.find(">");
+ poco_assert (pos != std::string::npos);
+ _retParam = _retParam.substr(pos+1);
+ }
+ Poco::trimInPlace(_retParam);
+ }
+}
+
+
+Function::~Function()
+{
+ for (Parameters::iterator it = _params.begin(); it != _params.end(); ++it)
+ {
+ delete *it;
+ }
+}
+
+
+void Function::addParameter(Parameter* pParam)
+{
+ _params.push_back(pParam);
+}
+
+
+Function::Iterator Function::begin() const
+{
+ return _params.begin();
+}
+
+
+Function::Iterator Function::end() const
+{
+ return _params.end();
+}
+
+
+void Function::makeInline()
+{
+ _flags |= FN_INLINE;
+}
+
+
+void Function::makeConst()
+{
+ _flags |= FN_CONST;
+}
+
+
+void Function::makePureVirtual()
+{
+ _flags |= FN_PURE_VIRTUAL;
+}
+
+
+bool Function::isConstructor() const
+{
+ return name() == nameSpace()->name();
+}
+
+
+bool Function::isDestructor() const
+{
+ return name()[0] == '~';
+}
+
+
+bool Function::isMethod() const
+{
+ return !isConstructor() && !isDestructor() && nameSpace()->kind() == Symbol::SYM_STRUCT;
+}
+
+
+bool Function::isFunction() const
+{
+ return nameSpace()->kind() == Symbol::SYM_NAMESPACE;
+}
+
+
+int Function::countParameters() const
+{
+ return (int) _params.size();
+}
+
+
+Symbol::Kind Function::kind() const
+{
+ return Symbol::SYM_FUNCTION;
+}
+
+
+std::string Function::signature() const
+{
+ std::string signature(declaration());
+ if (signature.compare(0, 8, "virtual ") == 0)
+ signature.erase(0, 8);
+ else if (signature.compare(0, 7, "static ") == 0)
+ signature.erase(0, 8);
+ if (signature.compare(0, 7, "inline ") == 0)
+ signature.erase(0, 7);
+ signature += "(";
+ bool isFirst = true;
+ for (Iterator it = begin(); it != end(); ++it)
+ {
+ if (isFirst)
+ isFirst = false;
+ else
+ signature += ", ";
+ std::string arg = (*it)->declaration();
+ std::string::size_type pos = arg.size() - 1;
+ while (pos > 0 && !std::isspace(arg[pos])) --pos;
+ while (pos > 0 && std::isspace(arg[pos])) --pos;
+ signature.append(arg, 0, pos + 1);
+ }
+ signature += ")";
+ if (_flags & FN_CONST)
+ signature += " const";
+ return signature;
+}
+
+
+bool Function::isVirtual() const
+{
+ if (_flags & FN_VIRTUAL)
+ {
+ return true;
+ }
+ else if (isDestructor())
+ {
+ Struct* pClass = dynamic_cast(nameSpace());
+ return pClass && pClass->hasVirtualDestructor();
+ }
+ else return getOverridden() != 0;
+ return false;
+}
+
+
+Function* Function::getOverridden() const
+{
+ if (isMethod() && !(_flags & FN_STATIC))
+ {
+ Struct* pClass = dynamic_cast(nameSpace());
+ if (pClass)
+ {
+ for (Struct::BaseIterator it = pClass->baseBegin(); it != pClass->baseEnd(); ++it)
+ {
+ if (it->pClass)
+ {
+ Function* pOverridden = it->pClass->findFunction(signature());
+ if (pOverridden && pOverridden->isVirtual())
+ return pOverridden;
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+
+std::string Function::toString() const
+{
+ std::ostringstream ostr;
+ ostr << Decl::toString() << "(\n";
+ for (Iterator it = begin(); it != end(); ++it)
+ {
+ ostr << "\t" << (*it)->toString() << "\n";
+ }
+ ostr << ");";
+ return ostr.str();
+}
+
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/src/NameSpace.cpp b/CppParser/src/NameSpace.cpp
new file mode 100644
index 000000000..683854d7d
--- /dev/null
+++ b/CppParser/src/NameSpace.cpp
@@ -0,0 +1,268 @@
+//
+// Namespace.cpp
+//
+// $Id: //poco/1.3/CppParser/src/NameSpace.cpp#3 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Namespace
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/NameSpace.h"
+#include "Poco/Exception.h"
+#include
+#include
+
+
+using Poco::ExistsException;
+using Poco::NotFoundException;
+
+
+namespace Poco {
+namespace CppParser {
+
+
+NameSpace::NameSpace()
+{
+}
+
+
+NameSpace::NameSpace(const std::string& name, NameSpace* pNameSpace):
+ Symbol(name, pNameSpace)
+{
+}
+
+
+NameSpace::~NameSpace()
+{
+ for (SymbolTable::iterator it = _symbols.begin(); it != _symbols.end(); ++it)
+ {
+ delete it->second;
+ }
+}
+
+
+void NameSpace::addSymbol(Symbol* pSymbol)
+{
+ poco_check_ptr (pSymbol);
+
+ _symbols.insert(SymbolTable::value_type(pSymbol->name(), pSymbol));
+}
+
+
+void NameSpace::importSymbol(const std::string& fullName)
+{
+ std::string localName;
+ std::string::size_type pos = fullName.find_last_of(':');
+ if (pos != std::string::npos && pos < fullName.size() - 1)
+ {
+ localName.assign(fullName, pos + 1, fullName.size() - pos - 1);
+ _importedSymbols[localName] = fullName;
+ }
+}
+
+
+void NameSpace::importNameSpace(const std::string& nameSpace)
+{
+ _importedNameSpaces.push_back(nameSpace);
+}
+
+
+NameSpace::Iterator NameSpace::begin() const
+{
+ return _symbols.begin();
+}
+
+
+NameSpace::Iterator NameSpace::end() const
+{
+ return _symbols.end();
+}
+
+
+Symbol* NameSpace::lookup(const std::string& name) const
+{
+ std::set alreadyVisited;
+ return lookup(name, alreadyVisited);
+}
+
+
+Symbol* NameSpace::lookup(const std::string& name, std::set& alreadyVisited) const
+{
+ Symbol* pSymbol = 0;
+
+ if (name.empty())
+ return pSymbol;
+
+ if (alreadyVisited.find(this) != alreadyVisited.end())
+ return pSymbol;
+ std::string head;
+ std::string tail;
+ splitName(name, head, tail);
+
+ alreadyVisited.insert(this);
+ bool currentNSInserted = true;
+
+
+ if (head.empty())
+ {
+ alreadyVisited.insert(this);
+ return root()->lookup(tail, alreadyVisited);
+ }
+ SymbolTable::const_iterator it = _symbols.find(head);
+ if (it != _symbols.end())
+ {
+ pSymbol = it->second;
+ if (!tail.empty())
+ {
+ alreadyVisited.insert(this);
+ NameSpace* pNS = dynamic_cast(pSymbol);
+ if (pNS)
+ pSymbol = static_cast(pSymbol)->lookup(tail, alreadyVisited);
+ else
+ pSymbol = 0;
+ }
+ }
+ else if (tail.empty())
+ {
+ AliasMap::const_iterator itAlias = _importedSymbols.find(head);
+ if (itAlias != _importedSymbols.end())
+ pSymbol = lookup(itAlias->second, alreadyVisited);
+ else
+ {
+ for (NameSpaceVec::const_iterator it = _importedNameSpaces.begin(); !pSymbol && it != _importedNameSpaces.end(); ++it)
+ {
+ Symbol* pNS = lookup(*it, alreadyVisited);
+ if (pNS && pNS->kind() == Symbol::SYM_NAMESPACE)
+ {
+ pSymbol = static_cast(pNS)->lookup(name, alreadyVisited);
+ }
+ }
+ }
+ }
+ NameSpace* pNS = nameSpace();
+ if (!pSymbol && pNS && (alreadyVisited.find(pNS) == alreadyVisited.end()))
+ {
+ // if we have to go up, never push the NS!
+ if (currentNSInserted)
+ alreadyVisited.erase(this);
+ pSymbol = nameSpace()->lookup(name, alreadyVisited);
+ }
+ return pSymbol;
+}
+
+
+void NameSpace::nameSpaces(SymbolTable& table) const
+{
+ extract(Symbol::SYM_NAMESPACE, table);
+}
+
+
+void NameSpace::typeDefs(SymbolTable& table) const
+{
+ extract(Symbol::SYM_TYPEDEF, table);
+}
+
+
+void NameSpace::enums(SymbolTable& table) const
+{
+ extract(Symbol::SYM_ENUM, table);
+}
+
+
+void NameSpace::classes(SymbolTable& table) const
+{
+ extract(Symbol::SYM_STRUCT, table);
+}
+
+
+void NameSpace::functions(SymbolTable& table) const
+{
+ extract(Symbol::SYM_FUNCTION, table);
+}
+
+
+void NameSpace::variables(SymbolTable& table) const
+{
+ extract(Symbol::SYM_VARIABLE, table);
+}
+
+
+Symbol::Kind NameSpace::kind() const
+{
+ return Symbol::SYM_NAMESPACE;
+}
+
+
+std::string NameSpace::toString() const
+{
+ std::ostringstream ostr;
+ ostr << "namespace " << name() << "\n{\n";
+ for (Iterator it = begin(); it != end(); ++it)
+ {
+ ostr << it->second->fullName() << "\n";
+ ostr << it->second->toString() << "\n";
+ }
+ ostr << "}\n";
+ return ostr.str();
+}
+
+
+void NameSpace::splitName(const std::string& name, std::string& head, std::string& tail)
+{
+ std::string::size_type pos = name.find(':');
+ if (pos != std::string::npos)
+ {
+ head.assign(name, 0, pos);
+ pos += 2;
+ poco_assert (pos < name.length());
+ tail.assign(name, pos, name.length() - pos);
+ }
+ else head = name;
+}
+
+
+NameSpace* NameSpace::root()
+{
+ static NameSpace root;
+ return &root;
+}
+
+
+void NameSpace::extract(Symbol::Kind kind, SymbolTable& table) const
+{
+ for (SymbolTable::const_iterator it = _symbols.begin(); it != _symbols.end(); ++it)
+ {
+ if (it->second->kind() == kind)
+ table.insert(*it);
+ }
+}
+
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/src/Parameter.cpp b/CppParser/src/Parameter.cpp
new file mode 100644
index 000000000..81194a955
--- /dev/null
+++ b/CppParser/src/Parameter.cpp
@@ -0,0 +1,167 @@
+//
+// Parameter.cpp
+//
+// $Id: //poco/1.3/CppParser/src/Parameter.cpp#3 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Parameter
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/Parameter.h"
+#include "Poco/CppParser/NameSpace.h"
+#include "Poco/CppParser/TypeDef.h"
+#include "Poco/CppParser/Utility.h"
+#include "Poco/String.h"
+#include "Poco/NumberFormatter.h"
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+int Parameter::_count(0);
+
+
+Parameter::Parameter(const std::string& decl, Function* pFunction):
+ Decl(handleDecl (decl), 0), // handle init values
+ _type(),
+ _isRef(false),
+ _isPointer(false),
+ _isConst(false)
+{
+
+ std::size_t pos = declaration().rfind(name());
+
+ std::string tmp = declaration().substr(0, pos);
+ _type = Poco::trim(tmp);
+ std::size_t rightCut = _type.size();
+ while (rightCut > 0 && (_type[rightCut-1] == '&' || _type[rightCut-1] == '*' || _type[rightCut-1] == '\t' || _type[rightCut-1] == ' '))
+ {
+ if (_type[rightCut-1] == '&')
+ _isRef = true;
+ if (_type[rightCut-1] == '*')
+ _isPointer = true;
+ --rightCut;
+ }
+ _type = Poco::trim(_type.substr(0, rightCut));
+ if (_type.find("const ") == 0)
+ {
+ _isConst = true;
+ _type = _type.substr(6);
+ }
+ if (_type.find("const\t") == 0)
+ {
+ _type = _type.substr(6);
+ _isConst = true;
+ }
+
+
+ Poco::trimInPlace(_type);
+ pos = decl.find("=");
+ _hasDefaultValue = (pos != std::string::npos);
+ if (_hasDefaultValue)
+ {
+ _defaultDecl = decl.substr(pos + 1);
+ Poco::trimInPlace(_defaultDecl);
+ std::size_t posStart = _defaultDecl.find("(");
+ std::size_t posEnd = _defaultDecl.rfind(")");
+ if (posStart != std::string::npos && posEnd != std::string::npos)
+ {
+ _defaultValue = _defaultDecl.substr(posStart + 1, posEnd-posStart - 1);
+ }
+ else
+ {
+ poco_assert (posStart == std::string::npos && posEnd == std::string::npos);
+ _defaultValue = _defaultDecl;
+ }
+ Poco::trimInPlace(_defaultValue);
+ }
+}
+
+
+Parameter::~Parameter()
+{
+}
+
+
+Symbol::Kind Parameter::kind() const
+{
+ return Symbol::SYM_PARAMETER;
+}
+
+
+bool Parameter::vectorType(const std::string& type, NameSpace* pNS)
+{
+ bool ret = type.find("vector") != std::string::npos;
+ if (!ret)
+ {
+ Symbol* pSym = pNS->lookup(type);
+ if (pSym)
+ {
+ if (pSym->kind() == Symbol::SYM_TYPEDEF)
+ {
+ TypeDef* pType = static_cast(pSym);
+ ret = pType->declaration().find("vector") != std::string::npos;
+ }
+ }
+ }
+ return ret;
+}
+
+
+std::string Parameter::handleDecl(const std::string& decl)
+{
+ std::size_t pos = decl.find('=');
+ std::string result(decl.substr(0, pos));
+ // now check if we have to add a paramName
+ Poco::trimInPlace(result);
+ std::size_t posSpace = result.rfind(' ');
+ bool mustAdd = false;
+ if (posSpace>0)
+ {
+ std::string tmp(result.substr(posSpace+1));
+ mustAdd = (tmp.find('<') != -1 || tmp.find('>') != -1 || tmp.find('*') != -1 || tmp.find('&') != -1);
+ }
+ else
+ mustAdd = true;
+ if (mustAdd)
+ {
+
+ result.append(" ");
+ result.append("param");
+ result.append(Poco::NumberFormatter::format(++_count));
+ //never add the default val it breaks the upper class parser
+ }
+ return result;
+}
+
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/src/Parser.cpp b/CppParser/src/Parser.cpp
new file mode 100644
index 000000000..1a4182e9f
--- /dev/null
+++ b/CppParser/src/Parser.cpp
@@ -0,0 +1,927 @@
+//
+// Parser.cpp
+//
+// $Id: //poco/1.3/CppParser/src/Parser.cpp#7 $
+//
+// Library: CppParser
+// Package: CppParser
+// Module: Parser
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/Parser.h"
+#include "Poco/CppParser/CppToken.h"
+#include "Poco/CppParser/Decl.h"
+#include "Poco/CppParser/Enum.h"
+#include "Poco/CppParser/EnumValue.h"
+#include "Poco/CppParser/Function.h"
+#include "Poco/CppParser/NameSpace.h"
+#include "Poco/CppParser/Parameter.h"
+#include "Poco/CppParser/Struct.h"
+#include "Poco/CppParser/TypeDef.h"
+#include "Poco/CppParser/Variable.h"
+#include "Poco/CppParser/AttributesParser.h"
+#include "Poco/Path.h"
+#include "Poco/String.h"
+#include "Poco/NumberFormatter.h"
+#include "Poco/Exception.h"
+#include
+#include
+
+
+using Poco::Token;
+using Poco::WhitespaceToken;
+using Poco::Path;
+using Poco::NumberFormatter;
+using Poco::SyntaxException;
+using Poco::icompare;
+using Poco::trimInPlace;
+
+
+namespace Poco {
+namespace CppParser {
+
+
+Parser::Parser(NameSpace::SymbolTable& gst, const std::string& file, std::istream& istr):
+ _gst(gst),
+ _istr(istr),
+ _tokenizer(_istr),
+ _file(file),
+ _inFile(false),
+ _pCurrentSymbol(0),
+ _access(Symbol::ACC_PUBLIC)
+{
+ Path p(file);
+ p.makeAbsolute();
+ _path = p.toString();
+ _currentPath = _path;
+
+ _nsStack.push_back(NameSpace::root());
+}
+
+
+Parser::~Parser()
+{
+}
+
+
+inline bool Parser::isIdentifier(const Token* pToken)
+{
+ return pToken->is(Token::IDENTIFIER_TOKEN) || isOperator(pToken, OperatorToken::OP_DBL_COLON);
+}
+
+
+inline bool Parser::isOperator(const Token* pToken, int kind)
+{
+ return pToken->is(Token::OPERATOR_TOKEN) && pToken->asInteger() == kind;
+}
+
+
+inline bool Parser::isKeyword(const Token* pToken, int kind)
+{
+ return pToken->is(Token::KEYWORD_TOKEN) && pToken->asInteger() == kind;
+}
+
+
+inline bool Parser::isEOF(const Token* pToken)
+{
+ return pToken->is(Token::EOF_TOKEN);
+}
+
+
+void Parser::expectOperator(const Token* pToken, int kind, const std::string& msg)
+{
+ if (!isOperator(pToken, kind))
+ syntaxError(msg + ", found " + pToken->tokenString());
+}
+
+
+void Parser::syntaxError(const std::string& msg)
+{
+ throw SyntaxException("Expected", msg);
+}
+
+
+inline void Parser::append(std::string& decl, const std::string& token)
+{
+ if (!decl.empty())
+ {
+ char last = decl[decl.length() - 1];
+ if (token != "::" &&
+ token != "." &&
+ token != ")" &&
+ token != "->" &&
+ token != "," &&
+ token != "[" &&
+ token != "]" &&
+ last != '~' &&
+ last != ':' &&
+ last != '(' &&
+ last != ')' &&
+ last != '[' &&
+ last != ']' &&
+ last != ' '
+ )
+ decl.append(" ");
+ }
+ decl.append(token);
+ if (token == "const"
+ || token == "static"
+ || token == "mutable"
+ || token == "inline"
+ || token == "volatile"
+ || token == "register")
+ decl.append(" ");
+}
+
+
+inline void Parser::append(std::string& decl, const Token* pToken)
+{
+ poco_check_ptr (pToken);
+ append(decl, pToken->tokenString());
+}
+
+
+void Parser::parse()
+{
+ try
+ {
+ const Token* pNext = next();
+ pNext = parseFile(pNext);
+ if (!isEOF(pNext))
+ syntaxError("Additional tokens behind supposed EOF");
+ }
+ catch (SyntaxException& exc)
+ {
+ std::string m(exc.message());
+ std::string where(_currentPath);
+ where.append("(");
+ where.append(NumberFormatter::format(_istr.getCurrentLineNumber()));
+ where.append(")");
+ throw SyntaxException(m, where);
+ }
+}
+
+
+const Token* Parser::parseFile(const Token* pNext)
+{
+ while (pNext->is(Token::IDENTIFIER_TOKEN) || pNext->is(Token::KEYWORD_TOKEN))
+ {
+ switch (pNext->asInteger())
+ {
+ case IdentifierToken::KW_NAMESPACE:
+ pNext = parseNameSpace(pNext);
+ break;
+ case IdentifierToken::KW_STRUCT:
+ case IdentifierToken::KW_CLASS:
+ pNext = parseClass(pNext);
+ break;
+ case IdentifierToken::KW_TEMPLATE:
+ pNext = parseTemplate(pNext);
+ break;
+ case IdentifierToken::KW_TYPEDEF:
+ pNext = parseTypeDef(pNext);
+ break;
+ case IdentifierToken::KW_USING:
+ pNext = parseUsing(pNext);
+ break;
+ case IdentifierToken::KW_ENUM:
+ pNext = parseEnum(pNext);
+ break;
+ default:
+ pNext = parseVarFunc(pNext);
+ }
+ }
+ return pNext;
+}
+
+
+const Token* Parser::parseNameSpace(const Token* pNext)
+{
+ poco_assert (isKeyword(pNext, IdentifierToken::KW_NAMESPACE));
+
+ pNext = next();
+ if (pNext->is(Token::IDENTIFIER_TOKEN))
+ {
+ _access = Symbol::ACC_PUBLIC;
+ std::string name = pNext->tokenString();
+ pNext = next();
+ expectOperator(pNext, OperatorToken::OP_OPENBRACE, "{");
+ NameSpace* pNS = dynamic_cast(currentNameSpace()->lookup(name));
+ bool undefined = (pNS == 0);
+ if (undefined) pNS = new NameSpace(name, currentNameSpace());
+ pushNameSpace(pNS, -1, undefined);
+ pNext = next();
+ while (pNext->is(Token::IDENTIFIER_TOKEN) || pNext->is(Token::KEYWORD_TOKEN))
+ {
+ switch (pNext->asInteger())
+ {
+ case IdentifierToken::KW_NAMESPACE:
+ pNext = parseNameSpace(pNext);
+ break;
+ case IdentifierToken::KW_STRUCT:
+ case IdentifierToken::KW_CLASS:
+ pNext = parseClass(pNext);
+ break;
+ case IdentifierToken::KW_TEMPLATE:
+ pNext = parseTemplate(pNext);
+ break;
+ case IdentifierToken::KW_TYPEDEF:
+ pNext = parseTypeDef(pNext);
+ break;
+ case IdentifierToken::KW_USING:
+ pNext = parseUsing(pNext);
+ break;
+ case IdentifierToken::KW_ENUM:
+ pNext = parseEnum(pNext);
+ break;
+ default:
+ pNext = parseVarFunc(pNext);
+ }
+ }
+ expectOperator(pNext, OperatorToken::OP_CLOSBRACE, "}");
+ pNext = next();
+ }
+ else syntaxError("namespace name");
+ popNameSpace();
+ return pNext;
+}
+
+
+const Token* Parser::parseClass(const Token* pNext)
+{
+ std::string decl;
+ return parseClass(pNext, decl);
+}
+
+
+const Token* Parser::parseClass(const Token* pNext, std::string& decl)
+{
+ poco_assert (isKeyword(pNext, IdentifierToken::KW_CLASS) || isKeyword(pNext, IdentifierToken::KW_STRUCT));
+
+ _pCurrentSymbol = 0;
+ bool isClass = isKeyword(pNext, IdentifierToken::KW_CLASS);
+ int line = _istr.getCurrentLineNumber();
+ Symbol::Access prevAccess = _access;
+ append(decl, pNext);
+ Symbol::Access access;
+ if (isKeyword(pNext, IdentifierToken::KW_CLASS))
+ access = Symbol::ACC_PRIVATE;
+ else
+ access = Symbol::ACC_PUBLIC;
+ pNext = next();
+ if (pNext->is(Token::IDENTIFIER_TOKEN))
+ append(decl, pNext);
+ else
+ syntaxError("class/struct name");
+ pNext = next();
+ if (!isOperator(pNext, OperatorToken::OP_SEMICOLON))
+ {
+ // if we have a template specialization the next token will be a <
+ if (isOperator(pNext, OperatorToken::OP_LT))
+ {
+ // skip all template specializations
+ // skip until at { bracket, then parseBlock to ignore it
+ while (!isOperator(pNext, OperatorToken::OP_OPENBRACE))
+ pNext = next();
+ pNext = parseBlock(pNext); // skip after }
+
+ expectOperator(pNext, OperatorToken::OP_SEMICOLON, ";");
+ pNext = next();
+ _access = prevAccess;
+ _pCurrentSymbol = 0;
+ return pNext;
+ }
+ if (isOperator(pNext, OperatorToken::OP_COLON) || isOperator(pNext, OperatorToken::OP_OPENBRACE))
+ {
+ Struct* pClass = new Struct(decl, isClass, currentNameSpace());
+ pushNameSpace(pClass, line);
+ _access = access;
+ if (isOperator(pNext, OperatorToken::OP_COLON))
+ pNext = parseBaseClassList(next(), pClass);
+ expectOperator(pNext, OperatorToken::OP_OPENBRACE, "{");
+ pNext = parseClassMembers(pNext, pClass);
+ expectOperator(pNext, OperatorToken::OP_CLOSBRACE, "}");
+ pNext = next();
+ expectOperator(pNext, OperatorToken::OP_SEMICOLON, ";");
+ popNameSpace();
+ }
+ else return parseVarFunc(pNext, decl);
+ }
+ pNext = next();
+ _access = prevAccess;
+ _pCurrentSymbol = 0;
+ return pNext;
+}
+
+
+const Token* Parser::parseBaseClassList(const Token* pNext, Struct* pClass)
+{
+ while (pNext->is(Token::IDENTIFIER_TOKEN) || pNext->is(Token::KEYWORD_TOKEN))
+ {
+ bool isVirtual = false;
+ Symbol::Access acc = _access;
+ while (pNext->is(Token::KEYWORD_TOKEN))
+ {
+ switch (pNext->asInteger())
+ {
+ case IdentifierToken::KW_PUBLIC:
+ acc = Symbol::ACC_PUBLIC;
+ break;
+ case IdentifierToken::KW_PROTECTED:
+ acc = Symbol::ACC_PROTECTED;
+ break;
+ case IdentifierToken::KW_PRIVATE:
+ acc = Symbol::ACC_PRIVATE;
+ break;
+ case IdentifierToken::KW_VIRTUAL:
+ isVirtual = true;
+ break;
+ default:
+ syntaxError("public, protected, private or virtual");
+ }
+ pNext = next();
+ }
+ std::string id;
+ pNext = parseIdentifier(pNext, id);
+ if (isOperator(pNext, OperatorToken::OP_LT))
+ pNext = parseTemplateArgs(pNext, id);
+ pClass->addBase(id, acc, isVirtual);
+ if (isOperator(pNext, OperatorToken::OP_COMMA))
+ pNext = next();
+ }
+ return pNext;
+}
+
+
+const Token* Parser::parseClassMembers(const Token* pNext, Struct* pClass)
+{
+ poco_assert (isOperator(pNext, OperatorToken::OP_OPENBRACE));
+
+ pNext = next();
+ while (pNext->is(Token::IDENTIFIER_TOKEN) || pNext->is(Token::KEYWORD_TOKEN) || isOperator(pNext, OperatorToken::OP_COMPL))
+ {
+ switch (pNext->asInteger())
+ {
+ case IdentifierToken::KW_PRIVATE:
+ case IdentifierToken::KW_PROTECTED:
+ case IdentifierToken::KW_PUBLIC:
+ pNext = parseAccess(pNext);
+ break;
+ case IdentifierToken::KW_STRUCT:
+ case IdentifierToken::KW_CLASS:
+ pNext = parseClass(pNext);
+ break;
+ case IdentifierToken::KW_TEMPLATE:
+ pNext = parseTemplate(pNext);
+ break;
+ case IdentifierToken::KW_TYPEDEF:
+ pNext = parseTypeDef(pNext);
+ break;
+ case IdentifierToken::KW_ENUM:
+ pNext = parseEnum(pNext);
+ break;
+ case IdentifierToken::KW_FRIEND:
+ pNext = parseFriend(pNext);
+ break;
+ case OperatorToken::OP_COMPL:
+ default:
+ pNext = parseVarFunc(pNext);
+ }
+ }
+ return pNext;
+}
+
+
+const Token* Parser::parseAccess(const Token* pNext)
+{
+ switch (pNext->asInteger())
+ {
+ case IdentifierToken::KW_PRIVATE:
+ _access = Symbol::ACC_PRIVATE;
+ break;
+ case IdentifierToken::KW_PROTECTED:
+ _access = Symbol::ACC_PROTECTED;
+ break;
+ case IdentifierToken::KW_PUBLIC:
+ _access = Symbol::ACC_PUBLIC;
+ break;
+ }
+ pNext = next();
+ expectOperator(pNext, OperatorToken::OP_COLON, ":");
+ return next();
+}
+
+
+const Token* Parser::parseTemplate(const Token* pNext)
+{
+ poco_assert (isKeyword(pNext, IdentifierToken::KW_TEMPLATE));
+
+ std::string decl;
+ append(decl, pNext);
+ pNext = next();
+ expectOperator(pNext, OperatorToken::OP_LT, "<");
+ pNext = parseTemplateArgs(pNext, decl);
+ if (isKeyword(pNext, IdentifierToken::KW_CLASS) || isKeyword(pNext, IdentifierToken::KW_STRUCT))
+ return parseClass(pNext, decl);
+ else
+ return parseVarFunc(pNext, decl);
+}
+
+
+const Token* Parser::parseTemplateArgs(const Token* pNext, std::string& decl)
+{
+ poco_assert (isOperator(pNext, OperatorToken::OP_LT));
+
+ append(decl, pNext);
+ int depth = 1;
+ pNext = next();
+ while (depth > 0 && !isEOF(pNext))
+ {
+ append(decl, pNext);
+ if (isOperator(pNext, OperatorToken::OP_LT))
+ ++depth;
+ else if (isOperator(pNext, OperatorToken::OP_GT))
+ --depth;
+ pNext = next();
+ }
+ return pNext;
+}
+
+
+const Token* Parser::parseTypeDef(const Token* pNext)
+{
+ poco_assert (isKeyword(pNext, IdentifierToken::KW_TYPEDEF));
+
+ _pCurrentSymbol = 0;
+ int line = _istr.getCurrentLineNumber();
+ std::string decl;
+ while (!isOperator(pNext, OperatorToken::OP_SEMICOLON) && !isEOF(pNext))
+ {
+ append(decl, pNext);
+ pNext = next();
+ }
+ TypeDef* pTypeDef = new TypeDef(decl, currentNameSpace());
+ addSymbol(pTypeDef, line);
+ pNext = next();
+ _pCurrentSymbol = 0;
+ return pNext;
+}
+
+
+const Token* Parser::parseUsing(const Token* pNext)
+{
+ poco_assert (isKeyword(pNext, IdentifierToken::KW_USING));
+
+ pNext = next();
+ if (isKeyword(pNext, IdentifierToken::KW_NAMESPACE))
+ {
+ pNext = next();
+ if (isIdentifier(pNext))
+ {
+ std::string ns;
+ pNext = parseIdentifier(pNext, ns);
+ currentNameSpace()->importNameSpace(ns);
+ }
+ else syntaxError("identifier");
+ }
+ else
+ {
+ if (isIdentifier(pNext))
+ {
+ std::string id;
+ pNext = parseIdentifier(pNext, id);
+ currentNameSpace()->importSymbol(id);
+ }
+ }
+
+ if (!isOperator(pNext, OperatorToken::OP_SEMICOLON))
+ syntaxError("semicolon");
+ return next();
+}
+
+
+const Token* Parser::parseFriend(const Token* pNext)
+{
+ poco_assert (isKeyword(pNext, IdentifierToken::KW_FRIEND));
+
+ pNext = next();
+
+ while (!isOperator(pNext, OperatorToken::OP_SEMICOLON) && !isEOF(pNext))
+ pNext = next();
+
+ if (isOperator(pNext, OperatorToken::OP_SEMICOLON))
+ pNext = next();
+ return pNext;
+}
+
+
+const Token* Parser::parseVarFunc(const Token* pNext)
+{
+ std::string decl;
+ return parseVarFunc(pNext, decl);
+}
+
+
+const Token* Parser::parseVarFunc(const Token* pNext, std::string& decl)
+{
+ _pCurrentSymbol = 0;
+ if (isKeyword(pNext, IdentifierToken::KW_EXTERN))
+ {
+ pNext = parseExtern(pNext);
+ }
+ else
+ {
+ append(decl, pNext);
+ pNext = next();
+ bool isOp = false;
+ while (!isOperator(pNext, OperatorToken::OP_SEMICOLON) && !isOperator(pNext, OperatorToken::OP_OPENPARENT) && !isEOF(pNext))
+ {
+ append(decl, pNext);
+ isOp = isKeyword(pNext, IdentifierToken::KW_OPERATOR);
+ pNext = next();
+ }
+ if (isOperator(pNext, OperatorToken::OP_SEMICOLON))
+ {
+ std::string name = Symbol::extractName(decl);
+ if (!currentNameSpace()->lookup(name))
+ {
+ Variable* pVar = new Variable(decl, currentNameSpace());
+ addSymbol(pVar, _istr.getCurrentLineNumber());
+ }
+ pNext = next();
+ }
+ else if (isOperator(pNext, OperatorToken::OP_OPENPARENT))
+ {
+ if (isOp)
+ {
+ decl += " (";
+ pNext = next();
+ expectOperator(pNext, OperatorToken::OP_CLOSPARENT, ")");
+ append(decl, pNext);
+ pNext = next();
+ expectOperator(pNext, OperatorToken::OP_OPENPARENT, "(");
+ }
+ pNext = parseFunc(pNext, decl);
+ }
+ }
+ _pCurrentSymbol = 0;
+ return pNext;
+}
+
+
+const Token* Parser::parseExtern(const Token* pNext)
+{
+ poco_assert (isKeyword(pNext, IdentifierToken::KW_EXTERN));
+
+ pNext = next();
+ if (pNext->is(Token::STRING_LITERAL_TOKEN))
+ pNext = next();
+ if (isOperator(pNext, OperatorToken::OP_OPENBRACE))
+ {
+ pNext = parseBlock(pNext);
+ }
+ else
+ {
+ while (!isOperator(pNext, OperatorToken::OP_SEMICOLON) && !isEOF(pNext))
+ pNext = next();
+ }
+ if (isOperator(pNext, OperatorToken::OP_SEMICOLON))
+ pNext = next();
+ return pNext;
+}
+
+
+const Token* Parser::parseFunc(const Token* pNext, std::string& decl)
+{
+ poco_assert (isOperator(pNext, OperatorToken::OP_OPENPARENT));
+
+ int line = _istr.getCurrentLineNumber();
+ Function* pFunc = 0;
+ std::string name = Symbol::extractName(decl);
+ if (name.find(':') == std::string::npos)
+ {
+ pFunc = new Function(decl, currentNameSpace());
+ addSymbol(pFunc, line);
+ }
+ pNext = parseParameters(pNext, pFunc);
+ expectOperator(pNext, OperatorToken::OP_CLOSPARENT, ")");
+ pNext = next();
+ if (isKeyword(pNext, IdentifierToken::KW_CONST))
+ {
+ if (pFunc) pFunc->makeConst();
+ pNext = next();
+ }
+ if (isKeyword(pNext, IdentifierToken::KW_THROW))
+ {
+ while (!isOperator(pNext, OperatorToken::OP_ASSIGN) && !isOperator(pNext, OperatorToken::OP_SEMICOLON) &&
+ !isOperator(pNext, OperatorToken::OP_OPENBRACE) && !isEOF(pNext))
+ pNext = next();
+ }
+ if (isOperator(pNext, OperatorToken::OP_ASSIGN))
+ {
+ pNext = next();
+ if (!pNext->is(Token::INTEGER_LITERAL_TOKEN))
+ syntaxError("0");
+ pNext = next();
+ if (pFunc) pFunc->makePureVirtual();
+ expectOperator(pNext, OperatorToken::OP_SEMICOLON, ";");
+ }
+ else if (isOperator(pNext, OperatorToken::OP_OPENBRACE) || isOperator(pNext, OperatorToken::OP_COLON))
+ {
+ while (!isOperator(pNext, OperatorToken::OP_OPENBRACE) && !isEOF(pNext))
+ pNext = next();
+
+ pNext = parseBlock(pNext);
+ if (!pFunc)
+ pFunc = dynamic_cast(currentNameSpace()->lookup(name));
+ if (pFunc)
+ pFunc->makeInline();
+ }
+ else
+ {
+ expectOperator(pNext, OperatorToken::OP_SEMICOLON, ";");
+ }
+ if (isOperator(pNext, OperatorToken::OP_SEMICOLON))
+ pNext = next();
+ return pNext;
+}
+
+
+const Token* Parser::parseParameters(const Token* pNext, Function* pFunc)
+{
+ poco_assert (isOperator(pNext, OperatorToken::OP_OPENPARENT));
+
+ pNext = next();
+ while (!isOperator(pNext, OperatorToken::OP_CLOSPARENT) && !isEOF(pNext))
+ {
+ std::string decl;
+ int depth = 0;
+ while ((depth > 0 || (!isOperator(pNext, OperatorToken::OP_CLOSPARENT) && !isOperator(pNext, OperatorToken::OP_COMMA))) && !isEOF(pNext))
+ {
+ append(decl, pNext);
+ if (isOperator(pNext, OperatorToken::OP_OPENPARENT))
+ ++depth;
+ else if (isOperator(pNext, OperatorToken::OP_CLOSPARENT))
+ --depth;
+ pNext = next();
+ }
+ if (isOperator(pNext, OperatorToken::OP_COMMA))
+ pNext = next();
+ if (pFunc && decl != "void") // don't add the void parameter, I simply check here to avoid throwing away void*
+ pFunc->addParameter(new Parameter(decl, pFunc));
+ }
+ return pNext;
+}
+
+
+const Token* Parser::parseBlock(const Token* pNext)
+{
+ poco_assert (isOperator(pNext, OperatorToken::OP_OPENBRACE));
+
+ pNext = next();
+ int depth = 1;
+ while (depth > 0 && !isEOF(pNext))
+ {
+ if (isOperator(pNext, OperatorToken::OP_OPENBRACE))
+ ++depth;
+ else if (isOperator(pNext, OperatorToken::OP_CLOSBRACE))
+ --depth;
+ pNext = next();
+ }
+ return pNext;
+}
+
+
+const Token* Parser::parseEnum(const Token* pNext)
+{
+ poco_assert (isKeyword(pNext, IdentifierToken::KW_ENUM));
+
+ _pCurrentSymbol = 0;
+ int line = _istr.getCurrentLineNumber();
+ pNext = next();
+ std::string name;
+ if (pNext->is(Token::IDENTIFIER_TOKEN))
+ {
+ name = pNext->tokenString();
+ pNext = next();
+ }
+ expectOperator(pNext, OperatorToken::OP_OPENBRACE, "{");
+ Enum* pEnum = new Enum(name, currentNameSpace());
+ addSymbol(pEnum, line);
+ pNext = next();
+ while (pNext->is(Token::IDENTIFIER_TOKEN))
+ {
+ pNext = parseEnumValue(pNext, pEnum);
+ }
+ expectOperator(pNext, OperatorToken::OP_CLOSBRACE, "}");
+ pNext = next();
+ expectOperator(pNext, OperatorToken::OP_SEMICOLON, ";");
+ pNext = next();
+ _pCurrentSymbol = 0;
+ return pNext;
+}
+
+
+const Token* Parser::parseEnumValue(const Token* pNext, Enum* pEnum)
+{
+ _pCurrentSymbol = 0;
+ _doc.clear();
+ int line = _istr.getCurrentLineNumber();
+ std::string name = pNext->tokenString();
+ std::string value;
+ pNext = next();
+ if (isOperator(pNext, OperatorToken::OP_ASSIGN))
+ {
+ pNext = next();
+ while (!isOperator(pNext, OperatorToken::OP_COMMA) && !isOperator(pNext, OperatorToken::OP_CLOSBRACE) && !isEOF(pNext))
+ {
+ append(value, pNext);
+ pNext = next();
+ }
+ }
+ EnumValue* pValue = new EnumValue(name, value, pEnum);
+ addSymbol(pValue, line, true);
+ if (isOperator(pNext, OperatorToken::OP_COMMA))
+ pNext = next();
+ else if (!isOperator(pNext, OperatorToken::OP_CLOSBRACE))
+ syntaxError(", or }");
+ return pNext;
+}
+
+
+const Token* Parser::parseIdentifier(const Token* pNext, std::string& id)
+{
+ poco_assert (pNext->is(Token::IDENTIFIER_TOKEN) || isOperator(pNext, OperatorToken::OP_DBL_COLON));
+ id.append(pNext->tokenString());
+ if (isOperator(pNext, OperatorToken::OP_DBL_COLON))
+ {
+ pNext = next();
+ if (!pNext->is(Token::IDENTIFIER_TOKEN)) syntaxError("identifier");
+ id.append(pNext->tokenString());
+ }
+ pNext = next();
+ while (isOperator(pNext, OperatorToken::OP_DBL_COLON))
+ {
+ id.append("::");
+ pNext = next();
+ if (!pNext->is(Token::IDENTIFIER_TOKEN)) syntaxError("identifier");
+ id.append(pNext->tokenString());
+ pNext = next();
+ }
+ return pNext;
+}
+
+
+void Parser::addSymbol(Symbol* pSymbol, int lineNumber, bool addGST)
+{
+ pSymbol->setLineNumber(lineNumber);
+ pSymbol->setFile(_currentPath);
+ pSymbol->setPackage(_package);
+ pSymbol->setLibrary(_library);
+ pSymbol->setAccess(_access);
+ _pCurrentSymbol = pSymbol;
+ if (addGST)
+ _gst.insert(NameSpace::SymbolTable::value_type(pSymbol->name(), pSymbol));
+ if (!_doc.empty())
+ pSymbol->addDocumentation(_doc);
+ if (!_attrs.empty())
+ {
+ Attributes attrs;
+ std::istringstream istr(_attrs);
+ AttributesParser parser(attrs, istr);
+ parser.parse();
+ pSymbol->setAttributes(attrs);
+ _attrs.clear();
+ }
+ _doc.clear();
+}
+
+
+void Parser::pushNameSpace(NameSpace* pNameSpace, int lineNumber, bool addGST)
+{
+ addSymbol(pNameSpace, lineNumber, addGST);
+ _nsStack.push_back(pNameSpace);
+}
+
+
+void Parser::popNameSpace()
+{
+ _nsStack.pop_back();
+}
+
+
+NameSpace* Parser::currentNameSpace() const
+{
+ return _nsStack.back();
+}
+
+
+const Token* Parser::next()
+{
+ const Token* pNext = nextPreprocessed();
+ while (!_inFile && !isEOF(pNext))
+ pNext = nextPreprocessed();
+ return pNext;
+}
+
+
+const Token* Parser::nextPreprocessed()
+{
+ const Token* pNext = nextToken();
+ while (pNext->is(Token::PREPROCESSOR_TOKEN))
+ {
+ std::istringstream pps(pNext->tokenString());
+ pps.get();
+ Tokenizer ppt(pps);
+ const Token* pPPT = ppt.next();
+ if (pPPT->tokenString() == "line" || pPPT->is(Token::INTEGER_LITERAL_TOKEN))
+ {
+ if (!pPPT->is(Token::INTEGER_LITERAL_TOKEN))
+ pPPT = ppt.next();
+ int line = pPPT->asInteger();
+ _istr.setCurrentLineNumber(line);
+ pPPT = ppt.next();
+ if (pPPT->is(Token::STRING_LITERAL_TOKEN))
+ {
+ std::string path = pPPT->asString();
+ Path p(path);
+ p.makeAbsolute();
+ _currentPath = p.toString();
+ _inFile = (icompare(_path, _currentPath) == 0);
+ }
+ }
+ pNext = nextToken();
+ }
+ return pNext;
+}
+
+
+const Token* Parser::nextToken()
+{
+ const Token* pNext = _tokenizer.next();
+ while (pNext->is(Token::COMMENT_TOKEN) || pNext->is(Token::SPECIAL_COMMENT_TOKEN))
+ {
+ if (pNext->is(Token::SPECIAL_COMMENT_TOKEN))
+ {
+ if (_pCurrentSymbol)
+ {
+ _pCurrentSymbol->addDocumentation(pNext->asString());
+ _doc.clear();
+ }
+ else if (_inFile)
+ {
+ if (!_doc.empty()) _doc += "\n";
+ _doc += pNext->asString();
+ }
+ }
+ else if (pNext->is(Token::COMMENT_TOKEN) && _inFile)
+ {
+ const std::string& comment = pNext->tokenString();
+ if (comment.compare(0, 3, "//@") == 0)
+ {
+ _attrs.append(comment.substr(3));
+ }
+ else if (comment.compare(0, 11, "// Package:") == 0)
+ {
+ _package = comment.substr(11);
+ trimInPlace(_package);
+ }
+ else if (comment.compare(0, 11, "// Library:") == 0)
+ {
+ _library = comment.substr(11);
+ trimInPlace(_library);
+ }
+ }
+ pNext = _tokenizer.next();
+ }
+ return pNext;
+}
+
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/src/Struct.cpp b/CppParser/src/Struct.cpp
new file mode 100644
index 000000000..2baf77dbd
--- /dev/null
+++ b/CppParser/src/Struct.cpp
@@ -0,0 +1,277 @@
+//
+// Struct.cpp
+//
+// $Id: //poco/1.3/CppParser/src/Struct.cpp#2 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Struct
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/Struct.h"
+#include "Poco/CppParser/Function.h"
+#include "Poco/String.h"
+#include
+#include
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+Struct::Struct(const std::string& decl, bool isClass, NameSpace* pNameSpace):
+ NameSpace(extractName(decl), pNameSpace),
+ _decl(decl),
+ _flags(0),
+ _isClass(isClass)
+{
+ std::size_t pos = decl.find("template");
+ if (pos != std::string::npos)
+ {
+ _flags |= FN_TEMPLATE;
+ std::size_t templTypeStart = decl.find("<", pos);
+ std::size_t templTypeEnd = decl.find(">", templTypeStart);
+ if (templTypeStart != std::string::npos && templTypeEnd != std::string::npos)
+ {
+ std::string templParam = decl.substr(templTypeStart+1, templTypeEnd-templTypeStart-1);
+ Poco::trimInPlace(templParam);
+ if (templParam.empty())
+ _flags |= FN_TEMPLATE_SPECIALIZATION;
+ }
+ }
+}
+
+
+Struct::~Struct()
+{
+}
+
+
+void Struct::addBase(const std::string& name, Symbol::Access access, bool isVirtual)
+{
+ Base base;
+ base.name = name;
+ base.access = access;
+ base.isVirtual = isVirtual;
+ base.pClass = 0;
+ _bases.push_back(base);
+}
+
+
+Struct::BaseIterator Struct::baseBegin() const
+{
+ return _bases.begin();
+}
+
+
+Struct::BaseIterator Struct::baseEnd() const
+{
+ return _bases.end();
+}
+
+
+void Struct::addDerived(Struct* pClass)
+{
+ poco_check_ptr (pClass);
+
+ _derived.push_back(pClass);
+}
+
+
+void Struct::fixupBases()
+{
+ for (BaseClasses::iterator it = _bases.begin(); it != _bases.end(); ++it)
+ {
+ it->pClass = dynamic_cast(lookup(it->name));
+ if (it->pClass)
+ it->pClass->addDerived(this);
+ }
+}
+
+
+Struct::DerivedIterator Struct::derivedBegin() const
+{
+ return _derived.begin();
+}
+
+
+Struct::DerivedIterator Struct::derivedEnd() const
+{
+ return _derived.end();
+}
+
+
+namespace
+{
+ struct CPLT
+ {
+ bool operator() (const Function* pF1, const Function* pF2) const
+ {
+ int pc1 = pF1->countParameters();
+ int pc2 = pF2->countParameters();
+ return pc1 < pc2;
+ }
+ };
+};
+
+
+void Struct::constructors(Functions& functions) const
+{
+ for (NameSpace::Iterator it = begin(); it != end(); ++it)
+ {
+ Function* pFunc = dynamic_cast(it->second);
+ if (pFunc && pFunc->isConstructor())
+ functions.push_back(pFunc);
+ }
+ std::sort(functions.begin(), functions.end(), CPLT());
+}
+
+
+void Struct::bases(std::set& bases) const
+{
+ for (BaseIterator it = baseBegin(); it != baseEnd(); ++it)
+ {
+ if (it->pClass)
+ {
+ bases.insert(it->pClass->fullName());
+ it->pClass->bases(bases);
+ }
+ else bases.insert(it->name);
+ }
+}
+
+
+Function* Struct::destructor() const
+{
+ for (NameSpace::Iterator it = begin(); it != end(); ++it)
+ {
+ Function* pFunc = dynamic_cast(it->second);
+ if (pFunc && pFunc->isDestructor())
+ return pFunc;
+ }
+ return 0;
+}
+
+
+void Struct::methods(Symbol::Access access, Functions& functions) const
+{
+ for (NameSpace::Iterator it = begin(); it != end(); ++it)
+ {
+ Function* pFunc = dynamic_cast(it->second);
+ if (pFunc && pFunc->getAccess() == access && pFunc->isMethod())
+ functions.push_back(pFunc);
+ }
+}
+
+
+void Struct::inheritedMethods(FunctionSet& functions) const
+{
+ for (BaseIterator it = baseBegin(); it != baseEnd(); ++it)
+ {
+ Struct* pBase = it->pClass;
+ if (pBase)
+ {
+ for (NameSpace::Iterator itm = pBase->begin(); itm != pBase->end(); ++itm)
+ {
+ Function* pFunc = dynamic_cast(itm->second);
+ if (pFunc && pFunc->getAccess() != Symbol::ACC_PRIVATE && pFunc->isMethod())
+ functions.insert(pFunc);
+ }
+ pBase->inheritedMethods(functions);
+ }
+ }
+}
+
+
+void Struct::derived(StructSet& derived) const
+{
+ for (DerivedIterator it = derivedBegin(); it != derivedEnd(); ++it)
+ {
+ derived.insert(*it);
+ (*it)->derived(derived);
+ }
+}
+
+
+Symbol::Kind Struct::kind() const
+{
+ return Symbol::SYM_STRUCT;
+}
+
+
+Function* Struct::findFunction(const std::string& signature) const
+{
+ for (NameSpace::Iterator it = begin(); it != end(); ++it)
+ {
+ Function* pFunc = dynamic_cast(it->second);
+ if (pFunc && pFunc->signature() == signature)
+ return pFunc;
+ }
+ for (BaseIterator it = baseBegin(); it != baseEnd(); ++it)
+ {
+ if (it->pClass)
+ {
+ Function* pFunc = it->pClass->findFunction(signature);
+ if (pFunc) return pFunc;
+ }
+ }
+ return 0;
+}
+
+
+bool Struct::hasVirtualDestructor() const
+{
+ Function* pFunc = destructor();
+ if (pFunc && (pFunc->flags() & Function::FN_VIRTUAL))
+ return true;
+ for (BaseIterator it = baseBegin(); it != baseEnd(); ++it)
+ {
+ if (it->pClass && it->pClass->hasVirtualDestructor())
+ return true;
+ }
+ return false;
+}
+
+
+std::string Struct::toString() const
+{
+ std::ostringstream ostr;
+ ostr << declaration() << "\n{\n";
+ for (Iterator it = begin(); it != end(); ++it)
+ {
+ ostr << it->second->fullName() << "\n";
+ ostr << it->second->toString() << "\n";
+ }
+ ostr << "};\n";
+ return ostr.str();
+}
+
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/src/Symbol.cpp b/CppParser/src/Symbol.cpp
new file mode 100644
index 000000000..96761aba2
--- /dev/null
+++ b/CppParser/src/Symbol.cpp
@@ -0,0 +1,238 @@
+//
+// Symbol.cpp
+//
+// $Id: //poco/1.3/CppParser/src/Symbol.cpp#6 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Symbol
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/Symbol.h"
+#include "Poco/CppParser/NameSpace.h"
+#include "Poco/CppParser/Utility.h"
+#include "Poco/String.h"
+#include
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+int Symbol::_nextId = 0;
+
+
+Symbol::Symbol():
+ _id(_nextId++),
+ _pNameSpace(0),
+ _access(ACC_PUBLIC),
+ _line(-1)
+{
+}
+
+
+Symbol::Symbol(const std::string& name, NameSpace* pNameSpace):
+ _id(_nextId++),
+ _name(name),
+ _pNameSpace(pNameSpace),
+ _access(ACC_PUBLIC),
+ _line(-1)
+{
+ if (_pNameSpace)
+ _pNameSpace->addSymbol(this);
+}
+
+
+Symbol::~Symbol()
+{
+}
+
+
+void Symbol::setAccess(Access access)
+{
+ _access = access;
+}
+
+
+void Symbol::setDocumentation(const std::string& text)
+{
+ _documentation = text;
+}
+
+
+void Symbol::addDocumentation(const std::string& text)
+{
+ if (!_documentation.empty())
+ _documentation.append("\n");
+ _documentation.append(text);
+}
+
+
+void Symbol::setFile(const std::string& path)
+{
+ _file = path;
+}
+
+
+void Symbol::setLineNumber(int line)
+{
+ _line = line;
+}
+
+
+void Symbol::setPackage(const std::string& package)
+{
+ _package = package;
+}
+
+
+void Symbol::setLibrary(const std::string& library)
+{
+ _library = library;
+}
+
+
+std::string Symbol::fullName() const
+{
+ std::string fullName;
+ if (_pNameSpace)
+ {
+ fullName = _pNameSpace->fullName();
+ if (!fullName.empty()) fullName.append("::");
+ }
+ fullName.append(_name);
+ return fullName;
+}
+
+
+std::string Symbol::extractName(const std::string& decl)
+{
+ poco_assert (!decl.empty());
+
+ std::string::size_type pos = decl.find('(');
+ // check for function pointer
+ if (pos != std::string::npos && pos < decl.size() - 1)
+ {
+ std::string::size_type i = pos + 1;
+ while (i < decl.size() && std::isspace(decl[i])) i++;
+ if (i < decl.size() && decl[i] == '*')
+ {
+ i++;
+ std::string name;
+ while (i < decl.size() && std::isspace(decl[i])) i++;
+ while (i < decl.size() && !std::isspace(decl[i]) && decl[i] != ')') name += decl[i++];
+ return name;
+ }
+ }
+ if (pos == std::string::npos || (pos > 0 && decl[pos - 1] == '('))
+ pos = decl.size();
+ --pos;
+ std::string::size_type eqPos = decl.find('=');
+ if (eqPos != std::string::npos)
+ {
+ std::string::size_type gtPos = decl.find('>', eqPos);
+ if ((gtPos == std::string::npos || gtPos > pos) && eqPos < pos && eqPos > 0 && decl[eqPos + 1] != '=')
+ pos = eqPos - 1;
+ }
+ while (pos > 0 && std::isspace(decl[pos])) --pos;
+ while (pos > 0 && decl[pos] == ']')
+ {
+ --pos;
+ while (pos > 0 && decl[pos] != '[') --pos;
+ if (pos > 0) --pos;
+ while (pos > 0 && std::isspace(decl[pos])) --pos;
+ }
+ // iterate over template (specialization)
+ int nestedTemplateCount = 0;
+ if (pos > 1 && decl[pos] == '>' && decl[pos-1] != '-' && decl[pos-1] != '>') // the operators ->, >>
+ {
+ --pos;
+ ++nestedTemplateCount;
+ while (pos > 0 && nestedTemplateCount != 0)
+ {
+ if (decl[pos] == '<')
+ --nestedTemplateCount;
+ if (decl[pos] == '>')
+ ++nestedTemplateCount;
+ --pos;
+ }
+ while (pos > 0 && std::isspace(decl[pos])) --pos;
+ }
+ std::string::size_type end = pos;
+ std::string::size_type op = decl.find("operator ");
+ if (op != std::string::npos && (op == 0 || std::isspace(decl[op - 1]) || decl[op - 1] == ':'))
+ {
+ pos = op;
+ }
+ else
+ {
+ while (pos > 0 && !isIdent(decl[pos])) --pos;
+ while (pos > 0 && std::isspace(decl[pos])) --pos;
+ while (pos > 0 && isIdent(decl[pos - 1])) --pos;
+ if (pos > 0 && decl[pos - 1] == '~') --pos;
+ }
+
+ while (pos > 2 && decl[pos - 1] == ':')
+ {
+ pos -= 3;
+ while (pos > 0 && isIdent(decl[pos - 1])) --pos;
+ }
+ return decl.substr(pos, end - pos + 1);
+}
+
+
+bool Symbol::isIdent(char c)
+{
+ return std::isalnum(c) || c == '_';
+}
+
+
+bool Symbol::hasAttr(const std::string& decl, const std::string& attr)
+{
+ std::string attrS(attr);
+ attrS += ' ';
+ std::string::size_type pos = decl.find(attrS);
+ return pos == 0 || (pos != std::string::npos && decl[pos - 1] == ' ');
+}
+
+
+void Symbol::setAttributes(const Attributes& attrs)
+{
+ _attrs = attrs;
+}
+
+
+const Attributes& Symbol::getAttributes() const
+{
+ return _attrs;
+}
+
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/src/Tokenizer.cpp b/CppParser/src/Tokenizer.cpp
new file mode 100644
index 000000000..fd02220f8
--- /dev/null
+++ b/CppParser/src/Tokenizer.cpp
@@ -0,0 +1,68 @@
+//
+// Tokenizer.cpp
+//
+// $Id: //poco/1.3/CppParser/src/Tokenizer.cpp#1 $
+//
+// Library: CppParser
+// Package: CppParser
+// Module: Tokenizer
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/Tokenizer.h"
+#include "Poco/CppParser/CppToken.h"
+
+
+using Poco::StreamTokenizer;
+using Poco::WhitespaceToken;
+
+
+namespace Poco {
+namespace CppParser {
+
+
+Tokenizer::Tokenizer(std::istream& istr):
+ StreamTokenizer(istr)
+{
+ addToken(new OperatorToken);
+ addToken(new IdentifierToken);
+ addToken(new StringLiteralToken);
+ addToken(new CharLiteralToken);
+ addToken(new NumberLiteralToken);
+ addToken(new CommentToken, false);
+ addToken(new PreprocessorToken);
+ addToken(new WhitespaceToken);
+}
+
+
+Tokenizer::~Tokenizer()
+{
+}
+
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/src/TypeDef.cpp b/CppParser/src/TypeDef.cpp
new file mode 100644
index 000000000..168840505
--- /dev/null
+++ b/CppParser/src/TypeDef.cpp
@@ -0,0 +1,79 @@
+//
+// TypeDef.cpp
+//
+// $Id: //poco/1.3/CppParser/src/TypeDef.cpp#3 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: TypeDef
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/TypeDef.h"
+#include "Poco/String.h"
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+TypeDef::TypeDef(const std::string& decl, NameSpace* pNameSpace):
+ Decl(decl, pNameSpace)
+{
+}
+
+
+TypeDef::~TypeDef()
+{
+}
+
+
+Symbol::Kind TypeDef::kind() const
+{
+ return Symbol::SYM_TYPEDEF;
+}
+
+
+std::string TypeDef::baseType() const
+{
+ std::string decl = declaration();
+ if (decl.compare(0, 7, "typedef") == 0)
+ {
+ decl.erase(0, 7);
+ std::string::size_type pos = decl.size() - 1;
+ while (pos > 0 && std::isspace(decl[pos])) pos--;
+ while (pos > 0 && !std::isspace(decl[pos])) pos--;
+ decl.resize(pos + 1);
+ Poco::trimInPlace(decl);
+ }
+ return decl;
+}
+
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/src/Utility.cpp b/CppParser/src/Utility.cpp
new file mode 100644
index 000000000..6b16a3b29
--- /dev/null
+++ b/CppParser/src/Utility.cpp
@@ -0,0 +1,316 @@
+//
+// Utility.cpp
+//
+// $Id: //poco/1.3/CppParser/src/Utility.cpp#5 $
+//
+// Library: CppParser
+// Package: CppParser
+// Module: Utility
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/Utility.h"
+#include "Poco/CppParser/Parser.h"
+#include "Poco/CppParser/Struct.h"
+#include "Poco/StringTokenizer.h"
+#include "Poco/Glob.h"
+#include "Poco/Path.h"
+#include "Poco/File.h"
+#include "Poco/Process.h"
+#include "Poco/Environment.h"
+#include "Poco/NumberFormatter.h"
+#include "Poco/Exception.h"
+#include
+#include
+
+
+using Poco::StringTokenizer;
+using Poco::Glob;
+using Poco::Path;
+using Poco::File;
+using Poco::Process;
+using Poco::ProcessHandle;
+using Poco::Environment;
+using Poco::NumberFormatter;
+using Poco::Exception;
+
+
+namespace Poco {
+namespace CppParser {
+
+
+void Utility::parseDir(const std::vector & includePattern, const std::vector & excludePattern, NameSpace::SymbolTable& st, const std::string& exec, const std::string& options, const std::string& path)
+{
+ std::set files;
+ Utility::buildFileList(files, includePattern, excludePattern);
+ for (std::set::const_iterator it = files.begin(); it != files.end(); ++it)
+ {
+ Utility::parse(*it, st, exec, options, path);
+ }
+ Utility::fixup(st);
+}
+
+
+void Utility::parse(const std::string& file, NameSpace::SymbolTable& st, const std::string& exec, const std::string& options, const std::string& path)
+{
+ std::string prepFile = Utility::preprocessFile(file, exec, options, path);
+ Utility::parseOnly(file, st, prepFile, true);
+}
+
+
+void Utility::fixup(NameSpace::SymbolTable& st)
+{
+ for (NameSpace::SymbolTable::iterator it = st.begin(); it != st.end(); ++it)
+ {
+ Struct* pStruct = dynamic_cast(it->second);
+ if (pStruct)
+ {
+ pStruct->fixupBases();
+ }
+ }
+}
+
+
+void Utility::detectPrefixAndIncludes(const std::string& origHFile, std::vector& lines, std::string& prefix)
+{
+ std::ifstream istr(origHFile.c_str());
+ try
+ {
+ if (istr.good())
+ {
+ std::string x;
+ istr >> x;
+ while (x.find("#ifndef") == std::string::npos)
+ istr >> x;
+ StringTokenizer tokenizer(x, " \t", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
+ poco_assert (tokenizer.count() == 2);
+ StringTokenizer::Iterator itTmp = tokenizer.begin();
+ ++itTmp;
+ std::string defValue = *itTmp;
+ istr >> x;
+ // now find the corresponsing #define
+ while (x.find(defValue) == std::string::npos)
+ istr >> x;
+ //now parse until a class def is found without a ; at the end
+ bool stop = false;
+ std::string prefixHint;
+ do
+ {
+ istr >> x;
+ // we add EVERYTHING to lines: reason: used macros/preprocessor defines, conditional includes should all be present in the generated code
+ // just think about fwd declarations inside a NS_BEGIN ... NS_END block
+ if (x.find("class") != std::string::npos && x.find(";") == std::string::npos)
+ {
+ StringTokenizer tok(x, " \t", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
+ StringTokenizer::Iterator it = tok.begin();
+ while (*it != "class" && it != tok.end())
+ ++it;
+ // the next after class must be *_API or in case of a template it must be the class name
+ ++it;
+ std::size_t apiPos = it->find("_API");
+ if (apiPos != std::string::npos)
+ {
+ prefixHint = it->substr(0, apiPos);
+ }
+ stop = true;
+ }
+ else
+ {
+ lines.push_back(x);
+ }
+ }
+ while (!stop && !istr.eof());
+ if (!stop)
+ {
+ lines.clear();
+ prefix.clear();
+ //throw Poco::SyntaxException("Failed to parse file " + origHFile + ".No class declared?");
+ return;
+ }
+
+ // now search the prefix
+ if (lines.empty())
+ {
+ prefix.clear();
+ return;
+ }
+ // the prefix for that file
+ std::vector::const_iterator it = lines.end();
+ --it;
+ std::vector::const_iterator itBegin = lines.begin();
+ for (; it != itBegin; --it)
+ {
+ std::size_t prefixPos = it->find("_BEGIN");
+ if (prefixPos != std::string::npos)
+ {
+ prefix = it->substr(0, prefixPos);
+ if (prefix != prefixHint && !prefixHint.empty())
+ {
+ throw Poco::SyntaxException("Conflicting prefixes detected: " + prefixHint + "<->" + prefix);
+ }
+ }
+ }
+ }
+ else throw Poco::OpenFileException(origHFile);
+ }
+ catch (Exception&)
+ {
+ istr.close();
+ throw;
+ }
+ istr.close();
+}
+
+std::string Utility::preprocessFile(const std::string& file, const std::string& exec, const std::string& options, const std::string& path)
+{
+ Path pp(file);
+ pp.setExtension("i");
+
+ std::string popts;
+ for (std::string::const_iterator it = options.begin(); it != options.end(); ++it)
+ {
+ if (*it == '%')
+ popts += pp.getBaseName();
+ else
+ popts += *it;
+ }
+ StringTokenizer tokenizer(popts, ",;\n", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
+ std::vector args(tokenizer.begin(), tokenizer.end());
+ args.push_back(file);
+
+ if (!path.empty())
+ {
+ std::string newPath(Environment::get("PATH"));
+ newPath += Path::pathSeparator();
+ newPath += path;
+ Environment::set("PATH", path);
+ }
+
+ ProcessHandle proc = Process::launch(exec, args);
+ int rc = Process::wait(proc);
+ if (rc != 0)
+ {
+ throw Poco::RuntimeException("Failed to process file");
+ }
+
+ return pp.getFileName();
+}
+
+
+void Utility::parseOnly(const std::string& file, NameSpace::SymbolTable& st, const std::string& preprocessedFile, bool removePreprocessedFile)
+{
+ std::ifstream istr(preprocessedFile.c_str());
+ try
+ {
+ if (istr.good())
+ {
+ Parser parser(st, file, istr);
+ parser.parse();
+ }
+ else throw Poco::OpenFileException(preprocessedFile);
+ }
+ catch (Exception&)
+ {
+ istr.close();
+ if (removePreprocessedFile)
+ removeFile(preprocessedFile);
+ throw;
+ }
+ istr.close();
+ if (removePreprocessedFile)
+ removeFile(preprocessedFile);
+}
+
+
+void Utility::removeFile(const std::string& preprocessedfile)
+{
+ try
+ {
+ File f(preprocessedfile);
+ f.remove();
+ }
+ catch (Exception&)
+ {
+ }
+}
+
+
+void Utility::buildFileList(std::set& files, const std::vector& includePattern, const std::vector& excludePattern)
+{
+ std::set temp;
+ std::vector ::const_iterator itInc = includePattern.begin();
+ std::vector ::const_iterator itIncEnd = includePattern.end();
+
+ int options(0);
+#if defined(_WIN32)
+ options |= Glob::GLOB_CASELESS;
+#endif
+
+ for (; itInc != itIncEnd; ++itInc)
+ {
+ Glob::glob(*itInc, temp, options);
+ }
+
+ std::vector ::const_iterator itExc = excludePattern.begin();
+ std::vector ::const_iterator itExcEnd = excludePattern.end();
+
+ for (std::set::const_iterator it = temp.begin(); it != temp.end(); ++it)
+ {
+ Path p(*it);
+ bool include = true;
+ for (; itExc != itExcEnd; ++itExc)
+ {
+ Glob glob(*itExc, options);
+ if (glob.match(p.getFileName()))
+ include = false;
+ }
+ if (include)
+ files.insert(*it);
+ }
+}
+
+
+std::string replace(const std::string& input, const std::string& oldToken, const std::string& newToken)
+{
+ std::string result;
+ std::size_t start = 0;
+ std::size_t pos = 0;
+ do
+ {
+ pos = input.find(oldToken, start);
+ result.append(input.substr(start, pos-start));
+ if (pos != std::string::npos)
+ result.append(newToken);
+ start = pos + oldToken.length();
+ }
+ while (pos != std::string::npos);
+
+ return result;
+}
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/src/Variable.cpp b/CppParser/src/Variable.cpp
new file mode 100644
index 000000000..962d1df90
--- /dev/null
+++ b/CppParser/src/Variable.cpp
@@ -0,0 +1,98 @@
+//
+// Variable.cpp
+//
+// $Id: //poco/1.3/CppParser/src/Variable.cpp#3 $
+//
+// Library: CppParser
+// Package: SymbolTable
+// Module: Variable
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "Poco/CppParser/Variable.h"
+#include "Poco/String.h"
+#include
+
+
+namespace Poco {
+namespace CppParser {
+
+
+Variable::Variable(const std::string& decl, NameSpace* pNameSpace):
+ Decl(decl, pNameSpace),
+ _flags(0),
+ _isPointer(false),
+ _type()
+{
+ if (hasAttr(decl, "static"))
+ _flags |= VAR_STATIC;
+ if (hasAttr(decl, "mutable"))
+ _flags |= VAR_MUTABLE;
+ if (hasAttr(decl, "volatile"))
+ _flags |= VAR_VOLATILE;
+ if (hasAttr(decl, "const"))
+ _flags |= VAR_CONST;
+
+ std::size_t pos = decl.rfind(name());
+ std::string tmp = decl.substr(0, pos);
+ tmp = Poco::trim(tmp);
+
+ pos = tmp.rfind("*");
+ _isPointer = (pos == (tmp.size()-1));
+
+ Poco::replaceInPlace(tmp, "static ", "");
+ Poco::replaceInPlace(tmp, "mutable ", "");
+ Poco::replaceInPlace(tmp, "volatile ", "");
+ Poco::replaceInPlace(tmp, "static\t", "");
+ Poco::replaceInPlace(tmp, "mutable\t", "");
+ Poco::replaceInPlace(tmp, "volatile\t", "");
+ if (tmp.find("const ") == 0)
+ tmp = tmp.substr(6);
+ if (tmp.find("const\t") == 0)
+ tmp = tmp.substr(6);
+
+ std::size_t rightCut = tmp.size();
+ while (rightCut > 0 && (tmp[rightCut-1] == '&' || tmp[rightCut-1] == '*' || tmp[rightCut-1] == '\t' || tmp[rightCut-1] == ' '))
+ --rightCut;
+ _type = Poco::trim(tmp.substr(0, rightCut));
+
+}
+
+
+Variable::~Variable()
+{
+}
+
+
+Symbol::Kind Variable::kind() const
+{
+ return Symbol::SYM_VARIABLE;
+}
+
+
+} } // namespace Poco::CppParser
diff --git a/CppParser/testsuite/Makefile b/CppParser/testsuite/Makefile
new file mode 100644
index 000000000..0e209175d
--- /dev/null
+++ b/CppParser/testsuite/Makefile
@@ -0,0 +1,19 @@
+#
+# Makefile
+#
+# $Id: //poco/1.3/CppParser/testsuite/Makefile#1 $
+#
+# Makefile for Poco CppParser testsuite
+#
+
+include $(POCO_BASE)/build/rules/global
+
+objects = CppParserTestSuite Driver \
+ CppParserTest \
+ AttributesTestSuite AttributesParserTest
+
+target = testrunner
+target_version = 1
+target_libs = PocoCppParser PocoFoundation CppUnit
+
+include $(POCO_BASE)/build/rules/exec
diff --git a/CppParser/testsuite/TestSuite.progen b/CppParser/testsuite/TestSuite.progen
new file mode 100644
index 000000000..b21c98060
--- /dev/null
+++ b/CppParser/testsuite/TestSuite.progen
@@ -0,0 +1,12 @@
+vc.project.guid = C79112BD-EC91-11DA-A4CE-005056C00008
+vc.project.name = TestSuite
+vc.project.target = TestSuite
+vc.project.type = testsuite
+vc.project.pocobase = ..\\..
+vc.project.platforms = Win32, x64, WinCE
+vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
+vc.project.prototype = TestSuite_vs90.vcproj
+vc.project.compiler.include = ..\\..\\Foundation\\include
+vc.project.linker.dependencies.Win32 =
+vc.project.linker.dependencies.x64 =
+vc.project.linker.dependencies.WinCE =
diff --git a/CppParser/testsuite/TestSuite.vmsbuild b/CppParser/testsuite/TestSuite.vmsbuild
new file mode 100644
index 000000000..0f924b0bf
--- /dev/null
+++ b/CppParser/testsuite/TestSuite.vmsbuild
@@ -0,0 +1,9 @@
+#
+# TestSuite.vmsbuild
+#
+# $Id: //poco/1.3/CppParser/testsuite/TestSuite.vmsbuild#1 $
+#
+EXE=TestRunner
+CppParserTestSuite
+Driver
+CppParserTest
diff --git a/CppParser/testsuite/TestSuite_CE_vs90.vcproj b/CppParser/testsuite/TestSuite_CE_vs90.vcproj
new file mode 100644
index 000000000..c4d0c7dbe
--- /dev/null
+++ b/CppParser/testsuite/TestSuite_CE_vs90.vcproj
@@ -0,0 +1,512 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppParser/testsuite/TestSuite_vs100.vcxproj b/CppParser/testsuite/TestSuite_vs100.vcxproj
new file mode 100644
index 000000000..64cfc281b
--- /dev/null
+++ b/CppParser/testsuite/TestSuite_vs100.vcxproj
@@ -0,0 +1,317 @@
+
+
+
+
+ debug_shared
+ Win32
+
+
+ debug_static_md
+ Win32
+
+
+ debug_static_mt
+ Win32
+
+
+ release_shared
+ Win32
+
+
+ release_static_md
+ Win32
+
+
+ release_static_mt
+ Win32
+
+
+
+ TestSuite
+ {C79112BD-EC91-11DA-A4CE-005056C00008}
+ TestSuite
+ Win32Proj
+
+
+
+ Application
+ Dynamic
+ MultiByte
+
+
+ Application
+ Dynamic
+ MultiByte
+
+
+ Application
+ Static
+ MultiByte
+
+
+ Application
+ Static
+ MultiByte
+
+
+ Application
+ Dynamic
+ MultiByte
+
+
+ Application
+ Dynamic
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.40219.1
+ bin\
+ obj\$(Configuration)\
+ true
+ bin\
+ obj\$(Configuration)\
+ false
+ bin\static_mt\
+ obj\$(Configuration)\
+ true
+ bin\static_mt\
+ obj\$(Configuration)\
+ false
+ bin\static_md\
+ obj\$(Configuration)\
+ true
+ bin\static_md\
+ obj\$(Configuration)\
+ false
+ TestSuited
+ TestSuited
+ TestSuited
+ TestSuite
+ TestSuite
+ TestSuite
+
+
+
+ Disabled
+ ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ Level3
+ EditAndContinue
+ Default
+ %(DisableSpecificWarnings)
+
+
+ CppUnitd.lib;WinTestRunnerd.lib;%(AdditionalDependencies)
+ bin\TestSuited.exe
+ ..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin\TestSuited.pdb
+ Windows
+ MachineX86
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ CppUnit.lib;WinTestRunner.lib;%(AdditionalDependencies)
+ bin\TestSuite.exe
+ ..\..\lib;%(AdditionalLibraryDirectories)
+ false
+ Windows
+ true
+ true
+ MachineX86
+
+
+
+
+ Disabled
+ ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebug
+ true
+ true
+ true
+ true
+
+ Level3
+ EditAndContinue
+ Default
+ %(DisableSpecificWarnings)
+
+
+ CppUnitmtd.lib;WinTestRunnermtd.lib;iphlpapi.lib;winmm.lib;nafxcwd.lib;libcmtd.lib;WinTestRunner.res;%(AdditionalDependencies)
+ bin\static_mt\TestSuited.exe
+ ..\..\lib;%(AdditionalLibraryDirectories)
+ nafxcwd.lib;libcmtd.lib;%(IgnoreSpecificDefaultLibraries)
+ true
+ true
+ bin\static_mt\TestSuited.pdb
+ Windows
+ MachineX86
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ CppUnitmt.lib;WinTestRunnermt.lib;iphlpapi.lib;winmm.lib;nafxcw.lib;libcmt.lib;WinTestRunner.res;%(AdditionalDependencies)
+ bin\static_mt\TestSuite.exe
+ ..\..\lib;%(AdditionalLibraryDirectories)
+ nafxcw.lib;libcmt.lib;%(IgnoreSpecificDefaultLibraries)
+ false
+ Windows
+ true
+ true
+ MachineX86
+
+
+
+
+ Disabled
+ ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ Level3
+ EditAndContinue
+ Default
+ %(DisableSpecificWarnings)
+
+
+ CppUnitmdd.lib;WinTestRunnermdd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;%(AdditionalDependencies)
+ bin\static_md\TestSuited.exe
+ ..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin\static_md\TestSuited.pdb
+ Windows
+ MachineX86
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ CppUnitmd.lib;WinTestRunnermd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;%(AdditionalDependencies)
+ bin\static_md\TestSuite.exe
+ ..\..\lib;%(AdditionalLibraryDirectories)
+ false
+ Windows
+ true
+ true
+ MachineX86
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppParser/testsuite/TestSuite_vs100.vcxproj.filters b/CppParser/testsuite/TestSuite_vs100.vcxproj.filters
new file mode 100644
index 000000000..8845b1fae
--- /dev/null
+++ b/CppParser/testsuite/TestSuite_vs100.vcxproj.filters
@@ -0,0 +1,69 @@
+
+
+
+
+ {3dbe62ab-f7d9-4d3e-9ab6-3312cc0d0d35}
+
+
+ {487fd5d4-34e1-4ced-9824-be2eb50ecea6}
+
+
+ {31c109cb-3156-45c8-b3fc-f8e312348f98}
+
+
+ {462c6f35-933d-4d79-ac6c-cb22b2e6127a}
+
+
+ {a897b148-fb3f-4ff6-baf7-c5f203a47d4e}
+
+
+ {f9c4b62e-3e7a-4e05-b266-ab16c1940566}
+
+
+ {1c844178-3834-47cc-bcf9-d1e85d1419ff}
+
+
+ {501d852d-ae97-41d1-9c7b-974b851fac8d}
+
+
+ {439a624a-3294-4620-a5a9-5859e00a3764}
+
+
+ {5e286b44-34f3-4561-b047-9af6c3b64c40}
+
+
+ {37e80b84-ac0f-4dc1-98bb-9e91a1f3301a}
+
+
+
+
+ CppParser\Header Files
+
+
+ _Suite\Header Files
+
+
+ Attributes\Header Files
+
+
+ Attributes\Header Files
+
+
+
+
+ CppParser\Source Files
+
+
+ _Suite\Source Files
+
+
+ _Driver\Source Files
+
+
+ Attributes\Source Files
+
+
+ Attributes\Source Files
+
+
+
\ No newline at end of file
diff --git a/CppParser/testsuite/TestSuite_vs71.vcproj b/CppParser/testsuite/TestSuite_vs71.vcproj
new file mode 100644
index 000000000..bf34405c5
--- /dev/null
+++ b/CppParser/testsuite/TestSuite_vs71.vcproj
@@ -0,0 +1,447 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppParser/testsuite/TestSuite_vs80.vcproj b/CppParser/testsuite/TestSuite_vs80.vcproj
new file mode 100644
index 000000000..fe4fb6236
--- /dev/null
+++ b/CppParser/testsuite/TestSuite_vs80.vcproj
@@ -0,0 +1,487 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppParser/testsuite/TestSuite_vs90.vcproj b/CppParser/testsuite/TestSuite_vs90.vcproj
new file mode 100644
index 000000000..56323bbf8
--- /dev/null
+++ b/CppParser/testsuite/TestSuite_vs90.vcproj
@@ -0,0 +1,487 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppParser/testsuite/TestSuite_x64_vs100.vcxproj b/CppParser/testsuite/TestSuite_x64_vs100.vcxproj
new file mode 100644
index 000000000..31e03aac6
--- /dev/null
+++ b/CppParser/testsuite/TestSuite_x64_vs100.vcxproj
@@ -0,0 +1,317 @@
+
+
+
+
+ debug_shared
+ x64
+
+
+ debug_static_md
+ x64
+
+
+ debug_static_mt
+ x64
+
+
+ release_shared
+ x64
+
+
+ release_static_md
+ x64
+
+
+ release_static_mt
+ x64
+
+
+
+ TestSuite
+ {C79112BD-EC91-11DA-A4CE-005056C00008}
+ TestSuite
+ Win32Proj
+
+
+
+ Application
+ Dynamic
+ MultiByte
+
+
+ Application
+ Dynamic
+ MultiByte
+
+
+ Application
+ Static
+ MultiByte
+
+
+ Application
+ Static
+ MultiByte
+
+
+ Application
+ Dynamic
+ MultiByte
+
+
+ Application
+ Dynamic
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.40219.1
+ bin64\
+ obj64\$(Configuration)\
+ true
+ bin64\
+ obj64\$(Configuration)\
+ false
+ bin64\static_mt\
+ obj64\$(Configuration)\
+ true
+ bin64\static_mt\
+ obj64\$(Configuration)\
+ false
+ bin64\static_md\
+ obj64\$(Configuration)\
+ true
+ bin64\static_md\
+ obj64\$(Configuration)\
+ false
+ TestSuited
+ TestSuited
+ TestSuited
+ TestSuite
+ TestSuite
+ TestSuite
+
+
+
+ Disabled
+ ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ Level3
+ ProgramDatabase
+ Default
+ %(DisableSpecificWarnings)
+
+
+ CppUnitd.lib;WinTestRunnerd.lib;%(AdditionalDependencies)
+ bin64\TestSuited.exe
+ ..\..\lib64;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin64\TestSuited.pdb
+ Windows
+ MachineX64
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ CppUnit.lib;WinTestRunner.lib;%(AdditionalDependencies)
+ bin64\TestSuite.exe
+ ..\..\lib64;%(AdditionalLibraryDirectories)
+ false
+ Windows
+ true
+ true
+ MachineX64
+
+
+
+
+ Disabled
+ ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebug
+ true
+ true
+ true
+ true
+
+ Level3
+ ProgramDatabase
+ Default
+ %(DisableSpecificWarnings)
+
+
+ CppUnitmtd.lib;WinTestRunnermtd.lib;iphlpapi.lib;winmm.lib;nafxcwd.lib;libcmtd.lib;WinTestRunner.res;%(AdditionalDependencies)
+ bin64\static_mt\TestSuited.exe
+ ..\..\lib64;%(AdditionalLibraryDirectories)
+ nafxcwd.lib;libcmtd.lib;%(IgnoreSpecificDefaultLibraries)
+ true
+ true
+ bin64\static_mt\TestSuited.pdb
+ Windows
+ MachineX64
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ CppUnitmt.lib;WinTestRunnermt.lib;iphlpapi.lib;winmm.lib;nafxcw.lib;libcmt.lib;WinTestRunner.res;%(AdditionalDependencies)
+ bin64\static_mt\TestSuite.exe
+ ..\..\lib64;%(AdditionalLibraryDirectories)
+ nafxcw.lib;libcmt.lib;%(IgnoreSpecificDefaultLibraries)
+ false
+ Windows
+ true
+ true
+ MachineX64
+
+
+
+
+ Disabled
+ ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+ Level3
+ ProgramDatabase
+ Default
+ %(DisableSpecificWarnings)
+
+
+ CppUnitmdd.lib;WinTestRunnermdd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;%(AdditionalDependencies)
+ bin64\static_md\TestSuited.exe
+ ..\..\lib64;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin64\static_md\TestSuited.pdb
+ Windows
+ MachineX64
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ CppUnitmd.lib;WinTestRunnermd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;%(AdditionalDependencies)
+ bin64\static_md\TestSuite.exe
+ ..\..\lib64;%(AdditionalLibraryDirectories)
+ false
+ Windows
+ true
+ true
+ MachineX64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppParser/testsuite/TestSuite_x64_vs100.vcxproj.filters b/CppParser/testsuite/TestSuite_x64_vs100.vcxproj.filters
new file mode 100644
index 000000000..6af69e6ca
--- /dev/null
+++ b/CppParser/testsuite/TestSuite_x64_vs100.vcxproj.filters
@@ -0,0 +1,69 @@
+
+
+
+
+ {4cb1acf1-ba98-4bd9-84ac-74e8fe451ad1}
+
+
+ {86c44e6b-2aad-4210-8a93-8eee9287b3ef}
+
+
+ {5957f029-1958-45dd-971f-3daa0a49cd0d}
+
+
+ {72b6f2bd-1ebd-42e6-9875-e780e24c0192}
+
+
+ {3b26424c-0f5e-4ef6-8117-dc25e24f6355}
+
+
+ {b19431b3-6c68-4dae-a4a7-88714eb2ebf2}
+
+
+ {730c5f02-68f8-4324-910c-64460f3c07d8}
+
+
+ {5a5c72ce-7230-4721-8666-ae7b4e69db4d}
+
+
+ {a9ad947c-31ad-4b5d-942a-35eb74f8a352}
+
+
+ {2f8a6d81-22c2-4089-936a-3abfbc73ae47}
+
+
+ {8d629d90-5ba0-4508-910a-28933d4c6c22}
+
+
+
+
+ CppParser\Header Files
+
+
+ _Suite\Header Files
+
+
+ Attributes\Header Files
+
+
+ Attributes\Header Files
+
+
+
+
+ CppParser\Source Files
+
+
+ _Suite\Source Files
+
+
+ _Driver\Source Files
+
+
+ Attributes\Source Files
+
+
+ Attributes\Source Files
+
+
+
\ No newline at end of file
diff --git a/CppParser/testsuite/TestSuite_x64_vs90.vcproj b/CppParser/testsuite/TestSuite_x64_vs90.vcproj
new file mode 100644
index 000000000..c65705a2f
--- /dev/null
+++ b/CppParser/testsuite/TestSuite_x64_vs90.vcproj
@@ -0,0 +1,487 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppParser/testsuite/src/AttributesParserTest.cpp b/CppParser/testsuite/src/AttributesParserTest.cpp
new file mode 100644
index 000000000..a15c2e28f
--- /dev/null
+++ b/CppParser/testsuite/src/AttributesParserTest.cpp
@@ -0,0 +1,158 @@
+//
+// AttributesParserTest.cpp
+//
+// $Id: //poco/1.3/CppParser/testsuite/src/AttributesParserTest.cpp#1 $
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "AttributesParserTest.h"
+#include "CppUnit/TestCaller.h"
+#include "CppUnit/TestSuite.h"
+#include "Poco/CppParser/Attributes.h"
+#include "Poco/CppParser/AttributesParser.h"
+#include
+
+
+using Poco::CppParser::Attributes;
+using Poco::CppParser::AttributesParser;
+
+
+AttributesParserTest::AttributesParserTest(const std::string& name): CppUnit::TestCase(name)
+{
+}
+
+
+AttributesParserTest::~AttributesParserTest()
+{
+}
+
+
+void AttributesParserTest::testParser1()
+{
+ Attributes attrs;
+ std::istringstream istr("");
+ AttributesParser parser(attrs, istr);
+ parser.parse();
+ assert (attrs.begin() == attrs.end());
+}
+
+
+void AttributesParserTest::testParser2()
+{
+ Attributes attrs;
+ std::istringstream istr("name=value");
+ AttributesParser parser(attrs, istr);
+ parser.parse();
+ assert (attrs.getString("name") == "value");
+}
+
+
+void AttributesParserTest::testParser3()
+{
+ Attributes attrs;
+ std::istringstream istr("name=value, name2=100");
+ AttributesParser parser(attrs, istr);
+ parser.parse();
+ assert (attrs.getString("name") == "value");
+ assert (attrs.getInt("name2") == 100);
+}
+
+
+void AttributesParserTest::testParser4()
+{
+ Attributes attrs;
+ std::istringstream istr("name=value, name2=100, name3");
+ AttributesParser parser(attrs, istr);
+ parser.parse();
+ assert (attrs.getString("name") == "value");
+ assert (attrs.getInt("name2") == 100);
+ assert (attrs.getBool("name3"));
+}
+
+
+void AttributesParserTest::testParser5()
+{
+ Attributes attrs;
+ std::istringstream istr("name.a=value, name.b=100, name.c");
+ AttributesParser parser(attrs, istr);
+ parser.parse();
+ assert (attrs.getString("name.a") == "value");
+ assert (attrs.getInt("name.b") == 100);
+ assert (attrs.getBool("name.c"));
+}
+
+
+void AttributesParserTest::testParser6()
+{
+ Attributes attrs;
+ std::istringstream istr("name = {a=value, b=100, c}");
+ AttributesParser parser(attrs, istr);
+ parser.parse();
+ assert (attrs.getString("name.a") == "value");
+ assert (attrs.getInt("name.b") == 100);
+ assert (attrs.getBool("name.c"));
+}
+
+
+void AttributesParserTest::testParser7()
+{
+ Attributes attrs;
+ std::istringstream istr("name = {a=value, b=100, c}, name2=\"foo\"");
+ AttributesParser parser(attrs, istr);
+ parser.parse();
+ assert (attrs.getString("name.a") == "value");
+ assert (attrs.getInt("name.b") == 100);
+ assert (attrs.getBool("name.c"));
+ assert (attrs.getString("name2") == "foo");
+}
+
+
+void AttributesParserTest::setUp()
+{
+}
+
+
+void AttributesParserTest::tearDown()
+{
+}
+
+
+CppUnit::Test* AttributesParserTest::suite()
+{
+ CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("AttributesParserTest");
+
+ CppUnit_addTest(pSuite, AttributesParserTest, testParser1);
+ CppUnit_addTest(pSuite, AttributesParserTest, testParser2);
+ CppUnit_addTest(pSuite, AttributesParserTest, testParser3);
+ CppUnit_addTest(pSuite, AttributesParserTest, testParser4);
+ CppUnit_addTest(pSuite, AttributesParserTest, testParser5);
+ CppUnit_addTest(pSuite, AttributesParserTest, testParser6);
+ CppUnit_addTest(pSuite, AttributesParserTest, testParser7);
+
+ return pSuite;
+}
diff --git a/CppParser/testsuite/src/AttributesParserTest.h b/CppParser/testsuite/src/AttributesParserTest.h
new file mode 100644
index 000000000..4fe23f629
--- /dev/null
+++ b/CppParser/testsuite/src/AttributesParserTest.h
@@ -0,0 +1,66 @@
+//
+// AttributesParserTest.h
+//
+// $Id: //poco/1.3/CppParser/testsuite/src/AttributesParserTest.h#1 $
+//
+// Definition of the AttributesParserTest class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef AttributesParserTest_INCLUDED
+#define AttributesParserTest_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "CppUnit/TestCase.h"
+
+
+class AttributesParserTest: public CppUnit::TestCase
+{
+public:
+ AttributesParserTest(const std::string& name);
+ ~AttributesParserTest();
+
+ void testParser1();
+ void testParser2();
+ void testParser3();
+ void testParser4();
+ void testParser5();
+ void testParser6();
+ void testParser7();
+
+ void setUp();
+ void tearDown();
+
+ static CppUnit::Test* suite();
+
+private:
+};
+
+
+#endif // AttributesParserTest_INCLUDED
diff --git a/CppParser/testsuite/src/AttributesTestSuite.cpp b/CppParser/testsuite/src/AttributesTestSuite.cpp
new file mode 100644
index 000000000..4b34e3d1e
--- /dev/null
+++ b/CppParser/testsuite/src/AttributesTestSuite.cpp
@@ -0,0 +1,44 @@
+//
+// AttributesTestSuite.cpp
+//
+// $Id: //poco/1.3/CppParser/testsuite/src/AttributesTestSuite.cpp#1 $
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "AttributesTestSuite.h"
+#include "AttributesParserTest.h"
+
+
+CppUnit::Test* AttributesTestSuite::suite()
+{
+ CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("CppParserTestSuite");
+
+ pSuite->addTest(AttributesParserTest::suite());
+
+ return pSuite;
+}
diff --git a/CppParser/testsuite/src/AttributesTestSuite.h b/CppParser/testsuite/src/AttributesTestSuite.h
new file mode 100644
index 000000000..ae2c4fe3f
--- /dev/null
+++ b/CppParser/testsuite/src/AttributesTestSuite.h
@@ -0,0 +1,49 @@
+//
+// AttributesTestSuite.h
+//
+// $Id: //poco/1.3/CppParser/testsuite/src/AttributesTestSuite.h#1 $
+//
+// Definition of the AttributesTestSuite class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef AttributesTestSuite_INCLUDED
+#define AttributesTestSuite_INCLUDED
+
+
+#include "CppUnit/TestSuite.h"
+
+
+class AttributesTestSuite
+{
+public:
+ static CppUnit::Test* suite();
+};
+
+
+#endif // AttributesTestSuite_INCLUDED
diff --git a/CppParser/testsuite/src/CppParserTest.cpp b/CppParser/testsuite/src/CppParserTest.cpp
new file mode 100644
index 000000000..b1cc39b05
--- /dev/null
+++ b/CppParser/testsuite/src/CppParserTest.cpp
@@ -0,0 +1,156 @@
+//
+// CppParserTest.cpp
+//
+// $Id: //poco/1.3/CppParser/testsuite/src/CppParserTest.cpp#2 $
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "CppParserTest.h"
+#include "CppUnit/TestCaller.h"
+#include "CppUnit/TestSuite.h"
+#include "Poco/CppParser/Utility.h"
+#include "Poco/CppParser/Symbol.h"
+#include
+
+
+using namespace Poco::CppParser;
+
+
+std::string linker("cl");
+std::string options("/I \"C:\\Program Files\\Microsoft Visual Studio 8\\VC\\INCLUDE\", "
+ "/I \"C:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include\", "
+ "/I \"p:\\poco\\Foundation\\include\", "
+ "/I \"p:\\poco\\XML\\include\", "
+ "/I \"p:\\poco\\Util\\include\", "
+ "/I \"p:\\poco\\Net\\include\", "
+ "/D \"WIN32\", "
+ "/D \"_DEBUG\", "
+ "/D \"_WINDOWS\", "
+ "/D \"_MBCS\", "
+ "/C, /P, /TP");
+std::string path("C:\\Program Files\\Microsoft Visual Studio 8\\Common7\\IDE;C:\\Program Files\\Microsoft Visual Studio 8\\VC\\BIN;C:\\Program Files\\Microsoft Visual Studio 8\\Common7\\Tools;;C:\\Program Files\\Microsoft Visual Studio 8\\Common7\\Tools\\bin");
+
+CppParserTest::CppParserTest(const std::string& name): CppUnit::TestCase(name)
+{
+}
+
+
+CppParserTest::~CppParserTest()
+{
+}
+
+
+void CppParserTest::testParseDir()
+{
+ //FIXME: implement some proper tests
+ return;
+ NameSpace::SymbolTable st;
+ std::vector inc;
+ inc.push_back("./*.h");
+ std::vector exc;
+ Utility::parseDir(inc, exc, st, linker, options, path);
+
+ NameSpace::SymbolTable::const_iterator it = st.begin();
+ NameSpace::SymbolTable::const_iterator itEnd = st.end();
+ for (it; it != itEnd; ++it)
+ {
+ std::cout << it->first << ": ";
+ Symbol* pSym = it->second;
+ std::cout << pSym->name() << ", " << pSym->getDocumentation() << "\n";
+
+ }
+}
+
+
+void CppParserTest::testExtractName()
+{
+ std::string decl("int _var");
+ std::string name = Symbol::extractName(decl);
+ assert (name == "_var");
+
+ decl = "void func(int arg1, int arg2)";
+ name = Symbol::extractName(decl);
+ assert (name == "func");
+
+ decl = "const std::vector* var";
+ name = Symbol::extractName(decl);
+ assert (name == "var");
+
+ decl = "const std::vector* func(int arg) = 0";
+ name = Symbol::extractName(decl);
+ assert (name == "func");
+
+ decl = "int (*func)(int, const std::string&)";
+ name = Symbol::extractName(decl);
+ assert (name == "func");
+
+ decl = "int ( * func )(int, const std::string&)";
+ name = Symbol::extractName(decl);
+ assert (name == "func");
+
+ decl = "template B func(A a, B b)";
+ name = Symbol::extractName(decl);
+ assert (name == "func");
+
+ decl = "template class Class";
+ name = Symbol::extractName(decl);
+ assert (name == "Class");
+
+ decl = "template <> class Class";
+ name = Symbol::extractName(decl);
+ assert (name == "Class");
+
+ decl = "template <> class Class ";
+ name = Symbol::extractName(decl);
+ assert (name == "Class");
+
+ decl = "template <> class Class >";
+ name = Symbol::extractName(decl);
+ assert (name == "Class");
+}
+
+
+void CppParserTest::setUp()
+{
+}
+
+
+void CppParserTest::tearDown()
+{
+}
+
+
+CppUnit::Test* CppParserTest::suite()
+{
+ CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("CppParserTest");
+
+ CppUnit_addTest(pSuite, CppParserTest, testParseDir);
+ CppUnit_addTest(pSuite, CppParserTest, testExtractName);
+
+ return pSuite;
+}
diff --git a/CppParser/testsuite/src/CppParserTest.h b/CppParser/testsuite/src/CppParserTest.h
new file mode 100644
index 000000000..4ff575740
--- /dev/null
+++ b/CppParser/testsuite/src/CppParserTest.h
@@ -0,0 +1,61 @@
+//
+// CppParserTest.h
+//
+// $Id: //poco/1.3/CppParser/testsuite/src/CppParserTest.h#2 $
+//
+// Definition of the CppParserTest class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParserTest_INCLUDED
+#define CppParserTest_INCLUDED
+
+
+#include "Poco/CppParser/CppParser.h"
+#include "CppUnit/TestCase.h"
+
+
+class CppParserTest: public CppUnit::TestCase
+{
+public:
+ CppParserTest(const std::string& name);
+ ~CppParserTest();
+
+ void testParseDir();
+ void testExtractName();
+
+ void setUp();
+ void tearDown();
+
+ static CppUnit::Test* suite();
+
+private:
+};
+
+
+#endif // CppParserTest_INCLUDED
diff --git a/CppParser/testsuite/src/CppParserTestSuite.cpp b/CppParser/testsuite/src/CppParserTestSuite.cpp
new file mode 100644
index 000000000..9292ff353
--- /dev/null
+++ b/CppParser/testsuite/src/CppParserTestSuite.cpp
@@ -0,0 +1,46 @@
+//
+// CppParserTestSuite.cpp
+//
+// $Id: //poco/1.3/CppParser/testsuite/src/CppParserTestSuite.cpp#1 $
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "CppParserTestSuite.h"
+#include "AttributesTestSuite.h"
+#include "CppParserTest.h"
+
+
+CppUnit::Test* CppParserTestSuite::suite()
+{
+ CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("CppParserTestSuite");
+
+ pSuite->addTest(AttributesTestSuite::suite());
+ pSuite->addTest(CppParserTest::suite());
+
+ return pSuite;
+}
diff --git a/CppParser/testsuite/src/CppParserTestSuite.h b/CppParser/testsuite/src/CppParserTestSuite.h
new file mode 100644
index 000000000..b1d2aac6f
--- /dev/null
+++ b/CppParser/testsuite/src/CppParserTestSuite.h
@@ -0,0 +1,49 @@
+//
+// CppParserTestSuite.h
+//
+// $Id: //poco/1.3/CppParser/testsuite/src/CppParserTestSuite.h#1 $
+//
+// Definition of the CppParserTestSuite class.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#ifndef CppParserTestSuite_INCLUDED
+#define CppParserTestSuite_INCLUDED
+
+
+#include "CppUnit/TestSuite.h"
+
+
+class CppParserTestSuite
+{
+public:
+ static CppUnit::Test* suite();
+};
+
+
+#endif // CppParserTestSuite_INCLUDED
diff --git a/CppParser/testsuite/src/Driver.cpp b/CppParser/testsuite/src/Driver.cpp
new file mode 100644
index 000000000..ffe92f90f
--- /dev/null
+++ b/CppParser/testsuite/src/Driver.cpp
@@ -0,0 +1,39 @@
+//
+// Driver.cpp
+//
+// $Id: //poco/1.3/CppParser/testsuite/src/Driver.cpp#1 $
+//
+// Console-based test driver for Poco CppParser.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "CppUnit/TestRunner.h"
+#include "CppParserTestSuite.h"
+
+
+CppUnitMain(CppParserTestSuite)
diff --git a/CppParser/testsuite/src/WinDriver.cpp b/CppParser/testsuite/src/WinDriver.cpp
new file mode 100644
index 000000000..bb93971f2
--- /dev/null
+++ b/CppParser/testsuite/src/WinDriver.cpp
@@ -0,0 +1,50 @@
+//
+// WinDriver.cpp
+//
+// $Id: //poco/1.3/CppParser/testsuite/src/WinDriver.cpp#1 $
+//
+// Windows test driver for Poco CppParser.
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+
+
+#include "WinTestRunner/WinTestRunner.h"
+#include "CppParserTestSuite.h"
+
+
+class TestDriver: public CppUnit::WinTestRunnerApp
+{
+ void TestMain()
+ {
+ CppUnit::WinTestRunner runner;
+ runner.addTest(CppParserTestSuite::suite());
+ runner.run();
+ }
+};
+
+
+TestDriver theDriver;
diff --git a/CppUnit/CppUnit.vxbuild b/CppUnit/CppUnit.vxbuild
new file mode 100644
index 000000000..ffe867662
--- /dev/null
+++ b/CppUnit/CppUnit.vxbuild
@@ -0,0 +1,16 @@
+#
+# CppUnit.vxbuild
+#
+# $Id: //poco/1.4/CppUnit/CppUnit.vxbuild#2 $
+#
+TARGET=cppUnit
+SOURCES="
+ CppUnitException.cpp
+ TestCase.cpp
+ TestDecorator.cpp
+ TestFailure.cpp
+ TestResult.cpp
+ TestRunner.cpp
+ TestSuite.cpp
+ TextTestResult.cpp
+"
diff --git a/CppUnit/CppUnit_CE_vs90.sln b/CppUnit/CppUnit_CE_vs90.sln
new file mode 100644
index 000000000..095aaba46
--- /dev/null
+++ b/CppUnit/CppUnit_CE_vs90.sln
@@ -0,0 +1,37 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppUnit", "CppUnit_CE_vs90.vcproj", "{138BB448-808A-4FE5-A66D-78D1F8770F59}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Digi JumpStart (ARMV4I) = debug_shared|Digi JumpStart (ARMV4I)
+ debug_static_md|Digi JumpStart (ARMV4I) = debug_static_md|Digi JumpStart (ARMV4I)
+ debug_static_mt|Digi JumpStart (ARMV4I) = debug_static_mt|Digi JumpStart (ARMV4I)
+ release_shared|Digi JumpStart (ARMV4I) = release_shared|Digi JumpStart (ARMV4I)
+ release_static_md|Digi JumpStart (ARMV4I) = release_static_md|Digi JumpStart (ARMV4I)
+ release_static_mt|Digi JumpStart (ARMV4I) = release_static_mt|Digi JumpStart (ARMV4I)
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|Digi JumpStart (ARMV4I).ActiveCfg = debug_shared|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|Digi JumpStart (ARMV4I).Build.0 = debug_shared|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|Digi JumpStart (ARMV4I).Deploy.0 = debug_shared|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md|Digi JumpStart (ARMV4I).ActiveCfg = debug_static_md|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md|Digi JumpStart (ARMV4I).Build.0 = debug_static_md|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md|Digi JumpStart (ARMV4I).Deploy.0 = debug_static_md|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt|Digi JumpStart (ARMV4I).ActiveCfg = debug_static_mt|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt|Digi JumpStart (ARMV4I).Build.0 = debug_static_mt|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt|Digi JumpStart (ARMV4I).Deploy.0 = debug_static_mt|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|Digi JumpStart (ARMV4I).ActiveCfg = release_shared|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|Digi JumpStart (ARMV4I).Build.0 = release_shared|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|Digi JumpStart (ARMV4I).Deploy.0 = release_shared|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md|Digi JumpStart (ARMV4I).ActiveCfg = release_static_md|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md|Digi JumpStart (ARMV4I).Build.0 = release_static_md|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md|Digi JumpStart (ARMV4I).Deploy.0 = release_static_md|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt|Digi JumpStart (ARMV4I).ActiveCfg = release_static_mt|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt|Digi JumpStart (ARMV4I).Build.0 = release_static_mt|Digi JumpStart (ARMV4I)
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt|Digi JumpStart (ARMV4I).Deploy.0 = release_static_mt|Digi JumpStart (ARMV4I)
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/CppUnit/CppUnit_CE_vs90.vcproj b/CppUnit/CppUnit_CE_vs90.vcproj
new file mode 100644
index 000000000..b7235dba5
--- /dev/null
+++ b/CppUnit/CppUnit_CE_vs90.vcproj
@@ -0,0 +1,696 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppUnit/CppUnit_vs100.sln b/CppUnit/CppUnit_vs100.sln
new file mode 100644
index 000000000..1cf9421cb
--- /dev/null
+++ b/CppUnit/CppUnit_vs100.sln
@@ -0,0 +1,49 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppUnit", "CppUnit_vs100.vcxproj", "{138BB448-808A-4FE5-A66D-78D1F8770F59}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinTestRunner", "WinTestRunner\WinTestRunner_vs100.vcxproj", "{BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {138BB448-808A-4FE5-A66D-78D1F8770F59} = {138BB448-808A-4FE5-A66D-78D1F8770F59}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Win32 = debug_shared|Win32
+ debug_static_md|Win32 = debug_static_md|Win32
+ debug_static_mt|Win32 = debug_static_mt|Win32
+ release_shared|Win32 = release_shared|Win32
+ release_static_md|Win32 = release_static_md|Win32
+ release_static_mt|Win32 = release_static_mt|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|Win32.Build.0 = release_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md|Win32.Build.0 = release_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|Win32.Build.0 = release_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_md|Win32.Build.0 = release_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/CppUnit/CppUnit_vs100.vcxproj b/CppUnit/CppUnit_vs100.vcxproj
new file mode 100644
index 000000000..b85f93ee1
--- /dev/null
+++ b/CppUnit/CppUnit_vs100.vcxproj
@@ -0,0 +1,409 @@
+
+
+
+
+ debug_shared
+ Win32
+
+
+ debug_static_md
+ Win32
+
+
+ debug_static_mt
+ Win32
+
+
+ release_shared
+ Win32
+
+
+ release_static_md
+ Win32
+
+
+ release_static_mt
+ Win32
+
+
+
+ CppUnit
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}
+ MFCProj
+
+
+
+ StaticLibrary
+ false
+ MultiByte
+
+
+ StaticLibrary
+ false
+ MultiByte
+
+
+ StaticLibrary
+ false
+ MultiByte
+
+
+ StaticLibrary
+ false
+ MultiByte
+
+
+ DynamicLibrary
+ false
+ MultiByte
+
+
+ DynamicLibrary
+ false
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+ ..\bin\
+ obj\$(Configuration)\
+ true
+ ..\bin\
+ obj\$(Configuration)\
+ false
+ ..\lib\
+ obj\$(Configuration)\
+ ..\lib\
+ obj\$(Configuration)\
+ ..\lib\
+ obj\$(Configuration)\
+ ..\lib\
+ obj\$(Configuration)\
+ CppUnitd
+ CppUnit
+ CppUnitmdd
+ CppUnitmtd
+ CppUnitmd
+ CppUnitmt
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib\CppUnit.tlb
+
+
+
+
+ Disabled
+ Default
+ false
+ include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;CppUnit_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc80.pdb
+ Level3
+ true
+ EditAndContinue
+ Default
+ false
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0c07
+
+
+ NotSet
+ ..\bin\CppUnitd.dll
+ true
+ %(AdditionalLibraryDirectories)
+ true
+ ..\bin\CppUnitd.pdb
+ ..\lib\CppUnitd.lib
+ MachineX86
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib\CppUnit.tlb
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;_AFXDLL;POCO_DLL;CppUnit_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ Default
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0c07
+
+
+ ..\bin\CppUnit.dll
+ true
+ %(AdditionalLibraryDirectories)
+
+
+ ..\lib\CppUnit.lib
+ MachineX86
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib\CppUnit.tlb
+
+
+
+
+ Disabled
+ Default
+ false
+ include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ ..\lib\CppUnitmdd.pdb
+ Level3
+ true
+ EditAndContinue
+ Default
+ false
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0c07
+
+
+ ..\lib\CppUnitmdd.lib
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib\CppUnit.tlb
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;_AFXDLL;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ Default
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0c07
+
+
+ ..\lib\CppUnitmd.lib
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib\CppUnit.tlb
+
+
+
+
+ Disabled
+ Default
+ false
+ include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebug
+ true
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ ..\lib\CppUnitmtd.pdb
+ Level3
+ true
+ EditAndContinue
+ Default
+ false
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0c07
+
+
+ ..\lib\CppUnitmtd.lib
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib\CppUnit.tlb
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;_AFXDLL;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ false
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ Default
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0c07
+
+
+ ..\lib\CppUnitmt.lib
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CppUnit/CppUnit_vs100.vcxproj.filters b/CppUnit/CppUnit_vs100.vcxproj.filters
new file mode 100644
index 000000000..6ad984e0c
--- /dev/null
+++ b/CppUnit/CppUnit_vs100.vcxproj.filters
@@ -0,0 +1,89 @@
+
+
+
+
+ {ce2987f4-05b4-4816-8402-83d6e2f8f80c}
+ cpp;c;cxx;rc;def;r;odl;idl;hpj;bat
+
+
+ {7c3a94cf-cfae-4dbe-8baf-b8a5a61faf48}
+ *.h
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+
\ No newline at end of file
diff --git a/CppUnit/CppUnit_vs71.sln b/CppUnit/CppUnit_vs71.sln
new file mode 100644
index 000000000..5af4af43c
--- /dev/null
+++ b/CppUnit/CppUnit_vs71.sln
@@ -0,0 +1,50 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppUnit", "CppUnit_VS71.vcproj", "{138BB448-808A-4FE5-A66D-78D1F8770F59}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinTestRunner", "WinTestRunner\WinTestRunner_VS71.vcproj", "{BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {138BB448-808A-4FE5-A66D-78D1F8770F59} = {138BB448-808A-4FE5-A66D-78D1F8770F59}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ debug_shared = debug_shared
+ debug_static_md = debug_static_md
+ debug_static_mt = debug_static_mt
+ release_shared = release_shared
+ release_static_md = release_static_md
+ release_static_mt = release_static_mt
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared.ActiveCfg = debug_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared.Build.0 = debug_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md.ActiveCfg = debug_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md.Build.0 = debug_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt.ActiveCfg = debug_static_mt|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt.Build.0 = debug_static_mt|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared.ActiveCfg = release_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared.Build.0 = release_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md.ActiveCfg = release_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md.Build.0 = release_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt.ActiveCfg = release_static_mt|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt.Build.0 = release_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared.ActiveCfg = debug_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared.Build.0 = debug_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_md.ActiveCfg = debug_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_md.Build.0 = debug_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_mt.ActiveCfg = debug_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_mt.Build.0 = debug_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared.ActiveCfg = release_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared.Build.0 = release_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_md.ActiveCfg = release_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_md.Build.0 = release_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_mt.ActiveCfg = release_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_mt.Build.0 = release_static_mt|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/CppUnit/CppUnit_vs71.vcproj b/CppUnit/CppUnit_vs71.vcproj
new file mode 100644
index 000000000..6e92cbcb6
--- /dev/null
+++ b/CppUnit/CppUnit_vs71.vcproj
@@ -0,0 +1,541 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppUnit/CppUnit_vs80.sln b/CppUnit/CppUnit_vs80.sln
new file mode 100644
index 000000000..4fda4a65c
--- /dev/null
+++ b/CppUnit/CppUnit_vs80.sln
@@ -0,0 +1,48 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppUnit", "CppUnit_vs80.vcproj", "{138BB448-808A-4FE5-A66D-78D1F8770F59}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinTestRunner", "WinTestRunner\WinTestRunner_vs80.vcproj", "{BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {138BB448-808A-4FE5-A66D-78D1F8770F59} = {138BB448-808A-4FE5-A66D-78D1F8770F59}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Win32 = debug_shared|Win32
+ debug_static_md|Win32 = debug_static_md|Win32
+ debug_static_mt|Win32 = debug_static_mt|Win32
+ release_shared|Win32 = release_shared|Win32
+ release_static_md|Win32 = release_static_md|Win32
+ release_static_mt|Win32 = release_static_mt|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|Win32.Build.0 = release_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md|Win32.Build.0 = release_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|Win32.Build.0 = release_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_md|Win32.Build.0 = release_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/CppUnit/CppUnit_vs80.vcproj b/CppUnit/CppUnit_vs80.vcproj
new file mode 100644
index 000000000..b7d7f5103
--- /dev/null
+++ b/CppUnit/CppUnit_vs80.vcproj
@@ -0,0 +1,724 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppUnit/CppUnit_vs90.sln b/CppUnit/CppUnit_vs90.sln
new file mode 100644
index 000000000..37c948b55
--- /dev/null
+++ b/CppUnit/CppUnit_vs90.sln
@@ -0,0 +1,48 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppUnit", "CppUnit_vs90.vcproj", "{138BB448-808A-4FE5-A66D-78D1F8770F59}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinTestRunner", "WinTestRunner\WinTestRunner_vs90.vcproj", "{BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {138BB448-808A-4FE5-A66D-78D1F8770F59} = {138BB448-808A-4FE5-A66D-78D1F8770F59}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Win32 = debug_shared|Win32
+ debug_static_md|Win32 = debug_static_md|Win32
+ debug_static_mt|Win32 = debug_static_mt|Win32
+ release_shared|Win32 = release_shared|Win32
+ release_static_md|Win32 = release_static_md|Win32
+ release_static_mt|Win32 = release_static_mt|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|Win32.Build.0 = release_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md|Win32.Build.0 = release_static_md|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|Win32.Build.0 = release_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_md|Win32.Build.0 = release_static_md|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/CppUnit/CppUnit_vs90.vcproj b/CppUnit/CppUnit_vs90.vcproj
new file mode 100644
index 000000000..e3e804652
--- /dev/null
+++ b/CppUnit/CppUnit_vs90.vcproj
@@ -0,0 +1,670 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppUnit/CppUnit_x64_vs100.sln b/CppUnit/CppUnit_x64_vs100.sln
new file mode 100644
index 000000000..892d1c6f9
--- /dev/null
+++ b/CppUnit/CppUnit_x64_vs100.sln
@@ -0,0 +1,49 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppUnit", "CppUnit_x64_vs100.vcxproj", "{138BB448-808A-4FE5-A66D-78D1F8770F59}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinTestRunner", "WinTestRunner\WinTestRunner_x64_vs100.vcxproj", "{BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {138BB448-808A-4FE5-A66D-78D1F8770F59} = {138BB448-808A-4FE5-A66D-78D1F8770F59}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|x64 = debug_shared|x64
+ debug_static_md|x64 = debug_static_md|x64
+ debug_static_mt|x64 = debug_static_mt|x64
+ release_shared|x64 = release_shared|x64
+ release_static_md|x64 = release_static_md|x64
+ release_static_mt|x64 = release_static_mt|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|x64.Build.0 = debug_shared|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md|x64.Build.0 = debug_static_md|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|x64.ActiveCfg = release_shared|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|x64.Build.0 = release_shared|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md|x64.ActiveCfg = release_static_md|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md|x64.Build.0 = release_static_md|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt|x64.Build.0 = release_static_mt|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|x64.Build.0 = debug_shared|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_md|x64.Build.0 = debug_static_md|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|x64.ActiveCfg = release_shared|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|x64.Build.0 = release_shared|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_md|x64.ActiveCfg = release_static_md|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_md|x64.Build.0 = release_static_md|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_mt|x64.Build.0 = release_static_mt|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/CppUnit/CppUnit_x64_vs100.vcxproj b/CppUnit/CppUnit_x64_vs100.vcxproj
new file mode 100644
index 000000000..c3914b0fe
--- /dev/null
+++ b/CppUnit/CppUnit_x64_vs100.vcxproj
@@ -0,0 +1,409 @@
+
+
+
+
+ debug_shared
+ x64
+
+
+ debug_static_md
+ x64
+
+
+ debug_static_mt
+ x64
+
+
+ release_shared
+ x64
+
+
+ release_static_md
+ x64
+
+
+ release_static_mt
+ x64
+
+
+
+ CppUnit
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}
+ MFCProj
+
+
+
+ StaticLibrary
+ false
+ MultiByte
+
+
+ StaticLibrary
+ false
+ MultiByte
+
+
+ StaticLibrary
+ false
+ MultiByte
+
+
+ StaticLibrary
+ false
+ MultiByte
+
+
+ DynamicLibrary
+ false
+ MultiByte
+
+
+ DynamicLibrary
+ false
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+ ..\bin64\
+ obj64\$(Configuration)\
+ true
+ ..\bin64\
+ obj64\$(Configuration)\
+ false
+ ..\lib64\
+ obj64\$(Configuration)\
+ ..\lib64\
+ obj64\$(Configuration)\
+ ..\lib64\
+ obj64\$(Configuration)\
+ ..\lib64\
+ obj64\$(Configuration)\
+ CppUnit64d
+ CppUnitmdd
+ CppUnitmtd
+ CppUnit64
+ CppUnit64md
+ CppUnit64mt
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib64\CppUnit.tlb
+
+
+
+
+ Disabled
+ Default
+ false
+ include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;CppUnit_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc80.pdb
+ Level3
+ true
+ ProgramDatabase
+ Default
+ false
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0c07
+
+
+ NotSet
+ ..\bin64\CppUnit64d.dll
+ true
+ %(AdditionalLibraryDirectories)
+ true
+ ..\bin64\CppUnit64d.pdb
+ ..\lib64\CppUnitd.lib
+ MachineX64
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib64\CppUnit.tlb
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;_AFXDLL;POCO_DLL;CppUnit_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ Default
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0c07
+
+
+ ..\bin64\CppUnit64.dll
+ true
+ %(AdditionalLibraryDirectories)
+
+
+ ..\lib64\CppUnit.lib
+ MachineX64
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib64\CppUnit.tlb
+
+
+
+
+ Disabled
+ Default
+ false
+ include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ ..\lib64\CppUnitmdd.pdb
+ Level3
+ true
+ ProgramDatabase
+ Default
+ false
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0c07
+
+
+ ..\lib64\CppUnitmdd.lib
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib64\CppUnit.tlb
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;_AFXDLL;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ Default
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0c07
+
+
+ ..\lib64\CppUnitmd.lib
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib64\CppUnit.tlb
+
+
+
+
+ Disabled
+ Default
+ false
+ include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebug
+ true
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ ..\lib64\CppUnitmtd.pdb
+ Level3
+ true
+ ProgramDatabase
+ Default
+ false
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0c07
+
+
+ ..\lib64\CppUnitmtd.lib
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib64\CppUnit.tlb
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;_AFXDLL;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ false
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ Default
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0c07
+
+
+ ..\lib64\CppUnitmt.lib
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CppUnit/CppUnit_x64_vs100.vcxproj.filters b/CppUnit/CppUnit_x64_vs100.vcxproj.filters
new file mode 100644
index 000000000..e0ea945ff
--- /dev/null
+++ b/CppUnit/CppUnit_x64_vs100.vcxproj.filters
@@ -0,0 +1,89 @@
+
+
+
+
+ {d780d541-ae9b-4dc6-9c70-cc0e5498be41}
+ cpp;c;cxx;rc;def;r;odl;idl;hpj;bat
+
+
+ {102c5e2b-3268-48b6-a3da-c96949868573}
+ *.h
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+
\ No newline at end of file
diff --git a/CppUnit/CppUnit_x64_vs90.sln b/CppUnit/CppUnit_x64_vs90.sln
new file mode 100644
index 000000000..a34a3ce4b
--- /dev/null
+++ b/CppUnit/CppUnit_x64_vs90.sln
@@ -0,0 +1,49 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppUnit", "CppUnit_x64_vs90.vcproj", "{138BB448-808A-4FE5-A66D-78D1F8770F59}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinTestRunner", "WinTestRunner\WinTestRunner_x64_vs90.vcproj", "{BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {138BB448-808A-4FE5-A66D-78D1F8770F59} = {138BB448-808A-4FE5-A66D-78D1F8770F59}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|x64 = debug_shared|x64
+ debug_static_md|x64 = debug_static_md|x64
+ debug_static_mt|x64 = debug_static_mt|x64
+ release_shared|x64 = release_shared|x64
+ release_static_md|x64 = release_static_md|x64
+ release_static_mt|x64 = release_static_mt|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|x64.Build.0 = debug_shared|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_md|x64.Build.0 = debug_static_md|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|x64.ActiveCfg = release_shared|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|x64.Build.0 = release_shared|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md|x64.ActiveCfg = release_static_md|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_md|x64.Build.0 = release_static_md|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_static_mt|x64.Build.0 = release_static_mt|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|x64.Build.0 = debug_shared|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_md|x64.Build.0 = debug_static_md|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|x64.ActiveCfg = release_shared|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|x64.Build.0 = release_shared|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_md|x64.ActiveCfg = release_static_md|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_md|x64.Build.0 = release_static_md|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_static_mt|x64.Build.0 = release_static_mt|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/CppUnit/CppUnit_x64_vs90.vcproj b/CppUnit/CppUnit_x64_vs90.vcproj
new file mode 100644
index 000000000..1f9e7b07b
--- /dev/null
+++ b/CppUnit/CppUnit_x64_vs90.vcproj
@@ -0,0 +1,670 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppUnit/Makefile b/CppUnit/Makefile
new file mode 100644
index 000000000..d5d12607a
--- /dev/null
+++ b/CppUnit/Makefile
@@ -0,0 +1,18 @@
+#
+# Makefile
+#
+# $Id: //poco/1.4/CppUnit/Makefile#1 $
+#
+# Makefile for Poco CppUnit
+#
+
+include $(POCO_BASE)/build/rules/global
+
+objects = CppUnitException TestDecorator TestResult TestSuite \
+ TestCase TestFailure TestRunner TextTestResult
+
+target = CppUnit
+target_version = 1
+target_libs =
+
+include $(POCO_BASE)/build/rules/lib
diff --git a/CppUnit/WinTestRunner/WinTestRunner_vs100.vcxproj b/CppUnit/WinTestRunner/WinTestRunner_vs100.vcxproj
new file mode 100644
index 000000000..1c9add023
--- /dev/null
+++ b/CppUnit/WinTestRunner/WinTestRunner_vs100.vcxproj
@@ -0,0 +1,433 @@
+
+
+
+
+ debug_shared
+ Win32
+
+
+ debug_static_md
+ Win32
+
+
+ debug_static_mt
+ Win32
+
+
+ release_shared
+ Win32
+
+
+ release_static_md
+ Win32
+
+
+ release_static_mt
+ Win32
+
+
+
+ WinTestRunner
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}
+ WinTestRunner
+ MFCProj
+
+
+
+ StaticLibrary
+ Static
+ MultiByte
+
+
+ StaticLibrary
+ Static
+ MultiByte
+
+
+ StaticLibrary
+ Dynamic
+ MultiByte
+
+
+ StaticLibrary
+ Dynamic
+ MultiByte
+
+
+ DynamicLibrary
+ Dynamic
+ MultiByte
+
+
+ DynamicLibrary
+ Dynamic
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+ ..\..\bin\
+ obj\$(Configuration)\
+ false
+ ..\..\bin\
+ obj\$(Configuration)\
+ true
+ ..\..\lib\
+ obj\$(Configuration)\
+ ..\..\lib\
+ obj\$(Configuration)\
+ ..\..\lib\
+ obj\$(Configuration)\
+ ..\..\lib\
+ obj\$(Configuration)\
+ WinTestRunnerd
+ WinTestRunnermdd
+ WinTestRunnermtd
+ WinTestRunner
+ WinTestRunnermd
+ WinTestRunnermt
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib\wintestrunner.tlb
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ include;..\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WinTestRunner_EXPORTS;WINVER=0x0500;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ Default
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0000
+
+
+ cppunit.lib;winmm.lib;%(AdditionalDependencies)
+ ..\..\bin\WinTestRunner.dll
+ true
+ ..\..\lib;%(AdditionalLibraryDirectories)
+
+
+ Windows
+ ..\..\lib\WinTestRunner.lib
+ MachineX86
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib\wintestrunner.tlb
+
+
+
+
+ Disabled
+ Default
+ false
+ include;..\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;WinTestRunner_EXPORTS;WINVER=0x0500;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ EditAndContinue
+ Default
+ false
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0000
+
+
+ cppunitd.lib;winmm.lib;%(AdditionalDependencies)
+ NotSet
+ ..\..\bin\WinTestRunnerd.dll
+ true
+ ..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ ..\..\bin\WinTestRunnerd.pdb
+ Windows
+ ..\..\lib\WinTestRunnerd.lib
+ MachineX86
+
+
+
+
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib\wintestrunner.tlb
+
+
+
+
+ Disabled
+ Default
+ false
+ include;..\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;WINVER=0x0500;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ ..\..\lib\WinTestRunnermdd.pdb
+ Level3
+ true
+ EditAndContinue
+ Default
+ false
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0000
+
+
+ ..\..\lib\WinTestRunnermdd.lib
+ MachineX86
+
+
+ Copying resources...
+ copy "$(IntDir)$(ProjectName).res" ..\..\lib\
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib\wintestrunner.tlb
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ include;..\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;WINVER=0x0500;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ Default
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0000
+
+
+ ..\..\lib\WinTestRunnermd.lib
+ MachineX86
+
+
+ Copying resources...
+ copy "$(IntDir)$(ProjectName).res" ..\..\lib\
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib\wintestrunner.tlb
+
+
+
+
+ Disabled
+ Default
+ false
+ include;..\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;WINVER=0x0500;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ EnableFastChecks
+ MultiThreadedDebug
+ true
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ ..\..\lib\WinTestRunnermtd.pdb
+ Level3
+ true
+ EditAndContinue
+ Default
+ false
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0000
+
+
+ ..\..\lib\WinTestRunnermtd.lib
+ MachineX86
+
+
+ Copying resources...
+ copy "$(IntDir)$(ProjectName).res" ..\..\lib\
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib\wintestrunner.tlb
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ include;..\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;WINVER=0x0500;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ MultiThreaded
+ false
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ Default
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0000
+
+
+ ..\..\lib\WinTestRunnermt.lib
+ MachineX86
+
+
+ Copying resources...
+ copy "$(IntDir)$(ProjectName).res" ..\..\lib\
+
+
+
+
+
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CppUnit/WinTestRunner/WinTestRunner_vs100.vcxproj.filters b/CppUnit/WinTestRunner/WinTestRunner_vs100.vcxproj.filters
new file mode 100644
index 000000000..4f586ae3e
--- /dev/null
+++ b/CppUnit/WinTestRunner/WinTestRunner_vs100.vcxproj.filters
@@ -0,0 +1,61 @@
+
+
+
+
+ {24a6f8c4-75a8-42be-afd6-586f23d02e79}
+ cpp;c;cxx;rc;def;r;odl;idl;hpj;bat
+
+
+ {8916ac8c-0791-483a-a494-0c7a0c9b6f8f}
+ *.h
+
+
+ {bcd6db0a-4bfb-4d8d-bf3b-efdbcc45d3b2}
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Resource Files
+
+
+
+
+ Resource Files
+
+
+
\ No newline at end of file
diff --git a/CppUnit/WinTestRunner/WinTestRunner_vs71.vcproj b/CppUnit/WinTestRunner/WinTestRunner_vs71.vcproj
new file mode 100644
index 000000000..b3c14c5b0
--- /dev/null
+++ b/CppUnit/WinTestRunner/WinTestRunner_vs71.vcproj
@@ -0,0 +1,504 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppUnit/WinTestRunner/WinTestRunner_vs80.vcproj b/CppUnit/WinTestRunner/WinTestRunner_vs80.vcproj
new file mode 100644
index 000000000..5d9eef3eb
--- /dev/null
+++ b/CppUnit/WinTestRunner/WinTestRunner_vs80.vcproj
@@ -0,0 +1,678 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppUnit/WinTestRunner/WinTestRunner_vs90.vcproj b/CppUnit/WinTestRunner/WinTestRunner_vs90.vcproj
new file mode 100644
index 000000000..65714ab6c
--- /dev/null
+++ b/CppUnit/WinTestRunner/WinTestRunner_vs90.vcproj
@@ -0,0 +1,674 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppUnit/WinTestRunner/WinTestRunner_x64_vs100.vcxproj b/CppUnit/WinTestRunner/WinTestRunner_x64_vs100.vcxproj
new file mode 100644
index 000000000..fb025754c
--- /dev/null
+++ b/CppUnit/WinTestRunner/WinTestRunner_x64_vs100.vcxproj
@@ -0,0 +1,433 @@
+
+
+
+
+ debug_shared
+ x64
+
+
+ debug_static_md
+ x64
+
+
+ debug_static_mt
+ x64
+
+
+ release_shared
+ x64
+
+
+ release_static_md
+ x64
+
+
+ release_static_mt
+ x64
+
+
+
+ WinTestRunner
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}
+ WinTestRunner
+ MFCProj
+
+
+
+ StaticLibrary
+ Static
+ MultiByte
+
+
+ StaticLibrary
+ Static
+ MultiByte
+
+
+ StaticLibrary
+ Dynamic
+ MultiByte
+
+
+ StaticLibrary
+ Dynamic
+ MultiByte
+
+
+ DynamicLibrary
+ Dynamic
+ MultiByte
+
+
+ DynamicLibrary
+ Dynamic
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+ ..\..\bin64\
+ obj64\$(Configuration)\
+ false
+ ..\..\bin\
+ obj64\$(Configuration)\
+ true
+ ..\..\lib64\
+ obj64\$(Configuration)\
+ ..\..\lib64\
+ obj64\$(Configuration)\
+ ..\..\lib64\
+ obj64\$(Configuration)\
+ ..\..\lib64\
+ obj64\$(Configuration)\
+ WinTestRunner64d
+ WinTestRunnermdd
+ WinTestRunnermtd
+ WinTestRunner
+ WinTestRunnermd
+ WinTestRunnermt
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib64\wintestrunner.tlb
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ include;..\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WinTestRunner_EXPORTS;WINVER=0x0500;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ Default
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0000
+
+
+ cppunit.lib;winmm.lib;%(AdditionalDependencies)
+ ..\..\bin64\WinTestRunner64.dll
+ true
+ ..\..\lib64;%(AdditionalLibraryDirectories)
+
+
+ Windows
+ ..\..\lib64\WinTestRunner.lib
+ MachineX64
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib64\wintestrunner.tlb
+
+
+
+
+ Disabled
+ Default
+ false
+ include;..\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;WinTestRunner_EXPORTS;WINVER=0x0500;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ ProgramDatabase
+ Default
+ false
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0000
+
+
+ cppunitd.lib;winmm.lib;%(AdditionalDependencies)
+ NotSet
+ ..\..\bin64\WinTestRunner64d.dll
+ true
+ ..\..\lib64;%(AdditionalLibraryDirectories)
+ true
+ ..\..\bin64\WinTestRunner64d.pdb
+ Windows
+ ..\..\lib64\WinTestRunnerd.lib
+ MachineX64
+
+
+
+
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib64\wintestrunner.tlb
+
+
+
+
+ Disabled
+ Default
+ false
+ include;..\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;WINVER=0x0500;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ ..\..\lib64\WinTestRunnermdd.pdb
+ Level3
+ true
+ ProgramDatabase
+ Default
+ false
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0000
+
+
+ ..\..\lib64\WinTestRunnermdd.lib
+ MachineX64
+
+
+ Copying resources...
+ copy "$(IntDir)$(ProjectName).res" ..\..\lib64
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib64\wintestrunner.tlb
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ include;..\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;WINVER=0x0500;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ Default
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0000
+
+
+ ..\..\lib64\WinTestRunnermd.lib
+ MachineX64
+
+
+ Copying resources...
+ copy "$(IntDir)$(ProjectName).res" ..\..\lib64
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib64\wintestrunner.tlb
+
+
+
+
+ Disabled
+ Default
+ false
+ include;..\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;WINVER=0x0500;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ EnableFastChecks
+ MultiThreadedDebug
+ true
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ ..\..\lib64\WinTestRunnermtd.pdb
+ Level3
+ true
+ ProgramDatabase
+ Default
+ false
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+ 0x0000
+
+
+ ..\..\lib64\WinTestRunnermtd.lib
+ MachineX64
+
+
+ Copying resources...
+ copy "$(IntDir)$(ProjectName).res" ..\..\lib64
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ Win32
+ .\lib64\wintestrunner.tlb
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ include;..\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;WINVER=0x0500;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
+ MultiThreaded
+ false
+ true
+ true
+ true
+
+
+
+
+ $(IntDir)
+ $(IntDir)vc70.pdb
+ Level3
+ true
+ Default
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+ 0x0000
+
+
+ ..\..\lib64\WinTestRunnermt.lib
+ MachineX64
+
+
+ Copying resources...
+ copy "$(IntDir)$(ProjectName).res" ..\..\lib64
+
+
+
+
+
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CppUnit/WinTestRunner/WinTestRunner_x64_vs100.vcxproj.filters b/CppUnit/WinTestRunner/WinTestRunner_x64_vs100.vcxproj.filters
new file mode 100644
index 000000000..a51a3912c
--- /dev/null
+++ b/CppUnit/WinTestRunner/WinTestRunner_x64_vs100.vcxproj.filters
@@ -0,0 +1,61 @@
+
+
+
+
+ {287a609c-665e-4810-863e-0737d5c606db}
+ cpp;c;cxx;rc;def;r;odl;idl;hpj;bat
+
+
+ {e90e89b4-cc09-45a8-ac7a-2afec3ded013}
+ *.h
+
+
+ {30a11146-41a7-4d34-b980-7d573885cf6e}
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Include Files
+
+
+ Resource Files
+
+
+
+
+ Resource Files
+
+
+
\ No newline at end of file
diff --git a/CppUnit/WinTestRunner/WinTestRunner_x64_vs90.vcproj b/CppUnit/WinTestRunner/WinTestRunner_x64_vs90.vcproj
new file mode 100644
index 000000000..3dd2ffb10
--- /dev/null
+++ b/CppUnit/WinTestRunner/WinTestRunner_x64_vs90.vcproj
@@ -0,0 +1,674 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppUnit/WinTestRunner/include/WinTestRunner/WinTestRunner.h b/CppUnit/WinTestRunner/include/WinTestRunner/WinTestRunner.h
new file mode 100644
index 000000000..a31d397e0
--- /dev/null
+++ b/CppUnit/WinTestRunner/include/WinTestRunner/WinTestRunner.h
@@ -0,0 +1,77 @@
+//
+// WinTestRunner.h
+//
+// $Id: //poco/1.4/CppUnit/WinTestRunner/include/WinTestRunner/WinTestRunner.h#1 $
+//
+// Application shell for CppUnit's TestRunner dialog.
+//
+
+
+#ifndef WinTestRunner_H_INCLUDED
+#define WinTestRunner_H_INCLUDED
+
+
+#if !defined(POCO_STATIC)
+#if defined(WinTestRunner_EXPORTS)
+#define WinTestRunner_API __declspec(dllexport)
+#else
+#define WinTestRunner_API __declspec(dllimport)
+#endif
+#else
+#define WinTestRunner_API
+#endif
+
+
+#include "CppUnit/CppUnit.h"
+#include
+#include
+
+
+namespace CppUnit {
+
+
+class Test;
+
+
+class WinTestRunner_API WinTestRunner
+{
+public:
+ WinTestRunner();
+ ~WinTestRunner();
+
+ void run();
+ void addTest(Test* pTest);
+
+private:
+ std::vector _tests;
+};
+
+
+class WinTestRunner_API WinTestRunnerApp: public CWinApp
+ /// A simple application class that hosts the TestRunner dialog.
+ /// Create a subclass and override the TestMain() method.
+ ///
+ /// WinTestRunnerApp supports a batch mode, which runs the
+ /// test using the standard text-based TestRunner from CppUnit.
+ /// To enable batch mode, start the application with the "/b"
+ /// or "/B" argument. Optionally, a filename may be specified
+ /// where the test output will be written to: "/b:" or
+ /// "/B:".
+ ///
+ /// When run in batch mode, the exit code of the application
+ /// will denote test success (0) or failure (1).
+{
+public:
+ virtual BOOL InitInstance();
+
+ virtual void TestMain() = 0;
+
+ DECLARE_MESSAGE_MAP()
+};
+
+
+} // namespace CppUnit
+
+
+#endif // WinTestRunner_H_INCLUDED
+
diff --git a/CppUnit/WinTestRunner/res/Resource.h b/CppUnit/WinTestRunner/res/Resource.h
new file mode 100644
index 000000000..c30c88ece
--- /dev/null
+++ b/CppUnit/WinTestRunner/res/Resource.h
@@ -0,0 +1,27 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by TestRunner.rc
+//
+#define IDD_DIALOG_TESTRUNNER 129
+#define IDC_LIST 1000
+#define ID_RUN 1001
+#define ID_STOP 1002
+#define IDC_PROGRESS 1003
+#define IDC_INDICATOR 1004
+#define IDC_COMBO_TEST 1005
+#define IDC_STATIC_RUNS 1007
+#define IDC_STATIC_ERRORS 1008
+#define IDC_STATIC_FAILURES 1009
+#define IDC_EDIT_TIME 1010
+#define IDC_CHK_AUTORUN 1013
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 131
+#define _APS_NEXT_COMMAND_VALUE 32771
+#define _APS_NEXT_CONTROL_VALUE 1014
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/CppUnit/WinTestRunner/res/TestRunner.rc2 b/CppUnit/WinTestRunner/res/TestRunner.rc2
new file mode 100644
index 000000000..55dca09fa
--- /dev/null
+++ b/CppUnit/WinTestRunner/res/TestRunner.rc2
@@ -0,0 +1,13 @@
+//
+// TESTRUNNER.RC2 - resources Microsoft Visual C++ does not edit directly
+//
+
+#ifdef APSTUDIO_INVOKED
+ #error this file is not editable by Microsoft Visual C++
+#endif //APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Add manually edited resources here...
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/CppUnit/WinTestRunner/res/WinTestRunner.rc b/CppUnit/WinTestRunner/res/WinTestRunner.rc
new file mode 100644
index 000000000..c4056f269
--- /dev/null
+++ b/CppUnit/WinTestRunner/res/WinTestRunner.rc
@@ -0,0 +1,175 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+ "#define _AFX_NO_OLE_RESOURCES\r\n"
+ "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+ "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
+ "\r\n"
+ "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
+ "#ifdef _WIN32\r\n"
+ "LANGUAGE 9, 1\r\n"
+ "#pragma code_page(1252)\r\n"
+ "#endif\r\n"
+ "#include ""..\\res\\WinTestRunner.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
+ "#include ""afxres.rc"" // Standard components\r\n"
+ "#endif\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "CppUnit WinTestRunner DLL"
+ VALUE "FileVersion", "1, 0, 0, 1"
+ VALUE "InternalName", "WinTestRunner"
+ VALUE "LegalCopyright", "Copyright (c) 2005"
+ VALUE "OriginalFilename", "TestRunner.dll"
+ VALUE "ProductName", "CppUnit WinTestRunner Dynamic Link Library"
+ VALUE "ProductVersion", "1, 0, 0, 1"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_DIALOG_TESTRUNNER DIALOGEX 0, 0, 512, 300
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "CppUnit WinTestRunner"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ COMBOBOX IDC_COMBO_TEST,7,20,424,273,CBS_DROPDOWNLIST |
+ WS_VSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "Run",ID_RUN,455,7,50,14
+ DEFPUSHBUTTON "Stop",ID_STOP,455,24,50,14
+ CONTROL "List1",IDC_LIST,"SysListView32",LVS_REPORT | WS_BORDER |
+ WS_TABSTOP,7,110,498,160
+ PUSHBUTTON "Close",IDOK,455,279,50,14
+ LTEXT "Test Name:",IDC_STATIC,7,9,179,9
+ LTEXT "Progress:",IDC_STATIC,7,55,49,9
+ LTEXT "Errors and Failures:",IDC_STATIC,7,99,67,9
+ LTEXT "Runs:",IDC_STATIC,457,54,26,10
+ LTEXT "Failures:",IDC_STATIC,457,80,26,10
+ LTEXT "Errors:",IDC_STATIC,457,67,26,10
+ RTEXT "0",IDC_STATIC_RUNS,487,54,16,10
+ RTEXT "0",IDC_STATIC_ERRORS,487,67,16,10
+ RTEXT "0",IDC_STATIC_FAILURES,487,80,16,10
+ EDITTEXT IDC_EDIT_TIME,7,281,440,12,ES_AUTOHSCROLL | ES_READONLY |
+ NOT WS_BORDER
+ LTEXT "",IDC_PROGRESS,7,67,424,20,SS_SUNKEN | NOT WS_VISIBLE
+ CONTROL "Auto Run",IDC_CHK_AUTORUN,"Button",BS_AUTOCHECKBOX |
+ BS_LEFTTEXT | WS_TABSTOP,383,38,46,10
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_DIALOG_TESTRUNNER, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 505
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 293
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+#define _AFX_NO_SPLITTER_RESOURCES
+#define _AFX_NO_OLE_RESOURCES
+#define _AFX_NO_TRACKER_RESOURCES
+#define _AFX_NO_PROPERTY_RESOURCES
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE 9, 1
+#pragma code_page(1252)
+#endif
+#include "afxres.rc" // Standard components
+#endif
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/CppUnit/WinTestRunner/src/ActiveTest.cpp b/CppUnit/WinTestRunner/src/ActiveTest.cpp
new file mode 100644
index 000000000..f0c6cf3c4
--- /dev/null
+++ b/CppUnit/WinTestRunner/src/ActiveTest.cpp
@@ -0,0 +1,44 @@
+//
+// ActiveTest.cpp
+//
+// $Id: //poco/1.4/CppUnit/WinTestRunner/src/ActiveTest.cpp#1 $
+//
+
+
+#include
+#include "ActiveTest.h"
+
+
+namespace CppUnit {
+
+
+// Spawn a thread to a test
+void ActiveTest::run(TestResult* result)
+{
+ CWinThread* thread;
+
+ setTestResult(result);
+ _runCompleted.ResetEvent();
+
+ thread = AfxBeginThread(threadFunction, this, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED);
+ DuplicateHandle(GetCurrentProcess(), thread->m_hThread, GetCurrentProcess(), &_threadHandle, 0, FALSE, DUPLICATE_SAME_ACCESS);
+
+ thread->ResumeThread();
+}
+
+
+// Simple execution thread. Assuming that an ActiveTest instance
+// only creates one of these at a time.
+UINT ActiveTest::threadFunction(LPVOID thisInstance)
+{
+ ActiveTest* test = (ActiveTest*) thisInstance;
+
+ test->run();
+ test->_runCompleted.SetEvent();
+
+ return 0;
+}
+
+
+} // namespace CppUnit
+
diff --git a/CppUnit/WinTestRunner/src/ActiveTest.h b/CppUnit/WinTestRunner/src/ActiveTest.h
new file mode 100644
index 000000000..f6c9ae457
--- /dev/null
+++ b/CppUnit/WinTestRunner/src/ActiveTest.h
@@ -0,0 +1,89 @@
+//
+// ActiveTest.h
+//
+// $Id: //poco/1.4/CppUnit/WinTestRunner/src/ActiveTest.h#1 $
+//
+
+
+#ifndef ActiveTest_INCLUDED
+#define ActiveTest_INCLUDED
+
+
+#include "CppUnit/CppUnit.h"
+#include "CppUnit/TestDecorator.h"
+#include
+
+
+namespace CppUnit {
+
+
+/* A Microsoft-specific active test
+ *
+ * An active test manages its own
+ * thread of execution. This one
+ * is very simple and only sufficient
+ * for the limited use we put it through
+ * in the TestRunner. It spawns a thread
+ * on run (TestResult *) and signals
+ * completion of the test.
+ *
+ * We assume that only one thread
+ * will be active at once for each
+ * instance.
+ *
+ */
+class ActiveTest: public TestDecorator
+{
+public:
+ ActiveTest(Test* test);
+ ~ActiveTest();
+
+ void run(TestResult* result);
+
+protected:
+ HANDLE _threadHandle;
+ CEvent _runCompleted;
+ TestResult* _currentTestResult;
+
+ void run ();
+ void setTestResult(TestResult* result);
+ static UINT threadFunction(LPVOID thisInstance);
+};
+
+
+// Construct the active test
+inline ActiveTest::ActiveTest(Test *test): TestDecorator(test)
+{
+ _currentTestResult = NULL;
+ _threadHandle = INVALID_HANDLE_VALUE;
+}
+
+
+// Pend until the test has completed
+inline ActiveTest::~ActiveTest()
+{
+ CSingleLock(&_runCompleted, TRUE);
+ CloseHandle(_threadHandle);
+}
+
+
+// Set the test result that we are to run
+inline void ActiveTest::setTestResult(TestResult* result)
+{
+ _currentTestResult = result;
+}
+
+
+// Run our test result
+inline void ActiveTest::run()
+{
+ TestDecorator::run(_currentTestResult);
+}
+
+
+} // namespace CppUnit
+
+
+#endif // ActiveTest_INCLUDED
+
+
diff --git a/CppUnit/WinTestRunner/src/DLLMain.cpp b/CppUnit/WinTestRunner/src/DLLMain.cpp
new file mode 100644
index 000000000..f20ea5b1e
--- /dev/null
+++ b/CppUnit/WinTestRunner/src/DLLMain.cpp
@@ -0,0 +1,50 @@
+//
+// DLLMain.cpp
+//
+// $Id: //poco/1.4/CppUnit/WinTestRunner/src/DLLMain.cpp#1 $
+//
+
+
+#include
+#include
+
+
+static AFX_EXTENSION_MODULE TestRunnerDLL = { NULL, NULL };
+
+
+extern "C" int APIENTRY
+DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
+{
+ // Remove this if you use lpReserved
+ UNREFERENCED_PARAMETER(lpReserved);
+
+ if (dwReason == DLL_PROCESS_ATTACH)
+ {
+ TRACE0("WinTestRunner.DLL Initializing\n");
+
+ // Extension DLL one-time initialization
+ if (!AfxInitExtensionModule(TestRunnerDLL, hInstance))
+ return 0;
+
+ // Insert this DLL into the resource chain
+ // NOTE: If this Extension DLL is being implicitly linked to by
+ // an MFC Regular DLL (such as an ActiveX Control)
+ // instead of an MFC application, then you will want to
+ // remove this line from DllMain and put it in a separate
+ // function exported from this Extension DLL. The Regular DLL
+ // that uses this Extension DLL should then explicitly call that
+ // function to initialize this Extension DLL. Otherwise,
+ // the CDynLinkLibrary object will not be attached to the
+ // Regular DLL's resource chain, and serious problems will
+ // result.
+
+ new CDynLinkLibrary(TestRunnerDLL);
+ }
+ else if (dwReason == DLL_PROCESS_DETACH)
+ {
+ TRACE0("WinTestRunner.DLL Terminating\n");
+ // Terminate the library before destructors are called
+ AfxTermExtensionModule(TestRunnerDLL);
+ }
+ return 1; // ok
+}
diff --git a/CppUnit/WinTestRunner/src/GUITestResult.cpp b/CppUnit/WinTestRunner/src/GUITestResult.cpp
new file mode 100644
index 000000000..9a8c7b75c
--- /dev/null
+++ b/CppUnit/WinTestRunner/src/GUITestResult.cpp
@@ -0,0 +1,52 @@
+//
+// GUITestResult.cpp
+//
+// $Id: //poco/1.4/CppUnit/WinTestRunner/src/GUITestResult.cpp#1 $
+//
+
+
+#include "TestRunnerDlg.h"
+#include "GUITestResult.h"
+
+
+namespace CppUnit {
+
+
+void GUITestResult::addError(Test *test, CppUnitException *e)
+{
+ ExclusiveZone zone(_syncObject);
+
+ TestResult::addError(test, e);
+ _runner->addError(this, test, e);
+}
+
+
+void GUITestResult::addFailure(Test *test, CppUnitException *e)
+{
+ ExclusiveZone zone(_syncObject);
+
+ TestResult::addFailure(test, e);
+ _runner->addFailure(this, test, e);
+}
+
+
+void GUITestResult::startTest(Test *test)
+{
+ ExclusiveZone zone(_syncObject);
+
+ TestResult::startTest(test);
+ _runner->startTest(test);
+}
+
+
+void GUITestResult::endTest(Test *test)
+{
+ ExclusiveZone zone(_syncObject);
+
+ TestResult::endTest(test);
+ _runner->endTest(this, test);
+}
+
+
+} // namespace CppUnit
+
diff --git a/CppUnit/WinTestRunner/src/GUITestResult.h b/CppUnit/WinTestRunner/src/GUITestResult.h
new file mode 100644
index 000000000..981b640d8
--- /dev/null
+++ b/CppUnit/WinTestRunner/src/GUITestResult.h
@@ -0,0 +1,83 @@
+//
+// GUITestResult.h
+//
+// $Id: //poco/1.4/CppUnit/WinTestRunner/src/GUITestResult.h#1 $
+//
+
+
+#ifndef GuiTestResult_INCLUDED
+#define GuiTestResult_INCLUDED
+
+
+#include "CppUnit/CppUnit.h"
+#include "CppUnit/TestResult.h"
+#include
+
+
+namespace CppUnit {
+
+
+class TestRunnerDlg;
+
+
+class GUITestResult: public TestResult
+{
+public:
+ GUITestResult(TestRunnerDlg* runner);
+ ~GUITestResult();
+
+ void addError(Test* test, CppUnitException* e);
+ void addFailure(Test* test, CppUnitException* e);
+
+ void startTest(Test* test);
+ void endTest(Test* test);
+ void stop();
+
+protected:
+ class LightweightSynchronizationObject: public TestResult::SynchronizationObject
+ {
+ public:
+ void lock()
+ {
+ _syncObject.Lock();
+ }
+
+ void unlock()
+ {
+ _syncObject.Unlock();
+ }
+
+ private:
+ CCriticalSection _syncObject;
+ };
+
+private:
+ TestRunnerDlg *_runner;
+};
+
+
+
+// Construct with lightweight synchronization
+inline GUITestResult::GUITestResult(TestRunnerDlg* runner): _runner(runner)
+{
+ setSynchronizationObject(new LightweightSynchronizationObject());
+}
+
+
+// Destructor
+inline GUITestResult::~GUITestResult()
+{
+}
+
+
+// Override without protection to prevent deadlock
+inline void GUITestResult::stop()
+{
+ _stop = true;
+}
+
+
+} // namespace CppUnit
+
+
+#endif // GuiTestResult_INCLUDED
diff --git a/CppUnit/WinTestRunner/src/ProgressBar.cpp b/CppUnit/WinTestRunner/src/ProgressBar.cpp
new file mode 100644
index 000000000..f51a772d0
--- /dev/null
+++ b/CppUnit/WinTestRunner/src/ProgressBar.cpp
@@ -0,0 +1,140 @@
+//
+// ProgressBar.cpp
+//
+// $Id: //poco/1.4/CppUnit/WinTestRunner/src/ProgressBar.cpp#1 $
+//
+
+
+#include "ProgressBar.h"
+
+
+namespace CppUnit {
+
+
+// Paint the progress bar in response to a paint message
+void ProgressBar::paint(CDC& dc)
+{
+ paintBackground (dc);
+ paintStatus (dc);
+}
+
+
+// Paint the background of the progress bar region
+void ProgressBar::paintBackground (CDC& dc)
+{
+ CBrush brshBackground;
+ CPen penGray (PS_SOLID, 1, RGB (128, 128, 128));
+ CPen penWhite (PS_SOLID, 1, RGB (255, 255, 255));
+
+ VERIFY (brshBackground.CreateSolidBrush (::GetSysColor (COLOR_BTNFACE)));
+
+ dc.FillRect (_bounds, &brshBackground);
+
+ CPen *pOldPen;
+
+ pOldPen = dc.SelectObject (&penGray);
+ {
+ dc.MoveTo (_bounds.left, _bounds.top);
+ dc.LineTo (_bounds.left + _bounds.Width () -1, _bounds.top);
+
+ dc.MoveTo (_bounds.left, _bounds.top);
+ dc.LineTo (_bounds.left, _bounds.top + _bounds.Height () -1);
+
+ }
+ dc.SelectObject (&penWhite);
+ {
+ dc.MoveTo (_bounds.left + _bounds.Width () -1, _bounds.top);
+ dc.LineTo (_bounds.left + _bounds.Width () -1, _bounds.top + _bounds.Height () -1);
+
+ dc.MoveTo (_bounds.left, _bounds.top + _bounds.Height () -1);
+ dc.LineTo (_bounds.left + _bounds.Width () -1, _bounds.top + _bounds.Height () -1);
+
+ }
+ dc.SelectObject (pOldPen);
+
+}
+
+
+// Paint the actual status of the progress bar
+void ProgressBar::paintStatus (CDC& dc)
+{
+ if (_progress <= 0)
+ return;
+
+ CBrush brshStatus;
+ CRect rect (_bounds.left, _bounds.top,
+ _bounds.left + _progressX, _bounds.bottom);
+
+ COLORREF statusColor = getStatusColor ();
+
+ VERIFY (brshStatus.CreateSolidBrush (statusColor));
+
+ rect.DeflateRect (1, 1);
+ dc.FillRect (rect, &brshStatus);
+
+}
+
+
+// Paint the current step
+void ProgressBar::paintStep (int startX, int endX)
+{
+ // kludge: painting the whole region on each step
+ _baseWindow->RedrawWindow (_bounds);
+ _baseWindow->UpdateWindow ();
+
+}
+
+
+// Setup the progress bar for execution over a total number of steps
+void ProgressBar::start (int total)
+{
+ _total = total;
+ reset ();
+}
+
+
+// Take one step, indicating whether it was a successful step
+void ProgressBar::step (bool successful)
+{
+ _progress++;
+
+ int x = _progressX;
+
+ _progressX = scale (_progress);
+
+ if (!_error && !successful)
+ {
+ _error = true;
+ x = 1;
+ }
+
+ paintStep (x, _progressX);
+
+}
+
+
+// Map from steps to display units
+int ProgressBar::scale (int value)
+{
+ if (_total > 0)
+ return max (1, value * (_bounds.Width () - 1) / _total);
+
+ return value;
+
+}
+
+
+// Reset the progress bar
+void ProgressBar::reset ()
+{
+ _progressX = 1;
+ _progress = 0;
+ _error = false;
+
+ _baseWindow->RedrawWindow (_bounds);
+ _baseWindow->UpdateWindow ();
+
+}
+
+
+} // namespace CppUnit
diff --git a/CppUnit/WinTestRunner/src/ProgressBar.h b/CppUnit/WinTestRunner/src/ProgressBar.h
new file mode 100644
index 000000000..8e937771d
--- /dev/null
+++ b/CppUnit/WinTestRunner/src/ProgressBar.h
@@ -0,0 +1,74 @@
+//
+// ProgressBar.h
+//
+// $Id: //poco/1.4/CppUnit/WinTestRunner/src/ProgressBar.h#1 $
+//
+
+
+#ifndef ProgressBar_INCLUDED
+#define ProgressBar_INCLUDED
+
+
+#include "CppUnit/CppUnit.h"
+#include
+
+
+namespace CppUnit {
+
+
+/* A Simple ProgressBar for test execution display
+ */
+class ProgressBar
+{
+public:
+ ProgressBar(CWnd* baseWindow, CRect& bounds);
+
+ void step(bool successful);
+ void paint(CDC& dc);
+ int scale(int value);
+ void reset();
+ void start(int total);
+
+protected:
+ void paintBackground(CDC& dc);
+ void paintStatus(CDC& dc);
+ COLORREF getStatusColor();
+ void paintStep(int startX, int endX);
+
+ CWnd* _baseWindow;
+ CRect _bounds;
+
+ bool _error;
+ int _total;
+ int _progress;
+ int _progressX;
+};
+
+
+// Construct a ProgressBar
+inline ProgressBar::ProgressBar(CWnd* baseWindow, CRect& bounds):
+ _baseWindow(baseWindow),
+ _bounds(bounds),
+ _error(false),
+ _total(0),
+ _progress(0),
+ _progressX(0)
+{
+ WINDOWINFO wi;
+ wi.cbSize = sizeof(WINDOWINFO);
+ baseWindow->GetWindowInfo(&wi);
+ _bounds.OffsetRect(-wi.rcClient.left, -wi.rcClient.top);
+}
+
+
+// Get the current color
+inline COLORREF ProgressBar::getStatusColor()
+{
+ return _error ? RGB(255, 0, 0) : RGB(0, 255, 0);
+}
+
+
+} // namespace CppUnit
+
+
+#endif // ProgressBar_INCLUDED
diff --git a/CppUnit/WinTestRunner/src/SynchronizedTestResult.h b/CppUnit/WinTestRunner/src/SynchronizedTestResult.h
new file mode 100644
index 000000000..84f461547
--- /dev/null
+++ b/CppUnit/WinTestRunner/src/SynchronizedTestResult.h
@@ -0,0 +1,106 @@
+#ifndef SYNCHRONIZEDTESTRESULTDECORATOR_H
+#define SYNCHRONIZEDTESTRESULTDECORATOR_H
+
+#include
+#include "TestResultDecorator.h"
+
+class SynchronizedTestResult : public TestResultDecorator
+{
+public:
+ SynchronizedTestResult (TestResult *result);
+ ~SynchronizedTestResult ();
+
+
+ bool shouldStop ();
+ void addError (Test *test, CppUnitException *e);
+ void addFailure (Test *test, CppUnitException *e);
+ void startTest (Test *test);
+ void endTest (Test *test);
+ int runTests ();
+ int testErrors ();
+ int testFailures ();
+ bool wasSuccessful ();
+ void stop ();
+
+ vector& errors ();
+ vector& failures ();
+
+private:
+ CCriticalSection m_criticalSection;
+
+};
+
+
+// Constructor
+inline SynchronizedTestResult::SynchronizedTestResult (TestResult *result)
+: TestResultDecorator (result) {}
+
+// Destructor
+inline SynchronizedTestResult::~SynchronizedTestResult ()
+{}
+
+// Returns whether the test should stop
+inline bool SynchronizedTestResult::shouldStop ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->shouldStop (); }
+
+
+// Adds an error to the list of errors. The passed in exception
+// caused the error
+inline void SynchronizedTestResult::addError (Test *test, CppUnitException *e)
+{ CSingleLock sync (&m_criticalSection, TRUE); m_result->addError (test, e); }
+
+
+// Adds a failure to the list of failures. The passed in exception
+// caused the failure.
+inline void SynchronizedTestResult::addFailure (Test *test, CppUnitException *e)
+{ CSingleLock sync (&m_criticalSection, TRUE); m_result->addFailure (test, e); }
+
+
+// Informs the result that a test will be started.
+inline void SynchronizedTestResult::startTest (Test *test)
+{ CSingleLock sync (&m_criticalSection, TRUE); m_result->startTest (test); }
+
+
+// Informs the result that a test was completed.
+inline void SynchronizedTestResult::endTest (Test *test)
+{ CSingleLock sync (&m_criticalSection, TRUE); m_result->endTest (test); }
+
+
+// Gets the number of run tests.
+inline int SynchronizedTestResult::runTests ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->runTests (); }
+
+
+// Gets the number of detected errors.
+inline int SynchronizedTestResult::testErrors ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->testErrors (); }
+
+
+// Gets the number of detected failures.
+inline int SynchronizedTestResult::testFailures ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->testFailures (); }
+
+
+// Returns whether the entire test was successful or not.
+inline bool SynchronizedTestResult::wasSuccessful ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->wasSuccessful (); }
+
+
+// Marks that the test run should stop.
+inline void SynchronizedTestResult::stop ()
+{ CSingleLock sync (&m_criticalSection, TRUE); m_result->stop (); }
+
+
+// Returns a vector of the errors.
+inline vector& SynchronizedTestResult::errors ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->errors (); }
+
+
+// Returns a vector of the failures.
+inline vector& SynchronizedTestResult::failures ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->failures (); }
+
+
+#endif
+
+
diff --git a/CppUnit/WinTestRunner/src/TestResultDecorator.h b/CppUnit/WinTestRunner/src/TestResultDecorator.h
new file mode 100644
index 000000000..ed2d46212
--- /dev/null
+++ b/CppUnit/WinTestRunner/src/TestResultDecorator.h
@@ -0,0 +1,102 @@
+#ifndef CPP_UNIT_TESTRESULTDECORATOR_H
+#define CPP_UNIT_TESTRESULTDECORATOR_H
+
+#include "TestResult.h"
+
+class TestResultDecorator
+{
+public:
+ TestResultDecorator (TestResult *result);
+ virtual ~TestResultDecorator ();
+
+
+ virtual bool shouldStop ();
+ virtual void addError (Test *test, CppUnitException *e);
+ virtual void addFailure (Test *test, CppUnitException *e);
+ virtual void startTest (Test *test);
+ virtual void endTest (Test *test);
+ virtual int runTests ();
+ virtual int testErrors ();
+ virtual int testFailures ();
+ virtual bool wasSuccessful ();
+ virtual void stop ();
+
+ vector& errors ();
+ vector& failures ();
+
+protected:
+ TestResult *m_result;
+};
+
+
+inline TestResultDecorator::TestResultDecorator (TestResult *result)
+: m_result (result) {}
+
+inline TestResultDecorator::~TestResultDecorator ()
+{}
+
+// Returns whether the test should stop
+inline bool TestResultDecorator::shouldStop ()
+{ return m_result->shouldStop (); }
+
+
+// Adds an error to the list of errors. The passed in exception
+// caused the error
+inline void TestResultDecorator::addError (Test *test, CppUnitException *e)
+{ m_result->addError (test, e); }
+
+
+// Adds a failure to the list of failures. The passed in exception
+// caused the failure.
+inline void TestResultDecorator::addFailure (Test *test, CppUnitException *e)
+{ m_result->addFailure (test, e); }
+
+
+// Informs the result that a test will be started.
+inline void TestResultDecorator::startTest (Test *test)
+{ m_result->startTest (test); }
+
+
+// Informs the result that a test was completed.
+inline void TestResultDecorator::endTest (Test *test)
+{ m_result->endTest (test); }
+
+
+// Gets the number of run tests.
+inline int TestResultDecorator::runTests ()
+{ return m_result->runTests (); }
+
+
+// Gets the number of detected errors.
+inline int TestResultDecorator::testErrors ()
+{ return m_result->testErrors (); }
+
+
+// Gets the number of detected failures.
+inline int TestResultDecorator::testFailures ()
+{ return m_result->testFailures (); }
+
+
+// Returns whether the entire test was successful or not.
+inline bool TestResultDecorator::wasSuccessful ()
+{ return m_result->wasSuccessful (); }
+
+
+// Marks that the test run should stop.
+inline void TestResultDecorator::stop ()
+{ m_result->stop (); }
+
+
+// Returns a vector of the errors.
+inline vector& TestResultDecorator::errors ()
+{ return m_result->errors (); }
+
+
+// Returns a vector of the failures.
+inline vector& TestResultDecorator::failures ()
+{ return m_result->failures (); }
+
+
+#endif
+
+
diff --git a/CppUnit/WinTestRunner/src/TestRunnerDlg.cpp b/CppUnit/WinTestRunner/src/TestRunnerDlg.cpp
new file mode 100644
index 000000000..9ad6b4690
--- /dev/null
+++ b/CppUnit/WinTestRunner/src/TestRunnerDlg.cpp
@@ -0,0 +1,439 @@
+//
+// TestRunnerDlg.cpp
+//
+// $Id: //poco/1.4/CppUnit/WinTestRunner/src/TestRunnerDlg.cpp#1 $
+//
+
+
+#include
+#include
+#include
+#include
+#include "TestRunnerDlg.h"
+#include "ActiveTest.h"
+#include "GUITestResult.h"
+#include "ProgressBar.h"
+#include "CppUnit/TestSuite.h"
+#include "TestRunnerDlg.h"
+
+
+namespace CppUnit {
+
+
+TestRunnerDlg::TestRunnerDlg(CWnd* pParent): CDialog(TestRunnerDlg::IDD, pParent)
+{
+ //{{AFX_DATA_INIT(TestRunnerDlg)
+ // NOTE: the ClassWizard will add member initialization here
+ //}}AFX_DATA_INIT
+
+ _testsProgress = 0;
+ _selectedTest = 0;
+ _currentTest = 0;
+}
+
+
+void TestRunnerDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(TestRunnerDlg)
+ // NOTE: the ClassWizard will add DDX and DDV calls here
+ //}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(TestRunnerDlg, CDialog)
+ //{{AFX_MSG_MAP(TestRunnerDlg)
+ ON_BN_CLICKED(ID_RUN, OnRun)
+ ON_BN_CLICKED(ID_STOP, OnStop)
+ ON_CBN_SELCHANGE(IDC_COMBO_TEST, OnSelchangeComboTest)
+ ON_BN_CLICKED(IDC_CHK_AUTORUN, OnBnClickedAutorun)
+ ON_WM_PAINT()
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+
+BOOL TestRunnerDlg::OnInitDialog()
+{
+ CDialog::OnInitDialog();
+
+ CListCtrl *listCtrl = (CListCtrl *)GetDlgItem (IDC_LIST);
+ CComboBox *comboBox = (CComboBox *)GetDlgItem (IDC_COMBO_TEST);
+
+ ASSERT (listCtrl);
+ ASSERT (comboBox);
+
+ CString title;
+ GetWindowText(title);
+#if defined(_DEBUG)
+ title.Append(" [debug]");
+#else
+ title.Append(" [release]");
+#endif
+ SetWindowText(title);
+
+ listCtrl->InsertColumn (0,"Type", LVCFMT_LEFT, 16 + listCtrl->GetStringWidth ("Type"), 1);
+ listCtrl->InsertColumn (1,"Name", LVCFMT_LEFT, 16 * listCtrl->GetStringWidth ("X"), 2);
+ listCtrl->InsertColumn (2,"Failed Condition", LVCFMT_LEFT, 24 * listCtrl->GetStringWidth ("M"), 3);
+ listCtrl->InsertColumn (3,"Line", LVCFMT_LEFT, 16 + listCtrl->GetStringWidth ("0000"), 4);
+ listCtrl->InsertColumn (4,"File Name", LVCFMT_LEFT, 36 * listCtrl->GetStringWidth ("M"), 5);
+
+ int numberOfCases = 0;
+
+ CWinApp* pApp = AfxGetApp();
+ CString lastTestCS = pApp->GetProfileString("Tests", "lastTest");
+ std::string lastTest((LPCSTR) lastTestCS);
+ int sel = -1;
+ for (std::vector::iterator it = _tests.begin (); it != _tests.end (); ++it)
+ {
+ std::string cbName(it->level*4, ' ');
+ cbName.append(it->pTest->toString());
+ comboBox->AddString (cbName.c_str ());
+ if (sel < 0)
+ {
+ if (lastTest.empty() || lastTest == it->pTest->toString())
+ {
+ _selectedTest = it->pTest;
+ sel = numberOfCases;
+ }
+ }
+ numberOfCases++;
+ }
+
+ if (numberOfCases > 0)
+ {
+ if (sel < 0)
+ {
+ _selectedTest = _tests[0].pTest;
+ sel = 0;
+ }
+ comboBox->SetCurSel (sel);
+ }
+ else
+ {
+ beRunDisabled ();
+ }
+ CWnd *pProgress = GetDlgItem(IDC_PROGRESS);
+ CRect rect;
+ pProgress->GetWindowRect(&rect);
+ _testsProgress = new ProgressBar (this, rect);
+
+ CButton* autoRunBtn = (CButton*) GetDlgItem(IDC_CHK_AUTORUN);
+ autoRunBtn->SetCheck(pApp->GetProfileInt("Tests", "autoRun", BST_UNCHECKED));
+
+ reset ();
+
+ if (autoRunBtn->GetCheck() == BST_CHECKED)
+ {
+ OnRun();
+ }
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
+}
+
+
+TestRunnerDlg::~TestRunnerDlg ()
+{
+ freeState ();
+ delete _testsProgress;
+}
+
+
+void TestRunnerDlg::OnRun()
+{
+ if (_selectedTest == 0)
+ return;
+
+ freeState ();
+ reset ();
+
+ beRunning ();
+
+ int numberOfTests = _selectedTest->countTestCases ();
+
+ _testsProgress->start (numberOfTests);
+
+ _result = new GUITestResult ((TestRunnerDlg *)this);
+ _activeTest = new ActiveTest (_selectedTest);
+
+ _testStartTime = timeGetTime ();
+
+ _activeTest->run (_result);
+
+ _testEndTime = timeGetTime ();
+
+}
+
+
+void TestRunnerDlg::addListEntry(const std::string& type, TestResult *result, Test *test, CppUnitException *e)
+{
+ char stage [80];
+ LV_ITEM lvi;
+ CListCtrl *listCtrl = (CListCtrl *)GetDlgItem (IDC_LIST);
+ int currentEntry = result->testErrors () + result->testFailures () -1;
+
+ sprintf (stage, "%s", type.c_str ());
+
+ lvi.mask = LVIF_TEXT;
+ lvi.iItem = currentEntry;
+ lvi.iSubItem = 0;
+ lvi.pszText = stage;
+ lvi.iImage = 0;
+ lvi.stateMask = 0;
+ lvi.state = 0;
+
+ listCtrl->InsertItem (&lvi);
+
+ // Set class string
+ listCtrl->SetItemText (currentEntry, 1, test->toString ().c_str ());
+
+ // Set the asserted text
+ listCtrl->SetItemText(currentEntry, 2, e->what ());
+
+ // Set the line number
+ if (e->lineNumber () == CppUnitException::CPPUNIT_UNKNOWNLINENUMBER)
+ sprintf (stage, "");
+ else
+ sprintf (stage, "%ld", e->lineNumber ());
+
+ listCtrl->SetItemText(currentEntry, 3, stage);
+
+ // Set the file name
+ listCtrl->SetItemText(currentEntry, 4, e->fileName ().c_str ());
+
+ listCtrl->RedrawItems (currentEntry, currentEntry);
+ listCtrl->UpdateWindow ();
+
+}
+
+
+void TestRunnerDlg::addError (TestResult *result, Test *test, CppUnitException *e)
+{
+ addListEntry ("Error", result, test, e);
+ _errors++;
+
+ _currentTest = 0;
+ updateCountsDisplay ();
+
+}
+
+
+void TestRunnerDlg::addFailure (TestResult *result, Test *test, CppUnitException *e)
+{
+ addListEntry ("Failure", result, test, e);
+ _failures++;
+
+ _currentTest = 0;
+ updateCountsDisplay ();
+
+}
+
+
+void TestRunnerDlg::startTest(Test* test)
+{
+ _currentTest = test;
+ updateCountsDisplay();
+}
+
+
+void TestRunnerDlg::endTest (TestResult *result, Test *test)
+{
+ if (_selectedTest == 0)
+ return;
+ _currentTest = 0;
+
+ _testsRun++;
+ updateCountsDisplay ();
+ _testsProgress->step (_failures == 0 && _errors == 0);
+
+ _testEndTime = timeGetTime ();
+
+ updateCountsDisplay ();
+
+ if (_testsRun >= _selectedTest->countTestCases ())
+ beIdle ();
+}
+
+
+void TestRunnerDlg::beRunning ()
+{
+ CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
+ CButton *closeButton = (CButton *)GetDlgItem (IDOK);
+
+ runButton->EnableWindow (FALSE);
+ closeButton->EnableWindow (FALSE);
+
+}
+
+
+void TestRunnerDlg::beIdle ()
+{
+ CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
+ CButton *closeButton = (CButton *)GetDlgItem (IDOK);
+
+ runButton->EnableWindow (TRUE);
+ closeButton->EnableWindow (TRUE);
+
+}
+
+
+void TestRunnerDlg::beRunDisabled ()
+{
+ CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
+ CButton *closeButton = (CButton *)GetDlgItem (IDOK);
+ CButton *stopButton = (CButton *)GetDlgItem (ID_STOP);
+
+ runButton->EnableWindow (FALSE);
+ stopButton->EnableWindow (FALSE);
+ closeButton->EnableWindow (TRUE);
+
+}
+
+
+void TestRunnerDlg::freeState ()
+{
+ delete _activeTest;
+ delete _result;
+
+}
+
+
+void TestRunnerDlg::reset ()
+{
+ _testsRun = 0;
+ _errors = 0;
+ _failures = 0;
+ _testEndTime = _testStartTime;
+
+ updateCountsDisplay ();
+
+ _activeTest = 0;
+ _result = 0;
+
+ CListCtrl *listCtrl = (CListCtrl *)GetDlgItem (IDC_LIST);
+
+ listCtrl->DeleteAllItems ();
+ _testsProgress->reset ();
+
+}
+
+
+void TestRunnerDlg::updateCountsDisplay ()
+{
+ CStatic *statTestsRun = (CStatic *)GetDlgItem (IDC_STATIC_RUNS);
+ CStatic *statErrors = (CStatic *)GetDlgItem (IDC_STATIC_ERRORS);
+ CStatic *statFailures = (CStatic *)GetDlgItem (IDC_STATIC_FAILURES);
+ CEdit *editTime = (CEdit *)GetDlgItem (IDC_EDIT_TIME);
+
+ CString argumentString;
+
+ argumentString.Format ("%d", _testsRun);
+ statTestsRun ->SetWindowText (argumentString);
+
+ argumentString.Format ("%d", _errors);
+ statErrors ->SetWindowText (argumentString);
+
+ argumentString.Format ("%d", _failures);
+ statFailures ->SetWindowText (argumentString);
+
+ if (_currentTest)
+ argumentString.Format ("Execution Time: %3.3lf seconds, Current Test: %s", (_testEndTime - _testStartTime) / 1000.0, _currentTest->toString().c_str());
+ else
+ argumentString.Format ("Execution Time: %3.3lf seconds", (_testEndTime - _testStartTime) / 1000.0);
+
+ editTime ->SetWindowText (argumentString);
+
+
+}
+
+
+void TestRunnerDlg::OnStop()
+{
+ if (_result)
+ _result->stop ();
+
+ beIdle ();
+
+}
+
+
+void TestRunnerDlg::OnOK()
+{
+ if (_result)
+ _result->stop ();
+
+ CDialog::OnOK ();
+}
+
+
+void TestRunnerDlg::OnSelchangeComboTest()
+{
+ CComboBox *testsSelection = (CComboBox *)GetDlgItem (IDC_COMBO_TEST);
+
+ int currentSelection = testsSelection->GetCurSel ();
+
+ if (currentSelection >= 0 && currentSelection < _tests.size ())
+ {
+ _selectedTest = (_tests.begin () + currentSelection)->pTest;
+ beIdle ();
+ CWinApp* pApp = AfxGetApp();
+ pApp->WriteProfileString("Tests", "lastTest", _selectedTest->toString().c_str());
+ }
+ else
+ {
+ _selectedTest = 0;
+ beRunDisabled ();
+
+ }
+
+ freeState ();
+ reset ();
+
+}
+
+
+void TestRunnerDlg::OnBnClickedAutorun()
+{
+ CButton *autoRunBtn = (CButton *)GetDlgItem (IDC_CHK_AUTORUN);
+ CWinApp* pApp = AfxGetApp();
+ pApp->WriteProfileInt("Tests", "autoRun", autoRunBtn->GetCheck());
+}
+
+
+void TestRunnerDlg::OnPaint()
+{
+ CPaintDC dc (this);
+
+ _testsProgress->paint (dc);
+}
+
+
+void TestRunnerDlg::setTests(const std::vector& tests)
+{
+ _tests.clear();
+ for (std::vector::const_iterator it = tests.begin(); it != tests.end(); ++it)
+ {
+ addTest(*it, 0);
+ }
+}
+
+
+void TestRunnerDlg::addTest(Test* pTest, int level)
+{
+ TestInfo ti;
+ ti.pTest = pTest;
+ ti.level = level;
+ _tests.push_back(ti);
+ TestSuite* pSuite = dynamic_cast(pTest);
+ if (pSuite)
+ {
+ const std::vector& tests = pSuite->tests();
+ for (std::vector::const_iterator it = tests.begin(); it != tests.end(); ++it)
+ {
+ addTest(*it, level + 1);
+ }
+ }
+}
+
+
+} // namespace CppUnit
diff --git a/CppUnit/WinTestRunner/src/TestRunnerDlg.h b/CppUnit/WinTestRunner/src/TestRunnerDlg.h
new file mode 100644
index 000000000..83ba5675e
--- /dev/null
+++ b/CppUnit/WinTestRunner/src/TestRunnerDlg.h
@@ -0,0 +1,94 @@
+//
+// TestRunnerDlg.h
+//
+// $Id: //poco/1.4/CppUnit/WinTestRunner/src/TestRunnerDlg.h#1 $
+//
+
+
+#ifndef TestRunnerDlg_INCLUDED
+#define TestRunnerDlg_INCLUDED
+
+
+#include "CppUnit/CppUnit.h"
+#include "CppUnit/CppUnitException.h"
+#include "ActiveTest.h"
+#include
+#include "../res/Resource.h"
+#include
+#include "afxwin.h"
+
+
+namespace CppUnit {
+
+
+class ProgressBar;
+
+
+class TestRunnerDlg: public CDialog
+{
+public:
+ TestRunnerDlg(CWnd* pParent = NULL);
+ ~TestRunnerDlg();
+
+ void setTests(const std::vector& tests);
+
+ void addError(TestResult* result, Test* test, CppUnitException* e);
+ void addFailure(TestResult* result, Test* test, CppUnitException* e);
+ void startTest(Test* test);
+ void endTest(TestResult* result, Test* test);
+
+ //{{AFX_DATA(TestRunnerDlg)
+ enum { IDD = IDD_DIALOG_TESTRUNNER };
+ // NOTE: the ClassWizard will add data members here
+ //}}AFX_DATA
+
+ //{{AFX_VIRTUAL(TestRunnerDlg)
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ //}}AFX_VIRTUAL
+
+protected:
+ //{{AFX_MSG(TestRunnerDlg)
+ virtual BOOL OnInitDialog();
+ afx_msg void OnRun();
+ afx_msg void OnStop();
+ virtual void OnOK();
+ afx_msg void OnSelchangeComboTest();
+ afx_msg void OnBnClickedAutorun();
+ afx_msg void OnPaint();
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+
+ void addListEntry(const std::string& type, TestResult* result, Test* test, CppUnitException* e);
+ void beIdle();
+ void beRunning();
+ void beRunDisabled();
+ void reset();
+ void freeState();
+ void updateCountsDisplay();
+ void addTest(Test* pTest, int level);
+
+ struct TestInfo
+ {
+ Test* pTest;
+ int level;
+ };
+ std::vector _tests;
+ ProgressBar* _testsProgress;
+ Test* _selectedTest;
+ ActiveTest* _activeTest;
+ TestResult* _result;
+ int _testsRun;
+ int _errors;
+ int _failures;
+ DWORD _testStartTime;
+ DWORD _testEndTime;
+ Test* _currentTest;
+};
+
+
+} // namespace CppUnit
+
+
+#endif // TestRunnerDlg_INCLUDED
+
diff --git a/CppUnit/WinTestRunner/src/WinTestRunner.cpp b/CppUnit/WinTestRunner/src/WinTestRunner.cpp
new file mode 100644
index 000000000..d9218db45
--- /dev/null
+++ b/CppUnit/WinTestRunner/src/WinTestRunner.cpp
@@ -0,0 +1,96 @@
+//
+// WinTestRunner.cpp
+//
+// $Id: //poco/1.4/CppUnit/WinTestRunner/src/WinTestRunner.cpp#1 $
+//
+
+
+#include "WinTestRunner/WinTestRunner.h"
+#include "TestRunnerDlg.h"
+#include "CppUnit/TestRunner.h"
+#include
+
+
+namespace CppUnit {
+
+
+WinTestRunner::WinTestRunner()
+{
+}
+
+
+WinTestRunner::~WinTestRunner()
+{
+ for (std::vector::iterator it = _tests.begin(); it != _tests.end(); ++it)
+ delete *it;
+}
+
+
+void WinTestRunner::run()
+{
+ // Note: The following code is some evil hack to
+ // add batch capability to the MFC based WinTestRunner.
+
+ std::string cmdLine(AfxGetApp()->m_lpCmdLine);
+ if (cmdLine.size() >= 2 && cmdLine[0] == '/' && (cmdLine[1] == 'b' || cmdLine[1] == 'B'))
+ {
+ // We're running in batch mode.
+ std::string outPath;
+ if (cmdLine.size() > 4 && cmdLine[2] == ':')
+ outPath = cmdLine.substr(3);
+ else
+ outPath = "CON";
+ std::ofstream ostr(outPath.c_str());
+ if (ostr.good())
+ {
+ TestRunner runner(ostr);
+ for (std::vector::iterator it = _tests.begin(); it != _tests.end(); ++it)
+ runner.addTest((*it)->toString(), *it);
+ _tests.clear();
+ std::vector args;
+ args.push_back("WinTestRunner");
+ args.push_back("-all");
+ bool success = runner.run(args);
+ ExitProcess(success ? 0 : 1);
+ }
+ else ExitProcess(2);
+ }
+ else
+ {
+ // We're running in interactive mode.
+ TestRunnerDlg dlg;
+ dlg.setTests(_tests);
+ dlg.DoModal();
+ }
+}
+
+
+void WinTestRunner::addTest(Test* pTest)
+{
+ _tests.push_back(pTest);
+}
+
+
+BEGIN_MESSAGE_MAP(WinTestRunnerApp, CWinApp)
+END_MESSAGE_MAP()
+
+
+BOOL WinTestRunnerApp::InitInstance()
+{
+ AllocConsole();
+ SetConsoleTitle("CppUnit WinTestRunner Console");
+ freopen("CONOUT$", "w", stdout);
+ freopen("CONOUT$", "w", stderr);
+ freopen("CONIN$", "r", stdin);
+ TestMain();
+ FreeConsole();
+ return FALSE;
+}
+
+
+void WinTestRunnerApp::TestMain()
+{
+}
+
+
+} // namespace CppUnit
diff --git a/CppUnit/cppunit.vmsbuild b/CppUnit/cppunit.vmsbuild
new file mode 100644
index 000000000..789d2c8b9
--- /dev/null
+++ b/CppUnit/cppunit.vmsbuild
@@ -0,0 +1,14 @@
+#
+# buildfiles.vms
+#
+# $Id: //poco/CppUnit/cppunit.vmsbuild#1 $
+#
+LIB=CppUnit
+CppUnitException
+TestCase
+TestDecorator
+TestFailure
+TestResult
+TestRunner
+TestSuite
+TextTestResult
diff --git a/CppUnit/doc/README.html b/CppUnit/doc/README.html
new file mode 100644
index 000000000..5f8a1418a
--- /dev/null
+++ b/CppUnit/doc/README.html
@@ -0,0 +1,75 @@
+
+
+
+
+CppUnit 1.5
+
+
+
+
+
+CppUnit 1.5
+Last Revision: 12/15/99 - Michael Feathers (mfeathers@acm.org) - written in standard C++, tested under Microsoft Visual C++ 6.0
+
+Background
+CppUnit is a simple unit test framework for C++. It is a port from JUnit, a testing framework for Java, developed by Kent Beck and Erich Gamma.
+Contents
+README.html this file
+
+ test the source code
+ framework the testing framework
+ extensions some framework extension classes
+ textui a command line interface to run tests
+ ms code for a Microsoft specific TestRunner
+ samples some example test cases and extensions to the framework
+ multicaster a sample illustrating a publish/subscribe
+ multicaster under test
+ doc documentation
+Installation
+To use the test framework, create a makefile or load all files in test\framework into your IDE. In this incarnation of CppUnit, all includes assume the current directory first. A makefile or project can be used to resolve the dependencies.
+The directory test\textui contains a simple command line example that uses the framework.
+Documentation
+CppUnit comes with the following documentation:
+
+
+a cookbook: doc\cookbook.htm
+this file
+
+Samples
+You can find several sample test cases in the samples directory:
+
+
+ExampleTestCase - some simple tests
+Multicaster - test cases for a sample publish/subscribe multicaster class
+
+Also, the wiki page http://c2.com/cgi/wiki?ClassHierarchyTestingInCppUnit shows how to automatically apply tests of classes to the classes' subclasses.
+
+Extensions
+You can find several classes that illustrate framework extensions in the extensions directory:
+
+
+TestDecorator - A Decorator for Test. You can use it as the base class for decorators that extend test cases.
+TestSetup - A Decorator that can be used to set up and tear down additional fixture state. Subclass TestSetup and insert it into your tests when you want to set up additional state once before the test is run.
+Orthodox - a template class which can be used to verify operations on an arbitrary class.
+
+
+Notes
+Porting this framework has been fun. I've tried to maintain the spirit and utility of JUnit in a C++ environment. Naturally, the move from Java to standard C++ forces out several nice JUnit features:
+
+
+Platform independent GUI.
+Stack traces of test failures
+Active (threaded) tests
+Direct invocation of test cases via reflection
+Run-time loading of new tests
+
+In addition, the lack of garbage collection in C++ requires some careful use of the framework classes. In particular, TestSuites are composites that manage the lifetime of any tests added to them. Holding onto a TestResult past the lifetime of the tests which filled it is a bad idea. This is because TestResults hold TestFailures and TestFailures hold pointers to the Tests that generated them.
+On the plus side, we can use the C++ macro preprocessor to get the exact line at which a failure occurs, along with the actual text inside the assert () call that detected the failure. The features of C++ that enable this are the __LINE__ and __FILE__ preprocessor definitions, along with the stringizing operator. If you find that generating this much literal text bulks up your test executables, you can use the CPP_UNIT_SOURCEANNOT define to disable that portion of the reporting.
+Note: If you use the C++ macro "assert ()" in your code, or include assert.h, you may have a name clash with CppUnit's assert macro. This can be remedied by changing the name of the macro to "cu_assert ()" in TestCase.h.
+I'd like to thank Kent Beck and Erich Gamma for the inspiration, design, and a wonderful cookbook that was easily/shamelessly mutated to describe CppUnit. Double thanks to Erich for thinking up a way to implement TestCaller. Additional thanks to Kent, Ward Cunningham, Ron Jeffries, Martin Fowler, and several other netizens of the WikiWikiWeb. I don't think any other bunch of people could have convinced me that rapid development with unit tests can be both effective and easy.
+Thanks also to Fred Huls for mentioning the idea of template-based testing. The orthodox template class demonstrates only a small part of what can be done with templated test cases.
+History Of Changes
+1.2 -- Added the TestCaller template class. There is now no need to use the CPP_UNIT_TESTCASEDISPATCH macro unless you are using a C++ compiler which does not support templates well. CPP_UNIT_TESTCASEDISPATCH remains in TestCase.h for backward compatibility. I've also kept the use of the macro in the Multicaster sample to leave in an example.
+1.3 -- Retired the CPP_UNIT_TESTCASEDISPATCH macro and cleaned up the include structure. Fixed bug in the textui version.
+1.4 -- Removed using directives for std in CppUnit headers. Merged the old AssertionFailedError into CppUnitException. Fixed a memory leak in the TestRunner class of the MS GUI TestRunner. Removed CppUnit.h file. Now headers for each class must be included directly.
+1.5 -- Upgraded projects from VC++ 5.0 to 6.0.