EvEmu
0.8.4
11 September 2021
|
#include "PlanetDB.h"
Public Member Functions | |
PyRep * | GetPlanetsForChar (uint32 charID) |
PyRep * | GetMyLaunchesDetails (uint32 charID) |
void | GetPlanetData (DBQueryResult &res) |
void | GetSchematicData (DBQueryResult &res) |
void | GetSchematicTimes (DBQueryResult &res) |
void | UpdatePins (uint32 pinID, PI_CCPin *ccPin) |
void | UpdateECUPin (uint32 pinID, PI_CCPin *ccPin) |
void | SavePins (PI_CCPin *ccPin) |
void | SaveHeads (uint32 ccPinID, uint32 ownerID, uint32 ecuID, std::map< uint16, PI_Heads > &heads) |
void | SaveLinks (PI_CCPin *ccPin) |
void | SaveRoutes (PI_CCPin *ccPin) |
void | SaveContents (PI_CCPin *ccPin) |
void | SavePinContents (uint32 ccPinID, uint32 pinID, std::map< uint16, uint32 > &contents) |
void | RemovePin (uint32 pinID) |
void | RemoveHead (uint32 ecuID, uint32 headID) |
void | RemoveLink (uint32 linkID) |
void | RemoveRoute (uint16 routeID) |
void | RemoveContents (uint32 pinID) |
void | DeleteColony (uint32 ccPinID, uint32 planetID, uint32 charID) |
void | LoadPins (uint32 ccPinID, std::map< uint32, PI_Pin > &pins) |
void | LoadHeads (uint32 ecuID, std::map< uint16, PI_Heads > &heads) |
void | LoadLinks (uint32 ccPinID, std::map< uint32, PI_Link > &links) |
void | LoadRoutes (uint32 ccPinID, std::map< uint16, PI_Route > &routes) |
void | LoadContents (uint32 pinID, std::map< uint16, uint32 > &contents) |
void | SaveCCLevel (uint32 pinID, uint8 level) |
void | SavePinLevel (uint32 pinID, uint8 level) |
void | SaveLinkLevel (uint32 linkID, uint8 level) |
void | SaveCommandCenter (uint32 pinID, uint32 charID, uint32 planetID, uint32 typeID, double latitude, double longitude) |
void | SaveLaunch (uint32 contID, uint32 charID, uint32 systemID, uint32 planetID, GPoint &pos) |
void | UpdatePinTimes (PI_CCPin *ccPin) |
void | AddPlanetForChar (uint32 solarSystemID, uint32 planetID, uint32 charID, uint32 ccPinID, uint16 typeID) |
void | UpdatePlanetPins (uint32 ccPinID, uint8 pins=1) |
bool | LoadColony (uint32 charID, uint32 planetID, PI_CCPin *ccPin) |
uint16 | SaveRoute (uint32 ccPinID, PI_Route &route) |
Static Public Member Functions | |
static void | GetLaunchDetails (Launch::Data &data) |
static GPoint | GetLaunchPos (uint32 launchID) |
static uint32 | GetLaunchItemID (uint32 launchID) |
static uint32 | GetLaunchPlanet (uint32 launchID) |
static void | UpdateLaunchStatus (uint32 itemID, uint8 status) |
static void | GetExtractorsForPlanet (uint32 planetID, DBQueryResult &res) |
static void | DeleteLaunch (uint32 contID) |
Definition at line 36 of file PlanetDB.h.
void PlanetDB::AddPlanetForChar | ( | uint32 | solarSystemID, |
uint32 | planetID, | ||
uint32 | charID, | ||
uint32 | ccPinID, | ||
uint16 | typeID | ||
) |
Definition at line 90 of file PlanetDB.cpp.
References _log, DBerror::GetError(), and sDatabase.
Referenced by Colony::CreateCommandPin().
Definition at line 831 of file PlanetDB.cpp.
References sDatabase.
Referenced by Colony::AbandonColony().
|
static |
Definition at line 825 of file PlanetDB.cpp.
References sDatabase.
Referenced by CargoContainer::Delete().
|
static |
Definition at line 194 of file PlanetDB.cpp.
References _log, DBerror::c_str(), DBQueryResult::error, DBQueryResult::GetRowCount(), and sDatabase.
Referenced by PlanetSE::GetExtractorsForPlanet().
|
static |
Definition at line 151 of file PlanetDB.cpp.
References _log, DBerror::c_str(), DBQueryResult::error, DBResultRow::GetDouble(), DBResultRow::GetInt(), DBResultRow::GetInt64(), DBQueryResult::GetRow(), Launch::Data::itemID, Launch::Data::launchID, Launch::Data::launchTime, Launch::Data::planetID, sDatabase, Launch::Data::solarSystemID, Launch::Data::status, Launch::Data::x, Launch::Data::y, and Launch::Data::z.
Definition at line 172 of file PlanetDB.cpp.
References _log, DBerror::c_str(), DBQueryResult::error, DBResultRow::GetInt(), DBQueryResult::GetRow(), and sDatabase.
Definition at line 136 of file PlanetDB.cpp.
References _log, DBerror::c_str(), DBQueryResult::error, DBResultRow::GetInt(), DBQueryResult::GetRow(), and sDatabase.
Definition at line 121 of file PlanetDB.cpp.
References _log, DBerror::c_str(), DBQueryResult::error, DBResultRow::GetDouble(), DBQueryResult::GetRow(), NULL_ORIGIN(), and sDatabase.
Definition at line 111 of file PlanetDB.cpp.
References _log, DBerror::c_str(), DBResultToRowset(), DBQueryResult::error, and sDatabase.
void PlanetDB::GetPlanetData | ( | DBQueryResult & | res | ) |
Definition at line 61 of file PlanetDB.cpp.
References _log, DBerror::c_str(), DBQueryResult::error, and sDatabase.
Referenced by PlanetDataMgr::_Populate().
self.colonizationData = sm.RemoteSvc('planetMgr').GetPlanetsForChar() returns (solarSystemID, planetID, typeID, numberOfPins)
Definition at line 75 of file PlanetDB.cpp.
References _log, DBerror::c_str(), DBResultToCRowset(), DBQueryResult::error, DBQueryResult::GetRowCount(), and sDatabase.
void PlanetDB::GetSchematicData | ( | DBQueryResult & | res | ) |
Definition at line 47 of file PlanetDB.cpp.
References _log, DBerror::c_str(), DBQueryResult::error, and sDatabase.
Referenced by PIDataMgr::_Populate().
void PlanetDB::GetSchematicTimes | ( | DBQueryResult & | res | ) |
Definition at line 54 of file PlanetDB.cpp.
References _log, DBerror::c_str(), DBQueryResult::error, and sDatabase.
Referenced by PIDataMgr::_Populate().
Definition at line 212 of file PlanetDB.cpp.
References _log, DBerror::c_str(), PI_CCPin::ccPinID, DBQueryResult::error, DBResultRow::GetInt(), DBQueryResult::GetRow(), PI_CCPin::level, and sDatabase.
Referenced by Colony::Init().
Definition at line 361 of file PlanetDB.cpp.
References _log, DBerror::c_str(), DBQueryResult::error, DBQueryResult::GetRow(), DBQueryResult::GetRowCount(), and sDatabase.
Referenced by LoadPins().
Definition at line 382 of file PlanetDB.cpp.
References _log, DBerror::c_str(), PI_Heads::ecuPinID, DBQueryResult::error, DBQueryResult::GetRow(), DBQueryResult::GetRowCount(), PI_Heads::latitude, PI_Heads::longitude, sDatabase, and PI_Heads::typeID.
Referenced by LoadPins().
Definition at line 290 of file PlanetDB.cpp.
References _log, DBerror::c_str(), PI_Link::endpoint1, PI_Link::endpoint2, DBQueryResult::error, DBQueryResult::GetRow(), DBQueryResult::GetRowCount(), PI_Link::level, sDatabase, PI_Link::state, and PI_Link::typeID.
Referenced by Colony::Load().
Definition at line 234 of file PlanetDB.cpp.
References _log, DBerror::c_str(), PI_Pin::contents, PI_Pin::cycleTime, DBQueryResult::error, PI_Pin::expiryTime, DBQueryResult::GetRow(), DBQueryResult::GetRowCount(), PI_Pin::hasReceivedInputs, PI_Pin::headRadius, PI_Pin::heads, EvE::Time::Hour, PI_Pin::installTime, PI_Pin::isCommandCenter, PI_Pin::isECU, PI_Pin::isLaunchable, PI_Pin::isProcess, PI_Pin::isStorage, PI_Pin::lastLaunchTime, PI_Pin::lastRunTime, PI_Pin::latitude, PI_Pin::level, LoadContents(), LoadHeads(), PI_Pin::longitude, PI_Pin::ownerID, PI_Pin::programType, PI_Pin::qtyPerCycle, PI_Pin::receivedInputsLastCycle, PI_Pin::schematicID, sDatabase, PI_Pin::state, and PI_Pin::typeID.
Referenced by Colony::Load().
Definition at line 316 of file PlanetDB.cpp.
References _log, DBerror::c_str(), PI_Route::commodityQuantity, PI_Route::commodityTypeID, PI_Route::destPinID, DBQueryResult::error, DBQueryResult::GetRow(), DBQueryResult::GetRowCount(), PI_Route::path, PI_Route::priority, sDatabase, PI_Route::srcPinID, and PI_Route::state.
Referenced by Colony::Load().
void PlanetDB::RemoveContents | ( | uint32 | pinID | ) |
Definition at line 819 of file PlanetDB.cpp.
References sDatabase.
Referenced by Colony::AbandonColony(), and Colony::Process().
Definition at line 801 of file PlanetDB.cpp.
References sDatabase.
void PlanetDB::RemoveLink | ( | uint32 | linkID | ) |
Definition at line 807 of file PlanetDB.cpp.
References sDatabase.
Referenced by Colony::RemoveLink(), and Colony::RemovePin().
void PlanetDB::RemovePin | ( | uint32 | pinID | ) |
Definition at line 793 of file PlanetDB.cpp.
References sDatabase.
Referenced by Colony::AbandonColony(), and Colony::RemovePin().
void PlanetDB::RemoveRoute | ( | uint16 | routeID | ) |
Definition at line 813 of file PlanetDB.cpp.
References sDatabase.
Referenced by Colony::RemovePin(), and Colony::RemoveRoute().
Definition at line 432 of file PlanetDB.cpp.
References _log, DBerror::GetError(), and sDatabase.
Referenced by Colony::UpgradeCommandCenter().
void PlanetDB::SaveCommandCenter | ( | uint32 | pinID, |
uint32 | charID, | ||
uint32 | planetID, | ||
uint32 | typeID, | ||
double | latitude, | ||
double | longitude | ||
) |
Definition at line 420 of file PlanetDB.cpp.
References _log, DBerror::GetError(), and sDatabase.
Referenced by Colony::CreateCommandPin().
void PlanetDB::SaveContents | ( | PI_CCPin * | ccPin | ) |
Definition at line 733 of file PlanetDB.cpp.
References _log, DBerror::c_str(), PI_CCPin::ccPinID, PI_CCPin::pins, and sDatabase.
Referenced by Colony::LaunchCommodities(), Colony::PlanetXfer(), Colony::Save(), Colony::Shutdown(), and Colony::TransferCommodities().
void PlanetDB::SaveHeads | ( | uint32 | ccPinID, |
uint32 | ownerID, | ||
uint32 | ecuID, | ||
std::map< uint16, PI_Heads > & | heads | ||
) |
Definition at line 595 of file PlanetDB.cpp.
References _log, DBerror::GetError(), and sDatabase.
Referenced by Colony::GetColony().
void PlanetDB::SaveLaunch | ( | uint32 | contID, |
uint32 | charID, | ||
uint32 | systemID, | ||
uint32 | planetID, | ||
GPoint & | pos | ||
) |
Definition at line 408 of file PlanetDB.cpp.
References _log, DBerror::GetError(), GetFileTimeNow(), sDatabase, Ga::GaVec3::x, Ga::GaVec3::y, and Ga::GaVec3::z.
Referenced by Colony::LaunchCommodities().
Definition at line 658 of file PlanetDB.cpp.
References _log, DBerror::GetError(), and sDatabase.
void PlanetDB::SaveLinks | ( | PI_CCPin * | ccPin | ) |
Definition at line 626 of file PlanetDB.cpp.
References _log, DBerror::c_str(), PI_CCPin::ccPinID, PI_CCPin::links, and sDatabase.
Referenced by Colony::CreateLink(), Colony::RemovePin(), Colony::Save(), and Colony::UpgradeLink().
void PlanetDB::SavePinContents | ( | uint32 | ccPinID, |
uint32 | pinID, | ||
std::map< uint16, uint32 > & | contents | ||
) |
Definition at line 767 of file PlanetDB.cpp.
References _log, DBerror::c_str(), and sDatabase.
Referenced by Colony::Process().
Definition at line 617 of file PlanetDB.cpp.
References _log, DBerror::GetError(), and sDatabase.
void PlanetDB::SavePins | ( | PI_CCPin * | ccPin | ) |
Definition at line 442 of file PlanetDB.cpp.
References _log, DBerror::c_str(), PI_CCPin::ccPinID, PI_CCPin::pins, and sDatabase.
Referenced by Colony::CreateCommandPin(), and Colony::Save().
Definition at line 667 of file PlanetDB.cpp.
References _log, PI_Route::commodityQuantity, PI_Route::commodityTypeID, PI_Route::destPinID, DBerror::GetError(), PI_Route::path, PI_Route::priority, sDatabase, PI_Route::srcPinID, and PI_Route::state.
Referenced by Colony::CreateRoute().
void PlanetDB::SaveRoutes | ( | PI_CCPin * | ccPin | ) |
Definition at line 689 of file PlanetDB.cpp.
References _log, DBerror::c_str(), PI_CCPin::ccPinID, PI_CCPin::routes, and sDatabase.
Referenced by Colony::PrioritizeRoute(), Colony::RemovePin(), and Colony::Save().
Definition at line 536 of file PlanetDB.cpp.
References _log, DBerror::GetError(), PI_CCPin::pins, and sDatabase.
Referenced by Colony::SetProgramResults().
Definition at line 187 of file PlanetDB.cpp.
References sDatabase.
Referenced by CargoContainer::RemoveItem().
Definition at line 485 of file PlanetDB.cpp.
References _log, DBerror::c_str(), PI_CCPin::ccPinID, PI_CCPin::pins, and sDatabase.
Referenced by Colony::LaunchCommodities(), Colony::PlanetXfer(), Colony::Process(), Colony::TransferCommodities(), and Colony::UpdatePlantPins().
void PlanetDB::UpdatePinTimes | ( | PI_CCPin * | ccPin | ) |
Definition at line 563 of file PlanetDB.cpp.
References _log, DBerror::c_str(), PI_CCPin::pins, and sDatabase.
Definition at line 101 of file PlanetDB.cpp.
References _log, DBerror::GetError(), and sDatabase.
Referenced by Colony::RemovePin(), and Colony::Save().