[Gcblue-commits] gcb_wx/include/sim Game.h,1.57,1.58 tcAero.h,1.6,1.7 tcAeroAirObject.h,1.12,1.13 tc
Status: Alpha
Brought to you by:
ddcforge
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9387/include/sim Modified Files: Game.h tcAero.h tcAeroAirObject.h tcBallisticWeapon.h tcDirector.h tcDirectorEvent.h tcESMSensor.h tcFlightOpsObject.h tcFlightPort.h tcGameObject.h tcLauncher.h tcLauncherState.h tcMissileObject.h tcObjectControl.h tcOpticalSensor.h tcPlatformObject.h tcRadar.h tcSensorMap.h tcSensorMapTrack.h tcSensorPlatform.h tcSensorState.h tcSensorTrackIterator.h tcSimState.h tcSonar.h tcSonobuoy.h tcStores.h tcSurfaceObject.h tcTorpedoObject.h tcWeaponObject.h Removed Files: tcAIData.h Log Message: namespace housekeeping Index: tcFlightOpsObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcFlightOpsObject.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcFlightOpsObject.h 29 Apr 2005 18:52:02 -0000 1.5 --- tcFlightOpsObject.h 1 Jun 2005 00:13:28 -0000 1.6 *************** *** 39,43 **** class tcUpdateStream; ! namespace Database { class tcDatabase; --- 39,43 ---- class tcUpdateStream; ! namespace database { class tcDatabase; *************** *** 89,93 **** virtual ~tcFlightOpsObject(); private: ! static Database::tcDatabase* database; tcFlightPort flight_deck; tcGameObject* gameObj; ///< to avoid (some) virtual inheritance inefficiency --- 89,93 ---- virtual ~tcFlightOpsObject(); private: ! static database::tcDatabase* database; tcFlightPort flight_deck; tcGameObject* gameObj; ///< to avoid (some) virtual inheritance inefficiency Index: tcDirector.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcDirector.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcDirector.h 7 Oct 2004 22:01:12 -0000 1.9 --- tcDirector.h 1 Jun 2005 00:13:28 -0000 1.10 *************** *** 36,48 **** class tc3DViewer; ! ! namespace MapView ! { ! class tcTacticalMapView; ! class tcWorldMapView; ! } ! ! using MapView::tcTacticalMapView; ! using MapView::tcWorldMapView; --- 36,41 ---- class tc3DViewer; ! class tcTacticalMapView; ! class tcWorldMapView; Index: tcTorpedoObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcTorpedoObject.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcTorpedoObject.h 24 Feb 2005 22:19:14 -0000 1.3 --- tcTorpedoObject.h 1 Jun 2005 00:13:28 -0000 1.4 *************** *** 34,38 **** class tcUpdateStream; ! namespace Database { class tcTorpedoDBObject; --- 34,38 ---- class tcUpdateStream; ! namespace database { class tcTorpedoDBObject; Index: tcOpticalSensor.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcOpticalSensor.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcOpticalSensor.h 23 Nov 2004 23:30:50 -0000 1.2 --- tcOpticalSensor.h 1 Jun 2005 00:13:28 -0000 1.3 *************** *** 31,35 **** #include <vector> ! using Database::tcOpticalDBObject; class tcGameObject; --- 31,35 ---- #include <vector> ! using database::tcOpticalDBObject; class tcGameObject; Index: tcSimState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSimState.h,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** tcSimState.h 8 May 2005 23:27:57 -0000 1.40 --- tcSimState.h 1 Jun 2005 00:13:28 -0000 1.41 *************** *** 52,63 **** #endif ! namespace ScriptInterface { class tcSimPythonInterface; } ! using namespace Aero; ! using namespace Sensor; ! using namespace ScriptInterface; class tcCommandQueue; --- 52,61 ---- #endif ! namespace scriptinterface { class tcSimPythonInterface; } ! using namespace scriptinterface; class tcCommandQueue; Index: Game.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/Game.h,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** Game.h 26 May 2005 11:53:37 -0000 1.57 --- Game.h 1 Jun 2005 00:13:28 -0000 1.58 *************** *** 52,56 **** ! namespace ScriptInterface { tcSimPythonInterface; --- 52,56 ---- ! namespace scriptinterface { tcSimPythonInterface; *************** *** 72,77 **** class tc3DWindow; ! using namespace ScriptInterface; ! using namespace MapView; --- 72,76 ---- class tc3DWindow; ! using namespace scriptinterface; Index: tcSonar.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSonar.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcSonar.h 7 Mar 2005 01:54:18 -0000 1.3 --- tcSonar.h 1 Jun 2005 00:13:28 -0000 1.4 *************** *** 30,39 **** #include <vector> ! namespace Database { class tcSonarDBObject; } ! using Database::tcSonarDBObject; --- 30,39 ---- #include <vector> ! namespace database { class tcSonarDBObject; } ! using database::tcSonarDBObject; Index: tcObjectControl.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcObjectControl.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tcObjectControl.h 29 Mar 2005 00:12:24 -0000 1.15 --- tcObjectControl.h 1 Jun 2005 00:13:28 -0000 1.16 *************** *** 52,56 **** } ! namespace Database { class tcDatabaseObject; --- 52,56 ---- } ! namespace database { class tcDatabaseObject; *************** *** 63,67 **** using ai::Brain; ! using Database::tcDatabaseObject; --- 63,67 ---- using ai::Brain; ! using database::tcDatabaseObject; Index: tcSensorMapTrack.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorMapTrack.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcSensorMapTrack.h 17 May 2005 00:20:39 -0000 1.1 --- tcSensorMapTrack.h 1 Jun 2005 00:13:28 -0000 1.2 *************** *** 35,43 **** class tcUpdateStream; ! namespace Database { class tcDatabase; } ! using Database::tcDatabase; /** --- 35,43 ---- class tcUpdateStream; ! namespace database { class tcDatabase; } ! using database::tcDatabase; /** *************** *** 45,193 **** * that needs refactoring. */ ! namespace Sensor { ! /** ! * stores all state information needed by sensor for surveillance tracks ! */ ! class tcSensorReport { ! public: ! float mfLon_rad; ! float mfLat_rad; ! float mfAlt_m; ! float mfSpeed_kts; ! float mfHeading_rad; ! double mfTimestamp; ! double mfStartTime; ///< birth time of track from report ! long mnTrackID; ! long trackDatabaseID; ///< database id of track (usually from visual ident), -1 is unknown ! long mnSensorPlatformID; ///< id of contributing sensor ! UINT8 mnFlags; ! std::vector<UINT32> maEmitter; ! unsigned mbClassified : 1; ! unsigned isIdentified : 1; ! ! void Clear() ! { ! mfLon_rad=0;mfLat_rad=0;mfAlt_m=0; ! mfSpeed_kts=0;mfHeading_rad=0; ! mfTimestamp=0;mfStartTime=0; ! mfStartTime = 0; ! mnTrackID = -1; ! mnSensorPlatformID = -1; ! mnFlags=0; ! mbClassified = 0; ! isIdentified = 0; ! } ! bool IsIdentified() const {return isIdentified != 0;} ! bool IsNew() {return (mfTimestamp == 0);} ! }; ! struct tsEmitterInfo ! { ! tnPoolIndex mnEmitterID; ///< database ID of emitter ! double mfTimestamp; ! int mnMode; ! }; ! /** ! * State info for track stored in alliance sensor map. ! * The targetedRating is used by the AI to avoid inefficient ganging up on track. ! * engageRating controls how much ordance ! */ ! class tcSensorMapTrack : public tcTrack ! { ! enum {MAX_SENSOR_REPORTS = 2, MAX_EMITTERS = 4}; ! public: ! tcSensorReport maSensorReport[MAX_SENSOR_REPORTS]; ///< most recent data from contributing sensors ! int mnContributors; ! tsEmitterInfo maEmitterInfo[MAX_EMITTERS]; ! int mnEmitters; ! long mnDatabaseID; ///< database ID of track, -1 for unknown ! float assessedDamage; ! std::vector<long> intercepts; ///< vector of platform ids that are intercepting this track ! std::vector<long> engaged; ///< vector of weapon ids that are tracking / engaging ! std::vector<long> ambiguityList; ///< vector of platform ids consistent with detected emitters ! static unsigned int ambiguityListUpdates; ! /// called to indicate weapon launched at target ! bool AddEngagement(long id); ! /// called to indicate platform intercepting target ! bool AddIntercept(long id); ! bool AddReport(const tcSensorReport& report); ! void RemoveReport(int n); ! ///< static method to set pointer to tcSimState object ! static void AttachDatabase(tcDatabase* db) {database = db;} ! static void AttachSimState(tcSimState* ss) {simState = ss;} ! virtual void Clear(); ! int GetEmitterCount() {return mnEmitters;} ! const tsEmitterInfo* GetEmitter(int anIdx) ! { ! if ((anIdx < 0)||(anIdx >= mnEmitters)) {return NULL;} ! return &maEmitterInfo[anIdx]; ! } ! /// gets number of weapons engaging this track ! unsigned GetEngagedCount() const; ! /// gets number of platforms intercepting this track ! unsigned GetInterceptCount() const; ! unsigned GetContributorCount() const; ! const char* GetContributorName(unsigned idx) const; ! ! tc3DModel* GetModel() const; ! void SetModel(tc3DModel* model_); ! const tcTrack* GetTrack() {return this;} ! bool IsNew() {return mfTimestamp == 0;} ! bool IsDestroyed() const; ! bool IsStale() const; ! void MarkDestroyed(); ! void MarkStale(); ! void ClearStale(); ! bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID); ! void UpdateAmbiguityList(); ! void UpdateClassification(UINT16 mnClassification, teAffiliation meAffiliation, ! tnPoolIndex databaseID); ! bool UpdateEmitter(tsEmitterInfo*& rpEmitterInfo, tnPoolIndex anEmitterID); ! /// removes engagement ids for weapons no longer engaging this track ! void UpdateEngagements(); ! /// removes intercept ids for platforms no longer intercepting this track ! void UpdateIntercepts(); ! bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID); ! void UpdateTrack(); - tcUpdateStream& operator<<(tcUpdateStream& stream); - tcUpdateStream& operator>>(tcUpdateStream& stream); ! tcSensorMapTrack* operator= (tcSensorMapTrack *pa) {return pa;} ! tcSensorMapTrack& operator= (const tcSensorMapTrack&); ! tcSensorMapTrack(const tcSensorMapTrack& src); ! tcSensorMapTrack(); ! ~tcSensorMapTrack(); - static void SetAutoKillAssess(bool state); - private: - static tcSimState* simState; - static tcDatabase* database; - static bool autoKillAssess; ///< set to true to automatically mark destroyed tracks - enum {TRACK_STALE = 1, TRACK_DESTROYED = 2}; - unsigned char sensorFlags; ///< 1 - stale, 2 - destroyed - tc3DModel* model; - void KillAssess(); - }; - } #endif --- 45,192 ---- * that needs refactoring. */ ! ! ! /** ! * stores all state information needed by sensor for surveillance tracks ! */ ! class tcSensorReport { + public: + float mfLon_rad; + float mfLat_rad; + float mfAlt_m; + float mfSpeed_kts; + float mfHeading_rad; + double mfTimestamp; + double mfStartTime; ///< birth time of track from report + long mnTrackID; + long trackDatabaseID; ///< database id of track (usually from visual ident), -1 is unknown + long mnSensorPlatformID; ///< id of contributing sensor + UINT8 mnFlags; + std::vector<UINT32> maEmitter; + unsigned mbClassified : 1; + unsigned isIdentified : 1; ! void Clear() { ! mfLon_rad=0;mfLat_rad=0;mfAlt_m=0; ! mfSpeed_kts=0;mfHeading_rad=0; ! mfTimestamp=0;mfStartTime=0; ! mfStartTime = 0; ! mnTrackID = -1; ! mnSensorPlatformID = -1; ! mnFlags=0; ! mbClassified = 0; ! isIdentified = 0; ! } ! bool IsIdentified() const {return isIdentified != 0;} ! bool IsNew() {return (mfTimestamp == 0);} ! }; ! struct tsEmitterInfo ! { ! tnPoolIndex mnEmitterID; ///< database ID of emitter ! double mfTimestamp; ! int mnMode; ! }; ! /** ! * State info for track stored in alliance sensor map. ! * The targetedRating is used by the AI to avoid inefficient ganging up on track. ! * engageRating controls how much ordance ! */ ! class tcSensorMapTrack : public tcTrack ! { ! enum {MAX_SENSOR_REPORTS = 2, MAX_EMITTERS = 4}; ! public: ! tcSensorReport maSensorReport[MAX_SENSOR_REPORTS]; ///< most recent data from contributing sensors ! int mnContributors; ! tsEmitterInfo maEmitterInfo[MAX_EMITTERS]; ! int mnEmitters; ! long mnDatabaseID; ///< database ID of track, -1 for unknown ! float assessedDamage; ! std::vector<long> intercepts; ///< vector of platform ids that are intercepting this track ! std::vector<long> engaged; ///< vector of weapon ids that are tracking / engaging ! std::vector<long> ambiguityList; ///< vector of platform ids consistent with detected emitters ! static unsigned int ambiguityListUpdates; ! /// called to indicate weapon launched at target ! bool AddEngagement(long id); ! /// called to indicate platform intercepting target ! bool AddIntercept(long id); ! bool AddReport(const tcSensorReport& report); ! void RemoveReport(int n); ! ///< static method to set pointer to tcSimState object ! static void AttachDatabase(tcDatabase* db) {database = db;} ! static void AttachSimState(tcSimState* ss) {simState = ss;} ! virtual void Clear(); ! int GetEmitterCount() {return mnEmitters;} ! const tsEmitterInfo* GetEmitter(int anIdx) ! { ! if ((anIdx < 0)||(anIdx >= mnEmitters)) {return NULL;} ! return &maEmitterInfo[anIdx]; ! } ! /// gets number of weapons engaging this track ! unsigned GetEngagedCount() const; ! /// gets number of platforms intercepting this track ! unsigned GetInterceptCount() const; ! unsigned GetContributorCount() const; ! const char* GetContributorName(unsigned idx) const; ! tc3DModel* GetModel() const; ! void SetModel(tc3DModel* model_); ! const tcTrack* GetTrack() {return this;} ! bool IsNew() {return mfTimestamp == 0;} ! bool IsDestroyed() const; ! bool IsStale() const; ! void MarkDestroyed(); ! void MarkStale(); ! void ClearStale(); ! bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID); ! void UpdateAmbiguityList(); ! void UpdateClassification(UINT16 mnClassification, teAffiliation meAffiliation, ! tnPoolIndex databaseID); ! bool UpdateEmitter(tsEmitterInfo*& rpEmitterInfo, tnPoolIndex anEmitterID); ! /// removes engagement ids for weapons no longer engaging this track ! void UpdateEngagements(); ! /// removes intercept ids for platforms no longer intercepting this track ! void UpdateIntercepts(); + bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID); + void UpdateTrack(); ! tcUpdateStream& operator<<(tcUpdateStream& stream); ! tcUpdateStream& operator>>(tcUpdateStream& stream); ! ! tcSensorMapTrack* operator= (tcSensorMapTrack *pa) {return pa;} ! tcSensorMapTrack& operator= (const tcSensorMapTrack&); ! tcSensorMapTrack(const tcSensorMapTrack& src); ! tcSensorMapTrack(); ! ~tcSensorMapTrack(); ! ! static void SetAutoKillAssess(bool state); ! private: ! static tcSimState* simState; ! static tcDatabase* database; ! static bool autoKillAssess; ///< set to true to automatically mark destroyed tracks ! enum {TRACK_STALE = 1, TRACK_DESTROYED = 2}; ! unsigned char sensorFlags; ///< 1 - stale, 2 - destroyed ! tc3DModel* model; ! void KillAssess(); ! }; #endif Index: tcSensorTrackIterator.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorTrackIterator.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcSensorTrackIterator.h 17 May 2005 00:20:39 -0000 1.2 --- tcSensorTrackIterator.h 1 Jun 2005 00:13:28 -0000 1.3 *************** *** 31,38 **** class tcSimState; - - namespace Sensor - { - class tcSensorMapTrack; class tcAllianceSensorMap; --- 31,34 ---- *************** *** 73,76 **** }; ! } #endif \ No newline at end of file --- 69,72 ---- }; ! #endif \ No newline at end of file Index: tcWeaponObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcWeaponObject.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcWeaponObject.h 25 Mar 2005 03:48:06 -0000 1.8 --- tcWeaponObject.h 1 Jun 2005 00:13:28 -0000 1.9 *************** *** 31,35 **** class tcUpdateStream; ! namespace Database { class tcWeaponDBObject; --- 31,35 ---- class tcUpdateStream; ! namespace database { class tcWeaponDBObject; Index: tcLauncher.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcLauncher.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tcLauncher.h 21 May 2005 02:00:28 -0000 1.15 --- tcLauncher.h 1 Jun 2005 00:13:28 -0000 1.16 *************** *** 31,35 **** #include <vector> ! namespace Database { class tcDatabase; --- 31,35 ---- #include <vector> ! namespace database { class tcDatabase; *************** *** 39,43 **** } ! using namespace Database; class tcGameObject; --- 39,43 ---- } ! using namespace database; class tcGameObject; Index: tcLauncherState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcLauncherState.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tcLauncherState.h 17 Apr 2005 22:35:00 -0000 1.15 --- tcLauncherState.h 1 Jun 2005 00:13:28 -0000 1.16 *************** *** 32,36 **** #include <vector> ! namespace Database { class tcDatabase; --- 32,36 ---- #include <vector> ! namespace database { class tcDatabase; *************** *** 40,44 **** } ! using namespace Database; class tcGameObject; --- 40,44 ---- } ! using namespace database; class tcGameObject; Index: tcRadar.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcRadar.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcRadar.h 21 May 2005 02:00:28 -0000 1.14 --- tcRadar.h 1 Jun 2005 00:13:28 -0000 1.15 *************** *** 32,40 **** #include <vector> ! namespace Database { class tcRadarDBObject; } ! using Database::tcRadarDBObject; /* --- 32,40 ---- #include <vector> ! namespace database { class tcRadarDBObject; } ! using database::tcRadarDBObject; /* Index: tcPlatformObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcPlatformObject.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** tcPlatformObject.h 5 May 2005 02:14:20 -0000 1.28 --- tcPlatformObject.h 1 Jun 2005 00:13:28 -0000 1.29 *************** *** 32,38 **** #include "tcSensorPlatform.h" #include "tcCommandObject.h" ! #include "tcAIData.h" ! using namespace AI; --- 32,38 ---- #include "tcSensorPlatform.h" #include "tcCommandObject.h" ! #include "ai/tcAIData.h" ! using namespace ai; *************** *** 44,48 **** class tcStores; ! namespace Database { class tcGenericDBObject; --- 44,48 ---- class tcStores; ! namespace database { class tcGenericDBObject; Index: tcBallisticWeapon.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcBallisticWeapon.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcBallisticWeapon.h 25 Mar 2005 03:48:06 -0000 1.6 --- tcBallisticWeapon.h 1 Jun 2005 00:13:28 -0000 1.7 *************** *** 29,33 **** ! namespace Database { class tcBallisticDBObject; --- 29,33 ---- ! namespace database { class tcBallisticDBObject; Index: tcAero.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcAero.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcAero.h 17 Aug 2004 02:22:56 -0000 1.6 --- tcAero.h 1 Jun 2005 00:13:28 -0000 1.7 *************** *** 35,57 **** class tcStream; ! namespace Aero { ! struct tsMissileKState ! { ! float mfFlightTime; ! float mfSpeed_mps; ///< speed through air ! float mfGroundSpeed_mps; ///< speed along ground ! float mfPitch_rad; ! float mfHeading_rad; ! float mfAltitude_m; ! float mfHeadingControl; ///< [-1,1] heading rate control input ! tcStream& operator<<(tcStream& stream); ! tcStream& operator>>(tcStream& stream); ! }; ! float GetSoundSpeed(float afAltitude_m); ! float GetAirDensity(float afAltitude_m); ! void UpdateMissileKState(tsMissileKState& k, Database::tcMissileDBObject *apMissileData, float afTimeStep); }; --- 35,58 ---- class tcStream; ! class Aero { ! public: ! struct tsMissileKState ! { ! float mfFlightTime; ! float mfSpeed_mps; ///< speed through air ! float mfGroundSpeed_mps; ///< speed along ground ! float mfPitch_rad; ! float mfHeading_rad; ! float mfAltitude_m; ! float mfHeadingControl; ///< [-1,1] heading rate control input ! tcStream& operator<<(tcStream& stream); ! tcStream& operator>>(tcStream& stream); ! }; ! static float GetSoundSpeed(float afAltitude_m); ! static float GetAirDensity(float afAltitude_m); ! static void UpdateMissileKState(tsMissileKState& k, database::tcMissileDBObject *apMissileData, float afTimeStep); }; Index: tcSonobuoy.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSonobuoy.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcSonobuoy.h 5 Mar 2005 22:37:51 -0000 1.1 --- tcSonobuoy.h 1 Jun 2005 00:13:28 -0000 1.2 *************** *** 30,38 **** #include "tcSensorPlatform.h" ! namespace Database { class tcSonobuoyDBObject; } ! using Database::tcSonobuoyDBObject; class tcGameObject; --- 30,38 ---- #include "tcSensorPlatform.h" ! namespace database { class tcSonobuoyDBObject; } ! using database::tcSonobuoyDBObject; class tcGameObject; --- tcAIData.h DELETED --- Index: tcFlightPort.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcFlightPort.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcFlightPort.h 10 May 2005 02:25:46 -0000 1.11 --- tcFlightPort.h 1 Jun 2005 00:13:28 -0000 1.12 *************** *** 32,36 **** class tcUpdateStream; ! namespace Database { class tcFlightportDBObject; --- 32,36 ---- class tcUpdateStream; ! namespace database { class tcFlightportDBObject; *************** *** 122,126 **** std::vector<tsSpotInfo>* GetLocVector(teLocation loc); ! void InitFromDatabase(Database::tcFlightportDBObject *dbObj); void InitRelPos(tcAirState *airstate); bool IsHeloOnly() const; --- 122,126 ---- std::vector<tsSpotInfo>* GetLocVector(teLocation loc); ! void InitFromDatabase(database::tcFlightportDBObject *dbObj); void InitRelPos(tcAirState *airstate); bool IsHeloOnly() const; Index: tcESMSensor.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcESMSensor.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcESMSensor.h 23 Nov 2004 23:30:47 -0000 1.7 --- tcESMSensor.h 1 Jun 2005 00:13:28 -0000 1.8 *************** *** 33,37 **** class tcStream; ! using namespace Database; /** --- 33,37 ---- class tcStream; ! using namespace database; /** Index: tcAeroAirObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcAeroAirObject.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcAeroAirObject.h 26 May 2005 11:53:37 -0000 1.12 --- tcAeroAirObject.h 1 Jun 2005 00:13:28 -0000 1.13 *************** *** 27,31 **** #include "tcAirObject.h" ! namespace Database { class tcAirDBObject; --- 27,31 ---- #include "tcAirObject.h" ! namespace database { class tcAirDBObject; Index: tcGameObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGameObject.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** tcGameObject.h 21 May 2005 02:00:28 -0000 1.38 --- tcGameObject.h 1 Jun 2005 00:13:28 -0000 1.39 *************** *** 43,47 **** class tcMapData; ! namespace Database { class tcDatabase; --- 43,47 ---- class tcMapData; ! namespace database { class tcDatabase; *************** *** 174,178 **** static bool IsClientMode() {return clientMode;} static void SetClientMode(bool state) {clientMode = state;} ! static void SetGameObjectDatabase(Database::tcDatabase *db) {database = db;} static void SetGameObjectMapData(tcMapData *md) {mapData = md;} static void SetHookedId(long id) {hookedId = id;} --- 174,178 ---- static bool IsClientMode() {return clientMode;} static void SetClientMode(bool state) {clientMode = state;} ! static void SetGameObjectDatabase(database::tcDatabase *db) {database = db;} static void SetGameObjectMapData(tcMapData *md) {mapData = md;} static void SetHookedId(long id) {hookedId = id;} *************** *** 186,190 **** bool recreateFlag; ///< workaround, true to resend create request for obj (multiplayer client only) static tcMapData *mapData; ! static Database::tcDatabase *database; static tcSimState *simState; static long hookedId; ///< id hooked by user, used for messaging only --- 186,190 ---- bool recreateFlag; ///< workaround, true to resend create request for obj (multiplayer client only) static tcMapData *mapData; ! static database::tcDatabase *database; static tcSimState *simState; static long hookedId; ///< id hooked by user, used for messaging only Index: tcStores.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcStores.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcStores.h 21 May 2005 02:00:28 -0000 1.2 --- tcStores.h 1 Jun 2005 00:13:28 -0000 1.3 *************** *** 30,39 **** #include <vector> ! namespace Database { class tcStoresDBObject; } ! using namespace Database; class tcGameObject; --- 30,39 ---- #include <vector> ! namespace database { class tcStoresDBObject; } ! using namespace database; class tcGameObject; Index: tcMissileObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcMissileObject.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcMissileObject.h 29 Mar 2005 00:12:24 -0000 1.17 --- tcMissileObject.h 1 Jun 2005 00:13:28 -0000 1.18 *************** *** 30,34 **** #include "tcRadar.h" - using namespace Aero; class tcUpdateStream; --- 30,33 ---- *************** *** 57,61 **** UINT mnCurrentSegment; tcRadar mcSensorState; ! tsMissileKState msKState; tcMissileDBObject *mpDBObject; // pointer to valid database obj --- 56,60 ---- UINT mnCurrentSegment; tcRadar mcSensorState; ! Aero::tsMissileKState msKState; tcMissileDBObject *mpDBObject; // pointer to valid database obj Index: tcSensorMap.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorMap.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcSensorMap.h 17 May 2005 00:20:39 -0000 1.14 --- tcSensorMap.h 1 Jun 2005 00:13:28 -0000 1.15 *************** *** 38,46 **** class tcUpdateStream; ! namespace Database { class tcDatabase; } ! using Database::tcDatabase; /** --- 38,46 ---- class tcUpdateStream; ! namespace database { class tcDatabase; } ! using database::tcDatabase; /** *************** *** 48,133 **** * that needs refactoring. */ ! namespace Sensor { ! class tcAllianceSensorMap ! { ! enum {MAX_SMTRACKS = 512, MAX_TRACKS = 512}; ! public: ! unsigned int GetAlliance() const; ! int GetTrackCount(); ! tnPoolIndex GetStartTrackPosition(); ! void GetNextTrack(tnPoolIndex& pos, tcSensorMapTrack*& pTrack); ! void Clear(); ! void DropTrack(tnPoolIndex anID); ! ! bool AddReport(const tcSensorReport& report); ! bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack); ! bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack); ! ! void Update(double afStatusTime); ! tcSensorMapTrack* GetSensorMapTrack(long anTrackID); ! bool GetTrack(long anTrackID, tcTrack& track); ! int Serialize(tcFile& file, bool mbLoad); - tcUpdateStream& operator<<(tcUpdateStream& stream); - tcUpdateStream& operator>>(tcUpdateStream& stream); ! tcAllianceSensorMap(unsigned int mapAlliance); ! virtual ~tcAllianceSensorMap(); ! private: ! tcPool<tcSensorMapTrack,MAX_SMTRACKS> maTrack; ! tnPoolIndex maTrackToSensorTrack[MAX_TRACKS]; ! double mfPreviousStatusTime; ! double lastEngagementsUpdate; ! const unsigned int alliance; ! float ageOutTime; ///< time to drop track ! float staleTime; ///< time to indicate track as stale ! }; ! /** ! * holds tcAllianceSensorMaps for all alliances ! * @see tcAllianceSensorMap ! */ ! class tcSensorMap ! { ! enum {MAX_MAPS = 4, MAX_ALLIANCES = 256}; ! public: ! int GetTrackCount(UINT8 anAlliance); ! tnPoolIndex GetStartTrackPosition(UINT8 anAlliance); ! void GetNextTrack(tnPoolIndex& pos, tcSensorMapTrack*& pTrack, UINT8 anAlliance); ! tcAllianceSensorMap* GetMap(UINT8 anAlliance); ! tcAllianceSensorMap* GetOrCreateMap(UINT8 alliance); ! void CreateMapForAlliance(UINT8 anAlliance); ! bool AddReport(const tcSensorReport& report, UINT8 anAlliance); ! bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance); ! bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance); ! void Clear(); ! void Update(double afStatusTime); ! tcSensorMapTrack* GetSensorMapTrack(long anTrackID, UINT8 anAlliance); ! bool GetTrack(unsigned long anTrackID, tcTrack& track, UINT8 anAlliance); ! int Serialize(tcFile& file, bool mbLoad); ! bool Test(); - tcSensorMap(); - virtual ~tcSensorMap(); - private: - tcAllianceSensorMap* mapMap[MAX_MAPS]; - int mnMaps; - int maMapIdxForAlliance[MAX_ALLIANCES]; - }; - } #endif // _SENSORMAP_H_ --- 48,128 ---- * that needs refactoring. */ ! class tcAllianceSensorMap { + enum {MAX_SMTRACKS = 512, MAX_TRACKS = 512}; + public: + unsigned int GetAlliance() const; + int GetTrackCount(); + tnPoolIndex GetStartTrackPosition(); + void GetNextTrack(tnPoolIndex& pos, tcSensorMapTrack*& pTrack); + void Clear(); + void DropTrack(tnPoolIndex anID); + bool AddReport(const tcSensorReport& report); + bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, + tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack); + bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, + tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack); + void Update(double afStatusTime); + tcSensorMapTrack* GetSensorMapTrack(long anTrackID); + bool GetTrack(long anTrackID, tcTrack& track); + int Serialize(tcFile& file, bool mbLoad); ! tcUpdateStream& operator<<(tcUpdateStream& stream); ! tcUpdateStream& operator>>(tcUpdateStream& stream); + tcAllianceSensorMap(unsigned int mapAlliance); + virtual ~tcAllianceSensorMap(); + private: + tcPool<tcSensorMapTrack,MAX_SMTRACKS> maTrack; + tnPoolIndex maTrackToSensorTrack[MAX_TRACKS]; + double mfPreviousStatusTime; + double lastEngagementsUpdate; + const unsigned int alliance; + float ageOutTime; ///< time to drop track + float staleTime; ///< time to indicate track as stale + }; ! /** ! * holds tcAllianceSensorMaps for all alliances ! * @see tcAllianceSensorMap ! */ ! class tcSensorMap ! { ! enum {MAX_MAPS = 4, MAX_ALLIANCES = 256}; ! public: ! int GetTrackCount(UINT8 anAlliance); ! tnPoolIndex GetStartTrackPosition(UINT8 anAlliance); ! void GetNextTrack(tnPoolIndex& pos, tcSensorMapTrack*& pTrack, UINT8 anAlliance); ! tcAllianceSensorMap* GetMap(UINT8 anAlliance); ! tcAllianceSensorMap* GetOrCreateMap(UINT8 alliance); ! void CreateMapForAlliance(UINT8 anAlliance); ! bool AddReport(const tcSensorReport& report, UINT8 anAlliance); ! bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance); ! bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance); ! void Clear(); ! void Update(double afStatusTime); ! tcSensorMapTrack* GetSensorMapTrack(long anTrackID, UINT8 anAlliance); ! bool GetTrack(unsigned long anTrackID, tcTrack& track, UINT8 anAlliance); ! int Serialize(tcFile& file, bool mbLoad); ! bool Test(); ! tcSensorMap(); ! virtual ~tcSensorMap(); ! private: ! tcAllianceSensorMap* mapMap[MAX_MAPS]; ! int mnMaps; ! int maMapIdxForAlliance[MAX_ALLIANCES]; + }; #endif // _SENSORMAP_H_ Index: tcDirectorEvent.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcDirectorEvent.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcDirectorEvent.h 27 Jan 2005 01:01:46 -0000 1.12 --- tcDirectorEvent.h 1 Jun 2005 00:13:28 -0000 1.13 *************** *** 36,44 **** class tcMapObject; ! namespace MapView ! { ! class tcTacticalMapView; ! class tcWorldMapView; ! } class tcConsoleBox; --- 36,41 ---- class tcMapObject; ! class tcTacticalMapView; ! class tcWorldMapView; class tcConsoleBox; *************** *** 55,61 **** } - using MapView::tcTacticalMapView; - using MapView::tcWorldMapView; - /** * Base class for time-tagged camera or game events to support cut scenes and --- 52,55 ---- Index: tcSensorState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorState.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcSensorState.h 21 May 2005 02:00:28 -0000 1.17 --- tcSensorState.h 1 Jun 2005 00:13:28 -0000 1.18 *************** *** 30,34 **** #include "simmath.h" ! namespace Database { class tcDatabase; --- 30,34 ---- #include "simmath.h" ! namespace database { class tcDatabase; *************** *** 36,41 **** } ! using Database::tcDatabase; ! using Database::tcSensorDBObject; #define SSMODE_SURVEILLANCE 1 ///< surveillance or both FC and surveillance --- 36,41 ---- } ! using database::tcDatabase; ! using database::tcSensorDBObject; #define SSMODE_SURVEILLANCE 1 ///< surveillance or both FC and surveillance Index: tcSensorPlatform.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorPlatform.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcSensorPlatform.h 17 Apr 2005 22:35:00 -0000 1.2 --- tcSensorPlatform.h 1 Jun 2005 00:13:28 -0000 1.3 *************** *** 41,50 **** class tcGameObject; ! namespace Database { class tcSensorPlatformDBObject; } ! using Database::tcSensorPlatformDBObject; /** --- 41,50 ---- class tcGameObject; ! namespace database { class tcSensorPlatformDBObject; } ! using database::tcSensorPlatformDBObject; /** Index: tcSurfaceObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSurfaceObject.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcSurfaceObject.h 8 Mar 2005 00:41:48 -0000 1.10 --- tcSurfaceObject.h 1 Jun 2005 00:13:28 -0000 1.11 *************** *** 29,33 **** #include "tcPlatformObject.h" ! namespace Database { class tcGenericDBObject; --- 29,33 ---- #include "tcPlatformObject.h" ! namespace database { class tcGenericDBObject; |