swift
Public Types | Static Public Member Functions | List of all members
swift::misc::network::CEntityFlags Class Reference

What and state of reading from web services. More...

Public Types

enum  EntityFlag {
  NoEntity = 0 , DbInfoObjectEntity = 1 << 0 , SharedInfoObjectEntity = 1 << 1 , AircraftIcaoEntity = 1 << 2 ,
  AirlineIcaoEntity = 1 << 3 , CountryEntity = 1 << 4 , DistributorEntity = 1 << 5 , LiveryEntity = 1 << 6 ,
  ModelEntity = 1 << 7 , MetarEntity = 1 << 8 , VatsimDataFile = 1 << 9 , VatsimStatusFile = 1 << 10 ,
  AirportEntity = 1 << 11 , AircraftCategoryEntity = 1 << 12 , AllEntities = ((1 << 13) - 1) , AllIcaoEntities = AircraftIcaoEntity | AirlineIcaoEntity ,
  AllIcaoAndCountries , AllIcaoCountriesCategory = AllIcaoAndCountries | AircraftCategoryEntity , DistributorLiveryModel = DistributorEntity | LiveryEntity | ModelEntity , ModelMatchingEntities = AllIcaoEntities | LiveryEntity | ModelEntity ,
  AllDbEntitiesNoInfoObjects , AllDbEntities = AllDbEntitiesNoInfoObjects | DbInfoObjectEntity , AllDbEntitiesNoInfoObjectsNoAirportsAndCategories
}
 Which data to read, requires corresponding readers. More...
 
enum  ReadState {
  ReadStarted , ReadParsing , ReadFinished , ReadFinishedRestricted ,
  ReadFailed , ReadSkipped
}
 State of operation. More...
 
using EntitySet = QSet< CEntityFlags::Entity >
 Set of CEntityFlags::Entity.
 

Static Public Member Functions

static QString flagToString (CEntityFlags::EntityFlag flag)
 Convert to string.
 
static QStringList entitiesToStringList (CEntityFlags::Entity entities)
 Entities to string list.
 
static QString entitiesToString (CEntityFlags::Entity entities, const QString &separator=", ")
 Entities to string list.
 
static bool isSingleEntity (CEntityFlags::Entity flag)
 Representing single entity?
 
static bool isFinishedReadState (ReadState state)
 Any finished state.
 
static bool isFinishedReadStateOrFailure (ReadState state)
 Any finished state.
 
static int numberOfEntities (CEntityFlags::Entity entities)
 Represented number of entities.
 
static const QString & stateToString (ReadState flag)
 Convert to string.
 
static CStatusMessage::StatusSeverity flagToSeverity (ReadState state)
 Flag to severity.
 
static Entity entityFlagToEntity (EntityFlag entityFlag)
 To entity (when explicit conversion is needed)
 
static EntityFlag entityToEntityFlag (Entity entity)
 To flag (when explicit conversion is needed)
 
static Entity iterateDbEntities (Entity &entities)
 Return single entity and remove it from entities.
 
static bool isWarningOrAbove (ReadState state)
 Read state representing warning or above?
 
static bool anySwiftDbEntity (Entity entities)
 Representing at least one DB entity.
 
static Entity singleEntityByName (const QString &name)
 Get by name.
 
static Entity multipleEntitiesByNames (const QStringList &names)
 Get by multiple names.
 
static EntitySet asSingleEntities (Entity entities)
 As set of single entities.
 
static void registerMetadata ()
 Register metadata.
 

Detailed Description

What and state of reading from web services.

Definition at line 21 of file entityflags.h.

Member Enumeration Documentation

◆ EntityFlag

Which data to read, requires corresponding readers.

Enumerator
NoEntity 

no data at all

DbInfoObjectEntity 

info about DB data (kind of metadata)

SharedInfoObjectEntity 

info about shared DB data (metadata)

AircraftIcaoEntity 

ICAO codes for aircraft.

AirlineIcaoEntity 

ICAO codes for airlines.

CountryEntity 

country codes

DistributorEntity 

distributors

LiveryEntity 

liveries

ModelEntity 

models

MetarEntity 

METAR.

VatsimDataFile 

the VATSIM data file (multiple data entities)

VatsimStatusFile 

the VATSIM status file (URLs for data files etc.)

AirportEntity 

airports

AircraftCategoryEntity 

aircraft category entities

AllEntities 

everything

AllIcaoEntities 

all ICAO codes

AllIcaoAndCountries 

all ICAO codes and countries

AllIcaoCountriesCategory 

includes category

DistributorLiveryModel 

Combined.

ModelMatchingEntities 

all needed for model matching

AllDbEntitiesNoInfoObjects 

all DB entities, no info objects

AllDbEntities 

all DB stuff

AllDbEntitiesNoInfoObjectsNoAirportsAndCategories 

all DB entities, no info objects and airports

Definition at line 25 of file entityflags.h.

◆ ReadState

State of operation.

Enumerator
ReadStarted 

reading has been started

ReadParsing 

parsing data

ReadFinished 

reading done

ReadFinishedRestricted 

finished a timestamp restricted read

ReadFailed 

reading failed

ReadSkipped 

read skipped, e.g.

because network is down

Definition at line 60 of file entityflags.h.


The documentation for this class was generated from the following files: