[Gcblue-commits] gcb_wx/src/database tcDatabase.cpp,1.5,1.6 tcDatabaseObject.cpp,1.4,1.5 tcLauncherD
Status: Alpha
Brought to you by:
ddcforge
Update of /cvsroot/gcblue/gcb_wx/src/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4640/src/database Modified Files: tcDatabase.cpp tcDatabaseObject.cpp tcLauncherDBObject.cpp tcMissileDBObject.cpp tcRadarDBObject.cpp Log Message: Index: tcDatabase.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcDatabase.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcDatabase.cpp 4 Jan 2004 22:24:52 -0000 1.5 --- tcDatabase.cpp 30 Jan 2004 01:02:34 -0000 1.6 *************** *** 977,983 **** ! tcDatabase::tcDatabase() { mstrCurrentFile = "NULL"; mnVersion = VERSION_CURRENT; } --- 977,985 ---- ! tcDatabase::tcDatabase() ! { mstrCurrentFile = "NULL"; mnVersion = VERSION_CURRENT; + tcDatabaseObject::AttachDatabase(this); } Index: tcDatabaseObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcDatabaseObject.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcDatabaseObject.cpp 10 Jan 2004 21:55:31 -0000 1.4 --- tcDatabaseObject.cpp 30 Jan 2004 01:02:34 -0000 1.5 *************** *** 26,29 **** --- 26,30 ---- #include "tcDatabaseObject.h" + #include "tcDatabase.h" #include "math_constants.h" #include "randfn.h" *************** *** 36,40 **** namespace Database { ! UINT16 IdxToClassification(int anIdx) { --- 37,42 ---- namespace Database { ! tcDatabase* tcDatabaseObject::database = NULL; ! UINT16 IdxToClassification(int anIdx) { Index: tcLauncherDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcLauncherDBObject.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcLauncherDBObject.cpp 7 Dec 2003 01:53:36 -0000 1.2 --- tcLauncherDBObject.cpp 30 Jan 2004 01:02:35 -0000 1.3 *************** *** 78,81 **** --- 78,82 ---- *csv >> mnCapacity; *csv >> s; mzChildClass = s.c_str(); + *csv >> fireControlSensorClass; int i; mnConfigurations = 0; *************** *** 96,100 **** *csv << (long)mnCapacity; *csv << mzChildClass.mz; ! for(unsigned i=0;i<MAX_LAUNCHER_CONFIGURATIONS;i++) { --- 97,102 ---- *csv << (long)mnCapacity; *csv << mzChildClass.mz; ! *csv << fireControlSensorClass; ! for(unsigned i=0;i<MAX_LAUNCHER_CONFIGURATIONS;i++) { *************** *** 122,126 **** *csv << "Basic capacity"; *csv << "Basic class"; ! for(unsigned i=0;i<MAX_LAUNCHER_CONFIGURATIONS;i++) { --- 124,128 ---- *csv << "Basic capacity"; *csv << "Basic class"; ! *csv << "Fire control sensor class"; for(unsigned i=0;i<MAX_LAUNCHER_CONFIGURATIONS;i++) { *************** *** 143,146 **** --- 145,149 ---- mnCapacity = 0; mzChildClass = "NOCHILDCLASS"; + fireControlSensorClass = ""; for(unsigned i=0;i<MAX_LAUNCHER_CONFIGURATIONS;i++) { *************** *** 162,165 **** --- 165,169 ---- } mnConfigurations = obj.mnConfigurations; + fireControlSensorClass = obj.fireControlSensorClass; } Index: tcMissileDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcMissileDBObject.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcMissileDBObject.cpp 8 Dec 2003 03:06:36 -0000 1.3 --- tcMissileDBObject.cpp 30 Jan 2004 01:02:35 -0000 1.4 *************** *** 29,32 **** --- 29,33 ---- //#include "aerror.h" #include "CsvTranslator.h" + #include "tcDatabase.h" *************** *** 54,57 **** --- 55,70 ---- } + tnPoolIndex tcMissileDBObject::GetPrimarySeekerKey() + { + wxASSERT(database); + if (primarySeekerKey != NULL_INDEX) return primarySeekerKey; + primarySeekerKey = database->GetKey(maSensorClass[0]); + if (primarySeekerKey == NULL_INDEX) + { + std::cerr << "tcMissileDBObject::GetPrimarySeekerKey -- not found" << std::endl; + } + return primarySeekerKey; + } + void tcMissileDBObject::PrintToFile(tcFile& file) { *************** *** 186,189 **** --- 199,205 ---- } *csv >> mnTargetFlags; + + // set other params that do not come from database file + primarySeekerKey = NULL_INDEX; } else *************** *** 311,314 **** --- 327,331 ---- maFlightProfile[i] = obj.maFlightProfile[i]; } + primarySeekerKey = NULL_INDEX; } *************** *** 347,350 **** --- 364,368 ---- maFlightProfile[0].meAltitudeMode = AM_ASL; maFlightProfile[0].meGuidanceMode = GM_COMMAND; + primarySeekerKey = NULL_INDEX; } Index: tcRadarDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcRadarDBObject.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcRadarDBObject.cpp 29 Jan 2004 00:05:23 -0000 1.4 --- tcRadarDBObject.cpp 30 Jan 2004 01:02:35 -0000 1.5 *************** *** 113,116 **** --- 113,117 ---- *csv >> mfMinRangeRate_mps; *csv >> maxFireControlTracks; + *csv >> val; isSemiactive = val != 0; *csv >> val; mbDetectsSurface = val != 0; *csv >> val; mbDetectsAir = val != 0; *************** *** 122,125 **** --- 123,127 ---- *csv << mfMinRangeRate_mps; *csv << (long)maxFireControlTracks; + *csv << (long)isSemiactive; *csv << (long)mbDetectsSurface; *csv << (long)mbDetectsAir; *************** *** 137,140 **** --- 139,143 ---- *csv << "MinRangeRate_mps"; *csv << "MaxFireControlTracks"; + *csv << "IsSemiactive"; *csv << "DetectsSurface"; *csv << "DetectsAir"; |