6 #ifndef SWIFT_CORE_DB_DATABASE_READERCONFIG_H
7 #define SWIFT_CORE_DB_DATABASE_READERCONFIG_H
35 swift::misc::network::CEntityFlags::Entity entities,
36 swift::misc::db::CDbFlags::DataRetrievalMode retrievalFlags,
43 swift::misc::network::CEntityFlags::Entity
getEntities()
const;
128 swift::misc::network::CEntityFlags::Entity cachedEntities)
const;
Details how to read a certain entity.
void setCacheLifetime(const swift::misc::physical_quantities::CTime &time)
Timeout.
QString convertToQString(bool i18n=false) const
Cast as QString.
void markAsDbDown()
DB is down.
CDatabaseReaderConfig(swift::misc::network::CEntityFlags::Entity entities, swift::misc::db::CDbFlags::DataRetrievalMode retrievalFlags, const swift::misc::physical_quantities::CTime &cacheLifetime=swift::misc::physical_quantities::CTime())
Constructor for one or multiple entities.
bool needsSharedInfoFile() const
Needs the DB info file loaded.
bool isValid() const
Fully initialized.
swift::misc::network::CEntityFlags::Entity getEntities() const
Supported entities.
swift::misc::db::CDbFlags::DataRetrievalMode getRetrievalMode() const
Supported modes.
bool possiblyReadsFromCache() const
Will read from cache.
bool possiblyReadsFromSwiftDb() const
Will read from swift DB.
bool supportsEntities(swift::misc::network::CEntityFlags::Entity entities) const
Supports given entites?
bool possiblyWritesToSwiftDb() const
Will write to swift DB.
CDatabaseReaderConfig()=default
Default constructor.
Value object encapsulating a list of reader configs.
CDatabaseReaderConfigList(const CSequence< CDatabaseReaderConfig > &other)
Construct from a base class object.
bool needsSharedInfoObjects(swift::misc::network::CEntityFlags::Entity entities) const
Needs any shared info object.
CDatabaseReaderConfig findFirstOrDefaultForEntity(const swift::misc::network::CEntityFlags::Entity entities) const
Find first one matching given.
static CDatabaseReaderConfigList allDirectDbAccess()
Init all with direct DB access.
bool needsSharedInfoFile(swift::misc::network::CEntityFlags::Entity entities) const
Needs any shared header loaded before continued.
void setCacheLifetimes(const swift::misc::physical_quantities::CTime &time)
Update lifetimes.
static CDatabaseReaderConfigList forMappingTool()
Init for mapping tool.
static CDatabaseReaderConfigList forLauncher()
Init for launcher.
void markAsDbDown()
DB is down.
swift::misc::network::CEntityFlags::Entity getEntitesCachedOrReadFromDB() const
Entities which will use cache or DB, so no canceled or ignored ones.
bool needsSharedInfoObjectsIfCachesEmpty(swift::misc::network::CEntityFlags::Entity entities, swift::misc::network::CEntityFlags::Entity cachedEntities) const
Needs any shared info object, but only if the cache is empty.
bool possiblyWritesToSwiftDb() const
Will write to swift DB.
CDatabaseReaderConfigList()=default
Default constructor.
bool possiblyReadsFromSwiftDb() const
Will read from swift DB.
static CDatabaseReaderConfigList forPilotClient()
Init for pilot client.
Generic ordered container with value semantics.
Generic sequential container with value semantics.
CSequence()=default
Default constructor.
Mix of the most commonly used mixin classes.
@ DbReading
directly from DB
Classes interacting with the swift database (aka "datastore").
#define SWIFT_DECLARE_SEQUENCE_MIXINS(Namespace, T, List)
Explicit template declaration of mixins for a CSequence subclass to be placed near the top of the hea...
#define SWIFT_CORE_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...