Update of /cvsroot/gcblue/gcb_wx/src/database
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11624/src/database
Modified Files:
tcDatabase.cpp tcGenericDBObject.cpp
Log Message:
Index: tcGenericDBObject.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcGenericDBObject.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** tcGenericDBObject.cpp 9 Apr 2004 14:17:42 -0000 1.8
--- tcGenericDBObject.cpp 18 Jul 2004 03:18:00 -0000 1.9
***************
*** 25,28 ****
--- 25,30 ----
#include "tcGenericDBObject.h"
+ #include "tcDatabase.h"
+ #include "tcFlightportDBObject.h"
#include "math_constants.h"
#include "randfn.h"
***************
*** 46,49 ****
--- 48,64 ----
}
+ tcFlightportDBObject* tcGenericDBObject::GetFlightport()
+ {
+ tcFlightportDBObject* flightport = dynamic_cast<tcFlightportDBObject*>
+ (database->GetObject(flightportClass.mz));
+
+ if (!flightport)
+ {
+ fprintf(stderr, "Error - Class: %s - flightport (%s) not found\n",
+ mzClass.mz, flightportClass.mz);
+ }
+ return flightport;
+ }
+
void tcGenericDBObject::RandInit()
{
Index: tcDatabase.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcDatabase.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** tcDatabase.cpp 9 Apr 2004 14:17:42 -0000 1.10
--- tcDatabase.cpp 18 Jul 2004 03:18:00 -0000 1.11
***************
*** 52,56 ****
{
! /********************************** tcDatabase ************************************/
/**
--- 52,64 ----
{
! /**
! * Method for accessing singleton instance.
! */
! tcDatabase* tcDatabase::Get()
! {
! static tcDatabase instance;
!
! return &instance;
! }
/**
***************
*** 1043,1047 ****
}
! tcDatabase::~tcDatabase() {
}
--- 1051,1056 ----
}
! tcDatabase::~tcDatabase()
! {
}
|