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-11-11 07:36:55
|
Author: mkrose Date: 2004-11-10 23:36:46 -0800 (Wed, 10 Nov 2004) New Revision: 1303 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/SimData/Parse.py Log: Another bug fix in Parse.py, this time for TableN types. Prevents spurious complaints about missing required fields. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1303 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-11-09 08:53:30 UTC (rev 1302) +++ trunk/CSP/SimData/CHANGES.current 2004-11-11 07:36:46 UTC (rev 1303) @@ -1,6 +1,10 @@ Version 0.4.0 (in progress) =========================== +2004-11-10: onsight + * Another bug fix in Parse.py, this time for TableN types. Prevents + spurious complaints about missing required fields. + 2004-11-07: onsight * In Parse.py, convert more unicode strings to ascii before calling extension methods. Swig 1.3.22 no longer accepts unicode strings Modified: trunk/CSP/SimData/SimData/Parse.py =================================================================== --- trunk/CSP/SimData/SimData/Parse.py 2004-11-09 08:53:30 UTC (rev 1302) +++ trunk/CSP/SimData/SimData/Parse.py 2004-11-11 07:36:46 UTC (rev 1303) @@ -627,7 +627,7 @@ def __init__(self, dim, id, base, name, attrs): SimpleHandler.__init__(self, id, base, name, attrs) self._method = attrs.get("method", "linear") - self._required_members = _LUTHandler.required_members + self._required_members = _LUTHandler.required_members[:] for i in range(dim): self._required_members.append("Breaks%d" % i) self._dim = dim |
From: <sv...@ww...> - 2004-11-09 08:53:38
|
Author: delta Date: 2004-11-09 00:53:30 -0800 (Tue, 09 Nov 2004) New Revision: 1302 Modified: trunk/CSP/CSPSim/Source/FlightDynamics.cpp Log: * Replaced a double test on m_Alpha with clampTo. * Changed the way m_Beta is calculated. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1302 Modified: trunk/CSP/CSPSim/Source/FlightDynamics.cpp =================================================================== --- trunk/CSP/CSPSim/Source/FlightDynamics.cpp 2004-11-07 20:11:04 UTC (rev 1301) +++ trunk/CSP/CSPSim/Source/FlightDynamics.cpp 2004-11-09 08:53:30 UTC (rev 1302) @@ -100,17 +100,18 @@ simdata::Vector3 airflowBody = *m_VelocityBody - m_WindVelocityBody; m_Airspeed = airflowBody.length(); m_Alpha = -atan2(airflowBody.z(), airflowBody.y()); + if (h > 0.0) { m_AlphaDot = ( m_Alpha - m_Alpha0 ) / h; } // else keep previous value // restrict m_alphaDot in vertical stalls - if (m_AlphaDot > 1.0) m_AlphaDot = 1.0; - if (m_AlphaDot < -1.0) m_AlphaDot = -1.0; + m_AlphaDot = simdata::clampTo(m_AlphaDot,-1.0,1.0); // Calculate side angle // beta is 0 when v velocity (i.e. side velocity) is 0; note here v is m_AirflowBody.x() - m_Beta = atan2(airflowBody.x(), airflowBody.y()); + //m_Beta = atan2(airflowBody.x(), airflowBody.y()); + m_Beta = asin(airflowBody.x()/(1.0 + m_Airspeed)); } void FlightDynamics::getInfo(InfoList &info) const { |
From: <sv...@ww...> - 2004-11-07 20:11:14
|
Author: mkrose Date: 2004-11-07 12:11:04 -0800 (Sun, 07 Nov 2004) New Revision: 1301 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/SimData/Parse.py Log: In Parse.py, convert more unicode strings to ascii before calling extension methods. Swig 1.3.22 no longer accepts unicode strings when std::string or char* is expected. Also a small fix for error reporting. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1301 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-11-07 09:23:42 UTC (rev 1300) +++ trunk/CSP/SimData/CHANGES.current 2004-11-07 20:11:04 UTC (rev 1301) @@ -1,16 +1,22 @@ Version 0.4.0 (in progress) =========================== +2004-11-07: onsight + * In Parse.py, convert more unicode strings to ascii before calling + extension methods. Swig 1.3.22 no longer accepts unicode strings + when std::string or char* is expected. Also a small fix for error + reporting. + 2004-10-17: delta * Fix a few asserts making vs angry (Thread.h). - + * Fix a few cast warnings under vs. - + * Added a SIMDATA_EXPORT on TaggedRecordRegistry. - - * Added prefix:: to <classname> in macro SIMDATA_REGISTER_INNER_INTERFACE - (InterfaceRegistry.h). - + + * Added prefix:: to <classname> in macro SIMDATA_REGISTER_INNER_INTERFACE + (InterfaceRegistry.h). + 2004-10-09: onsight * Fix Timer::reset(). Modified: trunk/CSP/SimData/SimData/Parse.py =================================================================== --- trunk/CSP/SimData/SimData/Parse.py 2004-11-07 09:23:42 UTC (rev 1300) +++ trunk/CSP/SimData/SimData/Parse.py 2004-11-07 20:11:04 UTC (rev 1301) @@ -320,7 +320,7 @@ def end(self): self._element = SimData.Real() - self._element.parseXML(self._c) + self._element.parseXML(self._c.encode('ascii')) class ECEFHandler(SimpleHandler): @@ -329,7 +329,7 @@ def end(self): self._element = SimData.ECEF() - self._element.parseXML(self._c) + self._element.parseXML(self._c.encode('ascii')) class LLAHandler(SimpleHandler): @@ -338,7 +338,7 @@ def end(self): self._element = SimData.LLA() - self._element.parseXML(self._c) + self._element.parseXML(self._c.encode('ascii')) class UTMHandler(SimpleHandler): @@ -347,7 +347,7 @@ def end(self): self._element = SimData.UTM() - self._element.parseXML(self._c) + self._element.parseXML(self._c.encode('ascii')) class VectorHandler(SimpleHandler): @@ -356,7 +356,7 @@ def end(self): self._element = SimData.Vector3() - self._element.parseXML(self._c) + self._element.parseXML(self._c.encode('ascii')) class MatrixHandler(SimpleHandler): @@ -366,7 +366,7 @@ def end(self): self._element = SimData.Matrix3() - self._element.parseXML(self._c) + self._element.parseXML(self._c.encode('ascii')) class QuatHandler(SimpleHandler): @@ -375,7 +375,7 @@ def end(self): self._element = SimData.Quaternion() - self._element.parseXML(self._c) + self._element.parseXML(self._c.encode('ascii')) class DateHandler(SimpleHandler): @@ -384,7 +384,7 @@ def end(self): self._element = SimData.SimDate() - self._element.parseXML(self._c) + self._element.parseXML(self._c.encode('ascii')) class StringHandler(SimpleHandler): @@ -426,10 +426,10 @@ # # 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) -# if ext is None: -# raise XMLSyntax, "Object enumeration member undefined (no Enumeration class)" -# ext.parseXML(self._c) +# ext = self.getObjectAttribute(obj, name, None) +# if ext is None: +# raise XMLSyntax, "Object enumeration member undefined (no Enumeration class)" +# ext.parseXML(self._c.encode('ascii')) class PathHandler(SimpleHandler): @@ -483,10 +483,10 @@ def assign(self, interface, obj, name): ext = SimData.External() - ext.setSource(self._element) + ext.setSource(self._element.encode('ascii')) interface.set(obj, name, ext) # ext = self.getObjectAttribute(obj, name, SimData.External()) -# ext.setSource(self._element) +# ext.setSource(self._element.encode('ascii')) class KeyHandler(SimpleHandler): @@ -761,7 +761,7 @@ def end(self): self._element = self._object self.checkAssigned() - self._element.parseXML(self._c) + self._element.parseXML(self._c.encode('ascii')) self._element.convertXML() def checkAssigned(self): @@ -836,16 +836,22 @@ line = locator.getLineNumber() public = locator.getPublicId() system = locator.getSystemId() - print "In source file \"%s\" [line %d, col %d]" % (path, line, column), + if column is None: + print "In source file \"%s\" [line %d]" % (path, line), + else: + print "In source file \"%s\" [line %d, col %d]" % (path, line, column), if public is not None or system is not None: print " - %s, %s" % (public, system) print print "Exception:", e - type, value, traceback = sys.exc_info() + type_, value, traceback = sys.exc_info() 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")) + if column is None: + print >>log, "%s[%d] - %s, %s" % (path, line, public, system) + else: + print >>log, "%s[%d:%d] - %s, %s" % (path, line, column, public, system) + print_exception(type_, value, traceback, file=open("error.log", "wt")) print "Exception traceback saved to error.log" else: raise |
From: <sv...@ww...> - 2004-11-07 09:24:28
|
Author: mkrose Date: 2004-11-07 01:23:42 -0800 (Sun, 07 Nov 2004) New Revision: 1300 Modified: trunk/CSP/SimNet/ClientServer.cpp trunk/CSP/SimNet/ClientServer.h trunk/CSP/SimNet/MessageQueue.h trunk/CSP/SimNet/NetworkInterface.cpp trunk/CSP/SimNet/NetworkInterface.h trunk/CSP/SimNet/NetworkNode.cpp trunk/CSP/SimNet/NetworkNode.h trunk/CSP/SimNet/PeerInfo.cpp trunk/CSP/SimNet/PeerInfo.h Log: Minor interface tweaks. Add multi-destination message queueing and caching. Add comments to PeerInfo, NetworkInterface, and ClientServer. Convert diagnostic print statements to log entries. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1300 Diff omitted (33994 bytes). |
From: <sv...@ww...> - 2004-10-30 21:57:27
|
Author: delta Date: 2004-10-30 14:57:17 -0700 (Sat, 30 Oct 2004) New Revision: 1299 Modified: trunk/CSP/Demeter/CHANGES.current trunk/CSP/Demeter/Terrain.cpp Log: * Changed GL_CLAMP mode to GL_CLAMP_TO_EDGE_EXT in CreateTexture to avoid edge clamping problem on windows. Need to be tested on GNU/Linux. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1299 Modified: trunk/CSP/Demeter/CHANGES.current =================================================================== --- trunk/CSP/Demeter/CHANGES.current 2004-10-25 20:44:43 UTC (rev 1298) +++ trunk/CSP/Demeter/CHANGES.current 2004-10-30 21:57:17 UTC (rev 1299) @@ -1,5 +1,11 @@ Version 0.3.2 (in progress) =========================== + +2004-10-18: delta + Changed GL_CLAMP mode to GL_CLAMP_TO_EDGE_EXT in CreateTexture + to avoid edge clamping problem on windows. Need to be tested on + GNU/Linux. + 2004-09-29: delta Added #NOMINMAX before including windows.h to avoid conflict with std::max/min. @@ -9,8 +15,7 @@ 2003-12-06: delta Minor changes to shut up .net 7.1 warnings. - Demeter debug version links onto release - SDL_image.lib + Demeter debug version links onto release SDL_image.lib. 2003-07-15: onsight Disabled GDAL support by default. Modified: trunk/CSP/Demeter/Terrain.cpp =================================================================== --- trunk/CSP/Demeter/Terrain.cpp 2004-10-25 20:44:43 UTC (rev 1298) +++ trunk/CSP/Demeter/Terrain.cpp 2004-10-30 21:57:17 UTC (rev 1299) @@ -2660,8 +2660,8 @@ glBindTexture(GL_TEXTURE_2D,texId); if (bClamp) { - glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP); - glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE_EXT); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE_EXT); } else { |
From: <sv...@ww...> - 2004-10-25 20:44:49
|
Author: delta Date: 2004-10-25 13:44:43 -0700 (Mon, 25 Oct 2004) New Revision: 1298 Modified: trunk/CSP/CSPSim/Include/CSPSim.i Log: * Changed Battlefield.h in OldBattlefield.h. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1298 Modified: trunk/CSP/CSPSim/Include/CSPSim.i =================================================================== --- trunk/CSP/CSPSim/Include/CSPSim.i 2004-10-24 19:17:45 UTC (rev 1297) +++ trunk/CSP/CSPSim/Include/CSPSim.i 2004-10-25 20:44:43 UTC (rev 1298) @@ -22,7 +22,7 @@ #include "Theater.h" #include "Projection.h" #include "Shell.h" -#include <SimCore/Battlefield/Battlefield.h> +#include <SimCore/Battlefield/OldBattlefield.h> #include <SimData/Math.h> void _createVehicleHelper(CSPSim *self, const char *path, simdata::Vector3 position, |
From: <sv...@ww...> - 2004-10-24 19:17:52
|
Author: delta Date: 2004-10-24 12:17:45 -0700 (Sun, 24 Oct 2004) New Revision: 1297 Modified: trunk/CSP/CSPSim/Source/CSPSim.cpp Log: * Forgot to commit the mods to this file. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1297 Modified: trunk/CSP/CSPSim/Source/CSPSim.cpp =================================================================== --- trunk/CSP/CSPSim/Source/CSPSim.cpp 2004-10-21 19:36:30 UTC (rev 1296) +++ trunk/CSP/CSPSim/Source/CSPSim.cpp 2004-10-24 19:17:45 UTC (rev 1297) @@ -34,6 +34,7 @@ #include "CSPSim.h" +#include "Animation.h" #include "Atmosphere.h" #include "Config.h" //#include "ConsoleCommands.h" |
From: <sv...@ww...> - 2004-10-21 19:36:40
|
Author: delta Date: 2004-10-21 12:36:30 -0700 (Thu, 21 Oct 2004) New Revision: 1296 Added: trunk/CSP/SimNet/VisualStudio2003/ trunk/CSP/SimNet/VisualStudio2003/SimNet.sln trunk/CSP/SimNet/VisualStudio2003/SimNet.vcproj Modified: trunk/CSP/SimNet/HandlerSet.h trunk/CSP/SimNet/NetworkInterface.cpp trunk/CSP/SimNet/NetworkNode.h trunk/CSP/SimNet/PacketHandler.h trunk/CSP/SimNet/PacketSource.h trunk/CSP/SimNet/PeerInfo.cpp trunk/CSP/SimNet/Sockets.h trunk/CSP/SimNet/StopWatch.h Log: * Initial vs2003 project file. * Minor tweaks to get it compile on vc7.1. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1296 Diff omitted (10864 bytes). |
From: <sv...@ww...> - 2004-10-18 05:06:30
|
Author: mkrose Date: 2004-10-17 22:06:21 -0700 (Sun, 17 Oct 2004) New Revision: 1295 Added: trunk/CSP/SimNet/DispatchTarget.cpp trunk/CSP/SimNet/DispatchTarget.h trunk/CSP/SimNet/SimNet.h Modified: trunk/CSP/SimNet/ClientServer.cpp trunk/CSP/SimNet/ClientServer.h trunk/CSP/SimNet/DispatchManager.cpp trunk/CSP/SimNet/DispatchManager.h trunk/CSP/SimNet/PeerInfo.cpp trunk/CSP/SimNet/PeerInfo.h trunk/CSP/SimNet/SConscript Log: Miscellaneous cleanup. Broke DispatchTarget out into a separate header. Small bug fixes in PeerInfo related to bandwidth allocation and deadtime detection. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1295 Diff omitted (14062 bytes). |
From: <sv...@ww...> - 2004-10-18 04:42:22
|
Author: mkrose Date: 2004-10-17 21:42:14 -0700 (Sun, 17 Oct 2004) New Revision: 1294 Added: trunk/CSP/SimCore/Battlefield/OldBattlefield.cpp trunk/CSP/SimCore/Battlefield/OldBattlefield.h Removed: trunk/CSP/SimCore/Battlefield/Battlefield.cpp trunk/CSP/SimCore/Battlefield/Battlefield.h Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/CSPSim.cpp trunk/CSP/CSPSim/Source/ClientNode.cpp trunk/CSP/CSPSim/Source/GameScreen.cpp trunk/CSP/CSPSim/Source/SimNet/DispatchMessageHandler.cpp trunk/CSP/CSPSim/Source/Views/View.cpp trunk/CSP/SimCore/Battlefield/SConscript trunk/CSP/SimCore/VisualStudio2003/SimCore.vcproj Log: Move Battlefield.* to OldBattlefield.*, to be replaced by a network-enabled battlefield implementation. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1294 Diff omitted (66630 bytes). |
From: <sv...@ww...> - 2004-10-18 02:01:13
|
Author: mkrose Date: 2004-10-17 19:01:06 -0700 (Sun, 17 Oct 2004) New Revision: 1293 Added: trunk/CSP/CSPSim/Include/glDiagnostics.h trunk/CSP/CSPSim/Source/glDiagnostics.cpp Log: Add GlStateSnapshot class for comparing gl state. Useful for detecting and diagnosing unexpected state changes. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1293 Diff omitted (19417 bytes). |
From: <sv...@ww...> - 2004-10-17 18:52:55
|
Author: delta Date: 2004-10-17 11:52:46 -0700 (Sun, 17 Oct 2004) New Revision: 1292 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/InterfaceRegistry.h Log: * Added prefix:: to <classname> in macro SIMDATA_REGISTER_INNER_INTERFACE (InterfaceRegistry.h). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1292 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-10-17 12:59:45 UTC (rev 1291) +++ trunk/CSP/SimData/CHANGES.current 2004-10-17 18:52:46 UTC (rev 1292) @@ -8,6 +8,9 @@ * Added a SIMDATA_EXPORT on TaggedRecordRegistry. + * Added prefix:: to <classname> in macro SIMDATA_REGISTER_INNER_INTERFACE + (InterfaceRegistry.h). + 2004-10-09: onsight * Fix Timer::reset(). Modified: trunk/CSP/SimData/Include/SimData/InterfaceRegistry.h =================================================================== --- trunk/CSP/SimData/Include/SimData/InterfaceRegistry.h 2004-10-17 12:59:45 UTC (rev 1291) +++ trunk/CSP/SimData/Include/SimData/InterfaceRegistry.h 2004-10-17 18:52:46 UTC (rev 1292) @@ -732,7 +732,7 @@ * See @ref InterfaceMacros for details. */ #define SIMDATA_REGISTER_INNER_INTERFACE(prefix, classname) \ - SIMDATA(ObjectInterface)<classname> *prefix::classname::classname##InterfaceProxy::_interface = 0; \ + SIMDATA(ObjectInterface)<prefix::classname> *prefix::classname::classname##InterfaceProxy::_interface = 0; \ namespace { \ prefix::classname::classname##InterfaceProxy __##prefix##_##classname##_interface; \ } /* anonymous namespace */ |
From: <sv...@ww...> - 2004-10-17 12:59:53
|
Author: delta Date: 2004-10-17 05:59:45 -0700 (Sun, 17 Oct 2004) New Revision: 1291 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h Log: * Added a SIMDATA_EXPORT on TaggedRecordRegistry. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1291 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-06-19 20:20:27 UTC (rev 1290) +++ trunk/CSP/SimData/CHANGES.current 2004-10-17 12:59:45 UTC (rev 1291) @@ -6,6 +6,8 @@ * Fix a few cast warnings under vs. + * Added a SIMDATA_EXPORT on TaggedRecordRegistry. + 2004-10-09: onsight * Fix Timer::reset(). Modified: trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h =================================================================== --- trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h 2004-06-19 20:20:27 UTC (rev 1290) +++ trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h 2004-10-17 12:59:45 UTC (rev 1291) @@ -64,7 +64,7 @@ * * @author Mark Rose <mr...@st...> */ -class TaggedRecordRegistry: public Singleton<TaggedRecordRegistry> { +class SIMDATA_EXPORT TaggedRecordRegistry: public Singleton<TaggedRecordRegistry> { friend class Singleton<TaggedRecordRegistry>; |
From: <sv...@ww...> - 2004-10-17 08:58:09
|
Author: delta Date: 2004-06-19 13:20:27 -0700 (Sat, 19 Jun 2004) New Revision: 1290 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/AtomicCounter.h trunk/CSP/SimData/Include/SimData/CircularBuffer.h trunk/CSP/SimData/Include/SimData/Thread.h Log: * Fix a few asserts making vs angry (Thread.h). * Fix a few cast warnings under vs. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1290 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-10-09 21:38:07 UTC (rev 1289) +++ trunk/CSP/SimData/CHANGES.current 2004-06-19 20:20:27 UTC (rev 1290) @@ -1,8 +1,13 @@ Version 0.4.0 (in progress) =========================== +2004-10-17: delta + * Fix a few asserts making vs angry (Thread.h). + + * Fix a few cast warnings under vs. + 2004-10-09: onsight - * Fix Timer::reset() + * Fix Timer::reset(). * Move TaggedRecordRegistry methods to .cpp file, add a factory lookup method. @@ -28,13 +33,13 @@ * Used Interlocked* instead of _Interlocked* in AtomicCounter.h. - * Removed ospath namespace in front of stripFileExtension. + * Removed ospath namespace in front of stripFileExtension (FileUtility.h). * Added #define NOMINMAX in FileUtility.cpp to avoid usual conflicts - including windows.h. + when including windows.h. * Changed "contents" into "entries" in getDirectoryContents (_WIN32) from - FileUtility.cpp. Changed FileClosed into FindClose. + FileUtility.cpp. Changed FileClose into FindClose. * Exported _log_reference_count_error & _log_reference_conversion_error from LogStream.cpp. Modified: trunk/CSP/SimData/Include/SimData/AtomicCounter.h =================================================================== --- trunk/CSP/SimData/Include/SimData/AtomicCounter.h 2004-10-09 21:38:07 UTC (rev 1289) +++ trunk/CSP/SimData/Include/SimData/AtomicCounter.h 2004-06-19 20:20:27 UTC (rev 1290) @@ -68,6 +68,7 @@ # define SIMDATA_ATOMIC_INC(x) InterlockedIncrement(&x) ? false : true; # define SIMDATA_ATOMIC_GET(x) x # define SIMDATA_ATOMIC_TYPE volatile LONG +// XXX: eventually, rewrite it with intrinsic functions. //# pragma intrinsic (_InterlockedExchange) //# pragma intrinsic (_InterlockedDecrement) //# pragma intrinsic (_InterlockedIncrement) Modified: trunk/CSP/SimData/Include/SimData/CircularBuffer.h =================================================================== --- trunk/CSP/SimData/Include/SimData/CircularBuffer.h 2004-10-09 21:38:07 UTC (rev 1289) +++ trunk/CSP/SimData/Include/SimData/CircularBuffer.h 2004-06-19 20:20:27 UTC (rev 1290) @@ -277,7 +277,7 @@ if (read - m_write <= RESERVE) return 0; return read - m_write - RESERVE - 1; } - uint32 space = std::max(read, m_size - m_write); + uint32 space = std::max<uint32>(read, m_size - m_write); if (space > RESERVE) return space - RESERVE - 1; return 0; } Modified: trunk/CSP/SimData/Include/SimData/Thread.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Thread.h 2004-10-09 21:38:07 UTC (rev 1289) +++ trunk/CSP/SimData/Include/SimData/Thread.h 2004-06-19 20:20:27 UTC (rev 1290) @@ -199,11 +199,11 @@ */ static void *_start(void *param) { Ref<Task> *task_ptr = static_cast<Ref<Task>*>(param); - assert(task_ptr); + assert(task_ptr != 0); Ref<Task> task = *task_ptr; // delete param (we own it and it has served its purpose) delete task_ptr; - assert(task); + assert(task.valid()); // execute the task task->_execute(); // drop our reference to the task |
From: <sv...@ww...> - 2004-10-09 21:38:14
|
Author: mkrose Date: 2004-10-09 14:38:07 -0700 (Sat, 09 Oct 2004) New Revision: 1289 Added: trunk/CSP/SimNet/ClientServer.cpp trunk/CSP/SimNet/ClientServer.h trunk/CSP/SimNet/ClientServerMessages.net Modified: trunk/CSP/SimNet/Callbacks.h trunk/CSP/SimNet/DispatchHandler.cpp trunk/CSP/SimNet/DispatchHandler.h trunk/CSP/SimNet/DispatchManager.h trunk/CSP/SimNet/MessageHandler.h trunk/CSP/SimNet/MessageQueue.h trunk/CSP/SimNet/NetBase.h trunk/CSP/SimNet/NetworkInterface.cpp trunk/CSP/SimNet/NetworkInterface.h trunk/CSP/SimNet/NetworkMessage.h trunk/CSP/SimNet/PacketDecoder.h trunk/CSP/SimNet/PeerInfo.cpp trunk/CSP/SimNet/PeerInfo.h trunk/CSP/SimNet/RecordCodec.cpp trunk/CSP/SimNet/RecordCodec.h trunk/CSP/SimNet/RoutingHandler.h trunk/CSP/SimNet/SConscript Log: Add client and server classes that encapsulate much of the networking boilerplate and provide a simpler api for building applications. Lots of miscellaneous cleanups, fixes, and enhancements. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1289 Diff omitted (58741 bytes). |
From: <sv...@ww...> - 2004-10-09 21:33:38
|
Author: mkrose Date: 2004-10-09 14:33:21 -0700 (Sat, 09 Oct 2004) New Revision: 1288 Modified: trunk/CSP/tools/build.py Log: Modify scons emitter for .net (no, not MS .net) files to place the generated header and source files in the same directory as the original file. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1288 Modified: trunk/CSP/tools/build.py =================================================================== --- trunk/CSP/tools/build.py 2004-10-09 21:31:00 UTC (rev 1287) +++ trunk/CSP/tools/build.py 2004-10-09 21:33:21 UTC (rev 1288) @@ -491,9 +491,11 @@ def EmitNet(target, source, env): assert(len(source)==1) source = source[0] + name = os.path.splitext(source.name)[0] + dir = source.srcnode().dir target = [ - source.target_from_source('', env['CXXFILESUFFIX']), - source.target_from_source('', '.h') + dir.File(name + env['CXXFILESUFFIX']), + dir.File(name + '.h'), ] return (target, source) |
From: <sv...@ww...> - 2004-10-09 21:31:14
|
Author: mkrose Date: 2004-10-09 14:31:00 -0700 (Sat, 09 Oct 2004) New Revision: 1287 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/ScopedPointer.h Log: Minor cleanup of ScopedPointer, added ScopedArray. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1287 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-10-09 11:41:00 UTC (rev 1286) +++ trunk/CSP/SimData/CHANGES.current 2004-10-09 21:31:00 UTC (rev 1287) @@ -7,6 +7,8 @@ * Move TaggedRecordRegistry methods to .cpp file, add a factory lookup method. + * Minor cleanup of ScopedPointer, added ScopedArray. + 2004-10-04: onsight * Add 32-bit and 64-bit pass-through hash functions. Modified: trunk/CSP/SimData/Include/SimData/ScopedPointer.h =================================================================== --- trunk/CSP/SimData/Include/SimData/ScopedPointer.h 2004-10-09 11:41:00 UTC (rev 1286) +++ trunk/CSP/SimData/Include/SimData/ScopedPointer.h 2004-10-09 21:31:00 UTC (rev 1287) @@ -56,7 +56,9 @@ */ explicit ScopedPointer(T * p = 0): _ptr(p) { } - inline ~ScopedPointer() { if (_ptr) reset(); } + /** Deletes the stored pointer. + */ + inline ~ScopedPointer() { delete _ptr; } /** Reassign this instance to a new pointer. * @@ -94,6 +96,59 @@ }; + +/** A smart pointer class that automatically deletes a + * dynamically allocated array when leaving scope. + * + * The interface was borrowed from Boost C++. + */ +template <class T> +class ScopedArray: public NonCopyable { + T *_ptr; +public: + typedef T Type; + + /** Construct a new scoped array. + * + * The assigned pointer, if non-null, will be automatically + * deleted when this instance goes out of scope. + */ + explicit ScopedArray(T * p = 0): _ptr(p) { } + + /** Deletes the stored array pointer. + */ + inline ~ScopedArray() { delete[] _ptr; } + + /** Reassign this instance to a new pointer. + * + * If the current pointer is non-null it will be deleted. + */ + void reset(T * p = 0) { + assert(_ptr == 0 || _ptr != p); + if (_ptr) delete[] _ptr; + _ptr = p; + } + + /** Obtain a non-const reference to an element of the array. + * + * Will abort if the array pointer is null. + */ + inline T & operator[](unsigned i) const { assert(_ptr); return _ptr[i]; } + + /** Get the raw array pointer. + */ + inline T * get() const { return _ptr; } + + /** Return true if the array pointer is null. + */ + inline bool isNull() const { return 0 == _ptr; } + + /** Return true if the array pointer is not null. + */ + inline bool valid() const { return 0 != _ptr; } + +}; + NAMESPACE_SIMDATA_END #endif // __SIMDATA_SCOPEDPOINTER_H__ |
From: <sv...@ww...> - 2004-10-09 11:41:08
|
Author: mkrose Date: 2004-10-09 04:41:00 -0700 (Sat, 09 Oct 2004) New Revision: 1286 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h trunk/CSP/SimData/Source/TaggedRecordRegistry.cpp Log: Move TaggedRecordRegistry methods to .cpp file, add a factory lookup method. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1286 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-10-09 11:32:48 UTC (rev 1285) +++ trunk/CSP/SimData/CHANGES.current 2004-10-09 11:41:00 UTC (rev 1286) @@ -4,6 +4,9 @@ 2004-10-09: onsight * Fix Timer::reset() + * Move TaggedRecordRegistry methods to .cpp file, add a factory + lookup method. + 2004-10-04: onsight * Add 32-bit and 64-bit pass-through hash functions. Modified: trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h =================================================================== --- trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h 2004-10-09 11:32:48 UTC (rev 1285) +++ trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h 2004-10-09 11:41:00 UTC (rev 1286) @@ -73,57 +73,41 @@ public: typedef std::vector<TaggedRecordFactoryBase *> FactoryList; - /** Get an object interface by object class name. + /** Create a new tagged record by name. * - * @returns 0 if the interface is not found. + * @param The name of the tagged record class. + * @returns 0 if the tagged record is not found. */ - Ref<TaggedRecord> createRecord(std::string const &name) const { - FactoryMap::const_iterator it = _map.find(name); - if (it != _map.end()) return it->second->create(); - return 0; - } - - /** Get an object interface by object class hash. + Ref<TaggedRecord> createRecord(std::string const &name) const; + + /** Create a new tagged record by id. * - * @returns 0 if the interface is not found. + * @returns 0 if the tagged record is not found. */ - Ref<TaggedRecord> createRecord(TaggedRecord::Id id) const { - HashT key(static_cast<uint32>(id), static_cast<uint32>(id>>32)); - FactoryIdMap::const_iterator it = _id_map.find(key); - if (it != _id_map.end()) return it->second->create(); - return 0; - } - - /** Test if an object interface is registered. + Ref<TaggedRecord> createRecord(TaggedRecord::Id id) const; + + /** Test if a tagged record is registered. * - * @param name The object class name. + * @param name The tagged record class name. */ - bool hasFactory(std::string const &name) const { - FactoryMap::const_iterator it = _map.find(name); - return it != _map.end(); - } - - /** Test if an object interface is registered. + bool hasFactory(std::string const &name) const; + + /** Test if a tagged record is registered. * - * @param id The object class hash. + * @param id The tagged record id. */ - bool hasFactory(TaggedRecord::Id id) const { - HashT key(static_cast<uint32>(id), static_cast<uint32>(id>>32)); - FactoryIdMap::const_iterator it = _id_map.find(key); - return it != _id_map.end(); - } - + bool hasFactory(TaggedRecord::Id id) const; + + /** Get the factory for a given tagged record id. + * @param id The tagged record id. + * @return The corresponding factory, or NULL. + */ + TaggedRecordFactoryBase const *getFactory(TaggedRecord::Id id) const; + /** Get a list of all interfaces in the registry. */ - FactoryList getFactories() const { - FactoryList list; - FactoryIdMap::const_iterator it = _id_map.begin(); - for (; it != _id_map.end(); ++it) { - list.push_back(it->second); - } - return list; - } - + FactoryList getFactories() const; + /** Get the interface registry singleton. */ static inline TaggedRecordRegistry &getTaggedRecordRegistry() { @@ -139,7 +123,7 @@ void registerFactory(TaggedRecordFactoryBase *factory); TaggedRecordRegistry() { } - + typedef HASH_MAPS<std::string, TaggedRecordFactoryBase*, hashstring, eqstring>::Type FactoryMap; typedef HASHT_MAP<TaggedRecordFactoryBase*>::Type FactoryIdMap; Modified: trunk/CSP/SimData/Source/TaggedRecordRegistry.cpp =================================================================== --- trunk/CSP/SimData/Source/TaggedRecordRegistry.cpp 2004-10-09 11:32:48 UTC (rev 1285) +++ trunk/CSP/SimData/Source/TaggedRecordRegistry.cpp 2004-10-09 11:41:00 UTC (rev 1286) @@ -42,6 +42,46 @@ _id_map[key] = factory; } +Ref<TaggedRecord> TaggedRecordRegistry::createRecord(std::string const &name) const { + FactoryMap::const_iterator it = _map.find(name); + if (it != _map.end()) return it->second->create(); + return 0; +} +Ref<TaggedRecord> TaggedRecordRegistry::createRecord(TaggedRecord::Id id) const { + HashT key(static_cast<uint32>(id), static_cast<uint32>(id>>32)); + FactoryIdMap::const_iterator it = _id_map.find(key); + if (it != _id_map.end()) return it->second->create(); + return 0; +} + +bool TaggedRecordRegistry::hasFactory(std::string const &name) const { + FactoryMap::const_iterator it = _map.find(name); + return it != _map.end(); +} + +bool TaggedRecordRegistry::hasFactory(TaggedRecord::Id id) const { + HashT key(static_cast<uint32>(id), static_cast<uint32>(id>>32)); + FactoryIdMap::const_iterator it = _id_map.find(key); + return it != _id_map.end(); +} + +TaggedRecordFactoryBase const *TaggedRecordRegistry::getFactory(TaggedRecord::Id id) const { + HashT key(static_cast<uint32>(id), static_cast<uint32>(id>>32)); + FactoryIdMap::const_iterator it = _id_map.find(key); + if (it != _id_map.end()) return it->second; + return 0; +} + +TaggedRecordRegistry::FactoryList TaggedRecordRegistry::getFactories() const { + FactoryList list; + FactoryIdMap::const_iterator it = _id_map.begin(); + for (; it != _id_map.end(); ++it) { + list.push_back(it->second); + } + return list; +} + + NAMESPACE_SIMDATA_END |
From: <sv...@ww...> - 2004-10-09 11:32:58
|
Author: mkrose Date: 2004-10-09 04:32:48 -0700 (Sat, 09 Oct 2004) New Revision: 1285 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Timing.h Log: Fix Timer::reset() Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1285 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-10-05 07:17:34 UTC (rev 1284) +++ trunk/CSP/SimData/CHANGES.current 2004-10-09 11:32:48 UTC (rev 1285) @@ -1,19 +1,22 @@ Version 0.4.0 (in progress) =========================== -2004-04-04: onsight +2004-10-09: onsight + * Fix Timer::reset() + +2004-10-04: onsight * Add 32-bit and 64-bit pass-through hash functions. * Fix quat stream output method. -2004-04-03: onsight +2004-10-03: onsight * Added a generic most-recently-used cache class. Initial use will be for caching network message dispatch handlers in SimNet. * Added a unittest for the new cache class, and cleaned up the scons build script for the c++ unittests. -2004-04-03: delta +2004-10-03: delta * Updated vcproj. * Exported EnumerationCore from Enum.h. Modified: trunk/CSP/SimData/Include/SimData/Timing.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Timing.h 2004-10-05 07:17:34 UTC (rev 1284) +++ trunk/CSP/SimData/Include/SimData/Timing.h 2004-10-09 11:32:48 UTC (rev 1285) @@ -108,7 +108,12 @@ } /// Reset the elapsed time to zero (does not stop the timer). - inline void reset() { _elapsed = 0; } + inline void reset() { + if (_running) { + _start = get_realtime(); + } + _elapsed = 0; + } }; |
From: <sv...@ww...> - 2004-10-05 07:17:49
|
Author: mkrose Date: 2004-10-05 00:17:34 -0700 (Tue, 05 Oct 2004) New Revision: 1284 Modified: trunk/CSP/SimNet/HandlerSet.h trunk/CSP/SimNet/MessageHandler.h trunk/CSP/SimNet/MessageQueue.h trunk/CSP/SimNet/NetBase.h trunk/CSP/SimNet/NetLog.h trunk/CSP/SimNet/NetRandom.cpp trunk/CSP/SimNet/NetRandom.h trunk/CSP/SimNet/NetworkInterface.cpp trunk/CSP/SimNet/NetworkInterface.h trunk/CSP/SimNet/NetworkMessage.h trunk/CSP/SimNet/NetworkNode.cpp trunk/CSP/SimNet/NetworkNode.h trunk/CSP/SimNet/PacketDecoder.h trunk/CSP/SimNet/PacketQueue.h trunk/CSP/SimNet/PacketSource.h trunk/CSP/SimNet/PeerInfo.h trunk/CSP/SimNet/ReliablePacket.h trunk/CSP/SimNet/SConscript trunk/CSP/SimNet/Sockets.h trunk/CSP/SimNet/StopWatch.h Log: Clean up simnet header notices. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1284 Modified: trunk/CSP/SimNet/HandlerSet.h =================================================================== --- trunk/CSP/SimNet/HandlerSet.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/HandlerSet.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/MessageHandler.h =================================================================== --- trunk/CSP/SimNet/MessageHandler.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/MessageHandler.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/MessageQueue.h =================================================================== --- trunk/CSP/SimNet/MessageQueue.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/MessageQueue.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/NetBase.h =================================================================== --- trunk/CSP/SimNet/NetBase.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/NetBase.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/NetLog.h =================================================================== --- trunk/CSP/SimNet/NetLog.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/NetLog.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/NetRandom.cpp =================================================================== --- trunk/CSP/SimNet/NetRandom.cpp 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/NetRandom.cpp 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/NetRandom.h =================================================================== --- trunk/CSP/SimNet/NetRandom.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/NetRandom.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/NetworkInterface.cpp =================================================================== --- trunk/CSP/SimNet/NetworkInterface.cpp 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/NetworkInterface.cpp 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/NetworkInterface.h =================================================================== --- trunk/CSP/SimNet/NetworkInterface.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/NetworkInterface.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/NetworkMessage.h =================================================================== --- trunk/CSP/SimNet/NetworkMessage.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/NetworkMessage.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/NetworkNode.cpp =================================================================== --- trunk/CSP/SimNet/NetworkNode.cpp 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/NetworkNode.cpp 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/NetworkNode.h =================================================================== --- trunk/CSP/SimNet/NetworkNode.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/NetworkNode.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/PacketDecoder.h =================================================================== --- trunk/CSP/SimNet/PacketDecoder.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/PacketDecoder.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/PacketQueue.h =================================================================== --- trunk/CSP/SimNet/PacketQueue.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/PacketQueue.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/PacketSource.h =================================================================== --- trunk/CSP/SimNet/PacketSource.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/PacketSource.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/PeerInfo.h =================================================================== --- trunk/CSP/SimNet/PeerInfo.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/PeerInfo.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/ReliablePacket.h =================================================================== --- trunk/CSP/SimNet/ReliablePacket.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/ReliablePacket.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/SConscript =================================================================== --- trunk/CSP/SimNet/SConscript 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/SConscript 2004-10-05 07:17:34 UTC (rev 1284) @@ -34,11 +34,14 @@ SOURCES = [ + 'DispatchManager.cpp', + 'DispatchHandler.cpp', 'NetRandom.cpp', 'NetworkInterface.cpp', 'NetworkNode.cpp', 'PeerInfo.cpp', 'RecordCodec.cpp', + 'RoutingHandler.cpp', ] MESSAGES = [ @@ -53,6 +56,9 @@ libmessages = env.SharedLibrary('SimNetMessages', MESSAGES) Alias(['all', 'SimNet'], [libmessages]) +server = env.Program('server', ['server.cpp', 'ObjectUpdate.net'] + libsimnet + ['#/SimData/SimData/libSimData.a']) +Alias('server', server) + """ test = env.Program('test', ['test.cpp'] + libsimnet + libmessages) # g++ -pg -o $@ $^ $(CXXFLAGS) $(SIMDATA_LIB) $(SIMNET_LIB) -lpthread -ldl -lccgnu2 -Wl,-R. -lSimNetMessages Modified: trunk/CSP/SimNet/Sockets.h =================================================================== --- trunk/CSP/SimNet/Sockets.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/Sockets.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // Modified: trunk/CSP/SimNet/StopWatch.h =================================================================== --- trunk/CSP/SimNet/StopWatch.h 2004-10-05 07:14:39 UTC (rev 1283) +++ trunk/CSP/SimNet/StopWatch.h 2004-10-05 07:17:34 UTC (rev 1284) @@ -1,4 +1,4 @@ -// Combat Simulator Project - FlightSim Demo +// Combat Simulator Project // Copyright (C) 2004 The Combat Simulator Project // http://csp.sourceforge.net // |
From: <sv...@ww...> - 2004-10-05 07:14:52
|
Author: mkrose Date: 2004-10-05 00:14:39 -0700 (Tue, 05 Oct 2004) New Revision: 1283 Added: trunk/CSP/SimNet/Callbacks.h trunk/CSP/SimNet/DispatchCache.h trunk/CSP/SimNet/DispatchHandler.cpp trunk/CSP/SimNet/DispatchHandler.h trunk/CSP/SimNet/DispatchManager.cpp trunk/CSP/SimNet/DispatchManager.h trunk/CSP/SimNet/RoutingHandler.cpp trunk/CSP/SimNet/RoutingHandler.h Modified: trunk/CSP/SimNet/MessageHandler.h trunk/CSP/SimNet/NetLog.h trunk/CSP/SimNet/NetworkMessage.h trunk/CSP/SimNet/PacketDecoder.h trunk/CSP/SimNet/PacketHandler.h Log: SimNet updates. Added message routing and dispatch, as well as smaller miscellaneous improvements. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1283 Diff omitted (37199 bytes). |
From: <sv...@ww...> - 2004-10-05 06:56:22
|
Author: mkrose Date: 2004-10-04 23:56:09 -0700 (Mon, 04 Oct 2004) New Revision: 1282 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Quat.h trunk/CSP/SimData/Source/Quat.cpp Log: Fix quat stream output method. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1282 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-10-05 06:53:49 UTC (rev 1281) +++ trunk/CSP/SimData/CHANGES.current 2004-10-05 06:56:09 UTC (rev 1282) @@ -4,6 +4,8 @@ 2004-04-04: onsight * Add 32-bit and 64-bit pass-through hash functions. + * Fix quat stream output method. + 2004-04-03: onsight * Added a generic most-recently-used cache class. Initial use will be for caching network message dispatch handlers in SimNet. Modified: trunk/CSP/SimData/Include/SimData/Quat.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Quat.h 2004-10-05 06:53:49 UTC (rev 1281) +++ trunk/CSP/SimData/Include/SimData/Quat.h 2004-10-05 06:56:09 UTC (rev 1282) @@ -404,7 +404,7 @@ #ifndef SWIG /** Format to an output stream. */ - friend inline std::ostream& operator << (std::ostream& output, const Quat& vec); + friend std::ostream& operator << (std::ostream& output, const Quat& q); /** Multiply a Quat by a scalar value on the left. */ friend inline Quat operator * (double lhs, const Quat& rhs) { return rhs*lhs; } Modified: trunk/CSP/SimData/Source/Quat.cpp =================================================================== --- trunk/CSP/SimData/Source/Quat.cpp 2004-10-05 06:53:49 UTC (rev 1281) +++ trunk/CSP/SimData/Source/Quat.cpp 2004-10-05 06:56:09 UTC (rev 1282) @@ -379,7 +379,7 @@ return 4*sizeof(double); } -inline std::ostream& operator << (std::ostream& output, const Quat& quat) +std::ostream& operator << (std::ostream& output, const Quat& quat) { output << "[" << quat._x << " " << quat._y |
From: <sv...@ww...> - 2004-10-05 06:53:59
|
Author: mkrose Date: 2004-10-04 23:53:49 -0700 (Mon, 04 Oct 2004) New Revision: 1281 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/HashUtility.h Log: Add generic 32-bit and 64-bit pass-through hash functions. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1281 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-10-04 11:19:29 UTC (rev 1280) +++ trunk/CSP/SimData/CHANGES.current 2004-10-05 06:53:49 UTC (rev 1281) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== +2004-04-04: onsight + * Add 32-bit and 64-bit pass-through hash functions. + 2004-04-03: onsight * Added a generic most-recently-used cache class. Initial use will be for caching network message dispatch handlers in SimNet. Modified: trunk/CSP/SimData/Include/SimData/HashUtility.h =================================================================== --- trunk/CSP/SimData/Include/SimData/HashUtility.h 2004-10-04 11:19:29 UTC (rev 1280) +++ trunk/CSP/SimData/Include/SimData/HashUtility.h 2004-10-05 06:53:49 UTC (rev 1281) @@ -1,18 +1,18 @@ /* SimData: Data Infrastructure for Simulations * Copyright (C) 2002 Mark Rose <tm...@st...> - * + * * 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. @@ -69,7 +69,7 @@ } /** Construct a specific hash value. - * + * * The high 32-bits will be zero. * * @param x The low 32-bits of the hash value. @@ -101,7 +101,7 @@ /** Compare this hash value for equality. * - * @param x The low 32-bits of the hash value to compare to. The + * @param x The low 32-bits of the hash value to compare to. The * high 32-bits are zero. */ bool operator ==(uint32 x) const { @@ -110,7 +110,7 @@ /** Compare this hash value for inequality. * - * @param x The low 32-bits of the hash value to compare to. The + * @param x The low 32-bits of the hash value to compare to. The * high 32-bits are zero. */ bool operator !=(uint32 x) const { @@ -165,10 +165,22 @@ inline HashT hash_string(std::string const &key) { return newhasht_cstring(key); } +/** Pass through (nop) hash function for 64-bit hash keys. + */ +struct nohash64 { + inline size_t operator()(uint64 x) const { return static_cast<size_t>(x); } +}; +/** Pass through (nop) hash function for 32-bit hash keys. + */ +struct nohash32 { + inline size_t operator()(uint32 x) const { return static_cast<size_t>(x); } +}; + + /** Integer equality functor for hash_map. */ -#if defined(_MSC_VER) && (_MSC_VER >= 1300) +#if defined(_MSC_VER) && (_MSC_VER >= 1300) struct eqint: public HASH<int const> { size_t operator ()(int const& i) const { return static_cast<size_t>(i); @@ -196,7 +208,7 @@ /** const char* equality functor for hash_map. */ -#if defined(_MSC_VER) && (_MSC_VER >= 1300) +#if defined(_MSC_VER) && (_MSC_VER >= 1300) struct eqstr: public HASH<char const*> { size_t operator()(char const* const &s) const { |
From: <sv...@ww...> - 2004-10-04 11:19:38
|
Author: delta Date: 2004-10-04 04:19:29 -0700 (Mon, 04 Oct 2004) New Revision: 1280 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/InputEvent.h trunk/CSP/CSPSim/Source/InputEvent.cpp Log: Fix for the recording of the input stream. It will need more work on the sampling value though. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1280 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-10-04 01:28:08 UTC (rev 1279) +++ trunk/CSP/CSPSim/CHANGES.current 2004-10-04 11:19:29 UTC (rev 1280) @@ -1,6 +1,10 @@ Version 0.4.0 (in progress) =========================== +2004-10-04: delta + * Fix for the recording of the input stream. It will need more work + on the sampling value though. + 2004-10-03: delta * Updated vcproj. Building CSPSimDLL now buils others libs (SimCore, SpatialIndex) according to the build mode. Modified: trunk/CSP/CSPSim/Include/InputEvent.h =================================================================== --- trunk/CSP/CSPSim/Include/InputEvent.h 2004-10-04 01:28:08 UTC (rev 1279) +++ trunk/CSP/CSPSim/Include/InputEvent.h 2004-10-04 11:19:29 UTC (rev 1280) @@ -35,8 +35,7 @@ class Handle { protected: - //simdata::SimTime m_EventTime; - float m_EventTime; + simdata::SimTime m_EventTime; static const float m_Sampling; public: Handle(): Modified: trunk/CSP/CSPSim/Source/InputEvent.cpp =================================================================== --- trunk/CSP/CSPSim/Source/InputEvent.cpp 2004-10-04 01:28:08 UTC (rev 1279) +++ trunk/CSP/CSPSim/Source/InputEvent.cpp 2004-10-04 11:19:29 UTC (rev 1280) @@ -48,11 +48,11 @@ bool Save::operator()(SDL_Event& event) { bool result = SDL_PollEvent(&event) != 0; - float d2 = CSPSim::theSim->getElapsedTime(); + simdata::SimTime d2 = CSPSim::theSim->getElapsedTime(); if (d2 - m_EventTime > m_Sampling) { m_EventTime = d2; m_of.write(reinterpret_cast<char*>(&event),sizeof(SDL_Event)); - m_of.write(reinterpret_cast<char*>(&m_EventTime),sizeof(float)); + m_of.write(reinterpret_cast<char*>(&m_EventTime),sizeof(simdata::SimTime)); } return result; } @@ -71,10 +71,11 @@ SDL_Event e; bool result = SDL_PollEvent(&e) != 0; if (e.type != SDL_QUIT && (e.type != SDL_KEYDOWN || e.key.keysym.sym != SDLK_ESCAPE)) { - float d2 = CSPSim::theSim->getElapsedTime(); + simdata::SimTime d2 = CSPSim::theSim->getElapsedTime(); if (d2 - m_EventTime > 2*m_Sampling) { m_if.read(reinterpret_cast<char*>(&event),sizeof(SDL_Event)); - m_if.read(reinterpret_cast<char*>(&m_EventTime),sizeof(float)); + m_if.read(reinterpret_cast<char*>(&m_EventTime),sizeof(simdata::SimTime)); + result = true; } } else { event = e; |
From: <sv...@ww...> - 2004-10-04 01:28:15
|
Author: mkrose Date: 2004-10-03 18:28:08 -0700 (Sun, 03 Oct 2004) New Revision: 1279 Added: trunk/CSP/SimData/Include/SimData/Cache.h trunk/CSP/SimData/SimData/Tests/test_Cache.cpp Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/SimData/Tests/SConscript trunk/CSP/SimData/Source/SConscript Log: Added a generic most-recently-used cache class. Initial use will be for caching network message dispatch handlers in SimNet. Added a unittest for the new cache class, and cleaned up the scons build script for the c++ unittests. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1279 Diff omitted (10623 bytes). |