You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(140) |
Feb
(98) |
Mar
(152) |
Apr
(104) |
May
(71) |
Jun
(94) |
Jul
(169) |
Aug
(83) |
Sep
(47) |
Oct
(134) |
Nov
(7) |
Dec
(20) |
2004 |
Jan
(41) |
Feb
(14) |
Mar
(42) |
Apr
(47) |
May
(68) |
Jun
(143) |
Jul
(65) |
Aug
(29) |
Sep
(40) |
Oct
(34) |
Nov
(33) |
Dec
(97) |
2005 |
Jan
(29) |
Feb
(30) |
Mar
(9) |
Apr
(37) |
May
(13) |
Jun
(31) |
Jul
(22) |
Aug
(23) |
Sep
|
Oct
(37) |
Nov
(34) |
Dec
(117) |
2006 |
Jan
(48) |
Feb
(6) |
Mar
(2) |
Apr
(71) |
May
(10) |
Jun
(16) |
Jul
(7) |
Aug
(1) |
Sep
(14) |
Oct
(17) |
Nov
(25) |
Dec
(26) |
2007 |
Jan
(8) |
Feb
(2) |
Mar
(7) |
Apr
(26) |
May
|
Jun
(12) |
Jul
(30) |
Aug
(14) |
Sep
(9) |
Oct
(4) |
Nov
(7) |
Dec
(6) |
2008 |
Jan
(10) |
Feb
(10) |
Mar
(6) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(18) |
Aug
(15) |
Sep
(16) |
Oct
(5) |
Nov
(3) |
Dec
(10) |
2009 |
Jan
(11) |
Feb
(2) |
Mar
|
Apr
(15) |
May
(31) |
Jun
(18) |
Jul
(11) |
Aug
(26) |
Sep
(52) |
Oct
(17) |
Nov
(4) |
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@ww...> - 2004-10-03 18:28:53
|
Author: delta Date: 2004-10-03 11:26:25 -0700 (Sun, 03 Oct 2004) New Revision: 1278 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/InputEvent.h trunk/CSP/CSPSim/Include/System.h trunk/CSP/CSPSim/Source/AircraftObject.cpp trunk/CSP/CSPSim/Source/ClientNode.cpp trunk/CSP/CSPSim/Source/Collision.cpp trunk/CSP/CSPSim/Source/DispatchCenter.cpp trunk/CSP/CSPSim/Source/DynamicObject.cpp trunk/CSP/CSPSim/Source/EchoServerNode.cpp trunk/CSP/CSPSim/Source/Engine.cpp trunk/CSP/CSPSim/Source/GameScreen.cpp trunk/CSP/CSPSim/Source/InputEvent.cpp trunk/CSP/CSPSim/Source/RedirectServerNode.cpp trunk/CSP/CSPSim/Source/ScreenInfo.cpp trunk/CSP/CSPSim/Source/SimNet/DispatchMessageHandler.cpp trunk/CSP/CSPSim/Source/SimNet/EchoMessageHandler.cpp trunk/CSP/CSPSim/Source/SimNet/NetworkMessage.cpp trunk/CSP/CSPSim/Source/SimNet/NetworkMessenger.cpp trunk/CSP/CSPSim/Source/SimNet/NetworkNode.cpp trunk/CSP/CSPSim/Source/SimNet/PrintMessageHandler.cpp trunk/CSP/CSPSim/Source/SimNet/RedirectMessageHandler.cpp trunk/CSP/CSPSim/Source/SimpleSceneManager.cpp trunk/CSP/CSPSim/Source/TankObject.cpp trunk/CSP/CSPSim/Source/Theater/Feature.cpp trunk/CSP/CSPSim/Source/Theater/FeatureGroup.cpp trunk/CSP/CSPSim/Source/Theater/FeatureObjectModel.cpp trunk/CSP/CSPSim/Source/Views/CameraAgent.cpp trunk/CSP/CSPSim/Source/Views/CameraKinematics.cpp trunk/CSP/CSPSim/Source/Views/View.cpp trunk/CSP/CSPSim/Source/VirtualScene.cpp trunk/CSP/CSPSim/Source/cCSP.i trunk/CSP/CSPSim/VisualStudio/CSPSim.sln trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj Log: * Updated vcproj. Building CSPSimDLL now buils others libs (SimCore, SpatialIndex) according to the build mode. * #include "Animation.h" and/or "ObjectModel.h" to numerous source files. Need to investigate more to a safe approach to make it work with vs. * Removed #undef ERROR from System.h. * Added #include "ObjectModel.h" & "Animation.h" to cCSP.i. * Minor others changes. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1278 Diff omitted (28223 bytes). |
From: <sv...@ww...> - 2004-10-03 13:53:28
|
Author: delta Date: 2004-10-03 06:46:08 -0700 (Sun, 03 Oct 2004) New Revision: 1277 Added: trunk/CSP/SimCore/VisualStudio2003/ trunk/CSP/SimCore/VisualStudio2003/SimCore.sln trunk/CSP/SimCore/VisualStudio2003/SimCore.vcproj Modified: trunk/CSP/SimCore/Util/Log.h Log: * Removed no more needed #undef ERROR (it arises at a higher level). * Added VisualStudio2003 dir. * Binaries are sent to SimCore/.bin Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1277 Modified: trunk/CSP/SimCore/Util/Log.h =================================================================== --- trunk/CSP/SimCore/Util/Log.h 2004-10-03 13:42:57 UTC (rev 1276) +++ trunk/CSP/SimCore/Util/Log.h 2004-10-03 13:46:08 UTC (rev 1277) @@ -28,8 +28,6 @@ #include <SimData/Log.h> -#undef ERROR - /** * Define the possible classes/categories of logging messages */ Added: trunk/CSP/SimCore/VisualStudio2003/SimCore.sln =================================================================== --- trunk/CSP/SimCore/VisualStudio2003/SimCore.sln 2004-10-03 13:42:57 UTC (rev 1276) +++ trunk/CSP/SimCore/VisualStudio2003/SimCore.sln 2004-10-03 13:46:08 UTC (rev 1277) @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimCore", "SimCore.vcproj", "{94C7C9F9-60EC-41F9-AFD1-560A0F3CCA38}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {94C7C9F9-60EC-41F9-AFD1-560A0F3CCA38}.Debug.ActiveCfg = Debug|Win32 + {94C7C9F9-60EC-41F9-AFD1-560A0F3CCA38}.Debug.Build.0 = Debug|Win32 + {94C7C9F9-60EC-41F9-AFD1-560A0F3CCA38}.Release.ActiveCfg = Release|Win32 + {94C7C9F9-60EC-41F9-AFD1-560A0F3CCA38}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal Added: trunk/CSP/SimCore/VisualStudio2003/SimCore.vcproj =================================================================== --- trunk/CSP/SimCore/VisualStudio2003/SimCore.vcproj 2004-10-03 13:42:57 UTC (rev 1276) +++ trunk/CSP/SimCore/VisualStudio2003/SimCore.vcproj 2004-10-03 13:46:08 UTC (rev 1277) @@ -0,0 +1,173 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="SimCore" + ProjectGUID="{94C7C9F9-60EC-41F9-AFD1-560A0F3CCA38}" + Keyword="MakeFileProj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="4"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../..;../../SimData/Include" + PreprocessorDefinitions="WIN32" + RuntimeLibrary="3" + RuntimeTypeInfo="TRUE" + WarningLevel="4"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="../.bin/$(ProjectName)d.lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="4"> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + GlobalOptimizations="TRUE" + InlineFunctionExpansion="2" + OptimizeForWindowsApplication="TRUE" + AdditionalIncludeDirectories="../..;../../SimData/Include" + PreprocessorDefinitions="WIN32" + RuntimeLibrary="2" + RuntimeTypeInfo="TRUE" + WarningLevel="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="../.bin/$(ProjectName).lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + <Filter + Name="Battlefield" + Filter=""> + <File + RelativePath="..\Battlefield\Battlefield.cpp"> + </File> + <File + RelativePath="..\Battlefield\SceneManager.cpp"> + </File> + <File + RelativePath="..\Battlefield\SimObject.cpp"> + </File> + </Filter> + <Filter + Name="Util" + Filter=""> + <File + RelativePath="..\Util\SimpleConfig.cpp"> + </File> + <File + RelativePath="..\Util\StringTools.cpp"> + </File> + <File + RelativePath="..\Util\SynchronousUpdate.cpp"> + </File> + </Filter> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + <Filter + Name="Battlefield" + Filter=""> + <File + RelativePath="..\Battlefield\Battlefield.h"> + </File> + <File + RelativePath="..\Battlefield\SceneManager.h"> + </File> + <File + RelativePath="..\Battlefield\SimObject.h"> + </File> + </Filter> + <Filter + Name="Util" + Filter=""> + <File + RelativePath="..\Util\Dispatch.h"> + </File> + <File + RelativePath="..\Util\Log.h"> + </File> + <File + RelativePath="..\Util\SimpleConfig.h"> + </File> + <File + RelativePath="..\Util\StringTools.h"> + </File> + <File + RelativePath="..\Util\SynchronousUpdate.h"> + </File> + </Filter> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + </Filter> + <File + RelativePath=".\readme.txt"> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> |
From: <sv...@ww...> - 2004-10-03 13:44:34
|
Author: delta Date: 2004-10-03 06:42:57 -0700 (Sun, 03 Oct 2004) New Revision: 1276 Modified: trunk/CSP/SpatialIndex/VisualStudio/SpatialIndex.vcproj Log: Binaries are sent to SpatialIndex/.bin. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1276 Modified: trunk/CSP/SpatialIndex/VisualStudio/SpatialIndex.vcproj =================================================================== --- trunk/CSP/SpatialIndex/VisualStudio/SpatialIndex.vcproj 2004-10-03 13:41:08 UTC (rev 1275) +++ trunk/CSP/SpatialIndex/VisualStudio/SpatialIndex.vcproj 2004-10-03 13:42:57 UTC (rev 1276) @@ -22,13 +22,15 @@ AdditionalIncludeDirectories=".." RuntimeLibrary="3" RuntimeTypeInfo="TRUE" + ExpandAttributedSource="FALSE" BrowseInformation="1" + WarningLevel="4" DebugInformationFormat="4"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLibrarianTool" - OutputFile="../../lib/$(ProjectName)d.lib"/> + OutputFile="../.bin/$(ProjectName)d.lib"/> <Tool Name="VCMIDLTool"/> <Tool @@ -67,7 +69,7 @@ Name="VCCustomBuildTool"/> <Tool Name="VCLibrarianTool" - OutputFile="../../lib/$(ProjectName).lib"/> + OutputFile="../.bin/$(ProjectName).lib"/> <Tool Name="VCMIDLTool"/> <Tool |
From: <sv...@ww...> - 2004-10-03 13:42:34
|
Author: delta Date: 2004-10-03 06:41:08 -0700 (Sun, 03 Oct 2004) New Revision: 1275 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/AtomicCounter.h trunk/CSP/SimData/Include/SimData/Enum.h trunk/CSP/SimData/Include/SimData/FileUtility.h trunk/CSP/SimData/Source/FileUtility.cpp trunk/CSP/SimData/Source/LogStream.cpp trunk/CSP/SimData/VisualStudio2003/SimData.vcproj Log: * Updated vcproj. * Exported EnumerationCore from Enum.h. * Used Interlocked* instead of _Interlocked* in AtomicCounter.h. * Removed ospath namespace in front of stripFileExtension. * Added #define NOMINMAX in FileUtility.cpp to avoid usual conflicts including windows.h. * Changed "contents" into "entries" in getDirectoryContents (_WIN32) from FileUtility.cpp. Changed FileClosed into FindClose. * Exported _log_reference_count_error & _log_reference_conversion_error from LogStream.cpp. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1275 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-10-03 02:29:06 UTC (rev 1274) +++ trunk/CSP/SimData/CHANGES.current 2004-10-03 13:41:08 UTC (rev 1275) @@ -1,6 +1,24 @@ Version 0.4.0 (in progress) =========================== +2004-04-03: delta + * Updated vcproj. + + * Exported EnumerationCore from Enum.h. + + * Used Interlocked* instead of _Interlocked* in AtomicCounter.h. + + * Removed ospath namespace in front of stripFileExtension. + + * Added #define NOMINMAX in FileUtility.cpp to avoid usual conflicts + including windows.h. + + * Changed "contents" into "entries" in getDirectoryContents (_WIN32) from + FileUtility.cpp. Changed FileClosed into FindClose. + + * Exported _log_reference_count_error & _log_reference_conversion_error from + LogStream.cpp. + 2004-10-02: onsight * Implement AtomicCounter using compiler intrinsics under msvc. @@ -40,7 +58,7 @@ 2004-09-28: delta * Added a #undef ERROR after inlcuding windows.h, protected behind - a #ifdef. + a #ifdef in AtomicCounter.h. 2004-09-26: onsight * Fix a couple compiler warnings under msvc. Modified: trunk/CSP/SimData/Include/SimData/AtomicCounter.h =================================================================== --- trunk/CSP/SimData/Include/SimData/AtomicCounter.h 2004-10-03 02:29:06 UTC (rev 1274) +++ trunk/CSP/SimData/Include/SimData/AtomicCounter.h 2004-10-03 13:41:08 UTC (rev 1275) @@ -38,10 +38,10 @@ #if defined(WIN32) # define WIN_ATOMIC -//# define _WINSOCKAPI_ -//# define NOMINMAX -//# include <Windows.h> -//# undef ERROR +# define _WINSOCKAPI_ +# define NOMINMAX +# include <Windows.h> +# undef ERROR #else # define LIN_ATOMIC extern "C" { @@ -63,14 +63,14 @@ // Atomic counter using windows-specific atomic counter primitives (much // faster than mutex locking). #elif defined(WIN_ATOMIC) -# define SIMDATA_ATOMIC_SET(x, count) _InterlockedExchange(&x, count) -# define SIMDATA_ATOMIC_DEC(x) _InterlockedDecrement(&x) ? false : true; -# define SIMDATA_ATOMIC_INC(x) _InterlockedIncrement(&x) ? false : true; +# define SIMDATA_ATOMIC_SET(x, count) InterlockedExchange(&x, count) +# define SIMDATA_ATOMIC_DEC(x) InterlockedDecrement(&x) ? false : true; +# define SIMDATA_ATOMIC_INC(x) InterlockedIncrement(&x) ? false : true; # define SIMDATA_ATOMIC_GET(x) x # define SIMDATA_ATOMIC_TYPE volatile LONG -# pragma intrinsic (_InterlockedExchange) -# pragma intrinsic (_InterlockedDecrement) -# pragma intrinsic (_InterlockedIncrement) +//# pragma intrinsic (_InterlockedExchange) +//# pragma intrinsic (_InterlockedDecrement) +//# pragma intrinsic (_InterlockedIncrement) // Atomic counter using pthreads locking (slow but safe). #else NAMESPACE_SIMDATA Modified: trunk/CSP/SimData/Include/SimData/Enum.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Enum.h 2004-10-03 02:29:06 UTC (rev 1274) +++ trunk/CSP/SimData/Include/SimData/Enum.h 2004-10-03 13:41:08 UTC (rev 1275) @@ -119,7 +119,7 @@ * You should never create an instance of this class directly; * use Enumeration instead. */ -class EnumerationCore: public Referenced { +class SIMDATA_EXPORT EnumerationCore: public Referenced { friend class Enumeration; typedef std::pair<std::string, int> Element; typedef std::vector<Element> Elements; Modified: trunk/CSP/SimData/Include/SimData/FileUtility.h =================================================================== --- trunk/CSP/SimData/Include/SimData/FileUtility.h 2004-10-03 02:29:06 UTC (rev 1274) +++ trunk/CSP/SimData/Include/SimData/FileUtility.h 2004-10-03 13:41:08 UTC (rev 1275) @@ -142,7 +142,7 @@ /** Removes the last extension from a filepath. Returns the extension * (excluding the '.'), or an empty string if no extensions were found. */ - extern SIMDATA_EXPORT std::string ospath::stripFileExtension(std::string &path); + extern SIMDATA_EXPORT std::string stripFileExtension(std::string &path); /** Get the last extension of a filename (excluding the '.'), or an empty * string if no extensions were found. Modified: trunk/CSP/SimData/Source/FileUtility.cpp =================================================================== --- trunk/CSP/SimData/Source/FileUtility.cpp 2004-10-03 02:29:06 UTC (rev 1274) +++ trunk/CSP/SimData/Source/FileUtility.cpp 2004-10-03 13:41:08 UTC (rev 1275) @@ -34,6 +34,7 @@ #ifdef _WIN32 # define STRICT /* Strict typing, please */ +# define NOMINMAX # include <windows.h> # include <direct.h> # include <ctype.h> @@ -197,7 +198,7 @@ #else // POSIX (hopefully) static const int mode = F_OK; #endif - return access(path.c_str(), mode); + return access(path.c_str(), mode) != 0; } ospath::DirectoryContents ospath::getDirectoryContents(std::string const &path) { @@ -208,9 +209,9 @@ HANDLE handle = FindFirstFile(search_path.c_str(), &ffd); if (handle != INVALID_HANDLE_VALUE) { do { - contents.push_back(ffd.cFileName); + entries.push_back(ffd.cFileName); } while (FindNextFile(handle, &ffd) != 0); - FileClose(handle); + FindClose(handle); } #else // POSIX (hopefully) DIR *dir = opendir(path.c_str()); Modified: trunk/CSP/SimData/Source/LogStream.cpp =================================================================== --- trunk/CSP/SimData/Source/LogStream.cpp 2004-10-03 02:29:06 UTC (rev 1274) +++ trunk/CSP/SimData/Source/LogStream.cpp 2004-10-03 13:41:08 UTC (rev 1275) @@ -127,12 +127,12 @@ } // not really the right place for this, but convenient. -void _log_reference_count_error(int count, int pointer) { +void SIMDATA_EXPORT _log_reference_count_error(int count, int pointer) { SIMDATA_LOG(LOG_ALL, LOG_ERROR, "simdata::ReferencedBase(" << std::hex << pointer << ") deleted with non-zero reference count (" << count << "): memory corruption possible."); } // not really the right place for this, but convenient. -void _log_reference_conversion_error() { +void SIMDATA_EXPORT _log_reference_conversion_error() { SIMDATA_LOG(LOG_ALL, LOG_ERROR, "simdata::Ref() assignment: incompatible types (dynamic cast failed)."); } Modified: trunk/CSP/SimData/VisualStudio2003/SimData.vcproj =================================================================== --- trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-10-03 02:29:06 UTC (rev 1274) +++ trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-10-03 13:41:08 UTC (rev 1275) @@ -106,6 +106,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" + EnableIntrinsicFunctions="TRUE" AdditionalIncludeDirectories="../Include,$(PYTHON_PATH)/include" PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;SIMDATA_EXPORTS" BasicRuntimeChecks="3" @@ -119,7 +120,8 @@ WarningLevel="4" SuppressStartupBanner="TRUE" DebugInformationFormat="3" - CompileAs="0"/> + CompileAs="2" + DisableSpecificWarnings="4511;4512;4100"/> <Tool Name="VCCustomBuildTool"/> <Tool @@ -255,12 +257,21 @@ RelativePath="..\Source\Real.cpp"> </File> <File + RelativePath="..\Source\TaggedRecordRegistry.cpp"> + </File> + <File RelativePath="..\Source\ThreadBase.cpp"> </File> <File + RelativePath="..\Source\ThreadLog.cpp"> + </File> + <File RelativePath="..\Source\Timing.cpp"> </File> <File + RelativePath="..\Source\Trace.cpp"> + </File> + <File RelativePath="..\Source\TypeAdapter.cpp"> </File> <File @@ -439,6 +450,9 @@ RelativePath="..\Include\SimData\Vector3.h"> </File> <File + RelativePath="..\Include\SimData\Verify.h"> + </File> + <File RelativePath="..\Include\SimData\Version.h"> </File> </Filter> |
From: <sv...@ww...> - 2004-10-03 02:30:26
|
Author: mkrose Date: 2004-10-02 19:29:06 -0700 (Sat, 02 Oct 2004) New Revision: 1274 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Animation.h trunk/CSP/CSPSim/Include/CSPSim.h trunk/CSP/CSPSim/Include/ChunkLodTerrain.h trunk/CSP/CSPSim/Include/ConsoleCommands.h trunk/CSP/CSPSim/Include/DynamicObject.h trunk/CSP/CSPSim/Include/GameScreen.h trunk/CSP/CSPSim/Include/MenuScreen.h trunk/CSP/CSPSim/Include/ObjectModel.h trunk/CSP/CSPSim/Include/ScreenInfo.h trunk/CSP/CSPSim/Include/ScreenInfoManager.h trunk/CSP/CSPSim/Include/TerrainObject.h trunk/CSP/CSPSim/Include/VirtualScene.h trunk/CSP/CSPSim/Source/Animation.cpp trunk/CSP/CSPSim/Source/CSPSim.cpp trunk/CSP/CSPSim/Source/ChunkLodTerrain.cpp trunk/CSP/CSPSim/Source/EventMapIndex.cpp trunk/CSP/CSPSim/Source/GameScreen.cpp trunk/CSP/CSPSim/Source/MenuScreen.cpp trunk/CSP/CSPSim/Source/ObjectModel.cpp trunk/CSP/CSPSim/Source/ScreenInfo.cpp trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp trunk/CSP/CSPSim/Source/TerrainObject.cpp trunk/CSP/SimData/Include/SimData/osg.h Log: Break more header interdependencies in CSPSim, especially wrt osg. Hopefully doesn't also break the Windows build too badly! Builds on Linux are about 30% faster. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1274 Diff omitted (24484 bytes). |
From: <sv...@ww...> - 2004-10-03 02:27:43
|
Author: mkrose Date: 2004-10-02 19:26:29 -0700 (Sat, 02 Oct 2004) New Revision: 1273 Modified: trunk/CSP/SimData/Include/SimData/AtomicCounter.h Log: Implement AtomicCounter using compiler intrinsics under msvc. ==>WINDOWS USERS this is untested and may need debugging. According to MS you'll need to pass the /Oi option to msvc. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1273 Modified: trunk/CSP/SimData/Include/SimData/AtomicCounter.h =================================================================== --- trunk/CSP/SimData/Include/SimData/AtomicCounter.h 2004-10-03 02:24:18 UTC (rev 1272) +++ trunk/CSP/SimData/Include/SimData/AtomicCounter.h 2004-10-03 02:26:29 UTC (rev 1273) @@ -38,10 +38,10 @@ #if defined(WIN32) # define WIN_ATOMIC -# define _WINSOCKAPI_ -# define NOMINMAX -# include <Windows.h> -# undef ERROR +//# define _WINSOCKAPI_ +//# define NOMINMAX +//# include <Windows.h> +//# undef ERROR #else # define LIN_ATOMIC extern "C" { @@ -52,7 +52,57 @@ }; #endif +// Atomic counter using linux-specific atomic counter primitives (much +// faster than mutex locking). +#if defined(LIN_ATOMIC) +# define SIMDATA_ATOMIC_SET(x, count) atomic_set(&x, count) +# define SIMDATA_ATOMIC_DEC(x) atomic_dec_and_test(&x) ? false : true; +# define SIMDATA_ATOMIC_INC(x) atomic_inc_and_test(&x) ? false : true; +# define SIMDATA_ATOMIC_GET(x) atomic_read(&x); +# define SIMDATA_ATOMIC_TYPE atomic_t +// Atomic counter using windows-specific atomic counter primitives (much +// faster than mutex locking). +#elif defined(WIN_ATOMIC) +# define SIMDATA_ATOMIC_SET(x, count) _InterlockedExchange(&x, count) +# define SIMDATA_ATOMIC_DEC(x) _InterlockedDecrement(&x) ? false : true; +# define SIMDATA_ATOMIC_INC(x) _InterlockedIncrement(&x) ? false : true; +# define SIMDATA_ATOMIC_GET(x) x +# define SIMDATA_ATOMIC_TYPE volatile LONG +# pragma intrinsic (_InterlockedExchange) +# pragma intrinsic (_InterlockedDecrement) +# pragma intrinsic (_InterlockedIncrement) +// Atomic counter using pthreads locking (slow but safe). +#else + NAMESPACE_SIMDATA + class _AtomicCounter { + private: + int __count; + ThreadMutex __mutex; + public: + _AtomicCounter(): __count(0) { } + inline void set(int count) { + ScopedLock<ThreadMutex> lock(__mutex); + __count = count; + } + inline bool dec() { + ScopedLock<ThreadMutex> lock(__mutex); + return --__count != 0; + } + inline bool inc() { + ScopedLock<ThreadMutex> lock(__mutex); + return ++__count != 0; + } + inline int get() { return __count; } + }; + NAMESPACE_SIMDATA_END +# define SIMDATA_ATOMIC_SET(x, count) x.set(count) +# define SIMDATA_ATOMIC_DEC(x) x.dec(); +# define SIMDATA_ATOMIC_INC(x) x.inc(); +# define SIMDATA_ATOMIC_GET(x) x.get(); +# define SIMDATA_ATOMIC_TYPE SIMDATA(_AtomicCounter) +#endif + NAMESPACE_SIMDATA @@ -60,20 +110,15 @@ * implement thread-safe reference counting. */ class SIMDATA_EXPORT AtomicCounter: public NonCopyable { - -// Atomic counter using linux-specific atomic counter primitives (much -// faster than mutex locking). -#if defined(LIN_ATOMIC) - private: - atomic_t __count; + SIMDATA_ATOMIC_TYPE __count; public: /** Construct a new atomic counter initialized to zero. */ AtomicCounter() { - atomic_set(&__count, 0); + SIMDATA_ATOMIC_SET(__count, 0); } /** Construct a new atomic counter. @@ -81,7 +126,7 @@ * @param count the initial value of the counter. */ AtomicCounter(int count) { - atomic_set(&__count, count); + SIMDATA_ATOMIC_SET(__count, count); } /** Increment the counter. @@ -92,7 +137,7 @@ * decremented past zero). */ inline bool operator++() { - return atomic_inc_and_test(&__count) ? false : true; + return SIMDATA_ATOMIC_INC(__count); } /** Decrement the counter. @@ -101,71 +146,13 @@ * regardless of the actual value; false otherwise. */ inline bool operator--() { - return atomic_dec_and_test(&__count) ? false : true; + return SIMDATA_ATOMIC_DEC(__count); } /** Return the counter value. */ - inline operator int() { return atomic_read(&__count); } + inline operator int() { return SIMDATA_ATOMIC_GET(__count); } -// TODO implement using windows atomic functions. -// -// probably involves the microsoft specific functions described at -// http://msdn.microsoft.com/library/en-us/vclang/html/vclrf_InterlockedDecrement.asp -// -//#elif defined(WIN_ATOMIC) - -// otherwise, fallback on pthread mutex locking (slow but safe) -#else - -private: - int __count; - ThreadMutex __mutex; - -public: - - /** Construct a new atomic counter initialized to zero. - */ - AtomicCounter(): __count(0) { } - - /** Construct a new atomic counter. - * - * @param count the initial value of the counter. - */ - AtomicCounter(int count): __count(count) { } - - /** Increment the counter. - * - * @returns 1 if the incremented count is non-zero, regardless - * of the actual value. Since this is a preincrement operator, it - * will always return 1 (unless the count overflows or is otherwise - * decremented past zero). - */ - inline bool operator++() { - __mutex.lock(); - int count = ++__count; - __mutex.unlock(); - return count != 0; - } - - /** Decrement the counter. - * - * @returns true if the pre-decremented count is non-zero, - * regardless of the actual value; false otherwise. - */ - inline bool operator--() { - __mutex.lock(); - int count = --__count; - __mutex.unlock(); - return count != 0; - } - - /** Return the counter value. - */ - inline operator int() { return __count; } - -#endif - }; NAMESPACE_SIMDATA_END |
From: <sv...@ww...> - 2004-10-03 02:25:37
|
Author: mkrose Date: 2004-10-02 19:24:18 -0700 (Sat, 02 Oct 2004) New Revision: 1272 Added: trunk/CSP/SimData/Include/SimData/Verify.h trunk/CSP/SimData/SimData/Tests/SConscript trunk/CSP/SimData/SimData/Tests/test_File.cpp Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/SConscript trunk/CSP/SimData/SimData/Tests/test_CircularBuffer.cpp trunk/CSP/SimData/SimData/Tests/test_Object.cpp trunk/CSP/SimData/SimData/Tests/test_Ref.cpp Log: Add a C++ unittest for new SimData file utilities. Fix up the SimData C++ unittests to run under scons. Add a header that provides enhanced assert/verify macros. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1272 Diff omitted (15958 bytes). |
From: <sv...@ww...> - 2004-10-03 02:21:42
|
Author: mkrose Date: 2004-10-02 19:20:18 -0700 (Sat, 02 Oct 2004) New Revision: 1271 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/FileUtility.h trunk/CSP/SimData/Source/FileUtility.cpp Log: Add directory reading and file extension splitting utility functions. This was motivated by osgDB::FileUtil, which provides this functionality only at a high cost of including many unnecessary header files. ==>WINDOWS USERS: warning -- directory reading has only been tested under Linux. If it builds it should work though. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1271 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-10-02 17:06:06 UTC (rev 1270) +++ trunk/CSP/SimData/CHANGES.current 2004-10-03 02:20:18 UTC (rev 1271) @@ -1,6 +1,19 @@ Version 0.4.0 (in progress) =========================== +2004-10-02: onsight + * Implement AtomicCounter using compiler intrinsics under msvc. + +==>WINDOWS USERS this is untested and may need debugging. According + to MS you'll need to pass the /Oi option to msvc. + + * Add directory reading and file extension splitting utility functions. + This was motivated by osgDB::FileUtil, which provides this functionality + only at a high cost of including many unnecessary header files. + +==>WINDOWS USERS: warning -- directory reading has only been tested under + Linux. If it builds it should work though. + 2004-10-01: onsight * Fix import SimData statements in Compile.py and Parse.py to find the local SimData package. Modified: trunk/CSP/SimData/Include/SimData/FileUtility.h =================================================================== --- trunk/CSP/SimData/Include/SimData/FileUtility.h 2004-10-02 17:06:06 UTC (rev 1270) +++ trunk/CSP/SimData/Include/SimData/FileUtility.h 2004-10-03 02:20:18 UTC (rev 1271) @@ -30,6 +30,7 @@ #include <string> +#include <vector> #include <SimData/Export.h> #include <SimData/Namespace.h> @@ -138,6 +139,27 @@ */ extern SIMDATA_EXPORT std::string const &addpath(std::string &pathlist, const std::string &path); + /** Removes the last extension from a filepath. Returns the extension + * (excluding the '.'), or an empty string if no extensions were found. + */ + extern SIMDATA_EXPORT std::string ospath::stripFileExtension(std::string &path); + + /** Get the last extension of a filename (excluding the '.'), or an empty + * string if no extensions were found. + */ + extern SIMDATA_EXPORT std::string getFileExtension(const std::string &path); + + /** Test if a file exists. + */ + extern SIMDATA_EXPORT bool exists(const std::string &path); + + typedef std::vector<std::string> DirectoryContents; + + /** Retrieve a list of entries (files and subdirectories) from the given + * path (non-recursive). + */ + extern SIMDATA_EXPORT DirectoryContents getDirectoryContents(std::string const &path); + } // namespace ospath //@} Modified: trunk/CSP/SimData/Source/FileUtility.cpp =================================================================== --- trunk/CSP/SimData/Source/FileUtility.cpp 2004-10-02 17:06:06 UTC (rev 1270) +++ trunk/CSP/SimData/Source/FileUtility.cpp 2004-10-03 02:20:18 UTC (rev 1271) @@ -30,7 +30,6 @@ #include <SimData/FileUtility.h> #include <cstdlib> -#include <cstdio> #ifdef _WIN32 @@ -43,6 +42,8 @@ # endif /* _MSC_VER */ #else /* _WIN32 */ # include <unistd.h> +# include <sys/types.h> +# include <dirent.h> #endif @@ -173,5 +174,56 @@ return denormalize(normalize(path)); } +std::string ospath::stripFileExtension(std::string &path) { + std::string ext = getFileExtension(path); + if (!ext.empty()) path = path.substr(0, path.size() - ext.size() - 1); + return ext; +} + +std::string ospath::getFileExtension(const std::string &path) { + std::string::size_type sep_idx0 = path.rfind('/'); + std::string::size_type sep_idx1 = path.rfind('\\'); + if (sep_idx0 == std::string::npos) sep_idx0 = 0; + if (sep_idx1 == std::string::npos) sep_idx1 = 0; + std::string::size_type sep_idx = std::max(sep_idx0, sep_idx1); + std::string::size_type idx = path.rfind('.'); + if (idx == std::string::npos || idx < sep_idx) return ""; + return path.substr(idx+1); +} + +bool ospath::exists(const std::string &path) { +#ifdef _WIN32 + static const int mode = 0; // existence only +#else // POSIX (hopefully) + static const int mode = F_OK; +#endif + return access(path.c_str(), mode); +} + +ospath::DirectoryContents ospath::getDirectoryContents(std::string const &path) { + DirectoryContents entries; +#ifdef _WIN32 + WIN32_FIND_DATA ffd; + std::string search_path = path + "\\*"; + HANDLE handle = FindFirstFile(search_path.c_str(), &ffd); + if (handle != INVALID_HANDLE_VALUE) { + do { + contents.push_back(ffd.cFileName); + } while (FindNextFile(handle, &ffd) != 0); + FileClose(handle); + } +#else // POSIX (hopefully) + DIR *dir = opendir(path.c_str()); + if (dir != NULL) { + struct dirent *entry; + while ((entry=readdir(dir)) != NULL) { + entries.push_back(entry->d_name); + } + closedir(dir); + } +#endif + return entries; +} + NAMESPACE_SIMDATA_END |
From: <sv...@ww...> - 2004-10-02 17:11:35
|
Author: mkrose Date: 2004-10-02 10:06:06 -0700 (Sat, 02 Oct 2004) New Revision: 1270 Added: trunk/CSP/SimData/Source/TaggedRecordRegistry.cpp trunk/CSP/SimData/Source/ThreadLog.cpp trunk/CSP/SimData/Source/Trace.cpp Log: Oops, forgot a few files! Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1270 Added: trunk/CSP/SimData/Source/TaggedRecordRegistry.cpp =================================================================== --- trunk/CSP/SimData/Source/TaggedRecordRegistry.cpp 2004-10-02 16:51:30 UTC (rev 1269) +++ trunk/CSP/SimData/Source/TaggedRecordRegistry.cpp 2004-10-02 17:06:06 UTC (rev 1270) @@ -0,0 +1,47 @@ +/* SimData: Data Infrastructure for Simulations + * Copyright (C) 2004 Mark Rose <mk...@us...> + * + * This file is part of SimData. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + + +/** + * @file TaggedRecordRegistry.cpp + * @brief Classes for storing and accessing tagged record factories. + */ + + +#include <SimData/TaggedRecordRegistry.h> +#include <SimData/Log.h> + + +NAMESPACE_SIMDATA + + +void TaggedRecordRegistry::registerFactory(TaggedRecordFactoryBase *factory) { + assert(factory != 0); + assert(!hasFactory(factory->getName())); + SIMDATA_LOG(LOG_ALL, LOG_INFO, "Registering TaggedRecordFactory<" << factory->getName() << "> [" << factory->getId() << "]"); + TaggedRecord::Id id = factory->getId(); + HashT key(static_cast<uint32>(id), static_cast<uint32>(id>>32)); + _map[factory->getName()] = factory; + _id_map[key] = factory; +} + + +NAMESPACE_SIMDATA_END + Added: trunk/CSP/SimData/Source/ThreadLog.cpp =================================================================== --- trunk/CSP/SimData/Source/ThreadLog.cpp 2004-10-02 16:51:30 UTC (rev 1269) +++ trunk/CSP/SimData/Source/ThreadLog.cpp 2004-10-02 17:06:06 UTC (rev 1270) @@ -0,0 +1,128 @@ +/* SimData: Data Infrastructure for Simulations + * Copyright 2004 Mark Rose <mk...@us...> + * + * This file is part of SimData. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + + +/** + * @file ThreadLog.cpp + * @brief Threadsafe logging classes. + **/ + +#ifndef SIMDATA_NOTHREADS + +// Log.h and ThreadLog.h are co-dependent; always use Log.h. +#include <SimData/Log.h> + +#include <iostream> + + +NAMESPACE_SIMDATA + + +/** A steam buffer class for thread-safe logging. + * + * StringBufs are used internally by ThreadLog to provide serialized + * access to a LogStream. + */ +class ThreadLog::StringBuf: public NonCopyable, public std::streambuf +{ + std::string m_buffer; + int m_category; + int m_priority; + const char *m_file; + int m_line; + LogStream &m_log; + + void init() { + m_buffer.reserve(1024); + } + + typedef ScopedLock<LogStream> ScopedLogLock; + +public: + + /** Default constructor, connects to the global simdata log. + */ + StringBuf(): m_category(LOG_ALL), m_priority(LOG_INFO), m_file(0), m_line(0), m_log(::simdata::log()) { + init(); + } + + /** Constructor, connects to the specified LogStream + */ + StringBuf(LogStream &base): m_category(LOG_ALL), m_priority(LOG_INFO), m_log(base) { + init(); + } + + /** Cache the log entry parameters. + */ + inline void setPrefix(int priority, int category, const char *file, int line) { + m_priority = priority; + m_category = category; + m_file = file; + m_line = line; + } + + /** Retrieve the associated LogStream. + */ + inline LogStream &getLogStream() const { return m_log; } + +protected: + + /** Overflow (cache characters internally) + */ + virtual int overflow(int c) { + m_buffer.push_back(static_cast<char>(c)); + return 1; + } + + /** Sync/flush the cached log entry to the underlying LogStream + */ + virtual int sync() { + ScopedLogLock lock(m_log); + std::ostream &entry = m_log.entry(m_priority, m_category, m_file, m_line); + entry << m_buffer; + entry.flush(); + m_buffer.clear(); + return 1; + } +}; + + +std::ostream & ThreadLog::entry(int priority, int category, const char *file, int line) { + m_stringbuf->setPrefix(priority, category, file, line); + return *m_logstream; +} + +ThreadLog::ThreadLog(): + m_stringbuf(new StringBuf()), + m_logstream(new std::ostream(m_stringbuf.get())), + m_log(m_stringbuf->getLogStream()) {} + +ThreadLog::ThreadLog(LogStream &base): + m_stringbuf(new StringBuf(base)), + m_logstream(new std::ostream(m_stringbuf.get())), + m_log(m_stringbuf->getLogStream()) {} + +ThreadLog::~ThreadLog() {} + +NAMESPACE_SIMDATA_END + + +#endif // SIMDATA_NOTHREADS + Added: trunk/CSP/SimData/Source/Trace.cpp =================================================================== --- trunk/CSP/SimData/Source/Trace.cpp 2004-10-02 16:51:30 UTC (rev 1269) +++ trunk/CSP/SimData/Source/Trace.cpp 2004-10-02 17:06:06 UTC (rev 1270) @@ -0,0 +1,80 @@ +/* SimData: Data Infrastructure for Simulations + * Copyright 2003, 2004 Mark Rose <mk...@us...> + * + * This file is part of SimData. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + + +/** + * @file Trace.cpp + * @brief Automatic callstack traces reporting on error. + * + */ + +#include <SimData/Trace.h> +#include <iostream> + +NAMESPACE_SIMDATA + +std::ostream &TraceBase::log() { + if (_log) { + return _log->entry(LOG_ERROR, LOG_ALL); + } else { + return simdata::log().entry(LOG_ERROR, LOG_ALL); + } +} + +void TraceBase::error(int skip, bool segv) { + if (_traced) return; + _traced = true; + if (segv) { + log() << "FATAL ERROR: segmentation fault." << std::endl; + } + _preCallback(); + _backtrace(log(), skip); + _postCallback(); +} + +#if defined(__GNUC__) && !defined(__MINGW32__) + +void Trace::StackDump(std::ostream &out, int skip) { + void *trace[64]; + char **messages = (char **)NULL; + int i, trace_size = 0; + + trace_size = backtrace(trace, 64); + out << "CALL STACK BACKTRACE:" << std::endl; + messages = backtrace_symbols(trace, trace_size); + if (messages) { + for (i=skip; i<trace_size; ++i) { + out << " " << messages[i] << std::endl; + } + free(messages); + } else { + out << " unavailable!" << std::endl; + } +} + +#else + +void Trace::StackDump(std::ostream &, int) { } + +#endif // __GNUC__ + + +NAMESPACE_SIMDATA_END + |
From: <sv...@ww...> - 2004-10-02 16:56:47
|
Author: mkrose Date: 2004-10-02 09:51:30 -0700 (Sat, 02 Oct 2004) New Revision: 1269 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/CSPSim.h trunk/CSP/CSPSim/Include/Controller.h trunk/CSP/CSPSim/Include/DynamicObject.h trunk/CSP/CSPSim/Include/FlightModel.h trunk/CSP/CSPSim/Include/ObjectModel.h trunk/CSP/CSPSim/Source/AircraftObject.cpp trunk/CSP/CSPSim/Source/AircraftPhysicsModel.cpp trunk/CSP/CSPSim/Source/CSPSim.cpp trunk/CSP/CSPSim/Source/DynamicObject.cpp trunk/CSP/CSPSim/Source/ObjectModel.cpp trunk/CSP/CSPSim/Source/TankObject.cpp trunk/CSP/CSPSim/Source/Views/CameraKinematics.cpp trunk/CSP/Demeter/README trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/BaseType.h trunk/CSP/SimData/Include/SimData/Composite.h trunk/CSP/SimData/Include/SimData/Enum.h trunk/CSP/SimData/Include/SimData/HashUtility.h trunk/CSP/SimData/Include/SimData/LUT.h trunk/CSP/SimData/Include/SimData/List.h trunk/CSP/SimData/Include/SimData/Log.h trunk/CSP/SimData/Include/SimData/LogStream.h trunk/CSP/SimData/Include/SimData/Matrix3.h trunk/CSP/SimData/Include/SimData/Quat.h trunk/CSP/SimData/Include/SimData/Ref.h trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h trunk/CSP/SimData/Include/SimData/Thread.h trunk/CSP/SimData/Include/SimData/ThreadLog.h trunk/CSP/SimData/Include/SimData/Trace.h trunk/CSP/SimData/Include/SimData/TypeAdapter.h trunk/CSP/SimData/Include/SimData/Vector3.h trunk/CSP/SimData/SConscript trunk/CSP/SimData/Source/DataArchive.cpp trunk/CSP/SimData/Source/Enum.cpp trunk/CSP/SimData/Source/FileUtility.cpp trunk/CSP/SimData/Source/InterfaceRegistry.cpp trunk/CSP/SimData/Source/LUT.cpp trunk/CSP/SimData/Source/Link.cpp trunk/CSP/SimData/Source/List.cpp trunk/CSP/SimData/Source/LogStream.cpp trunk/CSP/SimData/Source/Math.cpp trunk/CSP/SimData/Source/Matrix3.cpp trunk/CSP/SimData/Source/Path.cpp trunk/CSP/SimData/Source/Quat.cpp trunk/CSP/SimData/Source/SConscript trunk/CSP/SimData/Source/TypeAdapter.cpp trunk/CSP/SimData/Source/Vector3.cpp trunk/CSP/SimNet/RecordCodec.cpp Log: Clean up CSPSim header includes slightly. Use ScopedPointer for some of the member variables in class CSPSim. Break several key header dependencies that were slowing down the build. More work to be done. Clean up SimData headers by removing bloated/unnecessary includes and moving some large methods to the .cpp files. Simplified the logging code slightly. Miscellaneous formating/indenting cleanups. ==>WINDOWS USERS add TaggedRecordRegistry.cpp, ThreadLog.cpp, and Trace.cpp to the project. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1269 Diff omitted (117457 bytes). |
From: <sv...@ww...> - 2004-10-01 17:19:56
|
Author: mkrose Date: 2004-10-01 10:19:48 -0700 (Fri, 01 Oct 2004) New Revision: 1268 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/SimData/Compile.py trunk/CSP/SimData/SimData/Parse.py Log: Fix import SimData statements in Compile.py and Parse.py to find the local SimData package. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1268 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-10-01 06:35:57 UTC (rev 1267) +++ trunk/CSP/SimData/CHANGES.current 2004-10-01 17:19:48 UTC (rev 1268) @@ -1,6 +1,10 @@ Version 0.4.0 (in progress) =========================== +2004-10-01: onsight + * Fix import SimData statements in Compile.py and Parse.py to + find the local SimData package. + 2004-09-30: onsight * Added explicit casts to silence msvc warnings in GeoPos.cpp. Modified: trunk/CSP/SimData/SimData/Compile.py =================================================================== --- trunk/CSP/SimData/SimData/Compile.py 2004-10-01 06:35:57 UTC (rev 1267) +++ trunk/CSP/SimData/SimData/Compile.py 2004-10-01 17:19:48 UTC (rev 1268) @@ -2,28 +2,28 @@ # SimDataCSP: Data Infrastructure for Simulations # Copyright (C) 2002 Mark Rose <tm...@st...> -# +# # This file is part of SimDataCSP. -# +# # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import sys +import os.path +import time -import SimData - if __name__ == "__main__": if hasattr(sys, "setdlopenflags"): sys.setdlopenflags(0x101) @@ -63,18 +63,18 @@ if not new_path: sys.exit(1) sys.path = original_path[:] - sys.path.append(new_path) + sys.path.append(new_path) if new_path: f = open(".csp_path", "wt") print >>f, new_path +else: + import __init__ as SimData + from Parse import ObjectXMLArchive, XMLSyntax -from SimData import DataArchive, hash_string - from Debug import * -import os.path, time class Cache: def __init__(self, fn): @@ -83,7 +83,7 @@ if os.path.exists(fn): try: # open archive for reading, but disable chaining - self.source = DataArchive(fn, 1, 0) + self.source = SimData.DataArchive(fn, 1, 0) self.timestamp = os.path.getmtime(fn) except: self.source = None @@ -101,7 +101,7 @@ return None def isNewer(self, fn): - if self.timestamp is None: + if self.timestamp is None: return 1 try: mtime = os.path.getmtime(fn) @@ -114,7 +114,7 @@ def __init__(self, msg=None): self.msg = msg def getMessage(self): - if self.msg is None: + if self.msg is None: return "" return "Usage error: %s\n" % self.msg def __repr__(self): @@ -141,7 +141,7 @@ DEBUG(1, "XML parse completed.") if warnings > 0: print "%d warnings (severity=%d)." % (warnings, level) - if level > 0: + if level > 0: if level > getWarningLevel(): print "Run with '--warn=%d' to see all warnings." % level if not self.force: @@ -150,7 +150,8 @@ sys.exit(1) paths = master.getPaths() DEBUG(1,"Compiling all objects") - compiled = DataArchive(self.outfile, 0) + compiled = SimData.DataArchive(self.outfile, 0) + hash_string = SimData.hash_string for id in all.keys(): object = all[id] DEBUG(2, "Compiling object '%s' [%s] %s" % (id, hash_string(id), str(object))) Modified: trunk/CSP/SimData/SimData/Parse.py =================================================================== --- trunk/CSP/SimData/SimData/Parse.py 2004-10-01 06:35:57 UTC (rev 1267) +++ trunk/CSP/SimData/SimData/Parse.py 2004-10-01 17:19:48 UTC (rev 1268) @@ -2,27 +2,31 @@ # SimDataCSP: Data Infrastructure for Simulations # Copyright (C) 2002 Mark Rose <tm...@st...> -# +# # This file is part of SimDataCSP. -# +# # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -import sys, types +import sys +import types +import time +import re +import os.path -import SimData +import __init__ as SimData from xml.sax import ContentHandler, ErrorHandler, make_parser import xml.sax @@ -35,8 +39,6 @@ GzipError = str(e) from zipfile import ZipFile -import re -import os.path from traceback import print_exception from Debug import * @@ -117,7 +119,7 @@ return self._element def characters(self, c): - if self._handler is not None: + if self._handler is not None: self._handler.characters(c) else: self.cdata(c) @@ -160,7 +162,7 @@ handler_name = name+"Handler" try: handler = eval(handler_name) - except: + except: msg = "Unknown child element <%s>" % name raise XMLSyntax, msg self._handler = handler(self._id, self._base, name, attrs) @@ -213,7 +215,7 @@ def validateChild(self, name, attrs): if self._type is not None: return 0 - return name in ('List', 'Enum', 'Path', 'Int', 'Bool', 'Number', 'Float', + return name in ('List', 'Enum', 'Path', 'Int', 'Bool', 'Number', 'Float', 'String', 'Date', 'Vector', 'Matrix', 'External', 'Key', 'Object', 'Quat', 'LLA', "UTM", "ECEF") @@ -229,7 +231,7 @@ y = SimData.Real() y.parseXML(x) return y - f = spread + f = spread elif self._type == "path": def path(x, base = self._base): y = SimData.Path() @@ -421,7 +423,7 @@ def assign(self, interface, object, name): value = self._element.encode('ascii') interface.set_enum(object, name, value) - + # # FIXME this will break if the enum attribute doesn't exist in an Object, # # since it will not be linked to an enumeration # ext = self.getObjectAttribute(obj, name, None) @@ -626,7 +628,7 @@ SimpleHandler.__init__(self, id, base, name, attrs) self._method = attrs.get("method", "linear") self._required_members = _LUTHandler.required_members - for i in range(dim): + for i in range(dim): self._required_members.append("Breaks%d" % i) self._dim = dim self._keys = {} @@ -798,7 +800,7 @@ # if not self._objects.has_key(id): # self._objects[id] = self.loadObject(id) # return self._objects[id] -# +# # def loadObject(self, id): # path = id_to_path(id) # path = os.path.join(self._basepath, path); @@ -843,7 +845,7 @@ log = open("error.log", "wt") if log is not None: print >>log, "%s[%d:%d] - %s, %s" % (path, line, column, public, system) - print_exception(type, value, traceback, file=open("error.log", "wt")) + print_exception(type, value, traceback, file=open("error.log", "wt")) print "Exception traceback saved to error.log" else: raise @@ -885,7 +887,6 @@ return self._objects -import time def demo(): master = ObjectXMLArchive("../XML"); @@ -893,7 +894,7 @@ pw229 = master.getObject("engines.f100_pw_229") return print "ab_rpm = ", pw229.ab_rpm - print "idle table = " + print "idle table = " for i in range(6): for j in range(6): print "%.5f" % pw229.idle.getPrecise(i*0.2, j*0.2), @@ -903,7 +904,7 @@ def demo_show_members(obj): members = obj.__class__.__dict__["__swig_setmethods__"].keys() - for member in members: + for member in members: c = getattr(obj, member).__class__ print "%30s: %s(%s)" % (member, c, str(getattr(obj, member))) for i in obj.thrusts: |
From: <sv...@ww...> - 2004-10-01 06:36:12
|
Author: mkrose Date: 2004-09-30 23:35:57 -0700 (Thu, 30 Sep 2004) New Revision: 1267 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Source/GeoPos.cpp Log: Fix a few msvc warnings. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1267 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-10-01 06:26:10 UTC (rev 1266) +++ trunk/CSP/SimData/CHANGES.current 2004-10-01 06:35:57 UTC (rev 1267) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== +2004-09-30: onsight + * Added explicit casts to silence msvc warnings in GeoPos.cpp. + 2004-09-29: onsight * Clean up warnings and formatting in Date.h/cpp. Modified: trunk/CSP/SimData/Source/GeoPos.cpp =================================================================== --- trunk/CSP/SimData/Source/GeoPos.cpp 2004-10-01 06:26:10 UTC (rev 1266) +++ trunk/CSP/SimData/Source/GeoPos.cpp 2004-10-01 06:35:57 UTC (rev 1267) @@ -522,7 +522,7 @@ char B; int n = sscanf(c, "%lf %lf %d%c %lf", &X, &Y, &A, &B, &Z); if (n != 5) throw ParseException("SYNTAX ERROR: expecting 'northing easting zone altitude'"); - setUTM(X, Y, A, B, Z); + setUTM(X, Y, static_cast<char>(A), B, Z); } else { int n = sscanf(c, "%lf %lf %lf", &X, &Y, &Z); if (n != 3) throw ParseException("SYNTAX ERROR: expecting 'latitude longitude altitude'"); @@ -880,8 +880,8 @@ if (c2) { _zone *= 10; _zone += c1 - '0'; - _designator = toupper(c2); - } else _designator = toupper(c1); + _designator = static_cast<char>(toupper(c2)); + } else _designator = static_cast<char>(toupper(c1)); } if (!valid()) { // TODO @@ -917,8 +917,8 @@ char designator_; int n = sscanf(c, "%lf %lf %d%c %lf", &_E, &_N, &zone_, &designator_, &_alt); if (n != 5) throw ParseException("SYNTAX ERROR: expecting 'easting northing zone altitude'"); - _zone = zone_; - _designator = toupper(designator_); + _zone = static_cast<char>(zone_); + _designator = static_cast<char>(toupper(designator_)); if (!valid()) { throw ParseException("SYNTAX ERROR: invalid UTM code"); } |
From: <sv...@ww...> - 2004-10-01 06:26:23
|
Author: mkrose Date: 2004-09-30 23:26:10 -0700 (Thu, 30 Sep 2004) New Revision: 1266 Modified: trunk/CSP/__init__.py trunk/CSP/tools/CSP_bootstrap Log: Fix a failure mode of the CSP bootstrap loader that could result in an infinite recursion. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1266 Modified: trunk/CSP/__init__.py =================================================================== --- trunk/CSP/__init__.py 2004-09-30 07:20:48 UTC (rev 1265) +++ trunk/CSP/__init__.py 2004-10-01 06:26:10 UTC (rev 1266) @@ -16,12 +16,18 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -CSP = 1 import sys import os import os.path +# ugly kludge to allow us to import dl. the bootstrap loader removes the +# original contents of sys.path, and stashes the full path in sys.CSP_PATH. +# if it has been set we restore the path here and clear the sys attribute. +if len(sys.path) == 1 and hasattr(sys, 'CSP_PATH'): + sys.path = sys.CSP_PATH + del sys.CSP_PATH + # make SimData available as CSP.SimData __path__ += [os.path.join(os.path.dirname(__file__), 'SimData')] Modified: trunk/CSP/tools/CSP_bootstrap =================================================================== --- trunk/CSP/tools/CSP_bootstrap 2004-09-30 07:20:48 UTC (rev 1265) +++ trunk/CSP/tools/CSP_bootstrap 2004-10-01 06:26:10 UTC (rev 1266) @@ -29,15 +29,9 @@ import os.path import sys -# remove '.' from sys.path -try: - dotindex = sys.path.index('.') -except ValueError: - dotindex = -1 +# save the path +old_path = sys.path[:] -if dotindex >= 0: - del sys.path[dotindex] - # remove this module from sys.modules self = sys.modules['CSP'] del sys.modules['CSP'] @@ -51,21 +45,30 @@ while parts[-1] != 'CSP': parts = parts[:-1] -ROOT = os.path.sep.join(parts[:-1]) +CSP_PATH = os.path.sep.join(parts[:-1]) +ROOT = os.path.join(CSP_PATH, 'CSP') -if not os.path.exists(os.path.join(ROOT, 'CSP', '.svn')): +if not os.path.exists(os.path.join(ROOT, '.svn')): print 'Warning: %s does not contain .svn and may not be a valid CSP workspace.' % ROOT -# load the real CSP package -sys.path.insert(0, ROOT) +# load the real CSP package. we strip away the original sys.path to +# prevent this module from being loaded recursively on failure. the +# only problem is that the real CSP package __init__ needs to the +# full path to import dl. the expedient (but ugly, ugly) workaround +# is to cache the full path in sys.CSP_PATH, which the CSP module +# uses to restore the full path (after which it deletes sys.CSP_PATH). +sys.path = [CSP_PATH] +sys.CSP_PATH = [CSP_PATH] + old_path try: import CSP except ImportError, e: - print 'Unable to bootstrap a CSP module space from the current working directory:' - print e + # cleanup, notify, and pass the error along. + del sys.CSP_PATH + sys.path = old_path + print 'Unable to bootstrap a CSP module space from the current working directory.' + raise -# restore '.' to the path -if dotindex >= 0: - sys.path.insert(dotindex + 1, '.') +# restore the path +sys.path = [CSP_PATH] + old_path |
From: <sv...@ww...> - 2004-09-30 07:20:56
|
Author: mkrose Date: 2004-09-30 00:20:48 -0700 (Thu, 30 Sep 2004) New Revision: 1265 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Timing.h Log: Add a timer class to wrap get_realtime with basic stopwatch functions. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1265 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-09-30 07:19:09 UTC (rev 1264) +++ trunk/CSP/SimData/CHANGES.current 2004-09-30 07:20:48 UTC (rev 1265) @@ -4,6 +4,9 @@ 2004-09-29: onsight * Clean up warnings and formatting in Date.h/cpp. + * Add a timer class to wrap get_realtime with basic stopwatch + functions. + 2004-09-28: delta * Added a #undef ERROR after inlcuding windows.h, protected behind a #ifdef. Modified: trunk/CSP/SimData/Include/SimData/Timing.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Timing.h 2004-09-30 07:19:09 UTC (rev 1264) +++ trunk/CSP/SimData/Include/SimData/Timing.h 2004-09-30 07:20:48 UTC (rev 1265) @@ -64,6 +64,54 @@ timing_t get_realtime(); +/** A simple timing class with standard stopwatch functions. The + * timing precision is equivalent to get_realtime(). + */ +class Timer { + timing_t _start; + timing_t _elapsed; + bool _running; + +public: + /// Construct a new timer. + Timer(): _start(0), _elapsed(0), _running(false) { } + + /// Reset the elapsed time to zero and start the timer running. + inline void start() { + _elapsed = 0.0; + resume(); + } + + /// Resumes counting without reseting the elapsed time. + inline void resume() { + if (!_running) { + _start = get_realtime(); + _running = true; + } + } + + /// Stop the timer. + inline timing_t stop() { + if (_running) { + _elapsed += get_realtime() - _start; + _running = false; + } + return _elapsed; + } + + /// Return true if the timer is running. + inline bool running() const { return _running; } + + /// Get the total elasped time. + inline timing_t elapsed() const { + return (_running ? get_realtime() - _start + _elapsed : _elapsed); + } + + /// Reset the elapsed time to zero (does not stop the timer). + inline void reset() { _elapsed = 0; } +}; + + ///////////////////////////////////////////////////////////// // end of timing routines |
From: <sv...@ww...> - 2004-09-30 07:19:18
|
Author: mkrose Date: 2004-09-30 00:19:09 -0700 (Thu, 30 Sep 2004) New Revision: 1264 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Date.h trunk/CSP/SimData/Source/Date.cpp Log: Clean up warnings and formatting in Date.h/cpp. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1264 Diff omitted (11431 bytes). |
From: <sv...@ww...> - 2004-09-30 07:14:02
|
Author: mkrose Date: 2004-09-30 00:13:56 -0700 (Thu, 30 Sep 2004) New Revision: 1263 Modified: trunk/CSP/SimNet/NetworkInterface.cpp trunk/CSP/SimNet/NetworkInterface.h Log: Add a method to wait for incoming packets, but only if no incoming or outgoing packets are already queued. Useful for servers that are entirely event driven. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1263 Modified: trunk/CSP/SimNet/NetworkInterface.cpp =================================================================== --- trunk/CSP/SimNet/NetworkInterface.cpp 2004-09-30 07:11:41 UTC (rev 1262) +++ trunk/CSP/SimNet/NetworkInterface.cpp 2004-09-30 07:13:56 UTC (rev 1263) @@ -328,6 +328,15 @@ } +bool NetworkInterface::waitPending(double timeout) { + for (int queue_idx = 0; queue_idx <= 3; ++queue_idx) { + if (!m_RxQueues[queue_idx]->isEmpty()) return true; + if (!m_TxQueues[queue_idx]->isEmpty()) return true; + } + return (m_Socket->isPendingReceive(static_cast<int>(timeout * 1000))); +} + + static double DEBUG_recvtime; int NetworkInterface::receivePackets(double timeout) { @@ -350,7 +359,7 @@ watch.start(); while (true) { - + if (!m_Socket->isPendingReceive(0)) { watch.calibrate(); break; Modified: trunk/CSP/SimNet/NetworkInterface.h =================================================================== --- trunk/CSP/SimNet/NetworkInterface.h 2004-09-30 07:11:41 UTC (rev 1262) +++ trunk/CSP/SimNet/NetworkInterface.h 2004-09-30 07:13:56 UTC (rev 1263) @@ -138,6 +138,12 @@ void processIncoming(double timeout); void processOutgoing(double timeout); + /** Wait for incoming packets if all incoming and outgoing queues are empty. + * @param timeout the maximum time to wait, in seconds. + * @return false if the timeout expired (ie. no pending incoming packets and all queues empty). + */ + bool waitPending(double timeout); + void addPacketHandler(PacketHandler::Ref handler); void removePacketHandler(PacketHandler::Ref handler); |
From: <sv...@ww...> - 2004-09-30 07:12:00
|
Author: mkrose Date: 2004-09-30 00:11:41 -0700 (Thu, 30 Sep 2004) New Revision: 1262 Modified: trunk/CSP/SimNet/SConscript trunk/CSP/tools/build.py Log: Minor build tweaks. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1262 Modified: trunk/CSP/SimNet/SConscript =================================================================== --- trunk/CSP/SimNet/SConscript 2004-09-29 15:23:20 UTC (rev 1261) +++ trunk/CSP/SimNet/SConscript 2004-09-30 07:11:41 UTC (rev 1262) @@ -23,7 +23,6 @@ conf = build.CustomConfigure(env) conf.CheckCommandVersion('ccgnu2', 'ccgnu2-config --version', '1.0.13') env = conf.Finish() - env.ParseConfig('ccgnu2-config --flags --libs') env = env.Copy() env.AppendUnique(SHLINKFLAGS = '-Wl,-z,lazyload') @@ -31,6 +30,7 @@ env.SetConfig(PackageConfig) env.Documentation('#/SimNet/.dox', '#/SimNet/Doxyfile', '#/SimNet/*.{h,cpp}') +env.ParseConfig('ccgnu2-config --flags --libs') SOURCES = [ @@ -47,11 +47,11 @@ #'TestMessage.net', ] -libsimnet = env.StaticLibrary('SimNet', SOURCES) -Alias(['all', 'simnet'], [libsimnet]) +libsimnet = env.StaticLibrary('simnet', SOURCES) +Alias(['all', 'SimNet'], [libsimnet]) libmessages = env.SharedLibrary('SimNetMessages', MESSAGES) -Alias(['all', 'simnet'], [libmessages]) +Alias(['all', 'SimNet'], [libmessages]) """ test = env.Program('test', ['test.cpp'] + libsimnet + libmessages) Modified: trunk/CSP/tools/build.py =================================================================== --- trunk/CSP/tools/build.py 2004-09-29 15:23:20 UTC (rev 1261) +++ trunk/CSP/tools/build.py 2004-09-30 07:11:41 UTC (rev 1262) @@ -149,6 +149,7 @@ ShortMessageWrapper(message).bind(action) def SetShortMessages(env): + SetShortMessage(env, 'Program', TargetMessage('Building')) SetShortMessage(env, 'StaticObject', SourceMessage('Compiling')) SetShortMessage(env, 'SharedObject', SourceMessage('Compiling', suffix=' (shared)')) SetShortMessage(env, 'Object', SourceMessage('Compiling')) |
From: <sv...@ww...> - 2004-09-29 15:23:27
|
Author: delta Date: 2004-09-29 08:23:20 -0700 (Wed, 29 Sep 2004) New Revision: 1261 Modified: trunk/CSP/Demeter/CHANGES.current trunk/CSP/Demeter/DemeterVisualC6.vcproj trunk/CSP/Demeter/Terrain.h Log: Added #NOMINMAX before including windows.h to avoid conflict with std::max/min. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1261 Modified: trunk/CSP/Demeter/CHANGES.current =================================================================== --- trunk/CSP/Demeter/CHANGES.current 2004-09-28 21:22:24 UTC (rev 1260) +++ trunk/CSP/Demeter/CHANGES.current 2004-09-29 15:23:20 UTC (rev 1261) @@ -1,6 +1,9 @@ Version 0.3.2 (in progress) =========================== - +2004-09-29: delta + Added #NOMINMAX before including windows.h to avoid + conflict with std::max/min. + 2004-04-25: delta Adjusted paths. Modified: trunk/CSP/Demeter/DemeterVisualC6.vcproj =================================================================== --- trunk/CSP/Demeter/DemeterVisualC6.vcproj 2004-09-28 21:22:24 UTC (rev 1260) +++ trunk/CSP/Demeter/DemeterVisualC6.vcproj 2004-09-29 15:23:20 UTC (rev 1261) @@ -25,13 +25,13 @@ AdditionalIncludeDirectories="..\Include,..\Include\SDL" PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_USRDLL;DEMETERVISUALC6_EXPORTS;TERRAIN_EXPORTS" BasicRuntimeChecks="3" - RuntimeLibrary="1" + RuntimeLibrary="3" RuntimeTypeInfo="TRUE" PrecompiledHeaderFile=".\Debug/DemeterVisualC6.pch" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" ProgramDataBaseFileName=".\Debug/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="TRUE" DebugInformationFormat="4" CompileAs="0"/> @@ -91,7 +91,7 @@ AdditionalIncludeDirectories="..\include" PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_USRDLL;DEMETERVISUALC6_EXPORTS;TERRAIN_EXPORTS" StringPooling="TRUE" - RuntimeLibrary="0" + RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" RuntimeTypeInfo="TRUE" PrecompiledHeaderFile=".\Release/DemeterVisualC6.pch" @@ -100,7 +100,7 @@ ProgramDataBaseFileName=".\Release/" WarningLevel="3" SuppressStartupBanner="TRUE" - CompileAs="0"/> + CompileAs="2"/> <Tool Name="VCCustomBuildTool"/> <Tool Modified: trunk/CSP/Demeter/Terrain.h =================================================================== --- trunk/CSP/Demeter/Terrain.h 2004-09-28 21:22:24 UTC (rev 1260) +++ trunk/CSP/Demeter/Terrain.h 2004-09-29 15:23:20 UTC (rev 1261) @@ -60,6 +60,7 @@ #include <string.h> #ifdef _WIN32 +#define NOMINMAX #include <windows.h> #endif #include <GL/gl.h> |
From: <sv...@ww...> - 2004-09-28 21:22:35
|
Author: delta Date: 2004-09-28 14:22:24 -0700 (Tue, 28 Sep 2004) New Revision: 1260 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/AtomicCounter.h trunk/CSP/SimData/VisualStudio2003/SimData.vcproj Log: Added #undef ERROR for windows in AtomicCounter.h. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1260 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-09-27 00:04:30 UTC (rev 1259) +++ trunk/CSP/SimData/CHANGES.current 2004-09-28 21:22:24 UTC (rev 1260) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== - +2004-09-28: delta + * Added a #undef ERROR after inlcuding windows.h, protected behind + a #ifdef. + 2004-09-26: onsight * Fix a couple compiler warnings under msvc. Modified: trunk/CSP/SimData/Include/SimData/AtomicCounter.h =================================================================== --- trunk/CSP/SimData/Include/SimData/AtomicCounter.h 2004-09-27 00:04:30 UTC (rev 1259) +++ trunk/CSP/SimData/Include/SimData/AtomicCounter.h 2004-09-28 21:22:24 UTC (rev 1260) @@ -41,6 +41,7 @@ # define _WINSOCKAPI_ # define NOMINMAX # include <Windows.h> +# undef ERROR #else # define LIN_ATOMIC extern "C" { Modified: trunk/CSP/SimData/VisualStudio2003/SimData.vcproj =================================================================== --- trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-09-27 00:04:30 UTC (rev 1259) +++ trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2004-09-28 21:22:24 UTC (rev 1260) @@ -116,7 +116,7 @@ AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" ProgramDataBaseFileName=".\Debug/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="TRUE" DebugInformationFormat="3" CompileAs="0"/> |
From: <sv...@ww...> - 2004-09-27 00:04:39
|
Author: mkrose Date: 2004-09-26 17:04:30 -0700 (Sun, 26 Sep 2004) New Revision: 1259 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Animation.h trunk/CSP/CSPSim/Include/Collision.h trunk/CSP/CSPSim/Include/Exception.h trunk/CSP/CSPSim/Include/LandingGear.h trunk/CSP/CSPSim/Include/ScreenInfoManager.h trunk/CSP/CSPSim/Include/SimNet/NetworkMessage.h trunk/CSP/CSPSim/Include/System.h trunk/CSP/CSPSim/Include/SystemsModel.h trunk/CSP/CSPSim/Include/TankObject.h trunk/CSP/CSPSim/Include/Theater/FeatureModel.h trunk/CSP/CSPSim/SConscript trunk/CSP/CSPSim/Source/Animation.cpp trunk/CSP/CSPSim/Source/BaseDynamics.cpp trunk/CSP/CSPSim/Source/CSPSim.cpp trunk/CSP/CSPSim/Source/Collision.cpp trunk/CSP/CSPSim/Source/Colorspace.cpp trunk/CSP/CSPSim/Source/DemeterTerrain.cpp trunk/CSP/CSPSim/Source/Engine.cpp trunk/CSP/CSPSim/Source/GameScreen.cpp trunk/CSP/CSPSim/Source/LandingGear.cpp trunk/CSP/CSPSim/Source/LogoScreen.cpp trunk/CSP/CSPSim/Source/MenuScreen.cpp trunk/CSP/CSPSim/Source/NumericalMethod.cpp trunk/CSP/CSPSim/Source/PhysicsModel.cpp trunk/CSP/CSPSim/Source/ScreenInfo.cpp trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp trunk/CSP/CSPSim/Source/SimNet/DispatchMessageHandler.cpp trunk/CSP/CSPSim/Source/SimNet/NetworkMessenger.cpp trunk/CSP/CSPSim/Source/Sky.cpp trunk/CSP/CSPSim/Source/SmokeEffects.cpp trunk/CSP/CSPSim/Source/Systems/AircraftInputSystem.cpp trunk/CSP/CSPSim/Source/SystemsModel.cpp trunk/CSP/CSPSim/Source/TankObject.cpp trunk/CSP/CSPSim/Source/Theater/RandomBillboardModel.cpp trunk/CSP/CSPSim/Source/Theater/RandomForestModel.cpp trunk/CSP/CSPSim/Source/Views/CameraKinematics.cpp trunk/CSP/CSPSim/Source/Views/View.cpp trunk/CSP/CSPSim/Source/VirtualScene.cpp trunk/CSP/SConstruct trunk/CSP/SimCore/Battlefield/Battlefield.cpp trunk/CSP/SimData/Include/SimData/Composite.h trunk/CSP/SimData/Include/SimData/Link.h trunk/CSP/SimData/Include/SimData/ObjectInterface.h trunk/CSP/SimNet/SConscript Log: Fix a large number of small warnings when building CSPSim with g++ -W -Wall -pendantic. The only remaining warning is produced by gnu-commoncpp. Hopefully should have a positive impact on MSVC warnings as well, but you never know. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1259 Diff omitted (139414 bytes). |
From: <sv...@ww...> - 2004-09-26 20:12:29
|
Author: mkrose Date: 2004-09-26 13:12:20 -0700 (Sun, 26 Sep 2004) New Revision: 1258 Modified: trunk/CSP/SimCore/Battlefield/Battlefield.cpp trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/LogStream.h trunk/CSP/SimData/Include/SimData/TaggedRecord.h Log: Fix a few compiler warnings under msvc. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1258 Modified: trunk/CSP/SimCore/Battlefield/Battlefield.cpp =================================================================== --- trunk/CSP/SimCore/Battlefield/Battlefield.cpp 2004-09-26 14:32:51 UTC (rev 1257) +++ trunk/CSP/SimCore/Battlefield/Battlefield.cpp 2004-09-26 20:12:20 UTC (rev 1258) @@ -75,8 +75,8 @@ bool setAggregationBubbleCount(unsigned count) { CSP_LOG(BATTLEFIELD, DEBUG, "setting aggregation count to " << count << " for " << *unit()); bool state_change = ((count == 0 && m_aggregation_count > 0) || - (count > 0 && m_aggregation_count == 0)); - m_aggregation_count = count; + (count > 0 && m_aggregation_count == 0)); + m_aggregation_count = static_cast<simdata::uint16>(count); return state_change; } Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-09-26 14:32:51 UTC (rev 1257) +++ trunk/CSP/SimData/CHANGES.current 2004-09-26 20:12:20 UTC (rev 1258) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== +2004-09-26: onsight + * Fix a couple compiler warnings under msvc. + 2004-09-25: onsight * Add scons build target 'test' which runs the simdata unittests (so far). Modified: trunk/CSP/SimData/Include/SimData/LogStream.h =================================================================== --- trunk/CSP/SimData/Include/SimData/LogStream.h 2004-09-26 14:32:51 UTC (rev 1257) +++ trunk/CSP/SimData/Include/SimData/LogStream.h 2004-09-26 20:12:20 UTC (rev 1258) @@ -66,13 +66,26 @@ #endif // SIMDATA_NOTHREADS public: - /** The default is to send messages to cerr. + + /** Create a new log stream that defaults to stderr. + */ + LogStream(): + m_null(NULL), + m_stream(NULL), + m_fstream(NULL), + m_log_point(true), + m_log_time(false), + m_category(~0), + m_priority(0) { + } + + /** Create a new log stream. * - * @param out_ output stream + * @param out_ The initial output stream. */ LogStream(std::ostream& out_): m_null(NULL), - m_stream(NULL), + m_stream(&out_), m_fstream(NULL), m_log_point(true), m_log_time(false), Modified: trunk/CSP/SimData/Include/SimData/TaggedRecord.h =================================================================== --- trunk/CSP/SimData/Include/SimData/TaggedRecord.h 2004-09-26 14:32:51 UTC (rev 1257) +++ trunk/CSP/SimData/Include/SimData/TaggedRecord.h 2004-09-26 20:12:20 UTC (rev 1258) @@ -224,7 +224,7 @@ _buffer.append(reinterpret_cast<const char*>(&x), sizeof(x)); return *this; } - virtual Writer & operator<<(char const *x) { + virtual Writer & operator<<(char const *) { assert(0); return *this; } @@ -328,7 +328,7 @@ _bytes -= sizeof(x); return *this; } - virtual Reader & operator>>(char * &x) { + virtual Reader & operator>>(char * &) { assert(0); // avoid allocation issues for now -- no char*'s return *this; } |
From: <sv...@ww...> - 2004-09-26 14:33:01
|
Author: delta Date: 2004-09-26 07:32:51 -0700 (Sun, 26 Sep 2004) New Revision: 1257 Modified: trunk/CSP/SimCore/Battlefield/Battlefield.h Log: Added #include <limits>. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1257 Modified: trunk/CSP/SimCore/Battlefield/Battlefield.h =================================================================== --- trunk/CSP/SimCore/Battlefield/Battlefield.h 2004-09-26 09:03:25 UTC (rev 1256) +++ trunk/CSP/SimCore/Battlefield/Battlefield.h 2004-09-26 14:32:51 UTC (rev 1257) @@ -30,6 +30,7 @@ #ifndef __SIMCORE_BATTLEFIELD_BATTLEFIELD_H__ #define __SIMCORE_BATTLEFIELD_BATTLEFIELD_H__ +#include <limits> #include <map> #include <vector> |
From: <sv...@ww...> - 2004-09-26 08:07:08
|
Author: mkrose Date: 2004-09-26 01:06:59 -0700 (Sun, 26 Sep 2004) New Revision: 1255 Modified: trunk/CSP/tools/build.py Log: A few enhancements to the scons build tools. In "short message" mode (ie with -Q set), the full build commands are now logged to .bulidlog. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1255 Modified: trunk/CSP/tools/build.py =================================================================== --- trunk/CSP/tools/build.py 2004-09-26 07:49:34 UTC (rev 1254) +++ trunk/CSP/tools/build.py 2004-09-26 08:06:59 UTC (rev 1255) @@ -47,7 +47,9 @@ PYTHON_INCLUDE = sysconfig.get_python_inc() PYTHON_LIBRARY = sysconfig.get_python_lib() +BUILD_LOG = open(File('#/.buildlog').abspath, 'wt') + ############################################################################ # GENERAL HELPERS @@ -76,6 +78,24 @@ ############################################################################ # SHORT MESSAGES +class ShortMessageWrapper: + def __init__(self, message): + self.message = message + self.old_message = None + + def bind(self, action): + if not isinstance(action.strfunction, ShortMessageWrapper): + self.old_message = action.strfunction + action.strfunction = self + + def __call__(self, target, source, env): + if self.old_message and BUILD_LOG: + old = self.old_message(target, source, env) + print >>BUILD_LOG, old + BUILD_LOG.flush() + return self.message(target, source, env) + + def TargetMessage(phrase, suffix=''): def printer(target, source, env, phrase=phrase, suffix=suffix): if type(target) == type([]): @@ -124,9 +144,9 @@ if isinstance(action, SCons.Action.ListAction): for a in action.get_actions(): if a.strfunction is not None: - a.strfunction = message + ShortMessageWrapper(message).bind(a) return - action.strfunction = message + ShortMessageWrapper(message).bind(action) def SetShortMessages(env): SetShortMessage(env, 'StaticObject', SourceMessage('Compiling')) @@ -148,17 +168,29 @@ def BuildPackages(env, packages, **kw): import build + result = [] for package in packages: kw['build_dir'] = '%s/.bin' % package kw.setdefault('duplicate', 0) kw.setdefault('exports', 'env build') - env.SConscript('%s/SConscript' % package, **kw) + targets = env.SConscript('%s/SConscript' % package, **kw) + if targets: + if type(targets) != type([]): targets = [targets] + result.extend(targets) + result = env.Flatten(result) + return result def BuildModules(env, modules, **kw): import build + result = [] for module in modules: kw.setdefault('exports', 'env build') - env.SConscript('%s/SConscript' % module, **kw) + targets = env.SConscript('%s/SConscript' % module, **kw) + if targets: + if type(targets) != type([]): targets = [targets] + result.extend(targets) + result = env.Flatten(result) + return result @@ -498,3 +530,8 @@ env.Alias('dox', dox) env.Clean(['dox', 'all'], html) +def Apply(builder, sources, **overrides): + def builder_wrap(source): + return builder(source, **overrides) + return map(builder_wrap, sources) + |
From: <sv...@ww...> - 2004-09-26 07:49:51
|
Author: mkrose Date: 2004-09-26 00:49:34 -0700 (Sun, 26 Sep 2004) New Revision: 1254 Modified: trunk/CSP/SimCore/Util/SConscript trunk/CSP/SimCore/Util/SimpleConfig.cpp trunk/CSP/SimCore/Util/SimpleConfig.h Log: Fix include paths and minor cleanups; add SimpleConfig to build under SimCore. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1254 Modified: trunk/CSP/SimCore/Util/SConscript =================================================================== --- trunk/CSP/SimCore/Util/SConscript 2004-09-26 07:43:00 UTC (rev 1253) +++ trunk/CSP/SimCore/Util/SConscript 2004-09-26 07:49:34 UTC (rev 1254) @@ -19,6 +19,7 @@ Import('env build') SOURCES = [ + 'SimpleConfig.cpp', 'StringTools.cpp', 'SynchronousUpdate.cpp' ] Modified: trunk/CSP/SimCore/Util/SimpleConfig.cpp =================================================================== --- trunk/CSP/SimCore/Util/SimpleConfig.cpp 2004-09-26 07:43:00 UTC (rev 1253) +++ trunk/CSP/SimCore/Util/SimpleConfig.cpp 2004-09-26 07:49:34 UTC (rev 1254) @@ -1,17 +1,17 @@ -// Combat Simulator Project - FlightSim Demo -// Copyright (C) 2002 The Combat Simulator Project +// Combat Simulator Project +// Copyright (C) 2002, 2004 The Combat Simulator Project // http://csp.sourceforge.net -// +// // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -22,7 +22,7 @@ * * There are a number of aspects of these classes that are not ideal, * however the interface is simple enough to be stable and the - * implementation can be "purified" later (if desired) without + * implementation can be "purified" later (if desired) without * affecting its use. * * @author Mark Rose <mr...@st...> @@ -36,7 +36,7 @@ #define snprintf _snprintf #endif -#include "SimpleConfig.h" +#include <SimCore/Util/SimpleConfig.h> #include <algorithm> #include <string> @@ -93,7 +93,7 @@ // class ConfigError -ConfigError::ConfigError(const std::string &msg, const std::string &filename, +ConfigError::ConfigError(const std::string &msg, const std::string &filename, int line_no, const std::string &line): Error(msg) { char lstr[20]; @@ -115,7 +115,7 @@ public: ConfigElement() {} virtual ~ConfigElement() {} - virtual void write(std::ostream &os) const {} + virtual void write(std::ostream &) const {} }; // internal class for storing config comments @@ -282,7 +282,7 @@ std::string value = Trim(line.substr(eq+1)); _addValue(section, key, value); } - } + } } } @@ -301,7 +301,7 @@ ConfigValue *v = _find(section, key); if (v) { return atoi(v->getValue().c_str()); - } else + } else if (set) { setInt(section, key, default_); } @@ -317,7 +317,7 @@ } else { return false; } - } else + } else if (set) { setBool(section, key, default_); } @@ -329,7 +329,7 @@ ConfigValue *v = _find(section, key); if (v) { return atof(v->getValue().c_str()); - } else + } else if (set) { setFloat(section, key, default_); } @@ -341,7 +341,7 @@ ConfigValue *v = _find(section, key); if (v) { return v->getValue(); - } else + } else if (set) { setString(section, key, default_); } @@ -353,7 +353,7 @@ std::string native = simdata::ospath::filter(default_); if (v) { return simdata::ospath::filter(v->getValue()); - } else + } else if (set) { setString(section, key, native); } @@ -471,8 +471,8 @@ // This is a rather ugly and slow way to delete a section. It // can leave stay comments in the middle of sections, but will // remove the section entirely, even if it is multiply declared. -// This whole function was a bit of an afterthought, since it -// isn't very likely to be used in the application this class +// This whole function was a bit of an afterthought, since it +// isn't very likely to be used in the application this class // was written for. Sorry to all the purists out there. :-( void SimpleConfig::delSection(std::string const §ion_name) { ConfigDictionary::iterator i = m_last.find(section_name); Modified: trunk/CSP/SimCore/Util/SimpleConfig.h =================================================================== --- trunk/CSP/SimCore/Util/SimpleConfig.h 2004-09-26 07:43:00 UTC (rev 1253) +++ trunk/CSP/SimCore/Util/SimpleConfig.h 2004-09-26 07:49:34 UTC (rev 1254) @@ -1,17 +1,17 @@ -// Combat Simulator Project - FlightSim Demo -// Copyright (C) 2002 The Combat Simulator Project +// Combat Simulator Project +// Copyright (C) 2002, 2004 The Combat Simulator Project // http://csp.sourceforge.net -// +// // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -22,15 +22,15 @@ * * There are a number of aspects of these classes that are not ideal, * however the interface is simple enough to be stable and the - * implementation can be "purified" later (if desired) without + * implementation can be "purified" later (if desired) without * affecting its use. * * @author Mark Rose <mr...@st...> */ -#ifndef __SIMPLECONFIG_H__ -#define __SIMPLECONFIG_H__ +#ifndef __SIMCORE_UTIL_SIMPLECONFIG_H__ +#define __SIMCORE_UTIL_SIMPLECONFIG_H__ # if defined(_MSC_VER) && (_MSC_VER <= 1200) #pragma warning (disable : 4786) @@ -46,7 +46,7 @@ /** * Basic exception class. * - * The error message will automatically be dumped to stderr when the object + * The error message will automatically be dumped to stderr when the object * is destroyed unless the clear() method is called. * * @author Mark Rose <mr...@st...> @@ -64,7 +64,7 @@ * Maybe a little too fancy, but the clear() is needed so that * multiple automatic copies yield only a single error message. */ - Error(const Error &e): m_msg(e.m_msg), + Error(const Error &e): m_msg(e.m_msg), m_fullerror(e.m_fullerror), m_display(e.m_display) { e.clear(); } @@ -108,7 +108,7 @@ /** * Set the error information. */ - ConfigError(const std::string &msg, const std::string &filename, + ConfigError(const std::string &msg, const std::string &filename, int line_no, const std::string &line); /** @@ -146,7 +146,7 @@ * * This will often be created as a global object so that configuration * data can be accessed and saved throughout the program. - * + * * @author Mark Rose <mr...@st...> */ class SimpleConfig { @@ -198,7 +198,7 @@ void addComment(const std::string &comment); /** - * Open a new configuration file. Any changes to the previous file are saved + * Open a new configuration file. Any changes to the previous file are saved * first. */ bool open(const std::string &fn); @@ -364,8 +364,8 @@ ConfigDictionary m_dict, m_last; ElementList m_elements; - void _addComment(const std::string &comment); - void _addSection(const std::string §ion); + void _addComment(const std::string &comment); + void _addSection(const std::string §ion); std::string _hash_index(const std::string §ion, const std::string &key) const; void _addValue(const std::string §ion, const std::string &key, const std::string &value); void _parse(std::istream &is); @@ -374,5 +374,5 @@ }; -#endif // __SIMPLECONFIG_H__ +#endif // __SIMCORE_UTIL_SIMPLECONFIG_H__ |
From: <sv...@ww...> - 2004-09-26 07:43:12
|
Author: mkrose Date: 2004-09-26 00:43:00 -0700 (Sun, 26 Sep 2004) New Revision: 1253 Added: trunk/CSP/SimCore/Util/SimpleConfig.cpp trunk/CSP/SimCore/Util/SimpleConfig.h Log: Branch SimpleConfig to SimCore/Util. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1253 Copied: trunk/CSP/SimCore/Util/SimpleConfig.cpp (from rev 1239, trunk/CSP/CSPSim/Source/SimpleConfig.cpp) Copied: trunk/CSP/SimCore/Util/SimpleConfig.h (from rev 1239, trunk/CSP/CSPSim/Include/SimpleConfig.h) |