mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
refs #469, renamed flags
* db to entity flags as it also features entities not from DB * Flag enums singular (discussed with MS / slack)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
24432a56c7
commit
2cfd3540b8
@@ -13,36 +13,41 @@ using namespace BlackMisc::Network;
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
CWebReaderFlags::WebReader CWebReaderFlags::entityToReader(CDbFlags::Entity entity)
|
||||
CWebReaderFlags::WebReader CWebReaderFlags::entityToReader(CEntityFlags::Entity entity)
|
||||
{
|
||||
WebReader f = None;
|
||||
if (entity.testFlag(CDbFlags::AircraftIcaoEntity) ||
|
||||
entity.testFlag(CDbFlags::AirlineIcaoEntity) ||
|
||||
entity.testFlag(CDbFlags::CountryEntity))
|
||||
if (entity.testFlag(CEntityFlags::AircraftIcaoEntity) ||
|
||||
entity.testFlag(CEntityFlags::AirlineIcaoEntity) ||
|
||||
entity.testFlag(CEntityFlags::CountryEntity))
|
||||
{
|
||||
f |= IcaoDataReader;
|
||||
}
|
||||
|
||||
if (entity.testFlag(CDbFlags::ModelEntity) ||
|
||||
entity.testFlag(CDbFlags::DistributorEntity) ||
|
||||
entity.testFlag(CDbFlags::LiveryEntity))
|
||||
if (entity.testFlag(CEntityFlags::ModelEntity) ||
|
||||
entity.testFlag(CEntityFlags::DistributorEntity) ||
|
||||
entity.testFlag(CEntityFlags::LiveryEntity))
|
||||
{
|
||||
f |= ModelReader;
|
||||
}
|
||||
|
||||
if (entity.testFlag(CDbFlags::VatsimBookings))
|
||||
if (entity.testFlag(CEntityFlags::BookingEntity))
|
||||
{
|
||||
f |= VatsimBookingReader;
|
||||
}
|
||||
|
||||
if (entity.testFlag(CDbFlags::VatsimDataFile))
|
||||
if (entity.testFlag(CEntityFlags::VatsimDataFile))
|
||||
{
|
||||
f |= VatsimDataReader;
|
||||
}
|
||||
|
||||
if (entity.testFlag(CEntityFlags::MetarEntity))
|
||||
{
|
||||
f |= VatsimMetarReader;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
||||
bool CWebReaderFlags::isFromSwiftDb(CDbFlags::Entity entity)
|
||||
bool CWebReaderFlags::isFromSwiftDb(CEntityFlags::Entity entity)
|
||||
{
|
||||
return isFromSwiftDb(entityToReader(entity));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user