[Gcblue-commits] gcb_wx/include/database tcSonarDBObject.h,NONE,1.1 tcDatabaseObject.h,1.17,1.18 tcR
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-12-02 04:18:06
|
Update of /cvsroot/gcblue/gcb_wx/include/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31820/include/database Modified Files: tcDatabaseObject.h tcRadarDBObject.h tcStoresDBObject.h Added Files: tcSonarDBObject.h Log Message: Sonar work --- NEW FILE: tcSonarDBObject.h --- /** ** @file tcSonarDBObject.h */ /* Copyright (C) 2004 Dewitt Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB 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 GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _SONARDBOBJECT_H_ #define _SONARDBOBJECT_H_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "tcSensorDBObject.h" class TiXmlElement; namespace Database { class tcSqlReader; /** * */ class tcSonarDBObject : public tcSensorDBObject { public: float SL; ///< [dB] source level (active only) float DI; ///< [dB] receive directivity index float DT; ///< [dB] detectability threshold in noise float DTr; ///< [dB] detectability threshold with reverberation background float minFrequency_Hz; float maxFrequency_Hz; bool isPassive; std::string audioFile; ///< filename for audio sound effect (active only) float alpha; ///< CALCULATED attenuation coefficent in dB/km virtual tcSensorState* CreateSensor(tcGameObject* parent); ///< factory method virtual const char* GetClassName() {return "Sonar";} ///< returns class name of database object bool IsLeaf() const; ///< returns true if db obj is a leaf obj virtual void PrintToFile(tcFile& file); int Serialize(tcFile& file, bool mbLoad, unsigned int anVersion); virtual void SerializeXml(TiXmlElement* node, bool load); ///< XML serialization static void AddSqlColumns(std::string& columnString); void ReadSql(tcSqlReader& entry); void WriteSql(std::string& valueString); tcSonarDBObject(); tcSonarDBObject(tcSonarDBObject& obj); ///< copy constructor virtual ~tcSonarDBObject(); private: void CalculateParams(); }; } // namespace Database #endif Index: tcStoresDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcStoresDBObject.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcStoresDBObject.h 29 Nov 2004 03:54:49 -0000 1.1 --- tcStoresDBObject.h 2 Dec 2004 04:17:23 -0000 1.2 *************** *** 51,54 **** --- 51,55 ---- virtual const char* GetClassName() {return "Stores";} ///< returns class name of database object + bool IsLeaf() const; ///< returns true if db obj is a leaf obj virtual void PrintToFile(tcFile& file); int Serialize(tcFile& file, bool mbLoad, UINT32 anVersion); Index: tcRadarDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcRadarDBObject.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcRadarDBObject.h 29 Nov 2004 03:54:49 -0000 1.11 --- tcRadarDBObject.h 2 Dec 2004 04:17:23 -0000 1.12 *************** *** 33,68 **** namespace Database { ! class tcSqlReader; ! class tcRadarDBObject : public tcSensorDBObject ! { ! public: ! float mfMinRange_km; ///< [km] min range ! float mfERP_dBW; ///< [dBW] effective radiated power, peak ! float mfMinRangeRate_mps; ///< minimum detectable range rate ! unsigned int maxFireControlTracks; ///< max number of simultaneous fire control tracks ! bool isSemiactive; ///< set true if this is a semiactive radar ! bool isCommandReceiver; ///< set true if this is a command guidance receiver (a workaround) ! bool mbDetectsSurface; ///< set true if detects surface targets ! bool mbDetectsAir; ///< set true if detects airborne targets ! bool mbDetectsGround; ///< set true if detects ground targets ! virtual tcSensorState* CreateSensor(tcGameObject* parent); ///< factory method ! virtual const char* GetClassName() {return "Radar";} ///< returns class name of database object ! bool IsLeaf() const; ///< returns true if db obj is a leaf obj ! virtual void PrintToFile(tcFile& file); ! int Serialize(tcFile& file, bool mbLoad, UINT32 anVersion); ! int SerializeCSV(CsvTranslator* csv, bool mbLoad); ///< CSV serialization ! virtual void SerializeXml(TiXmlElement* node, bool load); ///< XML serialization ! static int WriteCSVHeader(CsvTranslator* csv); ///< writes column headings ! static void AddSqlColumns(std::string& columnString); ! void ReadSql(tcSqlReader& entry); ! void WriteSql(std::string& valueString); ! tcRadarDBObject(); ! tcRadarDBObject(tcRadarDBObject& obj); ///< copy constructor ! virtual ~tcRadarDBObject(); ! }; } // namespace Database --- 33,68 ---- namespace Database { ! class tcSqlReader; ! class tcRadarDBObject : public tcSensorDBObject ! { ! public: ! float mfMinRange_km; ///< [km] min range ! float mfERP_dBW; ///< [dBW] effective radiated power, peak ! float mfMinRangeRate_mps; ///< minimum detectable range rate ! unsigned int maxFireControlTracks; ///< max number of simultaneous fire control tracks ! bool isSemiactive; ///< set true if this is a semiactive radar ! bool isCommandReceiver; ///< set true if this is a command guidance receiver (a workaround) ! bool mbDetectsSurface; ///< set true if detects surface targets ! bool mbDetectsAir; ///< set true if detects airborne targets ! bool mbDetectsGround; ///< set true if detects ground targets ! virtual tcSensorState* CreateSensor(tcGameObject* parent); ///< factory method ! virtual const char* GetClassName() {return "Radar";} ///< returns class name of database object ! bool IsLeaf() const; ///< returns true if db obj is a leaf obj ! virtual void PrintToFile(tcFile& file); ! int Serialize(tcFile& file, bool mbLoad, UINT32 anVersion); ! int SerializeCSV(CsvTranslator* csv, bool mbLoad); ///< CSV serialization ! virtual void SerializeXml(TiXmlElement* node, bool load); ///< XML serialization ! static int WriteCSVHeader(CsvTranslator* csv); ///< writes column headings ! static void AddSqlColumns(std::string& columnString); ! void ReadSql(tcSqlReader& entry); ! void WriteSql(std::string& valueString); ! tcRadarDBObject(); ! tcRadarDBObject(tcRadarDBObject& obj); ///< copy constructor ! virtual ~tcRadarDBObject(); ! }; } // namespace Database Index: tcDatabaseObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcDatabaseObject.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcDatabaseObject.h 29 Nov 2004 03:54:49 -0000 1.17 --- tcDatabaseObject.h 2 Dec 2004 04:17:23 -0000 1.18 *************** *** 91,96 **** #define MTYPE_AIRFIELD 13 #define MTYPE_BALLISTIC 14 ! // database object types (database class identifier) #define DTYPE_OBJECT 0 #define DTYPE_GENERIC 1 --- 91,97 ---- #define MTYPE_AIRFIELD 13 #define MTYPE_BALLISTIC 14 + ! // database object types (database class identifier / typeid) #define DTYPE_OBJECT 0 #define DTYPE_GENERIC 1 *************** *** 107,110 **** --- 108,113 ---- #define DTYPE_OPTICAL 12 #define DTYPE_STORES 13 + #define DTYPE_SONAR 14 + #define DTYPE_TORPEDO 15 #define DTYPE_NULL 0xFFFFFFFF |