diff --git a/PocoDoc/Makefile b/PocoDoc/Makefile new file mode 100644 index 000000000..c0708e0f8 --- /dev/null +++ b/PocoDoc/Makefile @@ -0,0 +1,17 @@ +# +# Makefile +# +# $Id: //poco/Main/template/sample.make#4 $ +# +# Makefile for Poco PocoDoc +# + +include $(POCO_BASE)/build/rules/global + +objects = DocWriter PocoDoc + +target = PocoDoc +target_version = 1 +target_libs = PocoCppParser PocoFoundation PocoXML PocoUtil + +include $(POCO_BASE)/build/rules/exec diff --git a/PocoDoc/PocoDoc.progen b/PocoDoc/PocoDoc.progen new file mode 100644 index 000000000..6b26b9086 --- /dev/null +++ b/PocoDoc/PocoDoc.progen @@ -0,0 +1,16 @@ +vc.project.guid = 18BCF3CC-9474-4D1C-9445-F783A49D886B +vc.project.name = PocoDoc +vc.project.target = PocoDoc +vc.project.type = executable +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 = PocoDoc_vs90.vcproj +vc.project.compiler.include = ..\\Foundation\\include;..\\XML\\include;..\\Util\\include;..\\CppParser\\include +vc.project.compiler.defines = +vc.project.compiler.defines.shared = +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 = ws2_32.lib iphlpapi.lib +vc.solution.create = true diff --git a/PocoDoc/PocoDoc_vs100.sln b/PocoDoc/PocoDoc_vs100.sln new file mode 100644 index 000000000..26649eb84 --- /dev/null +++ b/PocoDoc/PocoDoc_vs100.sln @@ -0,0 +1,37 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PocoDoc", "PocoDoc_vs100.vcxproj", "{18BCF3CC-9474-4D1C-9445-F783A49D886B}" +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 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|Win32.Build.0 = debug_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|Win32.Build.0 = release_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|Win32.Deploy.0 = release_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|Win32.Build.0 = release_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/PocoDoc/PocoDoc_vs100.vcxproj b/PocoDoc/PocoDoc_vs100.vcxproj new file mode 100644 index 000000000..f9ae7156f --- /dev/null +++ b/PocoDoc/PocoDoc_vs100.vcxproj @@ -0,0 +1,303 @@ + + + + + debug_shared + Win32 + + + debug_static_md + Win32 + + + debug_static_mt + Win32 + + + release_shared + Win32 + + + release_static_md + Win32 + + + release_static_mt + Win32 + + + + PocoDoc + {18BCF3CC-9474-4D1C-9445-F783A49D886B} + PocoDoc + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + 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 + PocoDocd + PocoDocd + PocoDocd + PocoDoc + PocoDoc + PocoDoc + + + + Disabled + .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebugDLL + true + true + true + true + + Level3 + EditAndContinue + Default + %(DisableSpecificWarnings) + + + ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\PocoDocd.exe + ..\lib;%(AdditionalLibraryDirectories) + true + true + bin\PocoDocd.pdb + Console + MachineX86 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\PocoDoc.exe + ..\lib;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX86 + + + + + Disabled + .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebug + true + true + true + true + + Level3 + EditAndContinue + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\static_mt\PocoDocd.exe + ..\lib;%(AdditionalLibraryDirectories) + true + true + bin\static_mt\PocoDocd.pdb + Console + MachineX86 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + MultiThreaded + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\static_mt\PocoDoc.exe + ..\lib;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX86 + + + + + Disabled + .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebugDLL + true + true + true + true + + Level3 + EditAndContinue + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\static_md\PocoDocd.exe + ..\lib;%(AdditionalLibraryDirectories) + true + true + bin\static_md\PocoDocd.pdb + Console + MachineX86 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\static_md\PocoDoc.exe + ..\lib;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX86 + + + + + + + + + + + + diff --git a/PocoDoc/PocoDoc_vs100.vcxproj.filters b/PocoDoc/PocoDoc_vs100.vcxproj.filters new file mode 100644 index 000000000..4106069b9 --- /dev/null +++ b/PocoDoc/PocoDoc_vs100.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {8acaae35-1027-4d49-a71f-34ab95529ef2} + + + {ebdbde5f-35bf-44ce-9a51-70576b794a86} + + + {4151d822-de49-4574-a1a3-13e490b5ea16} + + + {61194373-3bdc-4e5f-9920-e538fb9b330c} + + + {986be004-b7d3-4d63-89d4-0d65db56184f} + + + {4d6019af-8454-4ce5-8176-69fea7ea9c9b} + + + + + App\Source Files + + + DocWriter\Source Files + + + + + DocWriter\Header Files + + + \ No newline at end of file diff --git a/PocoDoc/PocoDoc_vs100.vcxproj.user b/PocoDoc/PocoDoc_vs100.vcxproj.user new file mode 100644 index 000000000..695b5c78b --- /dev/null +++ b/PocoDoc/PocoDoc_vs100.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/PocoDoc/PocoDoc_vs71.sln b/PocoDoc/PocoDoc_vs71.sln new file mode 100644 index 000000000..e637ef9e4 --- /dev/null +++ b/PocoDoc/PocoDoc_vs71.sln @@ -0,0 +1,33 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PocoDoc", "PocoDoc_vs71.vcproj", "{18BCF3CC-9474-4D1C-9445-F783A49D886B}" + ProjectSection(ProjectDependencies) = postProject + 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 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared.ActiveCfg = debug_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared.Build.0 = debug_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared.ActiveCfg = release_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared.Build.0 = release_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt.ActiveCfg = debug_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt.Build.0 = debug_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt.ActiveCfg = release_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt.Build.0 = release_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md.ActiveCfg = debug_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md.Build.0 = debug_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md.ActiveCfg = release_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md.Build.0 = release_static_md|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/PocoDoc/PocoDoc_vs71.vcproj b/PocoDoc/PocoDoc_vs71.vcproj new file mode 100644 index 000000000..43439c92b --- /dev/null +++ b/PocoDoc/PocoDoc_vs71.vcproj @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PocoDoc/PocoDoc_vs80.sln b/PocoDoc/PocoDoc_vs80.sln new file mode 100644 index 000000000..5b979a785 --- /dev/null +++ b/PocoDoc/PocoDoc_vs80.sln @@ -0,0 +1,37 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PocoDoc", "PocoDoc_vs80.vcproj", "{18BCF3CC-9474-4D1C-9445-F783A49D886B}" +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 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|Win32.Build.0 = debug_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|Win32.Build.0 = release_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|Win32.Deploy.0 = release_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|Win32.Build.0 = release_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/PocoDoc/PocoDoc_vs80.vcproj b/PocoDoc/PocoDoc_vs80.vcproj new file mode 100644 index 000000000..169937188 --- /dev/null +++ b/PocoDoc/PocoDoc_vs80.vcproj @@ -0,0 +1,451 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PocoDoc/PocoDoc_vs90.sln b/PocoDoc/PocoDoc_vs90.sln new file mode 100644 index 000000000..3b0507f3e --- /dev/null +++ b/PocoDoc/PocoDoc_vs90.sln @@ -0,0 +1,37 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PocoDoc", "PocoDoc_vs90.vcproj", "{18BCF3CC-9474-4D1C-9445-F783A49D886B}" +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 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|Win32.Build.0 = debug_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|Win32.Build.0 = release_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|Win32.Deploy.0 = release_shared|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|Win32.Build.0 = release_static_md|Win32 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/PocoDoc/PocoDoc_vs90.vcproj b/PocoDoc/PocoDoc_vs90.vcproj new file mode 100644 index 000000000..465dbd497 --- /dev/null +++ b/PocoDoc/PocoDoc_vs90.vcproj @@ -0,0 +1,451 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PocoDoc/PocoDoc_x64_vs100.sln b/PocoDoc/PocoDoc_x64_vs100.sln new file mode 100644 index 000000000..18b9336ca --- /dev/null +++ b/PocoDoc/PocoDoc_x64_vs100.sln @@ -0,0 +1,37 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PocoDoc", "PocoDoc_x64_vs100.vcxproj", "{18BCF3CC-9474-4D1C-9445-F783A49D886B}" +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 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|x64.ActiveCfg = debug_shared|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|x64.Build.0 = debug_shared|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|x64.Deploy.0 = debug_shared|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|x64.ActiveCfg = release_shared|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|x64.Build.0 = release_shared|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|x64.Deploy.0 = release_shared|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|x64.Build.0 = release_static_mt|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|x64.Build.0 = debug_static_md|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|x64.ActiveCfg = release_static_md|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|x64.Build.0 = release_static_md|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|x64.Deploy.0 = release_static_md|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/PocoDoc/PocoDoc_x64_vs100.vcxproj b/PocoDoc/PocoDoc_x64_vs100.vcxproj new file mode 100644 index 000000000..e81c524cf --- /dev/null +++ b/PocoDoc/PocoDoc_x64_vs100.vcxproj @@ -0,0 +1,303 @@ + + + + + debug_shared + x64 + + + debug_static_md + x64 + + + debug_static_mt + x64 + + + release_shared + x64 + + + release_static_md + x64 + + + release_static_mt + x64 + + + + PocoDoc + {18BCF3CC-9474-4D1C-9445-F783A49D886B} + PocoDoc + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + 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 + PocoDocd + PocoDocd + PocoDocd + PocoDoc + PocoDoc + PocoDoc + + + + Disabled + .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebugDLL + true + true + true + true + + Level3 + ProgramDatabase + Default + %(DisableSpecificWarnings) + + + ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\PocoDocd.exe + ..\lib64;%(AdditionalLibraryDirectories) + true + true + bin64\PocoDocd.pdb + Console + MachineX64 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\PocoDoc.exe + ..\lib64;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX64 + + + + + Disabled + .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebug + true + true + true + true + + Level3 + ProgramDatabase + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\static_mt\PocoDocd.exe + ..\lib64;%(AdditionalLibraryDirectories) + true + true + bin64\static_mt\PocoDocd.pdb + Console + MachineX64 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + MultiThreaded + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\static_mt\PocoDoc.exe + ..\lib64;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX64 + + + + + Disabled + .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebugDLL + true + true + true + true + + Level3 + ProgramDatabase + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\static_md\PocoDocd.exe + ..\lib64;%(AdditionalLibraryDirectories) + true + true + bin64\static_md\PocoDocd.pdb + Console + MachineX64 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\static_md\PocoDoc.exe + ..\lib64;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX64 + + + + + + + + + + + + diff --git a/PocoDoc/PocoDoc_x64_vs100.vcxproj.filters b/PocoDoc/PocoDoc_x64_vs100.vcxproj.filters new file mode 100644 index 000000000..c65da2def --- /dev/null +++ b/PocoDoc/PocoDoc_x64_vs100.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {72496a5b-10d3-4fe5-bb78-eadadf59c695} + + + {4aab58a4-9133-4a18-996d-552a86cc6aa6} + + + {bf215e3d-4c92-4b78-a9d1-ade0f77b10b6} + + + {6d62310c-e85b-4790-958d-18815b7fa7bf} + + + {f5178ae5-6258-405a-be96-115d7b1c21e5} + + + {d95a7ab8-2343-4b0b-a210-2c083e680f4d} + + + + + App\Source Files + + + DocWriter\Source Files + + + + + DocWriter\Header Files + + + \ No newline at end of file diff --git a/PocoDoc/PocoDoc_x64_vs100.vcxproj.user b/PocoDoc/PocoDoc_x64_vs100.vcxproj.user new file mode 100644 index 000000000..695b5c78b --- /dev/null +++ b/PocoDoc/PocoDoc_x64_vs100.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/PocoDoc/PocoDoc_x64_vs90.sln b/PocoDoc/PocoDoc_x64_vs90.sln new file mode 100644 index 000000000..b6d923fe3 --- /dev/null +++ b/PocoDoc/PocoDoc_x64_vs90.sln @@ -0,0 +1,37 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PocoDoc", "PocoDoc_x64_vs90.vcproj", "{18BCF3CC-9474-4D1C-9445-F783A49D886B}" +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 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|x64.ActiveCfg = debug_shared|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|x64.Build.0 = debug_shared|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_shared|x64.Deploy.0 = debug_shared|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|x64.ActiveCfg = release_shared|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|x64.Build.0 = release_shared|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_shared|x64.Deploy.0 = release_shared|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|x64.Build.0 = release_static_mt|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|x64.Build.0 = debug_static_md|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|x64.ActiveCfg = release_static_md|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|x64.Build.0 = release_static_md|x64 + {18BCF3CC-9474-4D1C-9445-F783A49D886B}.release_static_md|x64.Deploy.0 = release_static_md|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/PocoDoc/PocoDoc_x64_vs90.vcproj b/PocoDoc/PocoDoc_x64_vs90.vcproj new file mode 100644 index 000000000..c23881b86 --- /dev/null +++ b/PocoDoc/PocoDoc_x64_vs90.vcproj @@ -0,0 +1,451 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PocoDoc/cfg/mkdoc-poco.xml b/PocoDoc/cfg/mkdoc-poco.xml new file mode 100644 index 000000000..919c0cfa6 --- /dev/null +++ b/PocoDoc/cfg/mkdoc-poco.xml @@ -0,0 +1,103 @@ + + + + + ${PocoBuild}/*/include/Poco/*.h + ${PocoBuild}/*/include/Poco/*/*.h + ${PocoBuild}/*/include/Poco/*/*/*.h + ${PocoBuild}/*/include/Poco/*/*.h + ${PocoBuild}/*/*/include/Poco/*/*/*.h + + + *_*.h, + expat*.h, + zconf.h, + zlib.h, + + + + ${PocoBuild}/doc/*.page, + ${PocoBuild}/*/doc/*.page + ${PocoBuild}/*/*/doc/*.page + + + ${PocoBase}/PocoDoc/resources/css, + ${PocoBase}/PocoDoc/resources/images, + ${PocoBase}/PocoDoc/resources/index.html, + ${PocoBase}/PocoDoc/resources/welcome.thtml, + ${PocoBuild}/*/doc/images + + + g++ + + ${Includes}, + -I/usr/local/mysql/include, + -D_DEBUG, + -E, + -C + + + true + + EN + utf-8 + POCO C++ Libraries + Applied Informatics Software Engineering GmbH and Contributors + http://pocoproject.org/ + + + + All Base Classes + All Symbols + Anonymous + Constructors + Class + Deprecated + Description + Destructor + Direct Base Classes + Enumerations + Functions +
Header
+ if and only if + Inheritance + Inherited Functions + is deprecated and should no longer be used + Known Derived Classes + Library + Member Functions + Member Summary + more... + Namespaces + Namespace + Nested Classes + Package + Packages + Package Index + See also + Struct + Symbol Index + This + Types + Variables + Contents + User Guides and Tutorials + Introduction +
+
+ + + + + c1 + warning + + + + + ConsoleChannel + %s: [%p] %t + + + +
diff --git a/PocoDoc/dependencies b/PocoDoc/dependencies new file mode 100644 index 000000000..fca5bc2a0 --- /dev/null +++ b/PocoDoc/dependencies @@ -0,0 +1,4 @@ +Util +CppParser +XML +Foundation diff --git a/PocoDoc/images/%inline.psd b/PocoDoc/images/%inline.psd new file mode 100644 index 000000000..16c904b0f Binary files /dev/null and b/PocoDoc/images/%inline.psd differ diff --git a/PocoDoc/images/%protected.psd b/PocoDoc/images/%protected.psd new file mode 100644 index 000000000..0484d00fa Binary files /dev/null and b/PocoDoc/images/%protected.psd differ diff --git a/PocoDoc/images/%static.psd b/PocoDoc/images/%static.psd new file mode 100644 index 000000000..1a7c4b6b9 Binary files /dev/null and b/PocoDoc/images/%static.psd differ diff --git a/PocoDoc/images/%virtual.psd b/PocoDoc/images/%virtual.psd new file mode 100644 index 000000000..c8226eae2 Binary files /dev/null and b/PocoDoc/images/%virtual.psd differ diff --git a/PocoDoc/images/Icons.key/color-profile b/PocoDoc/images/Icons.key/color-profile new file mode 100644 index 000000000..b21b4aa20 Binary files /dev/null and b/PocoDoc/images/Icons.key/color-profile differ diff --git a/PocoDoc/images/Icons.key/index.apxl.gz b/PocoDoc/images/Icons.key/index.apxl.gz new file mode 100644 index 000000000..825dc7656 Binary files /dev/null and b/PocoDoc/images/Icons.key/index.apxl.gz differ diff --git a/PocoDoc/images/inline.psd b/PocoDoc/images/inline.psd new file mode 100644 index 000000000..8e6cd16f7 Binary files /dev/null and b/PocoDoc/images/inline.psd differ diff --git a/PocoDoc/images/protected.psd b/PocoDoc/images/protected.psd new file mode 100644 index 000000000..853811bcc Binary files /dev/null and b/PocoDoc/images/protected.psd differ diff --git a/PocoDoc/images/static.psd b/PocoDoc/images/static.psd new file mode 100644 index 000000000..c8aaa44f9 Binary files /dev/null and b/PocoDoc/images/static.psd differ diff --git a/PocoDoc/images/virtual.psd b/PocoDoc/images/virtual.psd new file mode 100644 index 000000000..f8fe42078 Binary files /dev/null and b/PocoDoc/images/virtual.psd differ diff --git a/PocoDoc/pages/samplePage.page b/PocoDoc/pages/samplePage.page new file mode 100644 index 000000000..ca2f58348 --- /dev/null +++ b/PocoDoc/pages/samplePage.page @@ -0,0 +1,39 @@ +This is a test page +Category 1 + +Poco::Util::AbstractConfiguration is an abstract base class for different +kinds of configuration data, such as INI files, property files, +XML configuration files or the Windows Registry. + +!!! Large Heading +Configuration property keys have a hierarchical format, consisting +of names separated by periods. The exact interpretation of key names +is up to the actual subclass implementation of AbstractConfiguration. +Keys are case sensitive. This is a link to somewhere else: http://www.appinf.com +!! Medium Heading +All public methods are synchronized, so the class is safe for multithreaded use. +AbstractConfiguration implements reference counting based garbage collection. +!Small Heading +Subclasses must override the getRaw(), setRaw() and enumerate() methods. + +Here is some sample code: + int main(int argc, char** argv) + { + std::cout << "Hello, world!" << std::endl; + return 0; + } + +!Another Paragraph +Here we're -- showing <*italic text*>, and <[teletype text]>. +We can even do <**>! + +We can also refer to config properties: + +And we can even include HTML: +<% +

This is centered

+%> +...and <{inline HTML}>. +And here is ordinary text, again. + +This is an [[http://www.appinf.com external link]]. diff --git a/PocoDoc/resources/css/prettify.css b/PocoDoc/resources/css/prettify.css new file mode 100644 index 000000000..932ffa421 --- /dev/null +++ b/PocoDoc/resources/css/prettify.css @@ -0,0 +1,27 @@ +/* Pretty printing styles. Used with prettify.js. */ + +.str { color: #080; } +.kwd { color: #008; } +.com { color: #800; } +.typ { color: #606; } +.lit { color: #066; } +.pun { color: #660; } +.pln { color: #000; } +.tag { color: #008; } +.atn { color: #606; } +.atv { color: #080; } +.dec { color: #606; } +pre.prettyprint { padding: 2px; border: 1px solid #888; } + +@media print { + .str { color: #060; } + .kwd { color: #006; font-weight: bold; } + .com { color: #600; font-style: italic; } + .typ { color: #404; font-weight: bold; } + .lit { color: #044; } + .pun { color: #440; } + .pln { color: #000; } + .tag { color: #006; font-weight: bold; } + .atn { color: #404; } + .atv { color: #060; } +} diff --git a/PocoDoc/resources/css/styles.css b/PocoDoc/resources/css/styles.css new file mode 100644 index 000000000..a15b9f970 --- /dev/null +++ b/PocoDoc/resources/css/styles.css @@ -0,0 +1 @@ +/* * styles.css * * Style Sheet for Applied Informatics Documentation. * * Copyright (c) 2004-2007, Applied Informatics * */ body { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; color: #000000; background-color: #ffffff; } p, h1, h2, h3, h4, h5, h6, ul, ol, li, td, th, address, blockquote, strong, b, emph, i { font-family: "Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, sans-serif; } p, ul, ol, address, blockquote, h6 { color: black; font-size: 9pt; line-height: 12pt; margin-top: 6px; margin-bottom: 4px; } h1 { color: black; font-size: 18pt; font-weight: normal; line-height: 22pt; margin-top: 12px; margin-right: 0; margin-bottom: 12px; } h1.category, h1.namespace { font-size: 10pt; font-weight: bold; margin-top: 0px; margin-bottom: 8px; margin-left: 16px; margin-right: 16px; line-height: 10pt; background: #0076B8; color: white; } h1.template { font-size: 11pt; margin-top: 0px; margin-bottom: 0px; margin-left: 16px; margin-right: 16px; line-height: 12pt; background: #0076B8; color: white; } h1.title, h1.symbol { font-size: 16pt; margin-top: 0px; margin-bottom: 0px; margin-left: 16px; margin-right: 16px; line-height: 18pt; background: #0076B8; color: white; } div.header { margin-top: 0; margin-left: 0; margin-right: 0; margin-bottom: 0; background: #0076B8; color: white; padding-top: 8px; padding-bottom: 8px; border-bottom-width: 1px; border-bottom-color: #012F50; border-bottom-style: solid; } div.body { margin-top: 16px; margin-left: 16px; margin-right: 16px; } pre { color: #111; background: #F4F4F4; font-size: 8pt; border-bottom-width: 1px; border-bottom-color: #CCCCCC; border-bottom-style: solid; padding-top: 4px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; } h2 { color: black; font-size: 16px; margin-top: 14px; margin-bottom: 0; } h3 { color: black; font-size: 10pt; margin-top: 10px; margin-right: 0; margin-bottom: 0px; background: #CCC; border-bottom-width: 1px; border-bottom-color: #AAA; border-bottom-style: solid; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding-bottom: 2px; } h3.overview { color: black; font-size: 12pt; margin-top: 0; margin-right: 0; margin-bottom: 0px; background: white; border-bottom-width: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; padding-bottom: 0px; } h4 { color: black; font-size: 10pt; margin-top: 10px; margin-bottom: 0; } p.decl { color: black; font-size: 8pt; line-height: 10pt; margin-top: 0; margin-right: 0; margin-bottom: 0; background: #DDD; border-bottom-width: 1px; border-bottom-color: #BBB; border-bottom-style: solid; padding-left: 4px; padding-right: 4px; padding-top: 3px; padding-bottom: 3px; } p.index { font-size: 8pt; line-height: 10pt; } li { font-size: 9pt; color: #000000; margin-left: 0px; margin-bottom: 2px; margin-top: 4px; } ul { padding-left: 0px; margin-left: 2em; list-style-type: disc; list-style-position: outside; list-style-image: url(../images/bullet.gif); margin-top: 4px; } div.toc ul { padding-left: 0px; margin-left: 2em; list-style-type: disc; list-style-position: outside; list-style-image: url(../images/bullet.gif); margin-top: 4px; } li.level1 { font-size: 9pt; color: #000000; margin-left: 0px; margin-bottom: 2px; margin-top: 2px; font-weight: bold; } li.level2 { font-size: 9pt; color: #000000; margin-left: 16px; margin-bottom: 2px; margin-top: 2px; } li.level3 { font-size: 9pt; color: #000000; margin-left: 32px; margin-bottom: 2px; margin-top: 2px; } strong, b { font-weight: bold; } emph, i { font-style: italic; } .address { line-height: 11pt; margin-bottom: 4px; } .footer { font-size: 7pt; font-family: Verdana, Arial, Helvetica, sans-serif; text-align: left; line-height: 9pt; margin-top: 16px; margin-left: 0; margin-right: 0; margin-bottom: 10px; } a:link { color: #069; text-decoration: underline; } a:visited { color: #069; text-decoration: underline; } a:active { color: #069; text-decoration: underline; } a:hover { color: #069; text-decoration: underline; } a.namespace:link { color: white; text-decoration: none; } a.namespace:visited { color: white; text-decoration: none; } a.namespace:active { color: white; text-decoration: underline; } a.namespace:hover { color: white; text-decoration: underline; } a.class:link { color: black; text-decoration: none; } a.class:visited { color: black; text-decoration: none; } a.class:active { color: #069; text-decoration: underline; } a.class:hover { color: #069; text-decoration: underline; } a.footer:link { color: #069; text-decoration: underline; } a.footer:visited { color: #069; text-decoration: underline; } a.footer:active { color: #069; text-decoration: underline; } a.footer:hover { color: #069; text-decoration: underline; } h3.overview a:link, h3.overview a:visited { color: black; text-decoration: none; } h3.overview a:active, h3.overview a:hover { color: #069; text-decoration: none; } h2 a:link, h3 a:link, h4 a:link { color: black; text-decoration: none; } h2 a:visited, h3 a:visited, h4 a:visited { color: black; text-decoration: none; } h2 a:active, h3 a:active, h4 a:active { color: black; text-decoration: none; } h2 a:hover, h3 a:hover, h4 a:hover { color: black; text-decoration: none; } li.level1 a:link, li.level2 a:link, li.level3 a:link { color: #069; text-decoration: underline; } li.level1 a:visited, li.level2 a:visited, li.level3 a:visited { color: #069; text-decoration: underline; } li.level1 a:active, li.level2 a:active, li.level3 a:active { color: #069; text-decoration: underline; } li.level1 a:hover, li.level2 a:hover, li.level3 a:hover { color: #069; text-decoration: underline; } .image { margin-top: 10px; margin-bottom: 10px; } .imagecaption { font-family: "Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, sans-serif; color: black; font-size: 9pt; line-height: 12pt; font-style: italic; margin-top: 4px; margin-bottom: 0px; } \ No newline at end of file diff --git a/PocoDoc/resources/go.php b/PocoDoc/resources/go.php new file mode 100644 index 000000000..ee519e498 --- /dev/null +++ b/PocoDoc/resources/go.php @@ -0,0 +1,30 @@ + + + + +POCO C++ Libraries + + + + + + + + + +<h1>Frames Required</h1> +<p>This document is designed to be viewed using the frames feature. +If you see this message, you are using a non-frame-capable web client.</p> + + diff --git a/PocoDoc/resources/images/arrow.gif b/PocoDoc/resources/images/arrow.gif new file mode 100644 index 000000000..191c7cfa6 Binary files /dev/null and b/PocoDoc/resources/images/arrow.gif differ diff --git a/PocoDoc/resources/images/background.jpg b/PocoDoc/resources/images/background.jpg new file mode 100644 index 000000000..e897bf9ab Binary files /dev/null and b/PocoDoc/resources/images/background.jpg differ diff --git a/PocoDoc/resources/images/bottom.jpg b/PocoDoc/resources/images/bottom.jpg new file mode 100644 index 000000000..3d9c75860 Binary files /dev/null and b/PocoDoc/resources/images/bottom.jpg differ diff --git a/PocoDoc/resources/images/bullet.gif b/PocoDoc/resources/images/bullet.gif new file mode 100644 index 000000000..0bd6fca23 Binary files /dev/null and b/PocoDoc/resources/images/bullet.gif differ diff --git a/PocoDoc/resources/images/header.jpg b/PocoDoc/resources/images/header.jpg new file mode 100644 index 000000000..61dc53c09 Binary files /dev/null and b/PocoDoc/resources/images/header.jpg differ diff --git a/PocoDoc/resources/images/inline.gif b/PocoDoc/resources/images/inline.gif new file mode 100644 index 000000000..bcc711896 Binary files /dev/null and b/PocoDoc/resources/images/inline.gif differ diff --git a/PocoDoc/resources/images/poco.png b/PocoDoc/resources/images/poco.png new file mode 100644 index 000000000..160e29d74 Binary files /dev/null and b/PocoDoc/resources/images/poco.png differ diff --git a/PocoDoc/resources/images/protected.gif b/PocoDoc/resources/images/protected.gif new file mode 100644 index 000000000..2cc9bdc5b Binary files /dev/null and b/PocoDoc/resources/images/protected.gif differ diff --git a/PocoDoc/resources/images/static.gif b/PocoDoc/resources/images/static.gif new file mode 100644 index 000000000..4f2222f22 Binary files /dev/null and b/PocoDoc/resources/images/static.gif differ diff --git a/PocoDoc/resources/images/title.jpg b/PocoDoc/resources/images/title.jpg new file mode 100644 index 000000000..31d1df553 Binary files /dev/null and b/PocoDoc/resources/images/title.jpg differ diff --git a/PocoDoc/resources/images/virtual.gif b/PocoDoc/resources/images/virtual.gif new file mode 100644 index 000000000..e475060ed Binary files /dev/null and b/PocoDoc/resources/images/virtual.gif differ diff --git a/PocoDoc/resources/index.html b/PocoDoc/resources/index.html new file mode 100644 index 000000000..c401cc70e --- /dev/null +++ b/PocoDoc/resources/index.html @@ -0,0 +1,18 @@ + + + +POCO C++ Libraries + + + + + + + + + +<h1>Frames Required</h1> +<p>This document is designed to be viewed using the frames feature. +If you see this message, you are using a non-frame-capable web client.</p> + + diff --git a/PocoDoc/resources/js/prettify.js b/PocoDoc/resources/js/prettify.js new file mode 100644 index 000000000..63672b318 --- /dev/null +++ b/PocoDoc/resources/js/prettify.js @@ -0,0 +1,1432 @@ +// Copyright (C) 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +/** + * @fileoverview + * some functions for browser-side pretty printing of code contained in html. + * + * The lexer should work on a number of languages including C and friends, + * Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles. + * It works passably on Ruby, PHP and Awk and a decent subset of Perl, but, + * because of commenting conventions, doesn't work on Smalltalk, Lisp-like, or + * CAML-like languages. + * + * If there's a language not mentioned here, then I don't know it, and don't + * know whether it works. If it has a C-like, Bash-like, or XML-like syntax + * then it should work passably. + * + * Usage: + * 1) include this source file in an html page via + * + * 2) define style rules. See the example page for examples. + * 3) mark the
 and  tags in your source with class=prettyprint.
+ *    You can also use the (html deprecated)  tag, but the pretty printer
+ *    needs to do more substantial DOM manipulations to support that, so some
+ *    css styles may not be preserved.
+ * That's it.  I wanted to keep the API as simple as possible, so there's no
+ * need to specify which language the code is in.
+ *
+ * Change log:
+ * cbeust, 2006/08/22
+ *   Java annotations (start with "@") are now captured as literals ("lit")
+ */
+
+var PR_keywords = new Object();
+/** initialize the keyword list for our target languages. */
+(function () {
+  var CPP_KEYWORDS = (
+    "bool break case catch char class const const_cast continue default " +
+    "delete deprecated dllexport dllimport do double dynamic_cast else enum " +
+    "explicit extern false float for friend goto if inline int long mutable " +
+    "naked namespace new noinline noreturn nothrow novtable operator private " +
+    "property protected public register reinterpret_cast return selectany " +
+    "short signed sizeof static static_cast struct switch template this " +
+    "thread throw true try typedef typeid typename union unsigned using " +
+    "declaration, using directive uuid virtual void volatile while typeof");
+  var JAVA_KEYWORDS = (
+    "abstract default goto package synchronized boolean do if private this " +
+    "break double implements protected throw byte else import public throws " +
+    "case enum instanceof return transient catch extends int short try char " +
+    "final interface static void class finally long strictfp volatile const " +
+    "float native super while continue for new switch");
+  var PYTHON_KEYWORDS = (
+    "and assert break class continue def del elif else except exec finally " +
+    "for from global if import in is lambda not or pass print raise return " +
+    "try while yield False True None");
+  var JSCRIPT_KEYWORDS = (
+    "abstract boolean break byte case catch char class const continue " +
+    "debugger default delete do double else enum export extends false final " +
+    "finally float for function goto if implements import in instanceof int " +
+    "interface long native new null package private protected public return " +
+    "short static super switch synchronized this throw throws transient " +
+    "true try typeof var void volatile while with NaN Infinity");
+  var PERL_KEYWORDS = (
+    "foreach require sub unless until use elsif BEGIN END");
+  var SH_KEYWORDS = (
+    "if then do done else fi end");
+  var RUBY_KEYWORDS = (
+      "if then elsif else end begin do rescue ensure while for class module " +
+      "def yield raise until unless and or not when case super undef break " +
+      "next redo retry in return alias defined");
+  var KEYWORDS = [CPP_KEYWORDS, JAVA_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS,
+                  PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
+  for (var k = 0; k < KEYWORDS.length; k++) {
+    var kw = KEYWORDS[k].split(' ');
+    for (var i = 0; i < kw.length; i++) {
+      if (kw[i]) { PR_keywords[kw[i]] = true; }
+    }
+  }
+}).call(this);
+
+// token style names.  correspond to css classes
+/** token style for a string literal */
+var PR_STRING = 'str';
+/** token style for a keyword */
+var PR_KEYWORD = 'kwd';
+/** token style for a comment */
+var PR_COMMENT = 'com';
+/** token style for a type */
+var PR_TYPE = 'typ';
+/** token style for a literal value.  e.g. 1, null, true. */
+var PR_LITERAL = 'lit';
+/** token style for a punctuation string. */
+var PR_PUNCTUATION = 'pun';
+/** token style for a punctuation string. */
+var PR_PLAIN = 'pln';
+
+/** token style for an sgml tag. */
+var PR_TAG = 'tag';
+/** token style for a markup declaration such as a DOCTYPE. */
+var PR_DECLARATION = 'dec';
+/** token style for embedded source. */
+var PR_SOURCE = 'src';
+/** token style for an sgml attribute name. */
+var PR_ATTRIB_NAME = 'atn';
+/** token style for an sgml attribute value. */
+var PR_ATTRIB_VALUE = 'atv';
+
+/** the position of the end of a token during.  A division of a string into
+  * n tokens can be represented as a series n - 1 token ends, as long as
+  * runs of whitespace warrant their own token.
+  * @private
+  */
+function PR_TokenEnd(end, style) {
+  if (undefined === style) { throw new Error('BAD'); }
+  if ('number' != typeof(end)) { throw new Error('BAD'); }
+  this.end = end;
+  this.style = style;
+}
+PR_TokenEnd.prototype.toString = function () {
+  return '[PR_TokenEnd ' + this.end +
+    (this.style ? ':' + this.style : '') + ']';
+};
+
+
+/** a chunk of text with a style.  These are used to represent both the output
+  * from the lexing functions as well as intermediate results.
+  * @constructor
+  * @param token the token text
+  * @param style one of the token styles defined in designdoc-template, or null
+  *   for a styleless token, such as an embedded html tag.
+  * @private
+  */
+function PR_Token(token, style) {
+  if (undefined === style) { throw new Error('BAD'); }
+  this.token = token;
+  this.style = style;
+}
+
+PR_Token.prototype.toString = function () {
+  return '[PR_Token ' + this.token + (this.style ? ':' + this.style : '') + ']';
+};
+
+
+/** a helper class that decodes common html entities used to escape source and
+  * markup punctuation characters in html.
+  * @constructor
+  * @private
+  */
+function PR_DecodeHelper() {
+  this.next = 0;
+  this.ch = '\0';
+}
+
+PR_DecodeHelper.prototype.decode = function (s, i) {
+  var next = i + 1;
+  var ch = s.charAt(i);
+  if ('&' == ch) {
+    var semi = s.indexOf(';', next);
+    if (semi >= 0 && semi < next + 4) {
+      var entityName = s.substring(next, semi).toLowerCase();
+      next = semi + 1;
+      if ('lt' == entityName) {
+        ch = '<';
+      } else if ('gt' == entityName) {
+        ch = '>';
+      } else if ('quot' == entityName) {
+        ch = '"';
+      } else if ('apos' == entityName) {
+        ch = '\'';
+      } else if ('amp' == entityName) {
+        ch = '&';
+      } else {
+        next = i + 1;
+      }
+    }
+  }
+  this.next = next;
+  this.ch = ch;
+  return this.ch;
+}
+
+
+// some string utilities
+function PR_isWordChar(ch) {
+  return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z');
+}
+
+function PR_isIdentifierStart(ch) {
+  return PR_isWordChar(ch) || ch == '_' || ch == '$' || ch == '@';
+}
+
+function PR_isIdentifierPart(ch) {
+  return PR_isIdentifierStart(ch) || PR_isDigitChar(ch);
+}
+
+function PR_isSpaceChar(ch) {
+  return "\t \r\n".indexOf(ch) >= 0;
+}
+
+function PR_isDigitChar(ch) {
+  return ch >= '0' && ch <= '9';
+}
+
+function PR_trim(s) {
+  var i = 0, j = s.length - 1;
+  while (i <= j && PR_isSpaceChar(s.charAt(i))) { ++i; }
+  while (j > i && PR_isSpaceChar(s.charAt(j))) { --j; }
+  return s.substring(i, j + 1);
+}
+
+function PR_startsWith(s, prefix) {
+  return s.length >= prefix.length && prefix == s.substring(0, prefix.length);
+}
+
+function PR_endsWith(s, suffix) {
+  return s.length >= suffix.length &&
+         suffix == s.substring(s.length - suffix.length, s.length);
+}
+
+/** true iff prefix matches the first prefix characters in chars[0:len].
+  * @private
+  */
+function PR_prefixMatch(chars, len, prefix) {
+  if (len < prefix.length) { return false; }
+  for (var i = 0, n = prefix.length; i < n; ++i) {
+    if (prefix.charAt(i) != chars[i]) { return false; }
+  }
+  return true;
+}
+
+/** like textToHtml but escapes double quotes to be attribute safe. */
+function PR_attribToHtml(str) {
+  return str.replace(/&/g, '&amp;')
+    .replace(/</g, '&lt;')
+    .replace(/>/g, '&gt;')
+    .replace(/\"/g, '&quot;')
+    .replace(/\xa0/, '&nbsp;');
+}
+
+/** escapest html special characters to html. */
+function PR_textToHtml(str) {
+  return str.replace(/&/g, '&amp;')
+    .replace(/</g, '&lt;')
+    .replace(/>/g, '&gt;')
+    .replace(/\xa0/g, '&nbsp;');
+}
+
+/** is the given node's innerHTML normally unescaped? */
+function PR_isRawContent(node) {
+  return 'XMP' == node.tagName;
+}
+
+var PR_innerHtmlWorks = null;
+function PR_getInnerHtml(node) {
+  // inner html is hopelessly broken in Safari 2.0.4 when the content is
+  // an html description of well formed XML and the containing tag is a PRE
+   // tag, so we detect that case and emulate innerHTML.
+  if (null == PR_innerHtmlWorks) {
+    var testNode = document.createElement('PRE');
+    testNode.appendChild(
+        document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));
+    PR_innerHtmlWorks = !/</.test(testNode.innerHTML);
+  }
+
+  if (PR_innerHtmlWorks) {
+    var content = node.innerHTML;
+    // XMP tags contain unescaped entities so require special handling.
+    if (PR_isRawContent(node)) {
+       content = PR_textToHtml(content);
+    }
+    return content;
+  }
+
+  var out = [];
+  for (var child = node.firstChild; child; child = child.nextSibling) {
+    PR_normalizedHtml(child, out);
+  }
+  return out.join('');
+}
+
+/**
+ * walks the DOM returning a properly escaped version of innerHTML.
+ */
+function PR_normalizedHtml(node, out) {
+  switch (node.nodeType) {
+    case 1:  // an element
+      var name = node.tagName.toLowerCase();
+      out.push('\074', name);
+      for (var i = 0; i < node.attributes.length; ++i) {
+        var attr = node.attributes[i];
+        if (!attr.specified) { continue; }
+        out.push(' ');
+        PR_normalizedHtml(attr, out);
+      }
+      out.push('>');
+      for (var child = node.firstChild; child; child = child.nextSibling) {
+        PR_normalizedHtml(child, out);
+      }
+      if (node.firstChild || !/^(?:br|link|img)$/.test(name)) {
+        out.push('<\/', name, '>');
+      }
+      break;
+    case 2: // an attribute
+      out.push(node.name.toLowerCase(), '="', PR_attribToHtml(node.value), '"');
+      break;
+    case 3: case 4: // text
+      out.push(PR_textToHtml(node.nodeValue));
+      break;
+  }
+}
+
+
+/** split markup into chunks of html tags (style null) and
+  * plain text (style {@link #PR_PLAIN}).
+  *
+  * @param s a String of html.
+  * @return an Array of PR_Tokens of style PR_PLAIN and null.
+  * @private
+  */
+function PR_chunkify(s) {
+  var chunks = new Array();
+  var state = 0;
+  var start = 0;
+  var pos = -1;
+  for (var i = 0, n = s.length; i < n; ++i) {
+    var ch = s.charAt(i);
+    switch (state) {
+      case 0:
+        if ('<' == ch) { state = 1; }
+        break;
+      case 1:
+        pos = i - 1;
+        if ('/' == ch) { state = 2; }
+        else if (PR_isWordChar(ch)) { state = 3; }
+        else if ('<' == ch) { state = 1; }
+        else { state = 0; }
+        break;
+      case 2:
+        if (PR_isWordChar(ch)) { state = 3; }
+        else if ('<' == ch) { state = 1; }
+        else { state = 0; }
+        break;
+      case 3:
+        if ('>' == ch) {
+          if (pos > start) {
+            chunks.push(new PR_Token(s.substring(start, pos), PR_PLAIN));
+          }
+          chunks.push(new PR_Token(s.substring(pos, i + 1), null));
+          start = i + 1;
+          pos = -1;
+          state = 0;
+        }
+        break;
+    }
+  }
+  if (s.length > start) {
+    chunks.push(new PR_Token(s.substring(start, s.length), PR_PLAIN));
+  }
+  return chunks;
+}
+
+/** splits chunks around entities.
+  * @private
+  */
+function PR_splitEntities(chunks) {
+  var chunksOut = new Array();
+  var state = 0;
+  for (var ci = 0, nc = chunks.length; ci < nc; ++ci) {
+    var chunk = chunks[ci];
+    if (PR_PLAIN != chunk.style) {
+      chunksOut.push(chunk);
+      continue;
+    }
+    var s = chunk.token;
+    var pos = 0;
+    var start;
+    for (var i = 0; i < s.length; ++i) {
+      var ch = s.charAt(i);
+      switch (state) {
+        case 0:
+          if ('&' == ch) { state = 1; }
+          break;
+        case 1:
+          if ('#' == ch || PR_isWordChar(ch)) {
+            start = i - 1;
+            state = 2;
+          } else {
+            state = 0;
+          }
+          break;
+        case 2:
+          if (';' == ch) {
+            if (start > pos) {
+              chunksOut.push(
+                  new PR_Token(s.substring(pos, start), chunk.style));
+            }
+            chunksOut.push(new PR_Token(s.substring(start, i + 1), null));
+            pos = i + 1;
+            state = 0;
+          }
+          break;
+      }
+    }
+    if (s.length > pos) {
+      chunksOut.push(pos ?
+                     new PR_Token(s.substring(pos, s.length), chunk.style) :
+                     chunk);
+    }
+  }
+  return chunksOut;
+}
+
+/** walk the tokenEnds list and the chunk list in parallel to generate a list
+  * of split tokens.
+  * @private
+  */
+function PR_splitChunks(chunks, tokenEnds) {
+  var tokens = new Array();  // the output
+
+  var ci = 0;  // index into chunks
+  // position of beginning of amount written so far in absolute space.
+  var posAbs = 0;
+  // position of amount written so far in chunk space
+  var posChunk = 0;
+
+  // current chunk
+  var chunk = new PR_Token('', null);
+
+  for (var ei = 0, ne = tokenEnds.length; ei < ne; ++ei) {
+    var tokenEnd = tokenEnds[ei];
+    var end = tokenEnd.end;
+
+    var tokLen = end - posAbs;
+    var remainingInChunk = chunk.token.length - posChunk;
+    while (remainingInChunk <= tokLen) {
+      if (remainingInChunk > 0) {
+        tokens.push(
+            new PR_Token(chunk.token.substring(posChunk, chunk.token.length),
+                         null == chunk.style ? null : tokenEnd.style));
+      }
+      posAbs += remainingInChunk;
+      posChunk = 0;
+      if (ci < chunks.length) { chunk = chunks[ci++]; }
+
+      tokLen = end - posAbs;
+      remainingInChunk = chunk.token.length - posChunk;
+    }
+
+    if (tokLen) {
+      tokens.push(
+          new PR_Token(chunk.token.substring(posChunk, posChunk + tokLen),
+                       tokenEnd.style));
+      posAbs += tokLen;
+      posChunk += tokLen;
+    }
+  }
+
+  return tokens;
+}
+
+/** splits markup tokens into declarations, tags, and source chunks.
+  * @private
+  */
+function PR_splitMarkup(chunks) {
+  // A state machine to split out declarations, tags, etc.
+  // This state machine deals with absolute space in the text, indexed by k,
+  // and position in the current chunk, indexed by pos and tokenStart to
+  // generate a list of the ends of tokens.
+  // Absolute space is calculated by considering the chunks as appended into
+  // one big string, as they were before being split.
+
+  // Known failure cases
+  // Server side scripting sections such as <?...?> in attributes.
+  // i.e. <span class="<? foo ?>">
+  // Handling this would require a stack, and we don't use PHP.
+
+  // The output: a list of pairs of PR_TokenEnd instances
+  var tokenEnds = new Array();
+
+  var state = 0;  // FSM state variable
+  var k = 0;  // position in absolute space of the start of the current chunk
+  var tokenStart = -1;  // the start of the current token
+
+  // Try to find a closing tag for any open <style> or <script> tags
+  // We can't do this at a later stage because then the following case
+  // would fail:
+  // <script>document.writeln('<!--');</script>
+
+  // We use tokenChars[:tokenCharsI] to accumulate the tag name so that we
+  // can check whether to enter into a no scripting section when the tag ends.
+  var tokenChars = new Array(12);
+  var tokenCharsI = 0;
+  // if non null, the tag prefix that we need to see to break out.
+  var endScriptTag = null;
+  var decodeHelper = new PR_DecodeHelper();
+
+  for (var ci = 0, nc = chunks.length; ci < nc; ++ci) {
+    var chunk = chunks[ci];
+    if (PR_PLAIN != chunk.style) {
+      k += chunk.token.length;
+      continue;
+    }
+
+    var s = chunk.token;
+    var pos = 0;  // the position past the last character processed so far in s
+
+    for (var i = 0, n = s.length; i < n; /* i = next at bottom */) {
+      decodeHelper.decode(s, i);
+      var ch = decodeHelper.ch;
+      var next = decodeHelper.next;
+
+      var tokenStyle = null;
+      switch (state) {
+        case 0:
+          if ('<' == ch) { state = 1; }
+          break;
+        case 1:
+          tokenCharsI = 0;
+          if ('/' == ch) {  // only consider close tags if we're in script/style
+            state = 7;
+          } else if (null == endScriptTag) {
+            if ('!' == ch) {
+              state = 2;
+            } else if (PR_isWordChar(ch)) {
+              state = 8;
+            } else if ('?' == ch) {
+              state = 9;
+            } else if ('%' == ch) {
+              state = 11;
+            } else if ('<' != ch) {
+              state = 0;
+            }
+          } else if ('<' != ch) {
+            state = 0;
+          }
+          break;
+        case 2:
+          if ('-' == ch) {
+            state = 4;
+          } else if (PR_isWordChar(ch)) {
+            state = 3;
+          } else if ('<' == ch) {
+            state = 1;
+          } else {
+            state = 0;
+          }
+          break;
+        case 3:
+          if ('>' == ch) {
+            state = 0;
+            tokenStyle = PR_DECLARATION;
+          }
+          break;
+        case 4:
+          if ('-' == ch) { state = 5; }
+          break;
+        case 5:
+          if ('-' == ch) { state = 6; }
+          break;
+        case 6:
+          if ('>' == ch) {
+            state = 0;
+            tokenStyle = PR_COMMENT;
+          } else if ('-' == ch) {
+            state = 6;
+          } else {
+            state = 4;
+          }
+          break;
+        case 7:
+          if (PR_isWordChar(ch)) {
+            state = 8;
+          } else if ('<' == ch) {
+            state = 1;
+          } else {
+            state = 0;
+          }
+          break;
+        case 8:
+          if ('>' == ch) {
+            state = 0;
+            tokenStyle = PR_TAG;
+          }
+          break;
+        case 9:
+          if ('?' == ch) { state = 10; }
+          break;
+        case 10:
+          if ('>' == ch) {
+            state = 0;
+            tokenStyle = PR_SOURCE;
+          } else if ('?' != ch) {
+            state = 9;
+          }
+          break;
+        case 11:
+          if ('%' == ch) { state = 12; }
+          break;
+        case 12:
+          if ('>' == ch) {
+            state = 0;
+            tokenStyle = PR_SOURCE;
+          } else if ('%' != ch) {
+            state = 11;
+          }
+          break;
+      }
+
+      if (tokenCharsI < tokenChars.length) {
+        tokenChars[tokenCharsI++] = ch.toLowerCase();
+      }
+      if (1 == state) { tokenStart = k + i; }
+      i = next;
+      if (tokenStyle != null) {
+        if (null != tokenStyle) {
+          if (endScriptTag) {
+            if (PR_prefixMatch(tokenChars, tokenCharsI, endScriptTag)) {
+              endScriptTag = null;
+            }
+          } else {
+            if (PR_prefixMatch(tokenChars, tokenCharsI, 'script')) {
+              endScriptTag = '/script';
+            } else if (PR_prefixMatch(tokenChars, tokenCharsI, 'style')) {
+              endScriptTag = '/style';
+            } else if (PR_prefixMatch(tokenChars, tokenCharsI, 'xmp')) {
+              endScriptTag = '/xmp';
+            }
+          }
+          // disallow the tag if endScriptTag is set and this was not an open
+          // tag.
+          if (endScriptTag && tokenCharsI && '/' == tokenChars[0]) {
+            tokenStyle = null;
+          }
+        }
+        if (null != tokenStyle) {
+          tokenEnds.push(new PR_TokenEnd(tokenStart, PR_PLAIN));
+          tokenEnds.push(new PR_TokenEnd(k + next, tokenStyle));
+        }
+      }
+    }
+    k += chunk.token.length;
+  }
+  tokenEnds.push(new PR_TokenEnd(k, PR_PLAIN));
+
+  return tokenEnds;
+}
+
+/** splits the given string into comment, string, and "other" tokens.
+  * @return an array of PR_Tokens with style in
+  *   (PR_STRING, PR_COMMENT, PR_PLAIN, null)
+  *   The result array may contain spurious zero length tokens.  Ignore them.
+  *
+  * @private
+  */
+function PR_splitStringAndCommentTokens(chunks) {
+  // a state machine to split out comments, strings, and other stuff
+  var tokenEnds = new Array();  // positions of ends of tokens in absolute space
+  var state = 0;  // FSM state variable
+  var delim = -1;  // string delimiter
+  var k = 0;  // absolute position of beginning of current chunk
+  for (var ci = 0, nc = chunks.length; ci < nc; ++ci) {
+    var chunk = chunks[ci];
+    var s = chunk.token;
+    if (PR_PLAIN == chunk.style) {
+      for (var i = 0, n = s.length; i < n; ++i) {
+        var ch = s.charAt(i);
+        if (0 == state) {
+          if (ch == '"' || ch == '\'' || ch == '`') {
+            tokenEnds.push(new PR_TokenEnd(k + i, PR_PLAIN));
+            state = 1;
+            delim = ch;
+          } else if (ch == '/') {
+            state = 3;
+          } else if (ch == '#') {
+            tokenEnds.push(new PR_TokenEnd(k + i, PR_PLAIN));
+            state = 4;
+          }
+        } else if (1 == state) {
+          if (ch == delim) {
+            state = 0;
+            tokenEnds.push(new PR_TokenEnd(k + i + 1, PR_STRING));
+          } else if (ch == '\\') {
+            state = 2;
+          }
+        } else if (2 == state) {
+          state = 1;
+        } else if (3 == state) {
+          if (ch == '/') {
+            state = 4;
+            tokenEnds.push(new PR_TokenEnd(k + i - 1, PR_PLAIN));
+          } else if (ch == '*') {
+            state = 5;
+            tokenEnds.push(new PR_TokenEnd(k + i - 1, PR_PLAIN));
+          } else {
+            state = 0;
+            // next loop will reenter state 0 without same value of i, so
+            // ch will be reconsidered as start of new token.
+            --i;
+          }
+        } else if (4 == state) {
+          if (ch == '\r' || ch == '\n') {
+            state = 0;
+            tokenEnds.push(new PR_TokenEnd(k + i, PR_COMMENT));
+          }
+        } else if (5 == state) {
+          if (ch == '*') {
+            state = 6;
+          }
+        } else if (6 == state) {
+          if (ch == '/') {
+            state = 0;
+            tokenEnds.push(new PR_TokenEnd(k + i + 1, PR_COMMENT));
+          } else if (ch != '*') {
+            state = 5;
+          }
+        }
+      }
+    }
+    k += s.length;
+  }
+  var endTokenType;
+  switch (state) {
+    case 1: case 2:
+      endTokenType = PR_STRING;
+      break;
+    case 4: case 5: case 6:
+      endTokenType = PR_COMMENT;
+      break;
+    default:
+      endTokenType = PR_PLAIN;
+      break;
+  }
+  // handle unclosed token which can legally happen for line comments (state 4)
+  tokenEnds.push(new PR_TokenEnd(k, endTokenType));  // a token ends at the end
+
+  return PR_splitChunks(chunks, tokenEnds);
+}
+
+/** used by lexSource to split a non string, non comment token.
+  * @private
+  */
+function PR_splitNonStringNonCommentToken(s, outlist) {
+  var pos = 0;
+  var state = 0;
+  for (var i = 0; i <= s.length; i++) {
+    var ch = s.charAt(i);
+    // the next state.
+    // if set to -1 then it will cause a reentry to state 0 without consuming
+    // another character.
+    var nstate = state;
+
+    if (i == s.length) {
+      // nstate will not be equal to state, so it will append the token
+      nstate = -2;
+    } else {
+      switch (state) {
+      case 0:  // whitespace state
+        if (PR_isIdentifierStart(ch)) {
+          nstate = 1;
+        } else if (PR_isDigitChar(ch)) {
+          nstate = 2;
+        } else if (!PR_isSpaceChar(ch)) {
+          nstate = 3;
+        }
+        if (nstate && pos < i) {
+          var t = s.substring(pos, i);
+          outlist.push(new PR_Token(t, PR_PLAIN));
+          pos = i;
+        }
+        break;
+      case 1:  // identifier state
+        if (!PR_isIdentifierPart(ch)) {
+          nstate = -1;
+        }
+        break;
+      case 2:  // number literal state
+        // handle numeric literals like
+        // 0x7f 300UL 100_000
+
+        // this does not treat floating point values as a single literal
+        //   0.1 and 3e-6
+        // are each split into multiple tokens
+        if (!(PR_isDigitChar(ch) || PR_isWordChar(ch) || ch == '_')) {
+          nstate = -1;
+        }
+        break;
+      case 3:  // punctuation state
+        if (PR_isIdentifierStart(ch) || PR_isDigitChar(ch) ||
+            PR_isSpaceChar(ch)) {
+          nstate = -1;
+        }
+        break;
+      }
+    }
+
+    if (nstate != state) {
+      if (nstate < 0) {
+        if (i > pos) {
+          var t = s.substring(pos, i);
+          var ch0 = t.charAt(0);
+          var style;
+          if (PR_isIdentifierStart(ch0)) {
+            if (PR_keywords[t]) {
+              style = PR_KEYWORD;
+            } else if (ch0 === '@') {
+              style = PR_LITERAL;
+            } else {
+              // Treat any word that starts with an uppercase character and
+              // contains at least one lowercase character as a type, or
+              // ends with _t.
+              // This works perfectly for Java, pretty well for C++, and
+              // passably for Python.  The _t catches C structs.
+              var isType = false;
+              if (ch0 >= 'A' && ch0 <= 'Z') {
+                for (var j = 1; j < t.length; j++) {
+                  var ch1 = t.charAt(j);
+                  if (ch1 >= 'a' && ch1 <= 'z') {
+                    isType = true;
+                    break;
+                  }
+                }
+                if (!isType && t.length >= 2 &&
+                    t.substring(t.length - 2) == '_t') {
+                  isType = true;
+                }
+              }
+              style = isType ? PR_TYPE : PR_PLAIN;
+            }
+          } else if (PR_isDigitChar(ch0)) {
+            style = PR_LITERAL;
+          } else if (!PR_isSpaceChar(ch0)) {
+            style = PR_PUNCTUATION;
+          } else {
+            style = PR_PLAIN;
+          }
+          pos = i;
+          outlist.push(new PR_Token(t, style));
+        }
+
+        state = 0;
+        if (nstate == -1) {
+          // don't increment.  This allows us to use state 0 to redispatch based
+          // on the current character.
+          i--;
+          continue;
+        }
+      }
+      state = nstate;
+    }
+  }
+}
+
+/** split a group of chunks of markup.
+  * @private
+  */
+function PR_tokenizeMarkup(chunks) {
+  if (!(chunks && chunks.length)) { return chunks; }
+
+  var tokenEnds = PR_splitMarkup(chunks);
+  return PR_splitChunks(chunks, tokenEnds);
+}
+
+/** split tags attributes and their values out from the tag name, and
+  * recursively lex source chunks.
+  * @private
+  */
+function PR_splitTagAttributes(tokens) {
+  var tokensOut = new Array();
+  var state = 0;
+  var stateStyle = PR_TAG;
+  var delim = null;  // attribute delimiter for quoted value state.
+  var decodeHelper = new PR_DecodeHelper();
+  for (var ci = 0; ci < tokens.length; ++ci) {
+    var tok = tokens[ci];
+    if (PR_TAG == tok.style) {
+      var s = tok.token;
+      var start = 0;
+      for (var i = 0; i < s.length; /* i = next at bottom */) {
+        decodeHelper.decode(s, i);
+        var ch = decodeHelper.ch;
+        var next = decodeHelper.next;
+
+        var emitEnd = null;  // null or position of end of chunk to emit.
+        var nextStyle = null;  // null or next value of stateStyle
+        if (ch == '>') {
+          if (PR_TAG != stateStyle) {
+            emitEnd = i;
+            nextStyle = PR_TAG;
+          }
+        } else {
+          switch (state) {
+            case 0:
+              if ('<' == ch) { state = 1; }
+              break;
+            case 1:
+              if (PR_isSpaceChar(ch)) { state = 2; }
+              break;
+            case 2:
+              if (!PR_isSpaceChar(ch)) {
+                nextStyle = PR_ATTRIB_NAME;
+                emitEnd = i;
+                state = 3;
+              }
+              break;
+            case 3:
+              if ('=' == ch) {
+                emitEnd = i;
+                nextStyle = PR_TAG;
+                state = 5;
+              } else if (PR_isSpaceChar(ch)) {
+                emitEnd = i;
+                nextStyle = PR_TAG;
+                state = 4;
+              }
+              break;
+            case 4:
+              if ('=' == ch) {
+                state = 5;
+              } else if (!PR_isSpaceChar(ch)) {
+                emitEnd = i;
+                nextStyle = PR_ATTRIB_NAME;
+                state = 3;
+              }
+              break;
+            case 5:
+              if ('"' == ch || '\'' == ch) {
+                emitEnd = i;
+                nextStyle = PR_ATTRIB_VALUE;
+                state = 6;
+                delim = ch;
+              } else if (!PR_isSpaceChar(ch)) {
+                emitEnd = i;
+                nextStyle = PR_ATTRIB_VALUE;
+                state = 7;
+              }
+              break;
+            case 6:
+              if (ch == delim) {
+                emitEnd = next;
+                nextStyle = PR_TAG;
+                state = 2;
+              }
+              break;
+            case 7:
+              if (PR_isSpaceChar(ch)) {
+                emitEnd = i;
+                nextStyle = PR_TAG;
+                state = 2;
+              }
+              break;
+          }
+        }
+        if (emitEnd) {
+          if (emitEnd > start) {
+            tokensOut.push(
+                new PR_Token(s.substring(start, emitEnd), stateStyle));
+            start = emitEnd;
+          }
+          stateStyle = nextStyle;
+        }
+        i = next;
+      }
+      if (s.length > start) {
+        tokensOut.push(new PR_Token(s.substring(start, s.length), stateStyle));
+      }
+    } else {
+      if (tok.style) {
+        state = 0;
+        stateStyle = PR_TAG;
+      }
+      tokensOut.push(tok);
+    }
+  }
+  return tokensOut;
+}
+
+/** identify regions of markup that are really source code, and recursivley
+  * lex them.
+  * @private
+  */
+function PR_splitSourceNodes(tokens) {
+  var tokensOut = new Array();
+  // when we see a <script> tag, store '/' here so that we know to end the
+  // source processing
+  var endScriptTag = null;
+  var decodeHelper = new PR_DecodeHelper();
+
+  var sourceChunks = null;
+
+  for (var ci = 0, nc = tokens.length; ci < nc; ++ci) {
+    var tok = tokens[ci];
+    if (null == tok.style) {
+      tokens.push(tok);
+      continue;
+    }
+
+    var s = tok.token;
+
+    if (null == endScriptTag) {
+      if (PR_SOURCE == tok.style) {
+        // split off any starting and trailing <?, <%
+        if ('<' == decodeHelper.decode(s, 0)) {
+          decodeHelper.decode(s, decodeHelper.next);
+          if ('%' == decodeHelper.ch || '?' == decodeHelper.ch) {
+            endScriptTag = decodeHelper.ch;
+            tokensOut.push(new PR_Token(s.substring(0, decodeHelper.next),
+                                        PR_TAG));
+            s = s.substring(decodeHelper.next, s.length);
+          }
+        }
+      } else if (PR_TAG == tok.style) {
+        if ('<' == decodeHelper.decode(s, 0) &&
+            '/' != s.charAt(decodeHelper.next)) {
+          var tagContent = s.substring(decodeHelper.next).toLowerCase();
+          // FIXME(msamuel): this does not mirror exactly the code in
+          // in PR_splitMarkup that defers splitting tags inside script and
+          // style blocks.
+          if (PR_startsWith(tagContent, 'script') ||
+              PR_startsWith(tagContent, 'style') ||
+              PR_startsWith(tagContent, 'xmp')) {
+            endScriptTag = '/';
+          }
+        }
+      }
+    }
+
+    if (null != endScriptTag) {
+      var endTok = null;
+      if (PR_SOURCE == tok.style) {
+        if (endScriptTag == '%' || endScriptTag == '?') {
+          var pos = s.lastIndexOf(endScriptTag);
+          if (pos >= 0 && '>' == decodeHelper.decode(s, pos + 1) &&
+              s.length == decodeHelper.next) {
+            endTok = new PR_Token(s.substring(pos, s.length), PR_TAG);
+            s = s.substring(0, pos);
+          }
+        }
+        if (null == sourceChunks) { sourceChunks = new Array(); }
+        sourceChunks.push(new PR_Token(s, PR_PLAIN));
+      } else if (PR_PLAIN == tok.style) {
+        if (null == sourceChunks) { sourceChunks = new Array(); }
+        sourceChunks.push(tok);
+      } else if (PR_TAG == tok.style) {
+        // if it starts with </ then it must be the end tag.
+        if ('<' == decodeHelper.decode(tok.token, 0) &&
+            tok.token.length > decodeHelper.next &&
+            '/' == decodeHelper.decode(tok.token, decodeHelper.next)) {
+          endTok = tok;
+        } else {
+          tokensOut.push(tok);
+        }
+      } else {
+        if (sourceChunks) {
+          sourceChunks.push(tok);
+        } else {
+          // push remaining tag and attribute tokens from the opening tag
+          tokensOut.push(tok);
+        }
+      }
+      if (endTok) {
+        if (sourceChunks) {
+          var sourceTokens = PR_lexSource(sourceChunks);
+          tokensOut.push(new PR_Token('<span class=embsrc>', null));
+          for (var si = 0, ns = sourceTokens.length; si < ns; ++si) {
+            tokensOut.push(sourceTokens[si]);
+          }
+          tokensOut.push(new PR_Token('</span>', null));
+          sourceChunks = null;
+        }
+        tokensOut.push(endTok);
+        endScriptTag = null;
+      }
+    } else {
+      tokensOut.push(tok);
+    }
+  }
+  return tokensOut;
+}
+
+/** splits the quotes from an attribute value.
+  * ['"foo"'] -> ['"', 'foo', '"']
+  * @private
+  */
+function PR_splitAttributeQuotes(tokens) {
+  var firstPlain = null, lastPlain = null;
+  for (var i = 0; i < tokens.length; ++i) {
+    if (PR_PLAIN == tokens[i].style) {
+      firstPlain = i;
+      break;
+    }
+  }
+  for (var i = tokens.length; --i >= 0;) {
+    if (PR_PLAIN == tokens[i].style) {
+      lastPlain = i;
+      break;
+    }
+  }
+  if (null == firstPlain) { return tokens; }
+
+  var decodeHelper = new PR_DecodeHelper();
+  var fs = tokens[firstPlain].token;
+  var fc = decodeHelper.decode(fs, 0);
+  if ('"' != fc && '\'' != fc) {
+    return tokens;
+  }
+  var fpos = decodeHelper.next;
+
+  var ls = tokens[lastPlain].token;
+  var lpos = ls.lastIndexOf('&');
+  if (lpos < 0) { lpos = ls.length - 1; }
+  var lc = decodeHelper.decode(ls, lpos);
+  if (lc != fc || decodeHelper.next != ls.length) {
+    lc = null;
+    lpos = ls.length;
+  }
+
+  var tokensOut = new Array();
+  for (var i = 0; i < firstPlain; ++i) {
+    tokensOut.push(tokens[i]);
+  }
+  tokensOut.push(new PR_Token(fs.substring(0, fpos), PR_ATTRIB_VALUE));
+  if (lastPlain == firstPlain) {
+    tokensOut.push(new PR_Token(fs.substring(fpos, lpos), PR_PLAIN));
+  } else {
+    tokensOut.push(new PR_Token(fs.substring(fpos, fs.length), PR_PLAIN));
+    for (var i = firstPlain + 1; i < lastPlain; ++i) {
+      tokensOut.push(tokens[i]);
+    }
+    if (lc) {
+      tokens.push(new PR_Token(ls.substring(0, lpos), PR_PLAIN));
+    } else {
+      tokens.push(tokens[lastPlain]);
+    }
+  }
+  if (lc) {
+    tokensOut.push(new PR_Token(ls.substring(lpos, ls.length), PR_PLAIN));
+  }
+  for (var i = lastPlain + 1; i < tokens.length; ++i) {
+    tokensOut.push(tokens[i]);
+  }
+  return tokensOut;
+}
+
+/** identify attribute values that really contain source code and recursively
+  * lex them.
+  * @private
+  */
+function PR_splitSourceAttributes(tokens) {
+  var tokensOut = new Array();
+
+  var sourceChunks = null;
+  var inSource = false;
+  var name = '';
+
+  for (var ci = 0, nc = tokens.length; ci < nc; ++ci) {
+    var tok = tokens[ci];
+    var outList = tokensOut;
+    if (PR_TAG == tok.style) {
+      if (inSource) {
+        inSource = false;
+        name = '';
+        if (sourceChunks) {
+          tokensOut.push(new PR_Token('<span class=embsrc>', null));
+          var sourceTokens =
+            PR_lexSource(PR_splitAttributeQuotes(sourceChunks));
+          for (var si = 0, ns = sourceTokens.length; si < ns; ++si) {
+            tokensOut.push(sourceTokens[si]);
+          }
+          tokensOut.push(new PR_Token('</span>', null));
+          sourceChunks = null;
+        }
+      } else if (name && tok.token.indexOf('=') >= 0) {
+        var nameLower = name.toLowerCase();
+        if (PR_startsWith(nameLower, 'on') || 'style' == nameLower) {
+          inSource = true;
+        }
+      } else {
+        name = '';
+      }
+    } else if (PR_ATTRIB_NAME == tok.style) {
+      name += tok.token;
+    } else if (PR_ATTRIB_VALUE == tok.style) {
+      if (inSource) {
+        if (null == sourceChunks) { sourceChunks = new Array(); }
+        outList = sourceChunks;
+        tok = new PR_Token(tok.token, PR_PLAIN);
+      }
+    } else {
+      if (sourceChunks) {
+        outList = sourceChunks;
+      }
+    }
+    outList.push(tok);
+  }
+  return tokensOut;
+}
+
+/** returns a list of PR_Token objects given chunks of source code.
+  *
+  * This code assumes that < tokens are html escaped, but " are not.
+  * It will do a resonable job with <, but will not recognize an &quot;
+  * as starting a string.
+  *
+  * This code treats ", ', and ` as string delimiters, and \ as a string escape.
+  * It does not recognize double delimiter escapes, or perl's qq() style
+  * strings.
+  *
+  * It recognizes C, C++, and shell style comments.
+  *
+  * @param chunks PR_Tokens with style in (null, PR_PLAIN)
+  */
+function PR_lexSource(chunks) {
+  // positions of ends of tokens in order
+  var tokensIn = PR_splitStringAndCommentTokens(chunks);
+
+  // split entities out of so that we know to treat them as single units.
+  tokensIn = PR_splitEntities(tokensIn);
+
+  // split non comment|string tokens on whitespace and word boundaries
+  var tokensOut = new Array();
+  for (var i = 0; i < tokensIn.length; ++i) {
+    var tok = tokensIn[i];
+    var t = tok.token;
+    var s = tok.style;
+
+    if (PR_PLAIN == s) {
+      PR_splitNonStringNonCommentToken(t, tokensOut);
+      continue;
+    }
+    tokensOut.push(tok);
+  }
+
+  return tokensOut;
+}
+
+/** returns a list of PR_Token objects given a string of markup.
+  *
+  * This code assumes that < tokens are html escaped, but " are not.
+  * It will do a resonable job with <, but will not recognize an &quot;
+  * as starting a string.
+  *
+  * This code recognizes a number of constructs.
+  * <!-- ... --> comment
+  * <!\w ... >   declaration
+  * <\w ... >    tag
+  * </\w ... >   tag
+  * <?...?>      embedded source
+  * &[#\w]...;   entity
+  *
+  * It does not recognizes %foo; entities.
+  *
+  * It will recurse into any <style>, <script>, and on* attributes using
+  * PR_lexSource.
+  */
+function PR_lexMarkup(chunks) {
+  // This function works as follows:
+  // 1) Start by splitting the markup into text and tag chunks
+  //    Input:  String s
+  //    Output: List<PR_Token> where style in (PR_PLAIN, null)
+  // 2) Then split the text chunks further into comments, declarations,
+  //    tags, etc.
+  //    After each split, consider whether the token is the start of an
+  //    embedded source section, i.e. is an open <script> tag.  If it is,
+  //    find the corresponding close token, and don't bother to lex in between.
+  //    Input:  List<String>
+  //    Output: List<PR_Token> with style in (PR_TAG, PR_PLAIN, PR_SOURCE, null)
+  // 3) Finally go over each tag token and split out attribute names and values.
+  //    Input:  List<PR_Token>
+  //    Output: List<PR_Token> where style in
+  //            (PR_TAG, PR_PLAIN, PR_SOURCE, NAME, VALUE, null)
+  var tokensOut = PR_tokenizeMarkup(chunks);
+  tokensOut = PR_splitTagAttributes(tokensOut);
+  tokensOut = PR_splitSourceNodes(tokensOut);
+  tokensOut = PR_splitSourceAttributes(tokensOut);
+  return tokensOut;
+}
+
+/** classify the string as either source or markup and lex appropriately. */
+function PR_lexOne(s) {
+  var chunks = PR_chunkify(s);
+  // treat it as markup if the first non whitespace character is a < and the
+  // last non-whitespace character is a >
+  var isMarkup = false;
+  for (var i = 0; i < chunks.length; ++i) {
+    if (PR_PLAIN == chunks[i].style) {
+      if (PR_startsWith(PR_trim(chunks[i].token), '&lt;')) {
+        for (var j = chunks.length; --j >= 0;) {
+          if (PR_PLAIN == chunks[j].style) {
+            isMarkup = PR_endsWith(PR_trim(chunks[j].token), '&gt;');
+            break;
+          }
+        }
+      }
+      break;
+    }
+  }
+  return isMarkup ? PR_lexMarkup(chunks) : PR_lexSource(chunks);
+}
+
+/** pretty print a chunk of code.
+  *
+  * @param s code as html
+  * @return code as html, but prettier
+  */
+function prettyPrintOne(s) {
+  try {
+    var tokens = PR_lexOne(s);
+    var out = [];
+    var lastStyle = null;
+    for (var i = 0; i < tokens.length; i++) {
+      var t = tokens[i];
+      if (t.style != lastStyle) {
+        if (lastStyle != null) {
+          out.push('</span>');
+        }
+        if (t.style != null) {
+          out.push('<span class=', t.style, '>');
+        }
+        lastStyle = t.style;
+      }
+      var html = t.token;
+      if (null != t.style) {
+        // This interacts badly with some wikis which introduces paragraph tags
+        // into pre blocks for some strange reason.
+        // It's necessary for IE though which seems to lose the preformattedness
+        // of <pre> tags when their innerHTML is assigned.
+        // http://stud3.tuwien.ac.at/~e0226430/innerHtmlQuirk.html
+        html = html
+               .replace(/(\r\n?|\n| ) /g, '$1&nbsp;')
+               .replace(/\r\n?|\n/g, '<br>');
+      }
+      out.push(html);
+    }
+    if (lastStyle != null) {
+      out.push('</span>');
+    }
+    return out.join('');
+  } catch (e) {
+    //alert(e.stack);  // DISABLE in production
+    return s;
+  }
+}
+
+/** find all the < pre > and < code > tags in the DOM with class=prettyprint and
+  * prettify them.
+  */
+function prettyPrint() {
+  // fetch a list of nodes to rewrite
+  var codeSegments = [
+      document.getElementsByTagName('pre'),
+      document.getElementsByTagName('code'),
+      document.getElementsByTagName('xmp') ];
+  var elements = [];
+  for (var i = 0; i < codeSegments.length; ++i) {
+    for (var j = 0; j < codeSegments[i].length; ++j) {
+      elements.push(codeSegments[i][j]);
+    }
+  }
+  codeSegments = null;
+
+  // the loop is broken into a series of continuations to make sure that we
+  // don't make the browser unresponsive when rewriting a large page.
+  var k = 0;
+
+  function doWork() {
+    var endTime = new Date().getTime() + 250;
+    for (; k < elements.length && new Date().getTime() < endTime; k++) {
+      var cs = elements[k];
+      if (cs.className && cs.className.indexOf('prettyprint') >= 0) {
+
+        // make sure this is not nested in an already prettified element
+        var nested = false;
+        for (var p = cs.parentNode; p != null; p = p.parentNode) {
+          if ((p.tagName == 'pre' || p.tagName == 'code' ||
+               p.tagName == 'xmp') &&
+              p.className && p.className.indexOf('prettyprint') >= 0) {
+            nested = true;
+            break;
+          }
+        }
+        if (!nested) {
+          // fetch the content as a snippet of properly escaped HTML.
+          // Firefox adds newlines at the end.
+          var content = PR_getInnerHtml(cs);
+          content = content.replace(/(?:\r\n?|\n)$/, '');
+          if (!content) { continue; }
+
+          // do the pretty printing
+          var newContent = prettyPrintOne(content);
+
+          // push the prettified html back into the tag.
+          if (!PR_isRawContent(cs)) {
+            // just replace the old html with the new
+            cs.innerHTML = newContent;
+          } else {
+            // we need to change the tag to a <pre> since <xmp>s do not allow
+            // embedded tags such as the span tags used to attach styles to
+            // sections of source code.
+            var pre = document.createElement('PRE');
+            for (var i = 0; i < cs.attributes.length; ++i) {
+              var a = cs.attributes[i];
+              if (a.specified) {
+                pre.setAttribute(a.name, a.value);
+              }
+            }
+            pre.innerHTML = newContent;
+            // remove the old
+            cs.parentNode.replaceChild(pre, cs);
+          }
+        }
+      }
+    }
+    if (k < elements.length) {
+      // finish up in a continuation
+      setTimeout(doWork, 250);
+    }
+  }
+
+  doWork();
+}
diff --git a/PocoDoc/resources/platform/go.php b/PocoDoc/resources/platform/go.php
new file mode 100644
index 000000000..88b256e7a
--- /dev/null
+++ b/PocoDoc/resources/platform/go.php
@@ -0,0 +1,30 @@
+<?php 
+$category = "index-all.html";
+$page = "welcome.html";
+if (array_key_exists('c', $_GET))
+{
+	$category = 'category-' . $_GET['c'] . '-index.html';
+}
+if (array_key_exists('p', $_GET))
+{
+	$page = $_GET['p'] . '.html';
+}
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+<title>Applied Informatics C++ Libraries and Tools Reference Library</title>
+</head>
+<frameset cols="25%,75%" title="">
+<frameset rows="40%,60%" title="">
+<frame src="overview.html" title="Overview" name="overviewFrame" />
+<frame src="<?php echo $category; ?>" title="Index" name="indexFrame" />
+</frameset>
+<frame src="<?php echo $page; ?>" title="Details" name="detailsFrame" />
+</frameset>
+<noframes>
+<h1>Frames Required</h1>
+<p>This document is designed to be viewed using the frames feature. 
+If you see this message, you are using a non-frame-capable web client.</p>
+</noframes>
+</html>
diff --git a/PocoDoc/resources/platform/images/%headerlogo.png b/PocoDoc/resources/platform/images/%headerlogo.png
new file mode 100644
index 000000000..4acb80f92
Binary files /dev/null and b/PocoDoc/resources/platform/images/%headerlogo.png differ
diff --git a/PocoDoc/resources/platform/images/headerlogo.png b/PocoDoc/resources/platform/images/headerlogo.png
new file mode 100644
index 000000000..1009bc563
Binary files /dev/null and b/PocoDoc/resources/platform/images/headerlogo.png differ
diff --git a/PocoDoc/resources/platform/index.html b/PocoDoc/resources/platform/index.html
new file mode 100644
index 000000000..6fe6fd0e6
--- /dev/null
+++ b/PocoDoc/resources/platform/index.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+<title>Applied Informatics C++ Libraries and Tools Reference Library</title>
+</head>
+<frameset cols="25%,75%" title="">
+<frameset rows="40%,60%" title="">
+<frame src="overview.html" title="Overview" name="overviewFrame" />
+<frame src="index-all.html" title="Index" name="indexFrame" />
+</frameset>
+<frame src="welcome.html" title="Details" name="detailsFrame" />
+</frameset>
+<noframes>
+<h1>Frames Required</h1>
+<p>This document is designed to be viewed using the frames feature. 
+If you see this message, you are using a non-frame-capable web client.</p>
+</noframes>
+</html>
diff --git a/PocoDoc/resources/platform/welcome.thtml b/PocoDoc/resources/platform/welcome.thtml
new file mode 100644
index 000000000..735b707e0
--- /dev/null
+++ b/PocoDoc/resources/platform/welcome.thtml
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Welcome</title>
+<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
+<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
+<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
+<meta name="language" content="en"/>
+<meta name="date" content="2009-11-07"/>
+<meta name="generator" content="PocoDoc"/>
+<link rel="stylesheet" href="css/styles.css" type="text/css"/>
+</head>
+<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
+<div class="header">
+<img src="images/headerlogo.png" alt="Logo" align="right" border="0" style="padding-right: 20px;">
+<h1 class="category">Applied Informatics</h1>
+<h1 class="title">C++ Libraries and Tools Reference Library</h1>
+</div>
+<div class="body">
+<h2>User Guides And Tutorials</h2>
+${PocoDoc.pageIndex}
+
+<h2>API Reference by Namespace</h2>
+${PocoDoc.nameSpaceIndex}
+
+<p class="footer">${PocoDoc.software} ${PocoDoc.version}<br />
+Copyright &copy; ${PocoDoc.year}, <a href="${PocoDoc.companyURI}" target="_top">${PocoDoc.company}</a></p>
+</div>
+${PocoDoc.googleAnalyticsCode}
+</body>
+</html>
diff --git a/PocoDoc/resources/welcome.thtml b/PocoDoc/resources/welcome.thtml
new file mode 100644
index 000000000..36338bb8f
--- /dev/null
+++ b/PocoDoc/resources/welcome.thtml
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Welcome</title>
+<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
+<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
+<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
+<meta name="language" content="en"/>
+<meta name="date" content="2009-11-07"/>
+<meta name="generator" content="PocoDoc"/>
+<link rel="stylesheet" href="css/styles.css" type="text/css"/>
+</head>
+<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
+<div class="header">
+<h1 class="category">POCO C++ Libraries</h1>
+<h1 class="title">Reference Library</h1>
+</div>
+<div class="body">
+<h2>User Guides And Tutorials</h2>
+${PocoDoc.pageIndex}
+
+<h2>API Reference by Namespace</h2>
+${PocoDoc.nameSpaceIndex}
+
+<p class="footer">${PocoDoc.software} ${PocoDoc.version}<br />
+Copyright &copy; ${PocoDoc.year}, <a href="${PocoDoc.companyURI}" target="_top">${PocoDoc.company}</a></p>
+</div>
+</body>
+</html>
diff --git a/PocoDoc/src/DocWriter.cpp b/PocoDoc/src/DocWriter.cpp
new file mode 100644
index 000000000..6b888107c
--- /dev/null
+++ b/PocoDoc/src/DocWriter.cpp
@@ -0,0 +1,2313 @@
+//
+// DocWriter.cpp
+//
+// $Id: //poco/1.4/PocoDoc/src/DocWriter.cpp#1 $
+//
+// Copyright (c) 2005-2009, 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 "DocWriter.h"
+#include "Poco/NumberFormatter.h"
+#include "Poco/Path.h"
+#include "Poco/String.h"
+#include "Poco/DateTime.h"
+#include "Poco/DateTimeFormat.h"
+#include "Poco/DateTimeFormatter.h"
+#include "Poco/RegularExpression.h"
+#include "Poco/Exception.h"
+#include "Poco/Format.h"
+#include "Poco/Util/Application.h"
+#include "Poco/CppParser/Struct.h"
+#include "Poco/CppParser/Enum.h"
+#include "Poco/CppParser/EnumValue.h"
+#include "Poco/CppParser/Function.h"
+#include "Poco/CppParser/Parameter.h"
+#include "Poco/CppParser/TypeDef.h"
+#include "Poco/CppParser/Variable.h"
+#include <map>
+#include <fstream>
+#include <sstream>
+#include <cctype>
+
+
+using Poco::NumberFormatter;
+using Poco::Path;
+using Poco::DateTime;
+using Poco::DateTimeFormat;
+using Poco::DateTimeFormatter;
+using Poco::RegularExpression;
+using Poco::format;
+using Poco::Util::Application;
+using namespace Poco::CppParser;
+
+
+std::string DocWriter::_language;
+DocWriter::StringMap DocWriter::_strings;
+Poco::Logger* DocWriter::_pLogger(0);
+const std::string DocWriter::RFC_URI("http://www.ietf.org/rfc/rfc");
+
+
+DocWriter::DocWriter(const NameSpace::SymbolTable& symbols, const std::string& path, bool prettifyCode, bool noFrames):
+	_prettifyCode(prettifyCode),
+	_noFrames(noFrames),
+	_htmlMode(false),
+	_literalMode(false),
+	_symbols(symbols),
+	_path(path),
+	_pNameSpace(0),
+	_pendingLine(false),
+	_indent(0),
+	_titleId(0)
+{
+	_pLogger = &Poco::Logger::get("DocWriter");
+	
+	Application& app = Application::instance();
+	_language = app.config().getString("PocoDoc.language", "EN");
+	
+	logger().information(std::string("Loading translation strings [") + _language + "]");
+
+	loadStrings(_language);
+}
+
+
+DocWriter::~DocWriter()
+{
+}
+
+
+void DocWriter::addPage(const std::string& path)
+{
+	Page page;
+	page.path = path;
+	Path p(path);
+	p.setExtension("html");
+	page.fileName = p.getFileName();
+	_pages[page.fileName] = page;
+}
+
+
+void DocWriter::write()
+{	
+	writePages();
+	int nameSpaces = 0;
+	int classes    = 0;
+	for (NameSpace::SymbolTable::const_iterator it = _symbols.begin(); it != _symbols.end(); ++it)
+	{
+		switch (it->second->kind())
+		{
+		case Symbol::SYM_NAMESPACE:
+			++nameSpaces;
+			logger().information("Generating namespace " + it->second->fullName());
+			writeNameSpace(static_cast<const NameSpace*>(it->second));
+			writeNameSpaceIndex(static_cast<const NameSpace*>(it->second));
+			break;
+		case Symbol::SYM_STRUCT:
+			++classes;
+			logger().information("Generating class/struct " + it->second->fullName());
+			writeClass(static_cast<const Struct*>(it->second));
+			break;	
+		default:
+			break;
+		}
+	}
+	logger().information("Generating overview and index");
+	writeOverview();
+	writeIndex();
+	logger().information(NumberFormatter::format(nameSpaces) + " namespaces, " + NumberFormatter::format(classes) + " classes.");
+	Application& app = Application::instance();
+	app.config().setInt("PocoDoc.statistics.namespaces", nameSpaces);
+	app.config().setInt("PocoDoc.statistics.classes", classes);
+	std::ostringstream pageIndexStream;
+	writePageIndex(pageIndexStream);
+	app.config().setString("PocoDoc.pageIndex", pageIndexStream.str());
+	std::ostringstream nameSpaceIndexStream;
+	writeNameSpaceIndex(nameSpaceIndexStream);
+	app.config().setString("PocoDoc.nameSpaceIndex", nameSpaceIndexStream.str());
+}
+
+
+void DocWriter::writeOverview()
+{
+	Application& app = Application::instance();
+	std::string software(app.config().getString("PocoDoc.software", ""));
+
+	std::string path(pathFor("overview.html"));
+	std::ofstream ostr(path.c_str());
+	if (!ostr.good()) throw Poco::CreateFileException(path);
+	writeHeader(ostr, tr("Overview"));
+	beginBody(ostr);
+	ostr << "<h3 class=\"overview\"><a href=\"index.html\" target=\"_top\">" << htmlize(software) << "</a></h3>\n";
+	
+	if (!_pages.empty())
+	{
+		ostr << "<h4>" << tr("Guides") << "</h4>\n";
+		ostr << "<ul>\n";
+		std::set<std::string> categories;
+		for (PageMap::const_iterator it = _pages.begin(); it != _pages.end(); ++it)
+		{
+			categories.insert(it->second.category);
+		}
+		for (std::set<std::string>::const_iterator it = categories.begin(); it != categories.end(); ++it)
+		{
+			std::string fileName("category-");
+			fileName.append(makeFileName(*it));
+			fileName.append("-index.html");
+			ostr << "<li>";
+			writeTargetLink(ostr, fileName, tr(*it), "indexFrame");
+			ostr << "</li>\n";
+			writeCategoryIndex(*it, fileName);
+		}
+		ostr << "</ul>\n";
+	}
+	
+	ostr << "<h4>" << tr("Namespaces") << "</h4>\n";
+	ostr << "<ul>\n";
+	
+	std::map<std::string, Symbol*> namespaces; // sort namespaces by full name
+	for (NameSpace::SymbolTable::const_iterator it = _symbols.begin(); it != _symbols.end(); ++it)
+	{
+		if (it->second->kind() == Symbol::SYM_NAMESPACE)
+		{
+			namespaces[it->second->fullName()] = it->second;
+		}
+	}
+	for (std::map<std::string, Symbol*>::const_iterator it = namespaces.begin(); it != namespaces.end(); ++it)
+	{
+		ostr << "<li>";
+		writeTargetLink(ostr, baseNameFor(it->second) + "-index.html", it->second->fullName(), "indexFrame");
+		ostr << "</li>\n";
+	}
+	ostr << "</ul>\n";
+	ostr << "<h4>" << tr("Packages") << "</h4>\n";
+	ostr << "<ul>\n";
+	std::set<std::string> libs;
+	libraries(libs);
+	for (std::set<std::string>::const_iterator itl = libs.begin(); itl != libs.end(); ++itl)
+	{
+		ostr << "<li><b>" << *itl << "</b><br />\n";
+		std::set<std::string> pkgs;
+		packages(*itl, pkgs);
+		for (std::set<std::string>::const_iterator itp = pkgs.begin(); itp != pkgs.end(); ++itp)
+		{
+			std::string uri("package-");
+			uri += makeFileName(*itl);
+			uri += '.';
+			uri += makeFileName(*itp);
+			uri += "-index.html";
+			writeTargetLink(ostr, uri, *itp, "indexFrame");
+			ostr << "<br />\n";
+			writePackageIndex(uri, *itl, *itp);
+		}
+	}
+	ostr << "</ul>\n";
+	ostr << "<h4>";
+	writeTargetLink(ostr, "index-all.html", tr("All_Symbols"), "indexFrame");
+	ostr << "</h4>\n";
+	endBody(ostr);
+	writeFooter(ostr);
+}
+
+
+void DocWriter::writePageIndex(std::ostream& ostr)
+{
+	std::set<std::string> categories;
+	for (PageMap::const_iterator it = _pages.begin(); it != _pages.end(); ++it)
+	{
+		categories.insert(it->second.category);
+	}
+
+	ostr << "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">" << std::endl;
+	int column = 0;
+	for (std::set<std::string>::const_iterator it = categories.begin(); it != categories.end(); ++it)
+	{
+		if (column == 0)
+		{
+			ostr << "<tr>" << std::endl;
+		}
+		ostr << "<td valign=\"top\"><div style=\"margin-right: 16px; margin-bottom: 16px;\">" << std::endl;
+		writeCategoryIndex(ostr, *it, "");
+		ostr << "</div></td>" << std::endl;
+		++column;
+		if (column == PAGE_INDEX_COLUMNS)
+		{
+			ostr << "</tr>" << std::endl;
+			column = 0;
+		}
+	}
+	if (column != 0)
+	{
+		while (column < PAGE_INDEX_COLUMNS)
+		{
+			ostr << "<td></td>" << std::endl;
+			++column;
+		}
+		ostr << "</tr>" << std::endl;
+	}
+	ostr << "</table>";
+}
+
+
+void DocWriter::writeNameSpaceIndex(std::ostream& ostr)
+{
+	std::map<std::string, const NameSpace*> nsMap;
+	for (NameSpace::SymbolTable::const_iterator it = _symbols.begin(); it != _symbols.end(); ++it)
+	{
+		if (it->second->kind() == Symbol::SYM_NAMESPACE)
+		{
+			const NameSpace* pNameSpace = static_cast<const NameSpace*>(it->second);
+			nsMap[it->second->fullName()] = pNameSpace;
+		}
+	}
+
+	ostr << "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">" << std::endl;
+	int column = 0;
+	for (std::map<std::string, const NameSpace*>::const_iterator it = nsMap.begin(); it != nsMap.end(); ++it)
+	{
+		const NameSpace* pNameSpace = it->second;
+		if (column == 0)
+		{
+			ostr << "<tr>" << std::endl;
+		}
+		ostr << "<td valign=\"top\"><p style=\"margin-right: 16px; margin-bottom: 0px; margin-bottom: 0px;\">" << std::endl;
+		writeLink(ostr, uriFor(pNameSpace), pNameSpace->fullName());
+		ostr << "</p></td>" << std::endl;
+		++column;
+		if (column == NAMESPACE_INDEX_COLUMNS)
+		{
+			ostr << "</tr>" << std::endl;
+			column = 0;
+		}
+	}
+	if (column != 0)
+	{
+		while (column < PAGE_INDEX_COLUMNS)
+		{
+			ostr << "<td></td>" << std::endl;
+			++column;
+		}
+		ostr << "</tr>" << std::endl;
+	}
+	ostr << "</table>";
+}
+
+
+void DocWriter::writeEclipseTOC()
+{
+	Application& app = Application::instance();
+	std::string software(app.config().getString("PocoDoc.software", ""));
+
+	std::string path(pathFor("toc.xml"));
+	Poco::Path p(path);
+	std::string dir = p[p.depth() - 1];
+	dir.append("/");
+	p.popDirectory();
+	std::ofstream ostr(p.toString().c_str());
+	if (!ostr.good()) throw Poco::CreateFileException(path);
+	
+	ostr << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl;
+	ostr << "<toc id=\"poco\" label=\"" << htmlize(software) << " " << tr("Reference") << "\" topic=\"" << dir << "welcome.html\">" << std::endl;
+	
+	if (!_pages.empty())
+	{
+		ostr << "<topic label=\"" << tr("Guides") << "\">" << std::endl;
+		std::set<std::string> categories;
+		for (PageMap::const_iterator it = _pages.begin(); it != _pages.end(); ++it)
+		{
+			categories.insert(it->second.category);
+		}
+		for (std::set<std::string>::const_iterator it = categories.begin(); it != categories.end(); ++it)
+		{
+			ostr << "<topic label=\"" << *it << "\">" << std::endl;	
+			for (PageMap::const_iterator itp = _pages.begin(); itp != _pages.end(); ++itp)
+			{
+				if (itp->second.category == *it)
+				{
+					ostr << "<topic label=\"" << itp->second.title << "\" href=\"" << dir << itp->second.fileName << "\"/>" << std::endl;
+				}
+			}
+			ostr << "</topic>" << std::endl;	
+		}
+		ostr << "</topic>" << std::endl;	
+	}
+	
+	ostr << "<topic label=\"" << tr("Namespaces") << "\">" << std::endl;
+
+	std::map<std::string, Symbol*> namespaces; // sort namespaces by full name
+	for (NameSpace::SymbolTable::const_iterator it = _symbols.begin(); it != _symbols.end(); ++it)
+	{
+		if (it->second->kind() == Symbol::SYM_NAMESPACE)
+		{
+			namespaces[it->second->fullName()] = it->second;
+		}
+	}
+	for (std::map<std::string, Symbol*>::const_iterator it = namespaces.begin(); it != namespaces.end(); ++it)
+	{
+		ostr << "<topic label=\"" << it->second->fullName() << "\" href=\"" << dir << baseNameFor(it->second) << ".html" << "\"/>" << std::endl;
+	}
+	ostr << "</topic>" << std::endl;
+	
+	ostr << "<topic label=\"" << tr("Packages") << "\">" << std::endl;
+
+	std::set<std::string> libs;
+	libraries(libs);
+	for (std::set<std::string>::const_iterator itl = libs.begin(); itl != libs.end(); ++itl)
+	{
+		ostr << "<topic label=\"" << *itl << "\">" << std::endl;
+		std::set<std::string> pkgs;
+		packages(*itl, pkgs);
+		for (std::set<std::string>::const_iterator itp = pkgs.begin(); itp != pkgs.end(); ++itp)
+		{
+			std::string uri("package-");
+			uri += makeFileName(*itl);
+			uri += '.';
+			uri += makeFileName(*itp);
+			uri += "-index.html";
+			
+			ostr << "<topic label=\"" << *itp << "\" href=\"" << dir << uri << "\"/>" << std::endl;
+		}
+		ostr << "</topic>" << std::endl;
+	}
+
+	ostr << "</topic>" << std::endl;
+	
+	ostr << "<topic label=\"" << tr("All_Symbols") << "\" href=\"" << dir << "index-all.html\"/>" << std::endl;
+	
+	ostr << "</toc>" << std::endl;
+}
+
+
+void DocWriter::writeIndex()
+{
+	std::string path(pathFor("index-all.html"));
+	std::ofstream ostr(path.c_str());
+	if (!ostr.good()) throw Poco::CreateFileException(path);
+	writeHeader(ostr, tr("Symbol_Index"));
+	beginBody(ostr);
+	ostr << "<h4>" << tr("All_Symbols") << "</h4>\n";
+	ostr << "<p class=\"index\">";
+	std::string prevName;
+	std::string prevNameSpace;
+	for (NameSpace::SymbolTable::const_iterator it = _symbols.begin(); it != _symbols.end(); ++it)
+	{
+		const std::string& name = it->second->name();
+		const std::string& nameSpace = it->second->nameSpace()->fullName();
+		if (it->second->getAccess() != Symbol::ACC_PRIVATE && (name != prevName || nameSpace != prevNameSpace) && name[0] != '#')
+		{
+			writeTargetLink(ostr, uriFor(it->second), htmlizeName(name), "detailsFrame");
+			if (!nameSpace.empty())
+				ostr << "&nbsp;(" << nameSpace << ")";
+			ostr << "<br />\n";
+			prevName = name;
+			prevNameSpace = nameSpace;
+		}
+	}
+	ostr << "</p>";
+	endBody(ostr);
+	writeFooter(ostr);
+}
+
+
+void DocWriter::writeNameSpaceIndex(const NameSpace* pNameSpace)
+{
+	std::string path(pathFor(baseNameFor(pNameSpace) + "-index.html"));
+	std::ofstream ostr(path.c_str());
+	if (!ostr.good()) throw Poco::CreateFileException(path);
+	writeHeader(ostr, tr("Namespace") + " " + pNameSpace->fullName());
+	beginBody(ostr);
+	ostr << "<h4>";
+	writeTargetLink(ostr, uriFor(pNameSpace), pNameSpace->fullName(), "detailsFrame");
+	ostr << "</h4>\n";
+	ostr << "<p class=\"index\">";
+	std::string prevName;
+	for (NameSpace::Iterator it = pNameSpace->begin(); it != pNameSpace->end(); ++it)
+	{
+		const std::string& name = it->second->name();
+		if (name != prevName)
+		{
+			writeTargetLink(ostr, uriFor(it->second), name, "detailsFrame");
+			ostr << "<br />\n";
+			prevName = name;
+		}
+	}
+	ostr << "</p>";
+	endBody(ostr);
+	writeFooter(ostr);
+}
+
+
+void DocWriter::writePackageIndex(const std::string& file, const std::string& library, const std::string& package)
+{
+	std::string path(pathFor(file));
+	std::ofstream ostr(path.c_str());
+	if (!ostr.good()) throw Poco::CreateFileException(path);
+	writeHeader(ostr, tr("Package_Index"));
+	beginBody(ostr);
+	ostr << "<h4>" << package << " (" << library << ")</h4>\n";
+	ostr << "<p class=\"index\">";
+	std::string prevName;
+	std::string prevNameSpace;
+	for (NameSpace::SymbolTable::const_iterator it = _symbols.begin(); it != _symbols.end(); ++it)
+	{
+		Symbol* pSym = it->second;
+		Function* pFunc = dynamic_cast<Function*>(pSym);
+		Struct* pStruct = dynamic_cast<Struct*>(pSym);
+		bool isClass = pStruct && pStruct->getAccess() == Symbol::ACC_PUBLIC;
+		bool isFunc  = pFunc && pFunc->isFunction();
+		if (isClass || isFunc)
+		{
+			if (pSym->getLibrary() == library && pSym->getPackage() == package)
+			{
+				const std::string& name = pSym->name();
+				const std::string& nameSpace = pSym->nameSpace()->fullName();
+				if (name != prevName || nameSpace != prevNameSpace)
+				{
+					writeTargetLink(ostr, uriFor(pSym), htmlizeName(name), "detailsFrame");
+					ostr << "<br />\n";
+					prevName = name;
+					prevNameSpace = nameSpace;
+				}
+			}
+		}
+	}
+	ostr << "</p>";
+	endBody(ostr);
+	writeFooter(ostr);
+}
+
+
+void DocWriter::writeClass(const Struct* pStruct)
+{
+	_pNameSpace = pStruct;
+	std::string path(pathFor(fileNameFor(pStruct)));
+	std::ofstream ostr(path.c_str());
+	if (!ostr.good()) throw Poco::CreateFileException(path);
+	std::string header;
+	if (pStruct->isClass())
+		header += tr("Class") + " ";
+	else
+		header += tr("Struct") + " ";
+	header += pStruct->fullName();
+	writeHeader(ostr, header);
+	writeTitle(ostr, pStruct->nameSpace(), pStruct->declaration());
+	beginBody(ostr);
+	writeFileInfo(ostr, pStruct);
+	const std::string& doc = pStruct->getDocumentation();
+	if (pStruct->attrs().has("deprecated"))
+	{
+		writeDeprecated(ostr, pStruct->isClass() ? "class" : "struct");
+	}
+	if (!doc.empty())
+	{
+		if (doc.find("TODO") != std::string::npos)
+			logger().notice(std::string("TODO in class documentation for ") + pStruct->fullName());
+	
+		writeSubTitle(ostr, tr("Description"));
+		writeDescription(ostr, pStruct->getDocumentation());
+	}
+	else if (pStruct->isPublic() && !pStruct->isDerived())
+	{
+		logger().notice(std::string("Public root class has no documentation: ") + pStruct->fullName());
+	}
+	writeInheritance(ostr, pStruct);
+	writeMethodSummary(ostr, pStruct);
+	writeNestedClasses(ostr, pStruct);
+	writeTypes(ostr, pStruct);
+	writeEnums(ostr, pStruct);
+	writeConstructors(ostr, pStruct);
+	writeDestructor(ostr, pStruct);
+	writeMethods(ostr, pStruct);
+	writeVariables(ostr, pStruct);
+	writeCopyright(ostr);
+	endBody(ostr);
+	writeFooter(ostr);
+}
+
+
+void DocWriter::writeNameSpace(const NameSpace* pNameSpace)
+{
+	_pNameSpace = pNameSpace;
+	std::string path(pathFor(fileNameFor(pNameSpace)));
+	std::ofstream ostr(path.c_str());
+	if (!ostr.good()) throw Poco::CreateFileException(path);
+	writeHeader(ostr, tr("Namespace") + " " + pNameSpace->fullName());
+	writeTitle(ostr, pNameSpace->nameSpace(), std::string("namespace ") + pNameSpace->name());
+	beginBody(ostr);
+	writeSubTitle(ostr, tr("Overview"));
+	writeNameSpacesSummary(ostr, pNameSpace);
+	writeClassesSummary(ostr, pNameSpace);
+	writeTypesSummary(ostr, pNameSpace);
+	writeFunctionsSummary(ostr, pNameSpace);
+	writeNameSpaces(ostr, pNameSpace);
+	writeClasses(ostr, pNameSpace);
+	writeTypes(ostr, pNameSpace);
+	writeEnums(ostr, pNameSpace);
+	writeFunctions(ostr, pNameSpace);
+	writeVariables(ostr, pNameSpace);
+	writeCopyright(ostr);
+	endBody(ostr);
+	writeFooter(ostr);
+}
+
+
+std::string DocWriter::fileNameFor(const Symbol* pNameSpace)
+{
+	std::string result(baseNameFor(pNameSpace));
+	if (!result.empty()) result.append(".html");
+	return result;
+}
+
+
+std::string DocWriter::baseNameFor(const Symbol* pNameSpace)
+{
+	std::string result;
+	std::string fullName(pNameSpace->fullName());
+	std::string::const_iterator it  = fullName.begin();
+	std::string::const_iterator end = fullName.end();
+	while (it != end)
+	{
+		if (*it == ':')
+		{
+			result += '.';
+			++it;
+		}
+		else result += *it;
+		if (it != end) ++it;
+	}
+	return result;
+}
+
+
+std::string DocWriter::pathFor(const std::string& file)
+{
+	Path p(_path);
+	p.makeDirectory();
+	p.setFileName(file);
+	return p.toString();
+}
+
+
+std::string DocWriter::uriFor(const Symbol* pSymbol)
+{
+	const Function* pFunc = dynamic_cast<const Function*>(pSymbol);
+	if (pFunc && pFunc->isConstructor())
+		return fileNameFor(pSymbol->nameSpace());
+	else if (dynamic_cast<const NameSpace*>(pSymbol))
+		return fileNameFor(pSymbol);
+	else
+		return fileNameFor(pSymbol->nameSpace()) + "#" + NumberFormatter::format(pSymbol->id());
+}
+
+
+std::string DocWriter::makeFileName(const std::string& str)
+{
+	std::string result;
+	for (std::string::const_iterator it = str.begin(); it != str.end(); ++it)
+	{
+		if (std::isalnum(*it))
+			result += *it;
+		else
+			result += "_";
+	}
+	return result;
+}
+
+
+void DocWriter::writeHeader(std::ostream& ostr, const std::string& title)
+{
+	Application& app = Application::instance();
+	std::string company(app.config().getString("PocoDoc.company", "Applied Informatics"));
+	std::string charset(app.config().getString("PocoDoc.charset", "utf-8"));
+	DateTime now;
+	ostr << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << std::endl;
+	ostr << "<html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
+	ostr << "<head>" << std::endl;
+	ostr << "<title>" << htmlize(title) << "</title>" << std::endl;
+	ostr << "<meta http-equiv=\"content-type\" content=\"text/html; charset=" << charset << "\"/>" << std::endl;
+	ostr << "<meta name=\"author\" content=\"" << htmlize(company) << "\"/>" << std::endl;
+	ostr << "<meta name=\"publisher\" content=\"" << htmlize(company) << "\"/>" << std::endl;
+	ostr << "<meta name=\"copyright\" content=\"Copyright (c) " << now.year() << ", " << htmlize(company) << "\"/>" << std::endl;
+	ostr << "<meta name=\"language\" content=\"en\"/>" << std::endl;
+	ostr << "<meta name=\"date\" content=\"" << DateTimeFormatter::format(now, "%Y-%m-%d") << "\"/>" << std::endl;
+	ostr << "<meta name=\"generator\" content=\"" << app.config().getString("PocoDoc.generator", "PocoDoc") << "\"/>" << std::endl;
+	ostr << "<link rel=\"stylesheet\" href=\"css/styles.css\" type=\"text/css\"/>" << std::endl;
+	if (_prettifyCode)
+	{
+		ostr << "<link href=\"css/prettify.css\" type=\"text/css\" rel=\"stylesheet\"/>" << std::endl;
+		ostr << "<script type=\"text/javascript\" src=\"js/prettify.js\"></script>" << std::endl;
+	}
+	ostr << "</head>" << std::endl;
+	ostr << "<body bgcolor=\"#ffffff\" leftmargin=\"0\" topmargin=\"0\"";
+	if (_prettifyCode)
+		ostr << " onload=\"prettyPrint()\"";
+	ostr << ">" << std::endl;
+}
+
+
+void DocWriter::writeFooter(std::ostream& ostr)
+{
+	Application& app = Application::instance();
+	std::string googleAnalyticsCode(app.config().getString("PocoDoc.googleAnalyticsCode", ""));
+	ostr << googleAnalyticsCode;
+	ostr << "</body>" << std::endl;
+	ostr << "</html>" << std::endl;
+}
+
+
+void DocWriter::writeCopyright(std::ostream& ostr)
+{
+	Application& app = Application::instance();
+	std::string software(app.config().getString("PocoDoc.software", ""));
+	std::string version(app.config().getString("PocoDoc.version", ""));
+	std::string company(app.config().getString("PocoDoc.company", "Applied Informatics"));
+	std::string companyURI(app.config().getString("PocoDoc.companyURI", "http://www.appinf.com/"));
+	std::string licenseURI(app.config().getString("PocoDoc.licenseURI", ""));
+	DateTime now;
+	ostr << "<p class=\"footer\">";
+	ostr << htmlize(software) << " " << htmlize(version) << "<br />\n";
+	ostr << tr("Copyright") << " &copy; " << now.year() << ", ";
+	writeTargetLink(ostr, companyURI, htmlize(company), "_blank");
+	if (!licenseURI.empty())
+	{
+		ostr << " ";
+		std::string license("(");
+		license.append(tr("License"));
+		license.append(")");
+		writeTargetLink(ostr, licenseURI, htmlize(license), "_blank");
+	}
+	ostr << "</p>\n";
+}
+
+
+void DocWriter::writeTitle(std::ostream& ostr, const std::string& category, const std::string& title)
+{
+	Application& app = Application::instance();
+	std::string headerImage(app.config().getString("PocoDoc.headerImage", ""));
+	ostr << "<div class=\"header\">\n";
+	if (!headerImage.empty())
+	{
+		ostr << "<img src=\"" << headerImage << "\" alt=\"\" align=\"right\" border=\"0\" style=\"padding-right: 20px;\">\n";
+	}
+	ostr << "<h1 class=\"category\">";
+	ostr << htmlize(category);
+	ostr << "</h1>\n";
+	ostr << "<h1 class=\"title\">"  << htmlize(title) << "</h1>";
+	ostr << "\n</div>\n";
+}
+
+
+void DocWriter::writeTitle(std::ostream& ostr, const NameSpace* pNameSpace, const std::string& title)
+{
+	Application& app = Application::instance();
+	std::string headerImage(app.config().getString("PocoDoc.headerImage", ""));
+	ostr << "<div class=\"header\">\n";
+	if (!headerImage.empty())
+	{
+		ostr << "<img src=\"" << headerImage << "\" alt=\"\" align=\"right\" border=\"0\" style=\"padding-right: 20px;\">\n";
+	}
+	const std::string& nameSpace = pNameSpace->fullName();
+	if (!nameSpace.empty())
+	{
+		ostr << "<h1 class=\"namespace\">";
+		writeLink(ostr, uriFor(pNameSpace), nameSpace, "namespace");
+		ostr << "</h1>\n";
+	}
+
+	std::string::size_type posFirstOpen = title.find_first_of('<');
+	bool isTemplate = (posFirstOpen != std::string::npos);
+	std::string::size_type posFirstClose = std::string::npos;
+	std::string templateParam;
+	std::string templateParamSpec;
+	if (isTemplate)
+	{
+		int tempCount = 1;
+		posFirstClose = posFirstOpen;
+		while (tempCount != 0)
+		{
+			++posFirstClose;
+			if (title[posFirstClose] == '>')
+				--tempCount;
+			if (title[posFirstClose] == '<')
+				++tempCount;
+		}
+		++posFirstClose;
+		templateParam = title.substr(0, posFirstClose);
+		templateParamSpec = title.substr(posFirstClose+1);
+	}
+
+	if (isTemplate)
+	{
+		ostr << "<h1 class=\"template\">"
+		     << htmlize(templateParam)
+		     << "</h1>\n"
+		     << "<h1 class=\"symbol\">"
+		     << htmlize(templateParamSpec)
+		     << "</h1>";
+	}
+	else
+	{
+		ostr << "<h1 class=\"symbol\">"
+		     << htmlize(title)
+		     << "</h1>";
+	}
+	ostr << "\n</div>\n";
+}
+
+
+void DocWriter::writeSubTitle(std::ostream& ostr, const std::string& title)
+{
+	ostr << "<h2>"
+	     << htmlize(title)
+	     << "</h2>\n";	
+}
+
+
+void DocWriter::beginBody(std::ostream& ostr)
+{
+	ostr << "<div class=\"body\">\n";
+}
+
+
+void DocWriter::endBody(std::ostream& ostr)
+{
+	ostr << "\n</div>\n";
+}
+
+
+void DocWriter::writeDescription(std::ostream& ostr, const std::string& text)
+{
+	ostr << "<div class=\"description\">\n"
+	     << "<p>";
+	
+	_titleId = 0;
+	_htmlMode = false;
+	TextState state = TEXT_PARAGRAPH;
+	std::string::const_iterator it  = text.begin();
+	std::string::const_iterator end = text.end();
+	while (it != end)
+	{
+		std::string line;
+		while (it != end && *it != '\n') line += *it++;
+		writeDescriptionLine(ostr, line, state);
+		if (it != end) ++it;
+	}
+	switch (state)
+	{
+	case TEXT_PARAGRAPH:
+		ostr << "</p>";
+		break;
+	case TEXT_LIST:
+		ostr << "</li>\n</ul>";
+		break;
+	case TEXT_OLIST:
+		ostr << "</li>\n</ol>";
+		break;
+	case TEXT_LITERAL:
+		ostr << "</pre>";
+		break;
+	default:
+		break;
+	}
+	ostr << "\n</div>\n";
+}
+
+
+void DocWriter::writeDescriptionLine(std::ostream& ostr, const std::string& text, TextState& state)
+{
+	if (_htmlMode)
+	{
+		writeText(ostr, text);
+	}
+	else
+	{
+		TextState lineState = analyzeLine(text);
+		if (lineState == TEXT_LITERAL && state != lineState)
+		{
+			_indent = 0;
+			_pendingLine = false;
+		}
+		switch (lineState)
+		{
+		case TEXT_PARAGRAPH:
+			switch (state)
+			{
+			case TEXT_PARAGRAPH:
+				writeText(ostr, text);
+				break;
+			case TEXT_LIST:
+				ostr << "</li>\n</ul>\n<p>";
+				writeText(ostr, text);
+				break;
+			case TEXT_OLIST:
+				ostr << "</li>\n</ol>\n<p>";
+				writeText(ostr, text);
+				break;
+			case TEXT_LITERAL:
+				ostr << "</pre>\n<p>";
+				writeText(ostr, text);
+				break;
+			default:
+				break;
+			}
+			state = TEXT_PARAGRAPH;
+			break;
+		case TEXT_LIST:
+			switch (state)
+			{
+			case TEXT_PARAGRAPH:
+				ostr << "</p>\n<ul>\n<li>";
+				writeListItem(ostr, text);
+				state = TEXT_LIST;
+				break;
+			case TEXT_LIST:
+			case TEXT_OLIST:
+				ostr << "</li>\n<li>";
+				writeListItem(ostr, text);
+				state = TEXT_LIST;
+				break;
+			case TEXT_LITERAL:
+				writeLiteral(ostr, text);
+				break;
+			default:
+				break;
+			}
+			break;
+		case TEXT_OLIST:
+			switch (state)
+			{
+			case TEXT_PARAGRAPH:
+				ostr << "</p>\n<ol>\n<li>";
+				writeOrderedListItem(ostr, text);
+				state = TEXT_OLIST;
+				break;
+			case TEXT_LIST:
+			case TEXT_OLIST:
+				ostr << "</li>\n<li>";
+				writeOrderedListItem(ostr, text);
+				state = TEXT_OLIST;
+				break;
+			case TEXT_LITERAL:
+				writeLiteral(ostr, text);
+				break;
+			default:
+				break;
+			}
+			break;
+		case TEXT_LITERAL:
+			switch (state)
+			{
+			case TEXT_PARAGRAPH:
+				ostr << "</p>\n<pre";
+				if (_prettifyCode) ostr << " class=\"prettyprint\"";
+				ostr << ">";
+				writeLiteral(ostr, text);
+				state = TEXT_LITERAL;
+				break;
+			case TEXT_LIST:
+				writeText(ostr, text);
+				state = TEXT_LIST;
+				break;
+			case TEXT_OLIST:
+				writeText(ostr, text);
+				state = TEXT_OLIST;
+				break;
+			case TEXT_LITERAL:
+				writeLiteral(ostr, text);
+				break;
+			default:
+				break;
+			}
+			break;
+		case TEXT_WHITESPACE:
+			switch (state)
+			{
+			case TEXT_PARAGRAPH:
+				ostr << "</p>\n<p>";
+				break;
+			case TEXT_LIST:
+				ostr << "</li>\n</ul>\n<p>";
+				state = TEXT_PARAGRAPH;
+				break;
+			case TEXT_OLIST:
+				ostr << "</li>\n</ol>\n<p>";
+				state = TEXT_PARAGRAPH;
+				break;
+			case TEXT_LITERAL:
+				writeLiteral(ostr, text);
+				break;
+			default:
+				break;
+			}
+			break;
+		}
+	}
+}
+
+
+void DocWriter::writeSummary(std::ostream& ostr, const std::string& text, const std::string& uri)
+{
+	ostr << "<p>";
+	std::string::const_iterator beg = text.begin();
+	std::string::const_iterator it  = beg;
+	std::string::const_iterator end = text.end();
+	while (it != end && *it != '.') ++it;
+	if (it != end) ++it;
+	writeText(ostr, beg, it);
+	if (!uri.empty())
+	{
+		ostr << "&nbsp;";
+		writeImageLink(ostr, uri, "arrow.gif", tr("more"));
+	}
+	ostr << "</p>\n";
+}
+
+
+DocWriter::TextState DocWriter::analyzeLine(const std::string& line)
+{
+	int nSpaces = 0;
+	std::string::const_iterator it  = line.begin();
+	std::string::const_iterator end = line.end();
+	while (it != end && std::isspace(*it)) { ++it; ++nSpaces; }
+	if (it == end)
+		return TEXT_WHITESPACE;
+	else if (nSpaces < 3)
+		return TEXT_PARAGRAPH;
+	else if (*it == '-' || *it == '*')
+		return TEXT_LIST;
+	else if (std::isdigit(*it))
+	{
+		++it;
+		if (it != end && *it == '.')
+			return TEXT_OLIST;
+	}
+	return TEXT_LITERAL;
+}
+
+
+std::string DocWriter::htmlizeName(const std::string& name)
+{
+	std::string result;
+	for (std::string::const_iterator it = name.begin(); it != name.end(); ++it)
+	{
+		if (*it == ' ')
+			result += "&nbsp;";
+		else
+			result += htmlize(*it);
+	}
+	return result;
+}
+
+
+void DocWriter::writeText(std::ostream& ostr, const std::string& text)
+{
+	std::string::const_iterator it(text.begin());
+	std::string::const_iterator end(text.end());
+	
+	while (it != end && std::isspace(*it)) ++it;
+	if (it != end)
+	{
+		if (*it == '!')
+		{
+			std::string heading("h4");
+			++it;
+			if (it != end && *it == '!')
+			{
+				heading = "h3";
+				++it;
+			}
+			if (it != end && *it == '!')
+			{
+				heading = "h2";
+				++it;
+			}
+			while (it != end && std::isspace(*it)) ++it;
+			ostr << "</p><" << heading << ">" << format("<a name=\"%d\">", _titleId++) << htmlize(std::string(it, end)) << "</a></" << heading << "><p>" << std::endl;
+			return;
+		}
+	}
+	writeText(ostr, it, end);
+	ostr << ' ';
+}
+
+
+void DocWriter::writeText(std::ostream& ostr, std::string::const_iterator begin, const std::string::const_iterator& end)
+{
+	std::string token;
+	nextToken(begin, end, token);
+	while (!token.empty())
+	{
+		if (!writeSymbol(ostr, token, begin, end) && !writeSpecial(ostr, token, begin, end))
+		{
+			if (token == "[[")
+			{
+				std::string uri;
+				std::string text;
+				std::string::const_iterator it(begin);
+				while (it != end && std::isspace(*it)) ++it;
+				while (it != end && !std::isspace(*it)) uri += *it++;
+				while (it != end && std::isspace(*it)) ++it;
+				while (it != end && *it != ']') text += *it++;
+				while (it != end && *it == ']') ++it;
+				if (uri.compare(0, 6, "image:") == 0)
+				{
+					uri.erase(0, 6);
+					writeImage(ostr, uri, text);
+				}
+				else
+				{
+					std::string target;
+					if (uri.compare(0, 7, "http://") == 0 || uri.compare(0, 8, "https://") == 0)
+						target = "_blank";
+					writeTargetLink(ostr, uri, text, target);
+				}
+				begin = it;
+				nextToken(begin, end, token);
+				continue;
+			}
+			if (token == "RFC")
+			{
+				std::string::const_iterator it(begin);
+				std::string spc;
+				nextToken(begin, end, spc);
+				if (spc == " ")
+				{
+					std::string n;
+					nextToken(begin, end, n);
+					if (!n.empty() && std::isdigit(n[0]))
+					{
+						std::string uri(RFC_URI);
+						uri += n;
+						uri += ".txt";
+						writeTargetLink(ostr, uri, token + " " + n, "_blank");
+						nextToken(begin, end, token);
+						continue;
+					}
+				}
+				begin = it;
+			}
+			if (token == "http")
+			{
+				std::string::const_iterator it(begin);
+				std::string css;
+				nextToken(begin, end, css);
+				if (css == "://")
+				{
+					std::string uri(token);
+					uri += css;
+					while (begin != end && !std::isspace(*begin) && *begin != '>' && *begin != ')') uri += *begin++;
+					if (uri[uri.length() - 1] == '.')
+					{
+						uri.resize(uri.length() - 1);
+						writeTargetLink(ostr, uri, uri, "_blank");
+						ostr << '.';
+					}
+					else writeTargetLink(ostr, uri, uri, "_blank");
+					nextToken(begin, end, token);
+					continue;
+				}
+				else
+					ostr << htmlize(token);
+				begin = it;
+			}
+			else
+			{
+				ostr << htmlize(token);
+			}
+			nextToken(begin, end, token);
+		}
+	}
+}
+
+
+void DocWriter::writeDecl(std::ostream& ostr, const std::string& decl)
+{
+	writeDecl(ostr, decl.begin(), decl.end());
+}
+
+
+void DocWriter::writeDecl(std::ostream& ostr, std::string::const_iterator begin, const std::string::const_iterator& end)
+{
+	std::string token;
+	nextToken(begin, end, token);
+	while (!token.empty())
+	{
+		if (!writeSymbol(ostr, token, begin, end))
+		{
+			ostr << htmlize(token);
+			nextToken(begin, end, token);
+		}
+	}
+}
+		
+
+bool DocWriter::writeSymbol(std::ostream& ostr, std::string& token, std::string::const_iterator& begin, const std::string::const_iterator& end)
+{
+	if (std::isalnum(token[0]) && _pNameSpace)
+	{
+		std::string id(token);
+		std::string next;
+		std::string::const_iterator it(begin);
+		nextToken(begin, end, next);
+		begin = it;
+		if (std::isupper(id[0]) || (!next.empty() && next[0] == '('))
+		{
+			std::string::const_iterator it2(begin);
+			while (next == "::")
+			{
+				nextToken(begin, end, next); // ::
+				id += next;
+				nextToken(begin, end, next); // id
+				id += next;
+				it2 = begin;
+				nextToken(begin, end, next);
+				begin = it2;
+			}
+			Symbol* pSym = _pNameSpace->lookup(id);
+			if (pSym)
+			{
+				writeLink(ostr, pSym, id);
+				nextToken(begin, end, token);
+				return true;
+			}
+			begin = it;
+		}
+	}
+	return false;
+}
+
+
+bool DocWriter::writeSpecial(std::ostream& ostr, std::string& token, std::string::const_iterator& begin, const std::string::const_iterator& end)
+{
+	if (token == "<%")
+	{
+		_htmlMode = true;
+		ostr << "</p>";
+	}
+	else if (token == "<{")
+	{
+		_htmlMode = true;
+	}
+	else if (token == "%>")
+	{
+		_htmlMode = false;
+		ostr << "<p>";
+	}
+	else if (token == "}>")
+	{
+		_htmlMode = false;
+	}
+	else if (token == "<?")
+	{
+		std::string prop;
+		nextToken(begin, end, token);
+		while (!token.empty() && token != "?>")
+		{
+			prop.append(token);
+			nextToken(begin, end, token);
+		}
+		Poco::trimInPlace(prop);
+		Application& app = Application::instance();
+		ostr << htmlize(app.config().getString(prop, std::string("NOT FOUND: ") + prop));
+	}
+	else if (_htmlMode)
+	{
+		ostr << token;
+	}
+	else if (token == "<*")
+	{
+		ostr << "<i>";
+	}
+	else if (token == "*>")
+	{
+		ostr << "</i>";
+	}
+	else if (token == "<!")
+	{
+		ostr << "<b>";
+	}
+	else if (token == "!>")
+	{
+		ostr << "</b>";
+	}
+	else if (token == "<[")
+	{
+		ostr << "<tt>";
+		_literalMode = true;
+	}
+	else if (token == "]>")
+	{
+		ostr << "</tt>";
+		_literalMode = false;
+	}
+	else if (token == "--" && !_literalMode)
+	{
+		ostr << "&mdash;";
+	}
+	else if (token == "iff" && !_literalMode)
+	{
+		ostr << tr("iff");
+	}
+	else if (token != "----")
+	{
+		return false;
+	}
+	nextToken(begin, end, token);
+	return true;
+}
+
+
+void DocWriter::nextToken(std::string::const_iterator& it, const std::string::const_iterator& end, std::string& token)
+{
+	token.clear();
+	if (it != end && (std::isalnum(*it) || *it == '_'))
+	{
+		while (it != end && (std::isalnum(*it) || *it == '_')) token += *it++;
+	}
+	else if (it != end && std::isspace(*it))
+	{
+		while (it != end && std::isspace(*it)) token += *it++;
+	}
+	else if (it != end && *it == '<')
+	{
+		token += *it++;
+		if (it != end && std::ispunct(*it)) token += *it++;
+	}
+	else if (it != end && *it == '[')
+	{
+		token += *it++;
+		if (it != end && *it == '[') token += *it++;
+	}
+	else if (it != end && (*it == ']' || *it == '*' || *it == '!' || *it == '%' || *it == '}' || *it == '?'))
+	{
+		token += *it++;
+		if (it != end && *it == '>') token += *it++;
+	}
+	else if (it != end && *it == '-')
+	{
+		while (it != end && *it == '-') token += *it++;
+	}
+	else if (it != end && *it == ':')
+	{
+		while (it != end && (*it == ':' || *it == '/')) token += *it++;
+	}
+	else if (it != end)
+	{
+		token += *it++;
+	}
+}
+
+
+void DocWriter::writeListItem(std::ostream& ostr, const std::string& text)
+{
+	std::string::const_iterator it  = text.begin();
+	std::string::const_iterator end = text.end();
+	while (it != end && std::isspace(*it)) ++it;
+	if ((it != end && *it == '-') || *it == '*')
+	{
+		++it;
+		while (it != end && std::isspace(*it)) ++it;
+	}
+	writeText(ostr, it, end);
+	ostr << ' ';
+}
+
+
+void DocWriter::writeOrderedListItem(std::ostream& ostr, const std::string& text)
+{
+	std::string::const_iterator it  = text.begin();
+	std::string::const_iterator end = text.end();
+	while (it != end && std::isspace(*it)) ++it;
+	if (it != end && std::isdigit(*it))
+	{
+		while (it != end && std::isdigit(*it)) ++it;
+		if (it != end && *it == '.') ++it;
+		while (it != end && std::isspace(*it)) ++it;
+	}
+	writeText(ostr, it, end);
+	ostr << ' ';
+}
+
+
+void DocWriter::writeLiteral(std::ostream& ostr, const std::string& text)
+{
+	if (_pendingLine)
+	{
+		ostr << "\n";
+		_pendingLine = false;
+	}
+
+	std::string::const_iterator it(text.begin());
+	std::string::const_iterator end(text.end());
+	if (_indent == 0)
+	{
+		while (it != end && std::isspace(*it))
+		{
+			++it;
+			++_indent;
+		}
+	}
+	else
+	{
+		int i = 0;
+		while (it != end && i < _indent)
+		{
+			++it;
+			++i;
+		}
+	}
+	std::string line(it, end);
+	Poco::trimRightInPlace(line);
+	if (line.empty())
+		_pendingLine = true;
+	else
+		ostr << htmlize(std::string(it, end)) << "\n";
+}
+
+
+void DocWriter::writeFileInfo(std::ostream& ostr, const Symbol* pSymbol)
+{
+	std::string library(pSymbol->getLibrary());
+	std::string package(pSymbol->getPackage());
+	if (library.empty() || library == "ChangeThis")
+		logger().notice(std::string("No library name specified in ") + pSymbol->getFile());
+	if (package.empty() || package == "ChangeThis")
+		logger().notice(std::string("No package name specified in ") + pSymbol->getFile());
+	
+	ostr << "<p>\n";
+	ostr << "<b>" << tr("Library") << ":</b> " << library << "<br />\n"
+	     << "<b>" << tr("Package") << ":</b> " << package << "<br />\n"
+	     << "<b>" << tr("Header") << ":</b> " << headerFor(pSymbol);
+	ostr << "</p>\n";
+}
+
+
+void DocWriter::writeInheritance(std::ostream& ostr, const Struct* pStruct)
+{
+	std::set<std::string> bases;
+	pStruct->bases(bases);
+	if (!bases.empty() || pStruct->derivedBegin() != pStruct->derivedEnd())
+	{
+		writeSubTitle(ostr, tr("Inheritance"));
+		if (pStruct->baseBegin() != pStruct->baseEnd())
+		{
+			ostr << "<p><b>" << tr("Direct_Base_Classes") << ": </b>";
+			bool first = true;
+			for (Struct::BaseIterator it = pStruct->baseBegin(); it != pStruct->baseEnd(); ++it)
+			{
+				std::string base;
+				if (it->pClass)
+				{
+					if (it->pClass->nameSpace() == pStruct->nameSpace())
+						base = it->pClass->name();
+					else
+						base = it->pClass->fullName();
+				}
+				else base = it->name;
+				writeNameListItem(ostr, base, it->pClass, pStruct->nameSpace(), first);
+			}
+			ostr << "</p>\n";
+		}
+		if (!bases.empty())
+		{
+			ostr << "<p><b>" << tr("All_Base_Classes") << ": </b>";
+			bool first = true;
+			for (std::set<std::string>::const_iterator it = bases.begin(); it != bases.end(); ++it)
+			{
+				std::string base;
+				Symbol* pBase = pStruct->nameSpace()->lookup(*it);
+				if (pBase)
+				{
+					if (pBase->nameSpace() == pStruct->nameSpace())
+						base = pBase->name();
+					else
+						base = pBase->fullName();
+				}
+				else base = *it;
+				writeNameListItem(ostr, base, pBase, pStruct->nameSpace(), first);
+			}
+			ostr << "</p>\n";
+		}
+		Struct::StructSet derived;
+		pStruct->derived(derived);
+		if (!derived.empty())
+		{
+			ostr << "<p><b>" << tr("Known_Derived_Classes") << ": </b>";
+			bool first = true;
+			for (Struct::StructSet::const_iterator it = derived.begin(); it != derived.end(); ++it)
+			{
+				std::string derived;
+				if ((*it)->nameSpace() == pStruct->nameSpace())
+					derived = (*it)->name();
+				else
+					derived = (*it)->fullName();
+				writeNameListItem(ostr, derived, *it, pStruct->nameSpace(), first);
+			}
+			ostr << "</p>\n";
+		}
+	}
+}
+
+
+void DocWriter::writeMethodSummary(std::ostream& ostr, const Struct* pStruct)
+{
+	bool titleWritten = false;
+	MethodMap methods;
+	Struct::Functions functions;
+	pStruct->methods(Symbol::ACC_PUBLIC, functions);
+	for (Struct::Functions::const_iterator it = functions.begin(); it != functions.end(); ++it)
+	{
+		if (methods.find((*it)->name()) == methods.end())
+			methods[(*it)->name()] = *it;
+	}
+	pStruct->methods(Symbol::ACC_PROTECTED, functions);
+	for (Struct::Functions::const_iterator it = functions.begin(); it != functions.end(); ++it)
+	{
+		if (methods.find((*it)->name()) == methods.end())
+			methods[(*it)->name()] = *it;
+	}
+	if (!methods.empty())
+	{
+		writeSubTitle(ostr, tr("Member_Summary"));
+		titleWritten = true;
+		ostr << "<p><b>" << tr("Member_Functions") << ": </b>";
+		bool first = true;
+		for (MethodMap::const_iterator it = methods.begin(); it != methods.end(); ++it)
+		{
+			writeNameListItem(ostr, it->first, it->second, pStruct, first);
+		}
+		ostr << "</p>\n";
+	}
+	methods.clear();
+	Struct::FunctionSet inhFunctions;
+	pStruct->inheritedMethods(inhFunctions);
+	for (Struct::FunctionSet::const_iterator it = inhFunctions.begin(); it != inhFunctions.end(); ++it)
+	{
+		if (methods.find((*it)->name()) == methods.end())
+			methods[(*it)->name()] = *it;
+	}
+	if (!methods.empty())
+	{
+		if (!titleWritten)
+			writeSubTitle(ostr, tr("Member_Summary"));
+		ostr << "<p><b>" << tr("Inherited_Functions") << ": </b>";
+		bool first = true;
+		for (MethodMap::const_iterator it = methods.begin(); it != methods.end(); ++it)
+		{
+			writeNameListItem(ostr, it->first, it->second, pStruct, first);
+		}
+		ostr << "</p>\n";
+	}
+}
+
+
+void DocWriter::writeNestedClasses(std::ostream& ostr, const Struct* pStruct)
+{
+	NameSpace::SymbolTable classes;
+	pStruct->classes(classes);
+	bool hasNested = false;
+	for (NameSpace::Iterator it = classes.begin(); it != classes.end(); ++it)
+	{
+		if (it->second->getAccess() != Symbol::ACC_PRIVATE)
+			hasNested = true;
+	}
+	if (hasNested)
+	{
+		writeSubTitle(ostr, tr("Nested_Classes"));
+		for (NameSpace::Iterator it = classes.begin(); it != classes.end(); ++it)
+		{
+			if (it->second->getAccess() != Symbol::ACC_PRIVATE)
+				writeClassSummary(ostr, static_cast<const Struct*>(it->second));
+		}
+	}
+}
+
+
+void DocWriter::writeNameSpacesSummary(std::ostream& ostr, const NameSpace* pNameSpace)
+{
+	NameSpace::SymbolTable nameSpaces;
+	pNameSpace->nameSpaces(nameSpaces);
+	if (!nameSpaces.empty())
+	{
+		ostr << "<p><b>" << tr("Namespaces") << ":</b> " << std::endl;
+		bool first = true;
+		for (NameSpace::Iterator it = nameSpaces.begin(); it != nameSpaces.end(); ++it)
+		{
+			writeNameListItem(ostr, it->second->name(), it->second, pNameSpace, first);
+		}
+		ostr << "</p>" << std::endl;
+	}
+}
+
+
+void DocWriter::writeNameSpaces(std::ostream& ostr, const NameSpace* pNameSpace)
+{
+	NameSpace::SymbolTable nameSpaces;
+	pNameSpace->nameSpaces(nameSpaces);
+	if (!nameSpaces.empty())
+	{
+		writeSubTitle(ostr, tr("Namespaces"));
+		for (NameSpace::Iterator it = nameSpaces.begin(); it != nameSpaces.end(); ++it)
+		{
+			ostr << "<h3>";
+			std::string what("namespace ");
+			what += it->second->name();
+			writeLink(ostr, uriFor(it->second), what, "class");
+			ostr << "</h3>\n";
+		}
+	}
+}
+
+
+void DocWriter::writeClassesSummary(std::ostream& ostr, const NameSpace* pNameSpace)
+{
+	NameSpace::SymbolTable classes;
+	pNameSpace->classes(classes);
+	if (!classes.empty())
+	{
+		ostr << "<p><b>" << tr("Classes") << ":</b> " << std::endl;
+		bool first = true;
+		for (NameSpace::Iterator it = classes.begin(); it != classes.end(); ++it)
+		{
+			writeNameListItem(ostr, it->second->name(), it->second, pNameSpace, first);
+		}
+		ostr << "</p>" << std::endl;
+	}
+}
+
+
+void DocWriter::writeClasses(std::ostream& ostr, const NameSpace* pNameSpace)
+{
+	NameSpace::SymbolTable classes;
+	pNameSpace->classes(classes);
+	if (!classes.empty())
+	{
+		writeSubTitle(ostr, tr("Classes"));
+		for (NameSpace::Iterator it = classes.begin(); it != classes.end(); ++it)
+		{
+			writeClassSummary(ostr, static_cast<const Struct*>(it->second));
+		}
+	}
+}
+
+
+void DocWriter::writeClassSummary(std::ostream& ostr, const Struct* pStruct)
+{
+	ostr << "<h3>";
+	std::string what;
+	if (pStruct->isClass())
+		what += "class ";
+	else
+		what += "struct ";
+	what += pStruct->name();
+	writeLink(ostr, uriFor(pStruct), what, "class");
+	if (pStruct->getAccess() != Symbol::ACC_PUBLIC)
+		writeIcon(ostr, "protected");
+	ostr << "</h3>\n";
+	writeSummary(ostr, pStruct->getDocumentation(), uriFor(pStruct));
+}
+
+
+void DocWriter::writeTypesSummary(std::ostream& ostr, const NameSpace* pNameSpace)
+{
+	NameSpace::SymbolTable types;
+	pNameSpace->typeDefs(types);
+	if (!types.empty())
+	{
+		ostr << "<p><b>" << tr("Types") << ":</b> " << std::endl;
+		bool first = true;
+		for (NameSpace::Iterator it = types.begin(); it != types.end(); ++it)
+		{
+			writeNameListItem(ostr, it->second->name(), it->second, pNameSpace, first);
+		}
+		ostr << "</p>" << std::endl;
+	}
+}
+
+
+void DocWriter::writeTypes(std::ostream& ostr, const NameSpace* pNameSpace)
+{
+	NameSpace::SymbolTable types;
+	pNameSpace->typeDefs(types);
+	bool hasTypes = false;
+	for (NameSpace::Iterator it = types.begin(); !hasTypes && it != types.end(); ++it)
+	{
+		if (it->second->getAccess() != Symbol::ACC_PRIVATE)
+			hasTypes = true;
+	}
+	if (hasTypes)
+	{
+		writeSubTitle(ostr, tr("Types"));
+		for (NameSpace::Iterator it = types.begin(); it != types.end(); ++it)
+		{
+			if (it->second->getAccess() != Symbol::ACC_PRIVATE)
+				writeType(ostr, static_cast<const TypeDef*>(it->second));
+		}
+	}
+}
+
+
+void DocWriter::writeType(std::ostream& ostr, const TypeDef* pType)
+{
+	ostr << "<h3>";
+	writeAnchor(ostr, pType->name(), pType);
+	if (pType->getAccess() != Symbol::ACC_PUBLIC)
+		writeIcon(ostr, "protected");
+	ostr << "</h3>\n";
+	ostr << "<p class=\"decl\">";
+	writeDecl(ostr, pType->declaration());
+	ostr << ";</p>\n";
+	writeDescription(ostr, pType->getDocumentation());
+}
+
+
+void DocWriter::writeEnums(std::ostream& ostr, const NameSpace* pNameSpace)
+{
+	NameSpace::SymbolTable enums;
+	pNameSpace->enums(enums);
+	bool hasEnums = false;
+	for (NameSpace::Iterator it = enums.begin(); !hasEnums && it != enums.end(); ++it)
+	{
+		if (it->second->getAccess() != Symbol::ACC_PRIVATE)
+			hasEnums = true;
+	}
+	if (hasEnums)
+	{
+		writeSubTitle(ostr, tr("Enumerations"));
+		for (NameSpace::Iterator it = enums.begin(); it != enums.end(); ++it)
+		{
+			if (it->second->getAccess() != Symbol::ACC_PRIVATE)
+				writeEnum(ostr, static_cast<const Enum*>(it->second));
+		}
+	}
+}
+
+
+void DocWriter::writeEnum(std::ostream& ostr, const Enum* pEnum)
+{
+	ostr << "<h3>";
+	const std::string& name = pEnum->name();
+	if (name[0] == '#')
+		ostr << "<i>" << tr("Anonymous") << "</i>";
+	else
+		writeAnchor(ostr, name, pEnum);
+	if (pEnum->getAccess() != Symbol::ACC_PUBLIC)
+		writeIcon(ostr, "protected");
+	ostr << "</h3>\n";
+	writeDescription(ostr, pEnum->getDocumentation());
+	for (Enum::Iterator it = pEnum->begin(); it != pEnum->end(); ++it)
+	{
+		const std::string& name = (*it)->name();
+		const std::string& value = (*it)->value();
+		ostr << "<p class=\"decl\">";
+		writeAnchor(ostr, name, *it);
+		if (!value.empty())
+			ostr << " = " << htmlize(value);
+		ostr << "</p>\n";
+		writeDescription(ostr, (*it)->getDocumentation());
+	}
+}
+
+
+void DocWriter::writeConstructors(std::ostream& ostr, const Struct* pStruct)
+{
+	Struct::Functions ctors;
+	pStruct->constructors(ctors);
+	if (!ctors.empty())
+	{
+		writeSubTitle(ostr, tr("Constructors"));
+		for (Struct::Functions::const_iterator it = ctors.begin(); it != ctors.end(); ++it)
+		{
+			if ((*it)->getAccess() == Symbol::ACC_PUBLIC)
+				writeFunction(ostr, *it);
+		}
+		for (Struct::Functions::const_iterator it = ctors.begin(); it != ctors.end(); ++it)
+		{
+			if ((*it)->getAccess() == Symbol::ACC_PROTECTED)
+				writeFunction(ostr, *it);
+		}
+	}
+}
+
+
+void DocWriter::writeDestructor(std::ostream& ostr, const Struct* pStruct)
+{
+	if (pStruct->destructor())
+	{
+		writeSubTitle(ostr, tr("Destructor"));
+		writeFunction(ostr, pStruct->destructor());
+	}
+}
+
+
+void DocWriter::writeMethods(std::ostream& ostr, const Struct* pStruct)
+{
+	Struct::Functions methods;
+	pStruct->methods(Symbol::ACC_PUBLIC, methods);
+	pStruct->methods(Symbol::ACC_PROTECTED, methods);
+	if (!methods.empty())
+	{
+		writeSubTitle(ostr, tr("Member_Functions"));
+		for (Struct::Functions::const_iterator it = methods.begin(); it != methods.end(); ++it)
+		{
+			writeFunction(ostr, *it);
+		}
+	}
+}
+
+
+void DocWriter::writeFunctionsSummary(std::ostream& ostr, const NameSpace* pNameSpace)
+{
+	NameSpace::SymbolTable funcs;
+	pNameSpace->functions(funcs);
+	if (!funcs.empty())
+	{
+		ostr << "<p><b>" << tr("Functions") << ":</b> " << std::endl;
+		std::string lastName;
+		bool first = true;
+		for (NameSpace::Iterator it = funcs.begin(); it != funcs.end(); ++it)
+		{
+			if (it->second->name() != lastName)
+			{
+				writeNameListItem(ostr, it->second->name(), it->second, pNameSpace, first);
+				lastName = it->second->name();
+			}
+		}
+		ostr << "</p>" << std::endl;
+	}
+}
+
+
+void DocWriter::writeFunctions(std::ostream& ostr, const NameSpace* pNameSpace)
+{
+	NameSpace::SymbolTable funcs;
+	pNameSpace->functions(funcs);
+	if (!funcs.empty())
+	{
+		writeSubTitle(ostr, tr("Functions"));
+		for (NameSpace::Iterator it = funcs.begin(); it != funcs.end(); ++it)
+		{
+			writeFunction(ostr, static_cast<const Function*>(it->second));
+		}
+	}
+}
+
+
+void DocWriter::writeFunction(std::ostream& ostr, const Function* pFunc)
+{
+	ostr << "<h3>";
+	writeAnchor(ostr, pFunc->name(), pFunc);
+	if (pFunc->getAccess() != Symbol::ACC_PUBLIC)
+		writeIcon(ostr, "protected");
+	if (pFunc->isVirtual())
+		writeIcon(ostr, "virtual");
+	else if (pFunc->flags() & Function::FN_STATIC)
+		writeIcon(ostr, "static");
+	if (pFunc->flags() & Function::FN_INLINE)
+		writeIcon(ostr, "inline");
+	ostr << "</h3>\n";
+	ostr << "<p class=\"decl\">";
+	const std::string& decl = pFunc->declaration();
+	writeDecl(ostr, decl);
+	if (!std::isalnum(decl[decl.length() - 1]))
+		ostr << " ";
+	ostr << "(";
+	bool hasArgs = false;
+	for (Function::Iterator it = pFunc->begin(); it != pFunc->end(); ++it)
+	{
+		hasArgs = true;
+		if (it != pFunc->begin())
+			ostr << ",";
+		ostr << "<br />&nbsp;&nbsp;&nbsp;&nbsp;";
+		writeDecl(ostr, (*it)->declaration());
+		if ((*it)->hasDefaultValue())
+		{
+			ostr << " = " << (*it)->defaultDecl();
+		}
+	}
+	if (hasArgs)
+		ostr << "<br />";
+	ostr << ")";
+	if (pFunc->flags() & Function::FN_CONST)
+		ostr << " const";
+	if (pFunc->flags() & Function::FN_PURE_VIRTUAL)
+		ostr << " = 0";
+	ostr << ";</p>\n";
+	
+	if (pFunc->attrs().has("deprecated"))
+	{
+		writeDeprecated(ostr, "function");
+	}
+
+	Function* pOverridden = pFunc->getOverridden();
+	const std::string& doc(pFunc->getDocumentation());
+	if (doc.empty() && pFunc->isPublic() && !pOverridden && !pFunc->isConstructor() && !pFunc->isDestructor())
+		logger().notice(std::string("Undocumented public function: ") + pFunc->fullName());
+
+	writeDescription(ostr, doc);
+	if (pOverridden)
+	{
+		ostr << "<div class=\"description\"><p><b>" << tr("See_also") << ":</b> ";
+		writeLink(ostr, pOverridden, pOverridden->fullName() + "()");
+		ostr << "</p></div>\n";
+	}
+}
+
+
+void DocWriter::writeVariables(std::ostream& ostr, const NameSpace* pNameSpace)
+{
+	NameSpace::SymbolTable vars;
+	pNameSpace->variables(vars);
+	bool hasVars = false;
+	for (NameSpace::Iterator it = vars.begin(); !hasVars && it != vars.end(); ++it)
+	{
+		if (it->second->getAccess() != Symbol::ACC_PRIVATE)
+			hasVars = true;
+	}
+	if (hasVars)
+	{
+		
+		writeSubTitle(ostr, tr("Variables"));
+		for (NameSpace::Iterator it = vars.begin(); it != vars.end(); ++it)
+		{
+			if (it->second->getAccess() == Symbol::ACC_PUBLIC)
+				writeVariable(ostr, static_cast<const Variable*>(it->second));
+		}
+		for (NameSpace::Iterator it = vars.begin(); it != vars.end(); ++it)
+		{
+			if (it->second->getAccess() == Symbol::ACC_PROTECTED)
+				writeVariable(ostr, static_cast<const Variable*>(it->second));
+		}
+	}
+}
+
+
+void DocWriter::writeVariable(std::ostream& ostr, const Variable* pVar)
+{
+	ostr << "<h3>";
+	writeAnchor(ostr, pVar->name(), pVar);
+	if (pVar->getAccess() != Symbol::ACC_PUBLIC)
+		writeIcon(ostr, "protected");
+	if (pVar->flags() & Function::FN_STATIC)
+		writeIcon(ostr, "static");
+	ostr << "</h3>\n";
+	ostr << "<p class=\"decl\">";
+	writeDecl(ostr, pVar->declaration());
+	ostr << ";</p>\n";
+	writeDescription(ostr, pVar->getDocumentation());
+}
+
+
+void DocWriter::writeNameListItem(std::ostream& ostr, const std::string& str, const Symbol* pSymbol, const NameSpace* pNameSpace, bool& first)
+{
+	if (first)
+		first = false;
+	else
+		ostr << ", ";
+
+	if (pSymbol)
+		writeLink(ostr, pSymbol, str);
+	else
+		ostr << htmlizeName(str);
+}
+
+
+void DocWriter::writeLink(std::ostream& ostr, const std::string& uri, const std::string& text)
+{
+	ostr << "<a href=\"" << uri << "\">" << htmlize(text) << "</a>";
+}
+
+
+void DocWriter::writeLink(std::ostream& ostr, const Symbol* pSymbol, const std::string& name)
+{
+	ostr << "<a href=\"" << uriFor(pSymbol) << "\" title=\"" << titleFor(pSymbol) << "\">" << htmlizeName(name) << "</a>";
+}
+
+
+void DocWriter::writeLink(std::ostream& ostr, const std::string& uri, const std::string& text, const std::string& linkClass)
+{
+	ostr << "<a href=\"" << uri << "\" class=\"" << linkClass << "\">" << htmlize(text) << "</a>";
+}
+
+
+void DocWriter::writeTargetLink(std::ostream& ostr, const std::string& uri, const std::string& text, const std::string& target)
+{
+	if (_noFrames && target != "_blank")
+		ostr << "<a href=\"" << uri << "\">" << text << "</a>";
+	else if (!target.empty())
+		ostr << "<a href=\"" << uri << "\" target=\"" << target << "\">" << text << "</a>";
+	else
+		ostr << "<a href=\"" << uri << "\">" << htmlize(text) << "</a>";
+}
+
+
+void DocWriter::writeImageLink(std::ostream& ostr, const std::string& uri, const std::string& image, const std::string& alt)
+{
+	ostr << "<a href=\"" << uri << "\">";
+	ostr << "<img src=\"images/" << image << "\" alt=\"" + alt + "\" style=\"vertical-align:baseline;\" border=\"0\" /> ";
+	ostr << "</a>";
+}
+
+
+void DocWriter::writeImage(std::ostream& ostr, const std::string& uri, const std::string& caption)
+{
+	ostr << "<div class=\"image\">" << std::endl;
+	ostr << "<img src=\"" << uri << "\" alt=\"" + caption + "\" title=\"" << htmlize(caption) << "\" border=\"0\" /> " << std::endl;
+	if (!caption.empty())
+	{
+		ostr << "<div class=\"imagecaption\">" << htmlize(caption) << "</div>";
+	}
+	ostr << "</div>" << std::endl;
+}
+
+
+void DocWriter::writeIcon(std::ostream& ostr, const std::string& icon)
+{
+	ostr << " <img src=\"images/" << icon << ".gif\" alt=\"" + icon + "\" title=\"" << icon << "\" style=\"vertical-align:baseline;\" border=\"0\" /> ";
+}
+
+
+void DocWriter::writeAnchor(std::ostream& ostr, const std::string& text, const Symbol* pSymbol)
+{
+	ostr << "<a name=\"" << pSymbol->id() << "\">" << htmlize(text) << "</a>";
+}
+
+
+void DocWriter::writeDeprecated(std::ostream& ostr, const std::string& what)
+{
+	ostr << "<div class=\"description\">" << std::endl;
+	ostr << "<p><b>" << tr("Deprecated") << ".</b> <i>" << tr("This") << " " << what << " " << tr("is_deprecated") << ".</i></p>" << std::endl;
+	ostr << "</div>" << std::endl;
+}
+
+
+std::string DocWriter::headerFor(const Symbol* pSymbol)
+{
+	Path path(pSymbol->getFile());
+	std::string header;
+	int i = 0;
+	while (i < path.depth() - 1 && path[i] != "include") ++i;
+	for (++i; i < path.depth(); ++i)
+	{
+		header += path[i];
+		header += "/";
+	}
+	header += path.getFileName();
+	return header;
+}
+
+
+std::string DocWriter::titleFor(const Symbol* pSymbol)
+{
+	std::string title;
+	switch (pSymbol->kind())
+	{
+	case Symbol::SYM_NAMESPACE:
+		title += "namespace";
+		break;
+	case Symbol::SYM_STRUCT:
+		title += (static_cast<const Struct*>(pSymbol)->isClass() ? "class" : "struct");
+		break;
+	case Symbol::SYM_ENUM:
+		title += "enum ";
+		break;
+	default:
+		break;
+	}
+	if (!title.empty()) title += " ";
+	const Function* pFunc = dynamic_cast<const Function*>(pSymbol);
+	if (pFunc && pFunc->isConstructor())
+	{
+		title += "class " + pSymbol->nameSpace()->fullName();
+	}
+	else
+	{
+		title += pSymbol->fullName();
+		if (pFunc) title += "()";
+	}
+	return title;
+}
+
+
+std::string DocWriter::htmlize(const std::string& str)
+{
+	std::string result;
+	for (std::string::const_iterator it = str.begin(); it != str.end(); ++it)
+		result += htmlize(*it);
+	return result;
+}
+
+
+std::string DocWriter::htmlize(char c)
+{
+	std::string result;
+	switch (c)
+	{
+	case '"':
+		result += "&quot;";
+		break;
+	case '<':
+		result += "&lt;";
+		break;
+	case '>':
+		result += "&gt;";
+		break;
+	case '&':
+		result += "&amp;";
+		break;
+	default:
+		result += c;
+	}
+	return result;
+}
+
+
+void DocWriter::libraries(std::set<std::string>& libs)
+{
+	for (NameSpace::SymbolTable::const_iterator it = _symbols.begin(); it != _symbols.end(); ++it)
+	{
+		const std::string& lib = it->second->getLibrary();
+		if (!lib.empty())
+			libs.insert(lib);
+	}
+}
+
+
+void DocWriter::packages(const std::string& lib, std::set<std::string>& packages)
+{
+	for (NameSpace::SymbolTable::const_iterator it = _symbols.begin(); it != _symbols.end(); ++it)
+	{
+		const std::string& plib = it->second->getLibrary();
+		const std::string& pkg = it->second->getPackage();
+		if (!pkg.empty() && lib == plib)
+			packages.insert(pkg);
+	}
+}
+
+
+void DocWriter::writePages()
+{
+	_pNameSpace = rootNameSpace();
+	for (PageMap::iterator it = _pages.begin(); it != _pages.end(); ++it)
+	{
+		writePage(it->second);
+	}
+}
+
+
+void DocWriter::writePage(Page& page)
+{
+	std::ifstream istr(page.path.c_str());
+	if (!istr.good()) throw Poco::OpenFileException(page.path);
+	std::string title;
+	std::string category;
+	std::string text;
+	int ch = istr.get();
+	while (ch != -1 && ch != '\n') { title += (char) ch; ch = istr.get(); }
+	ch = istr.get();
+	while (ch != -1 && ch != '\n') { category += (char) ch; ch = istr.get(); }
+	
+	while (std::isspace(ch)) ch = istr.get();
+	while (ch != -1) 
+	{
+		text += (char) ch; 
+		if (ch == '\n') text += ' ';
+		ch = istr.get();
+	}
+	
+	page.title    = title;
+	page.category = category;
+	
+	TOC toc;
+	scanTOC(text, toc);
+	
+	std::string path(pathFor(page.fileName));
+	std::ofstream ostr(path.c_str());
+	if (!ostr.good()) throw Poco::CreateFileException(path);
+	writeHeader(ostr, title);
+	writeTitle(ostr, tr(category), title);
+	beginBody(ostr);
+	if (!toc.empty()) 
+	{
+		writeTOC(ostr, toc);
+	}
+	writeDescription(ostr, text);
+	writeCopyright(ostr);
+	writeFooter(ostr);
+}
+
+
+void DocWriter::scanTOC(const std::string& text, TOC& toc)
+{
+	int titleId = 0;
+	std::istringstream istr(text);
+	while (!istr.eof())
+	{
+		std::string line;
+		std::getline(istr, line);
+		std::string::const_iterator it(line.begin());
+		std::string::const_iterator end(line.end());
+		while (it != end && std::isspace(*it)) ++it;
+		if (it != end && *it == '!')
+		{
+			++it;
+			int level = MAX_TITLE_LEVEL;
+			while (it != end && *it == '!')
+			{
+				level--;
+				++it;
+			}
+			while (it != end && std::isspace(*it)) ++it;
+			TOCEntry entry;
+			entry.id = titleId++;
+			entry.level = level;
+			entry.title.assign(it, end);
+			toc.push_back(entry);
+		}
+	}
+}
+
+
+void DocWriter::writeTOC(std::ostream& ostr, const TOC& toc)
+{
+	ostr << "<h2>" << tr("TOC") << "</h2>" << std::endl;
+	ostr << "<div class=\"toc\"><ul>" << std::endl;
+	for (TOC::const_iterator it = toc.begin(); it != toc.end(); ++it)
+	{
+		ostr << "<li class=\"level" << it->level << "\"><a href=\"#" << it->id << "\">" << htmlize(it->title) << "</a></li>" << std::endl;
+	}
+	ostr << "</ul></div>" << std::endl;
+}
+
+
+void DocWriter::writeCategoryIndex(const std::string& category, const std::string& fileName)
+{
+	std::ofstream ostr(pathFor(fileName).c_str());
+	if (!ostr.good()) throw Poco::CreateFileException(fileName);
+	writeHeader(ostr, tr(category));
+	beginBody(ostr);
+	writeCategoryIndex(ostr, category, "detailsFrame");
+	endBody(ostr);
+	writeFooter(ostr);
+}
+
+
+void DocWriter::writeCategoryIndex(std::ostream& ostr, const std::string& category, const std::string& target)
+{
+	ostr << "<h4>" << htmlize(tr(category)) << "</h4>";
+	ostr << "<ul>";
+	
+	for (PageMap::const_iterator it = _pages.begin(); it != _pages.end(); ++it)
+	{
+		if (it->second.category == category)
+		{
+			ostr << "<li>";
+			writeTargetLink(ostr, it->second.fileName, it->second.title, target);
+			ostr << "</li>\n";
+		}
+	}
+	ostr << "</ul>";
+}
+
+
+NameSpace* DocWriter::rootNameSpace() const
+{
+	for (NameSpace::SymbolTable::const_iterator it = _symbols.begin(); it != _symbols.end(); ++it)
+	{
+		if (it->second->kind() == Symbol::SYM_NAMESPACE)
+		{
+			NameSpace* pNS = static_cast<NameSpace*>(it->second);
+			while (pNS->nameSpace()) pNS = pNS->nameSpace();
+			return pNS;
+		}
+	}
+	return 0;
+}
+
+
+const std::string& DocWriter::tr(const std::string& id)
+{
+	StringMap::const_iterator it = _strings.find(id);
+
+	if (it == _strings.end())
+	{
+		loadString(id, id, _language);
+		it = _strings.find(id);
+	}
+	if (it != _strings.end())
+		return it->second;
+	else
+		return id;
+}
+
+
+void DocWriter::loadString(const std::string& id, const std::string& def, const std::string& language)
+{
+	Application& app = Application::instance();
+	std::pair<std::string, std::string> p(id, app.config().getString("Translations." + language + "." + id, def));
+	_strings.insert(p);
+}
+
+
+void DocWriter::loadStrings(const std::string& language)
+{
+	_strings.clear();
+	loadString("AAAIntroduction", "Introduction", language);
+	loadString("All_Base_Classes", "All Base Classes", language);
+	loadString("All_Symbols", "All Symbols", language);
+	loadString("Anonymous", "Anonymous", language);
+	loadString("Constructors", "Constructors", language);
+	loadString("Class", "Class", language);
+	loadString("Deprecated", "Deprecated", language);
+	loadString("Description", "Description", language);
+	loadString("Destructor", "Destructor", language);
+	loadString("Direct_Base_Classes", "Direct Base Classes", language);
+	loadString("Enumerations", "Enumerations", language);
+	loadString("Functions", "Functions", language);
+	loadString("Header", "Header", language);
+	loadString("iff", "if and only if", language);
+	loadString("Inheritance", "Inheritance", language);
+	loadString("Inherited_Functions", "Inherited Functions", language);
+	loadString("is_deprecated", "is deprecated and should no longer be used", language);
+	loadString("Known_Derived_Classes", "Known Derived Classes", language);
+	loadString("Library", "Library", language);
+	loadString("License", "License", language);
+	loadString("Member_Functions", "Member Functions", language);
+	loadString("Member_Summary", "Member Summary", language);
+	loadString("more", "more...", language);
+	loadString("Namespaces", "Namespaces", language);
+	loadString("Namespace", "Namespace", language);
+	loadString("Nested_Classes", "Nested Classes", language);
+	loadString("Package", "Package", language);
+	loadString("Packages", "Packages", language);
+	loadString("Package_Index", "Package Index", language);
+	loadString("Reference", "Reference", language);
+	loadString("See_also", "See also", language);
+	loadString("Struct", "Struct", language);
+	loadString("Symbol_Index", "Symbol Index", language);
+	loadString("This", "This", language);
+	loadString("Types", "Types", language);
+	loadString("Variables", "Variables", language);
+}
diff --git a/PocoDoc/src/DocWriter.h b/PocoDoc/src/DocWriter.h
new file mode 100644
index 000000000..1407ac785
--- /dev/null
+++ b/PocoDoc/src/DocWriter.h
@@ -0,0 +1,245 @@
+//
+// DocWriter.h
+//
+// $Id: //poco/1.4/PocoDoc/src/DocWriter.h#1 $
+//
+// Definition of the DocWriter class.
+//
+// Copyright (c) 2005-2007, 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 PocoDoc_DocWriter_INCLUDED
+#define PocoDoc_DocWriter_INCLUDED
+
+
+#include "Poco/CppParser/NameSpace.h"
+#include "Poco/Logger.h"
+#include <vector>
+#include <set>
+#include <ostream>
+
+
+namespace Poco {
+namespace CppParser {
+
+
+class Symbol;
+class Struct;
+class Function;
+class TypeDef;
+class Enum;
+class Variable;
+
+
+} } // namespace Poco::CppParser
+
+
+class DocWriter
+	/// Given a symbol table obtained from a CppParser, this
+	/// class writes reference documentation in HTML format
+	/// to a directory.
+{
+public:
+	DocWriter(const Poco::CppParser::NameSpace::SymbolTable& symbols, const std::string& path, bool prettifyCode = true, bool noFrames = false);
+		/// Creates the DocWriter.
+
+	~DocWriter();
+		/// Destroys the DocWriter.
+		
+	void write();
+		/// Writes all documentation files.
+		
+	void writeEclipseTOC();
+		/// Write Eclipse Table-Of-Contents XML files.
+		
+	void addPage(const std::string& path);
+		/// Adds a page.
+
+protected:
+	enum TextState
+	{
+		TEXT_PARAGRAPH,
+		TEXT_LIST,
+		TEXT_OLIST,
+		TEXT_LITERAL,
+		TEXT_WHITESPACE
+	};
+	
+	struct Page
+	{
+		std::string path;
+		std::string fileName;
+		std::string title;
+		std::string category;
+	};
+	
+	enum
+	{
+		MAX_TITLE_LEVEL = 3,
+		PAGE_INDEX_COLUMNS = 2,
+		NAMESPACE_INDEX_COLUMNS = 4
+	};
+	
+	struct TOCEntry
+	{
+		std::string title;
+		int level;
+		int id;
+	};
+	
+	typedef std::vector<TOCEntry> TOC;
+	typedef std::map<std::string, Poco::CppParser::Function*> MethodMap;	
+	typedef std::map<std::string, std::string> StringMap;	
+	typedef std::map<std::string, Page> PageMap;
+
+	void writePages();
+	void writePage(Page& page);
+	void scanTOC(const std::string& text, TOC& toc);
+	void writeTOC(std::ostream& ostr, const TOC& toc);
+	void writeCategoryIndex(const std::string& category, const std::string& fileName);
+	void writeCategoryIndex(std::ostream& ostr, const std::string& category, const std::string& target);
+	void writePageIndex(std::ostream& ostr);
+	void writeNameSpaceIndex(std::ostream& ostr);
+	
+	void writeClass(const Poco::CppParser::Struct* pStruct);
+	void writeNameSpace(const Poco::CppParser::NameSpace* pNameSpace);
+	
+	void writeOverview();
+	void writeIndex();
+	void writeNameSpaceIndex(const Poco::CppParser::NameSpace* pNameSpace);
+	void writePackageIndex(const std::string& file, const std::string& library, const std::string& package);
+
+	std::string pathFor(const std::string& file);
+	static std::string fileNameFor(const Poco::CppParser::Symbol* pNameSpace);
+	static std::string baseNameFor(const Poco::CppParser::Symbol* pNameSpace);
+	static std::string uriFor(const Poco::CppParser::Symbol* pSymbol);
+	static std::string makeFileName(const std::string& str);
+	static std::string headerFor(const Poco::CppParser::Symbol* pSymbol);
+	static std::string titleFor(const Poco::CppParser::Symbol* pSymbol);
+
+	void writeHeader(std::ostream& ostr, const std::string& title);
+	static void writeFooter(std::ostream& ostr);
+	void writeCopyright(std::ostream& ostr);
+	static void writeTitle(std::ostream& ostr, const std::string& category, const std::string& title);
+	static void writeTitle(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, const std::string& title);
+	static void writeSubTitle(std::ostream& ostr, const std::string& title);
+	static void beginBody(std::ostream& ostr);
+	static void endBody(std::ostream& ostr);
+	void writeDescription(std::ostream& ostr, const std::string& text);
+	void writeDescriptionLine(std::ostream& ostr, const std::string& text, TextState& state);
+	void writeSummary(std::ostream& ostr, const std::string& text, const std::string& uri);
+	static std::string htmlize(const std::string& str);
+	static std::string htmlize(char c);
+	static TextState analyzeLine(const std::string& line);
+	static std::string htmlizeName(const std::string& name);
+	void writeText(std::ostream& ostr, const std::string& text);
+	void writeText(std::ostream& ostr, std::string::const_iterator begin, const std::string::const_iterator& end);
+	void writeDecl(std::ostream& ostr, const std::string& decl);
+	void writeDecl(std::ostream& ostr, std::string::const_iterator begin, const std::string::const_iterator& end);
+	bool writeSymbol(std::ostream& ostr, std::string& token, std::string::const_iterator& begin, const std::string::const_iterator& end);
+	bool writeSpecial(std::ostream& ostr, std::string& token, std::string::const_iterator& begin, const std::string::const_iterator& end);
+	void nextToken(std::string::const_iterator& it, const std::string::const_iterator& end, std::string& token);
+	void writeListItem(std::ostream& ostr, const std::string& text);
+	void writeOrderedListItem(std::ostream& ostr, const std::string& text);
+	void writeLiteral(std::ostream& ostr, const std::string& text);
+	void writeFileInfo(std::ostream& ostr, const Poco::CppParser::Symbol* pSymbol);
+	void writeInheritance(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
+	void writeMethodSummary(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
+	void writeNestedClasses(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
+	void writeNameSpacesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
+	void writeNameSpaces(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
+	void writeClassesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
+	void writeClasses(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
+	void writeClassSummary(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
+	void writeTypesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
+	void writeTypes(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
+	void writeType(std::ostream& ostr, const Poco::CppParser::TypeDef* pType);
+	void writeEnums(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
+	void writeEnum(std::ostream& ostr, const Poco::CppParser::Enum* pEnum);
+	void writeConstructors(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
+	void writeDestructor(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
+	void writeMethods(std::ostream& ostr, const Poco::CppParser::Struct* pNameSpace);
+	void writeFunctionsSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
+	void writeFunctions(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
+	void writeFunction(std::ostream& ostr, const Poco::CppParser::Function* pFunc);
+	void writeVariables(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
+	void writeVariable(std::ostream& ostr, const Poco::CppParser::Variable* pVar);
+	static void writeNameListItem(std::ostream& ostr, const std::string& name, const Poco::CppParser::Symbol* pSymbol, const Poco::CppParser::NameSpace* pNameSpace, bool& first);
+	static void writeLink(std::ostream& ostr, const std::string& uri, const std::string& text);
+	static void writeLink(std::ostream& ostr, const Poco::CppParser::Symbol* pSymbol, const std::string& text);
+	static void writeLink(std::ostream& ostr, const std::string& uri, const std::string& text, const std::string& linkClass);
+	void writeTargetLink(std::ostream& ostr, const std::string& uri, const std::string& text, const std::string& target);
+	static void writeImageLink(std::ostream& ostr, const std::string& uri, const std::string& image, const std::string& alt);
+	static void writeImage(std::ostream& ostr, const std::string& uri, const std::string& caption);
+	static void writeIcon(std::ostream& ostr, const std::string& icon);
+	static void writeAnchor(std::ostream& ostr, const std::string& text, const Poco::CppParser::Symbol* pSymbol);
+	static void writeDeprecated(std::ostream& ostr, const std::string& what);
+	void libraries(std::set<std::string>& libs);
+	void packages(const std::string& lib, std::set<std::string>& packages);
+
+	Poco::CppParser::NameSpace* rootNameSpace() const;
+
+	static const std::string& tr(const std::string& id);
+	static void loadStrings(const std::string& language);
+	static void loadString(const std::string& id, const std::string& def, const std::string& language);
+
+	static Poco::Logger& logger();
+	
+	static const std::string RFC_URI;
+	
+private:	
+	bool _prettifyCode;
+	bool _noFrames;
+	bool _htmlMode;
+	bool _literalMode;
+	const Poco::CppParser::NameSpace::SymbolTable& _symbols;
+	std::string _path;
+	const Poco::CppParser::NameSpace* _pNameSpace;
+	PageMap _pages;
+	bool _pendingLine;
+	int  _indent;
+	int  _titleId;
+	
+	static std::string _language;
+	static StringMap   _strings;
+	
+	static Poco::Logger* _pLogger;
+};
+
+
+//
+// inlines
+//
+inline Poco::Logger& DocWriter::logger()
+{
+	poco_check_ptr (_pLogger);
+
+	return *_pLogger;
+}
+
+
+#endif // PocoDoc_DocWriter_INCLUDED
diff --git a/PocoDoc/src/PocoDoc.cpp b/PocoDoc/src/PocoDoc.cpp
new file mode 100644
index 000000000..63bb868c2
--- /dev/null
+++ b/PocoDoc/src/PocoDoc.cpp
@@ -0,0 +1,511 @@
+//
+// PocoDoc.cpp
+//
+// $Id: //poco/1.4/PocoDoc/src/PocoDoc.cpp#2 $
+//
+// Copyright (c) 2005-2007, 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/StringTokenizer.h"
+#include "Poco/Glob.h"
+#include "Poco/Path.h"
+#include "Poco/File.h"
+#include "Poco/DirectoryIterator.h"
+#include "Poco/Process.h"
+#include "Poco/Pipe.h"
+#include "Poco/PipeStream.h"
+#include "Poco/Environment.h"
+#include "Poco/NumberFormatter.h"
+#include "Poco/Exception.h"
+#include "Poco/Stopwatch.h"
+#include "Poco/DateTime.h"
+#include "Poco/DateTimeFormatter.h"
+#include "Poco/Timespan.h"
+#include "Poco/DateTimeFormatter.h"
+#include "Poco/Util/Application.h"
+#include "Poco/Util/Option.h"
+#include "Poco/Util/OptionSet.h"
+#include "Poco/Util/HelpFormatter.h"
+#include "Poco/Util/AbstractConfiguration.h"
+#include "Poco/CppParser/Parser.h"
+#include "Poco/CppParser/NameSpace.h"
+#include "Poco/CppParser/Struct.h"
+#include "Poco/CppParser/Utility.h"
+#include "DocWriter.h"
+#include <set>
+#include <utility>
+#include <memory>
+#include <fstream>
+#include <sstream>
+#include <iostream>
+#include <clocale>
+
+
+using Poco::StringTokenizer;
+using Poco::Glob;
+using Poco::Path;
+using Poco::File;
+using Poco::DirectoryIterator;
+using Poco::Process;
+using Poco::ProcessHandle;
+using Poco::Environment;
+using Poco::NumberFormatter;
+using Poco::Exception;
+using Poco::Util::Application;
+using Poco::Util::Option;
+using Poco::Util::OptionSet;
+using Poco::Util::OptionCallback;
+using Poco::Util::HelpFormatter;
+using Poco::Util::AbstractConfiguration;
+
+
+class Preprocessor
+{
+public:
+	Preprocessor(const ProcessHandle& proc, std::istream* pStream):
+		_proc(proc),
+		_pStream(pStream)
+	{
+	}
+
+	Preprocessor(const ProcessHandle& proc, std::istream* pStream, const std::string& file):
+		_proc(proc),
+		_pStream(pStream),
+		_file(file)
+	{
+	}
+	
+	std::istream& stream()
+	{
+		return *_pStream;
+	}
+	
+	~Preprocessor()
+	{
+		int c = _pStream->get();
+		while (c != -1) c = _pStream->get();
+		delete _pStream;
+		_proc.wait();
+		if (!_file.empty())
+		{
+			try
+			{
+				File f(_file);
+				f.remove();
+			}
+			catch (Exception&)
+			{
+			}
+		}
+	}
+	
+private:
+	ProcessHandle _proc;
+	std::istream* _pStream;
+	std::string   _file;
+};
+
+
+class PocoDocApp: public Application
+{
+public:
+	PocoDocApp(): 
+		_helpRequested(false),
+		_writeEclipseTOC(false)
+	{
+		std::setlocale(LC_ALL, "");
+	}
+
+	~PocoDocApp()
+	{
+	}
+
+protected:	
+	void initialize(Application& self)
+	{
+		loadConfiguration(); // load default configuration files, if present
+		Application::initialize(self);
+	}
+	
+	void uninitialize()
+	{
+		Application::uninitialize();
+	}
+	
+	void reinitialize(Application& self)
+	{
+		Application::reinitialize(self);
+	}
+	
+	void defineOptions(OptionSet& options)
+	{
+		Application::defineOptions(options);
+
+		options.addOption(
+			Option("help", "h", "display help information on command line arguments")
+				.required(false)
+				.repeatable(false)
+				.callback(OptionCallback<PocoDocApp>(this, &PocoDocApp::handleHelp)));
+
+		options.addOption(
+			Option("config-file", "f", "load configuration data from a file")
+				.required(false)
+				.repeatable(true)
+				.argument("file")
+				.callback(OptionCallback<PocoDocApp>(this, &PocoDocApp::handleConfig)));
+
+		options.addOption(
+			Option("eclipse", "e", "write Eclipse TOC file")
+				.required(false)
+				.repeatable(false)
+				.callback(OptionCallback<PocoDocApp>(this, &PocoDocApp::handleEclipse)));
+	}
+	
+	void handleHelp(const std::string& name, const std::string& value)
+	{
+		_helpRequested = true;
+		displayHelp();
+		stopOptionsProcessing();
+	}
+	
+	void handleEclipse(const std::string& name, const std::string& value)
+	{
+		_writeEclipseTOC = true;
+	}
+
+	void handleConfig(const std::string& name, const std::string& value)
+	{
+		loadConfiguration(value, -200);
+	}
+	
+	void displayHelp()
+	{
+		HelpFormatter helpFormatter(options());
+		helpFormatter.setCommand(commandName());
+		helpFormatter.setUsage("OPTIONS");
+		helpFormatter.setHeader("Applied Informatics' super duper documentation builder.");
+		helpFormatter.format(std::cout);
+	}
+	
+	void buildFileList(std::set<std::string>& files)
+	{
+		std::set<std::string> temp;
+		std::string includes = config().getString("PocoDoc.files.include");
+		std::string excludes = config().getString("PocoDoc.files.exclude", "");
+		StringTokenizer incTokenizer(includes, ",\n", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
+		for (StringTokenizer::Iterator it = incTokenizer.begin(); it != incTokenizer.end(); ++it)
+		{
+			Glob::glob(*it, temp);
+		}
+		StringTokenizer excTokenizer(excludes, ",\n", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
+		for (std::set<std::string>::const_iterator it = temp.begin(); it != temp.end(); ++it)
+		{
+			Path p(*it);
+			bool include = true;
+			for (StringTokenizer::Iterator itg = excTokenizer.begin(); itg != excTokenizer.end(); ++itg)
+			{
+				Glob glob(*itg);
+				if (glob.match(p.getFileName()))
+					include = false;
+			}
+			if (include)
+				files.insert(*it);
+		}
+	}
+	
+	Preprocessor* preprocess(const std::string& file)
+	{
+		Path pp(file);
+		pp.setExtension("i");
+
+		std::string exec = config().getString("PocoDoc.compiler.exec");
+		std::string opts = config().getString("PocoDoc.compiler.options");
+		std::string path = config().getString("PocoDoc.compiler.path", "");
+		bool usePipe = config().getBool("PocoDoc.compiler.usePipe", false);
+		std::string popts;
+		for (std::string::const_iterator it = opts.begin(); it != opts.end(); ++it)
+		{
+			if (*it == '%')
+				popts += pp.getBaseName();
+			else
+				popts += *it;
+		}
+		StringTokenizer tokenizer(popts, ",\n", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
+		std::vector<std::string> 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);
+		}
+		
+		if (usePipe)
+		{
+			Poco::Pipe inPipe;
+			ProcessHandle proc = Process::launch(exec, args, 0, &inPipe, 0);		
+			return new Preprocessor(proc, new Poco::PipeInputStream(inPipe));
+		}
+		else
+		{
+			ProcessHandle proc = Process::launch(exec, args);	
+			proc.wait();
+			return new Preprocessor(proc, new std::ifstream(pp.getFileName().c_str()), pp.getFileName());
+		}
+	}
+	
+	void parse(const std::string& file)
+	{
+		logger().information("Preprocessing " + file);
+		std::auto_ptr<Preprocessor> pPreProc(preprocess(file));
+		
+		logger().information("Parsing " + file);
+		if (pPreProc->stream().good())
+		{
+			Poco::CppParser::Parser parser(_gst, file, pPreProc->stream());
+			parser.parse();
+		}
+		else throw Poco::OpenFileException("cannot read from preprocessor");
+	}
+		
+	int parseAll()
+	{
+		int errors = 0;
+		std::set<std::string> files;
+		buildFileList(files);
+		for (std::set<std::string>::const_iterator it = files.begin(); it != files.end(); ++it)
+		{
+			try
+			{
+				parse(*it);
+			}
+			catch (Exception& exc)
+			{
+				logger().log(exc);
+				++errors;
+			}
+		}
+		return errors;
+	}
+	
+	void fixup()
+	{
+		logger().information("Fixing-up class hierarchies");
+		for (Poco::CppParser::NameSpace::SymbolTable::iterator it = _gst.begin(); it != _gst.end(); ++it)
+		{
+			Poco::CppParser::Struct* pStruct = dynamic_cast<Poco::CppParser::Struct*>(it->second);
+			if (pStruct)
+			{
+				pStruct->fixupBases();
+			}
+		}
+	}
+	
+	void writeDoc()
+	{
+		logger().information("Generating documentation");
+		Path path(config().getString("PocoDoc.output", "doc"));
+		path.makeDirectory();
+		File file(path);
+		file.createDirectories();
+		
+		DocWriter writer(_gst, path.toString(), config().getBool("PocoDoc.prettifyCode", false), _writeEclipseTOC);
+		
+		if (config().hasProperty("PocoDoc.pages"))
+		{
+			std::string pages = config().getString("PocoDoc.pages");
+			StringTokenizer tokenizer(pages, ",\n", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
+			std::set<std::string> pageSet;
+			for (StringTokenizer::Iterator it = tokenizer.begin(); it != tokenizer.end(); ++it)
+			{
+				Glob::glob(*it, pageSet);
+			}
+			for (std::set<std::string>::const_iterator it = pageSet.begin(); it != pageSet.end(); ++it)
+			{
+				writer.addPage(*it);
+			}
+		}
+		writer.write();
+		
+		if (_writeEclipseTOC)
+		{
+			writer.writeEclipseTOC();
+		}
+	}
+	
+	void copyResources()
+	{
+		logger().information("Copying resources");
+		Path path(config().getString("PocoDoc.output", "doc"));
+
+		if (config().hasProperty("PocoDoc.resources"))
+		{
+			std::string pages = config().getString("PocoDoc.resources");
+			StringTokenizer tokenizer(pages, ",\n", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
+			std::set<std::string> pageSet;
+			for (StringTokenizer::Iterator it = tokenizer.begin(); it != tokenizer.end(); ++it)
+			{
+				Glob::glob(*it, pageSet);
+			}
+			for (std::set<std::string>::const_iterator it = pageSet.begin(); it != pageSet.end(); ++it)
+			{
+				try
+				{
+					copyResource(Path(*it), path);
+				}
+				catch (Poco::Exception& exc)
+				{
+					logger().log(exc);
+				}
+			}
+		}
+	}
+	
+	void copyResource(const Path& source, const Path& dest)
+	{
+		logger().information(std::string("Copying resource ") + source.toString() + " to " + dest.toString());
+		File sf(source);
+		if (sf.isDirectory())
+			copyDirectory(source, dest);
+		else
+			copyFile(source, dest);
+	}
+	
+	void copyFile(const Path& source, const Path& dest)
+	{
+		Path dd(dest);
+		dd.makeDirectory();
+		File df(dd);
+		df.createDirectories();
+		dd.setFileName(source.getFileName());
+		if (source.getExtension() == "thtml")
+		{
+			dd.setExtension("html");
+			std::ifstream istr(source.toString().c_str());
+			std::ofstream ostr(dd.toString().c_str());
+			while (istr.good())
+			{
+				std::string line;
+				std::getline(istr, line);
+				ostr << config().expand(line) << std::endl;
+			}
+		}
+		else
+		{
+			File sf(source);
+			sf.copyTo(dd.toString());
+		}
+	}
+	
+	void copyDirectory(const Path& source, const Path& dest)
+	{
+		Path src(source);
+		src.makeFile();
+		DirectoryIterator it(src);
+		DirectoryIterator end;
+		for (; it != end; ++it)
+		{
+			Path dd(dest);
+			dd.makeDirectory();
+			dd.pushDirectory(src.getFileName());
+			copyResource(it.path(), dd);
+		}
+	}
+
+	int main(const std::vector<std::string>& args)
+	{
+		if (!_helpRequested)
+		{
+			Poco::DateTime now;
+			config().setString("PocoDoc.date", Poco::DateTimeFormatter::format(now, "%Y-%m-%d"));
+			config().setString("PocoDoc.year", Poco::DateTimeFormatter::format(now, "%Y"));
+			config().setString("PocoDoc.googleAnalyticsCode", generateGoogleAnalyticsCode());
+			Poco::Stopwatch sw;
+			int errors = 0;
+			try
+			{
+				sw.start();
+				errors = parseAll();
+				fixup();
+				writeDoc();
+				copyResources();
+				sw.stop();
+			}
+			catch (Exception& exc)
+			{
+				std::cerr << exc.displayText() << std::endl;
+			}
+			logger().information(NumberFormatter::format(errors) + " errors.");
+			logger().information(std::string("Time: ") + Poco::DateTimeFormatter::format(Poco::Timespan(sw.elapsed())));
+		}
+		return Application::EXIT_OK;
+	}
+	
+	std::string generateGoogleAnalyticsCode()
+	{
+		std::stringstream ostr;
+		std::string googleAnalyticsId(config().getString("PocoDoc.googleAnalyticsId", ""));
+		if (!googleAnalyticsId.empty())
+		{
+			ostr << "<!-- Begin Google Analytics -->\n";
+			ostr << "<script type=\"text/javascript\">\n";
+			ostr << "var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\n";
+			ostr << "document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\n";
+			ostr << "</script>\n";
+			ostr << "<script type=\"text/javascript\">\n";
+			ostr << "try {\n";
+			ostr << "var pageTracker = _gat._getTracker(\"" << googleAnalyticsId << "\");\n";
+			ostr << "pageTracker._trackPageview();\n";
+			ostr << "} catch(err) {}</script>\n";
+			ostr << "<!-- End Google Analytics -->\n";
+		}
+		return ostr.str();
+	}
+	
+private:
+	bool _helpRequested;
+	bool _writeEclipseTOC;
+	Poco::CppParser::NameSpace::SymbolTable _gst;
+};
+
+
+int main(int argc, char** argv)
+{
+	PocoDocApp app;
+	try
+	{
+		app.init(argc, argv);
+	}
+	catch (Poco::Exception& exc)
+	{
+		app.logger().log(exc);
+		return Application::EXIT_CONFIG;
+	}
+	return app.run();
+}