[Gcblue-commits] gcb_wx/include/database tcDatabaseObject.h,1.24,1.25 tcLauncherDBObject.h,1.13,1.14
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-06-25 22:09:56
|
Update of /cvsroot/gcblue/gcb_wx/include/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21427/include/database Modified Files: tcDatabaseObject.h tcLauncherDBObject.h tcStoresDBObject.h Log Message: Index: tcDatabaseObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcDatabaseObject.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** tcDatabaseObject.h 12 Jun 2005 20:46:27 -0000 1.24 --- tcDatabaseObject.h 25 Jun 2005 22:09:46 -0000 1.25 *************** *** 94,97 **** --- 94,98 ---- #define MTYPE_BALLISTIC 14 #define MTYPE_SONOBUOY 15 + #define MTYPE_CM 16 // generic countermeasure model *************** *** 115,118 **** --- 116,120 ---- #define DTYPE_SONOBUOY 16 #define DTYPE_ITEM 17 + #define DTYPE_CM 18 #define DTYPE_NULL 0xFFFFFFFF Index: tcStoresDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcStoresDBObject.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcStoresDBObject.h 12 Jun 2005 20:46:27 -0000 1.4 --- tcStoresDBObject.h 25 Jun 2005 22:09:46 -0000 1.5 *************** *** 36,40 **** class tcSqlReader; - #define MAX_LAUNCHER_CONFIGURATIONS 8 // number of weapon class/capacity options supported /** * Database object to describe storage, used for weapons magazines, etc. --- 36,39 ---- Index: tcLauncherDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcLauncherDBObject.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tcLauncherDBObject.h 1 Jun 2005 00:13:26 -0000 1.13 --- tcLauncherDBObject.h 25 Jun 2005 22:09:46 -0000 1.14 *************** *** 1,6 **** ! /* ! ** tcLauncherDBObject.h ! ** ! ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- ! /** ! ** @file tcLauncherDBObject.h ! */ ! /* Copyright (C) 2003-2005 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 28,31 **** --- 28,32 ---- #include "tcDatabaseObject.h" + #include <vector> class TiXmlElement; *************** *** 35,39 **** class tcSqlReader; - #define MAX_LAUNCHER_CONFIGURATIONS 8 // number of weapon class/capacity options supported /** * --- 36,39 ---- *************** *** 42,56 **** { public: float cycleTime; ///< down time between shots bool isAutoPoint; ///< true to always point launcher toward target ! tcDBString mzChildClass; ///< class of platform to launch (simple model) ! unsigned short mnCapacity; ///< max number of launch objects held (simple model) ! tcDBString maChildClass[MAX_LAUNCHER_CONFIGURATIONS]; ///< array for multiple options ! unsigned short maCapacity[MAX_LAUNCHER_CONFIGURATIONS]; ///< array for mult configs ! unsigned short mnConfigurations; std::string fireControlSensorClass; ///< class of sensor on platform for fire control ///< (track required to launch) virtual const char* GetClassName() {return "Launcher";} ///< returns class name of database object bool IsLeaf() const; ///< returns true if db obj is a leaf obj virtual void PrintToFile(tcFile& file); --- 42,65 ---- { public: + enum + { + MAX_LAUNCHER_CONFIGURATIONS = 8 ///< number of weapon class/capacity options supported + }; float cycleTime; ///< down time between shots bool isAutoPoint; ///< true to always point launcher toward target ! ! std::string fireControlSensorClass; ///< class of sensor on platform for fire control ///< (track required to launch) + unsigned short GetCapacityForItem(const std::string& item) const; virtual const char* GetClassName() {return "Launcher";} ///< returns class name of database object + + unsigned short GetConfigurationCapacity(unsigned int idx) const; + const std::string& GetConfigurationClass(unsigned int idx) const; + unsigned int GetNumberConfigurations() const; + + unsigned short GetDefaultChildCapacity() const; + const char* GetDefaultChildClass() const; ///< @returns default class name for this launcher bool IsLeaf() const; ///< returns true if db obj is a leaf obj virtual void PrintToFile(tcFile& file); *************** *** 67,70 **** --- 76,84 ---- tcLauncherDBObject(tcLauncherDBObject& obj); ///< copy constructor virtual ~tcLauncherDBObject(); + + private: + std::vector<std::string> childClassList; ///< vector of different loadout configs + std::vector<unsigned short> childCapacityList; ///< corresponding vector of max quantities + }; |