mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 17:14:52 -07:00
Added server/client feature set communication
This commit is contained in:
parent
baa61d0571
commit
044c2356ff
26 changed files with 225 additions and 22 deletions
24
common/featureset.h
Normal file
24
common/featureset.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef FEATURESET_H
|
||||
#define FEATURESET_H
|
||||
|
||||
#include <QMap>
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
|
||||
class FeatureSet
|
||||
{
|
||||
public:
|
||||
FeatureSet();
|
||||
QMap<QString, bool> getDefaultFeatureList();
|
||||
void initalizeFeatureList(QMap<QString, bool> &featureList);
|
||||
void enableRequiredFeature(QMap<QString, bool> &featureList, QString featureName);
|
||||
void disableRequiredFeature(QMap<QString, bool> &featureList, QString featureName);
|
||||
QMap<QString, bool> addFeature(QMap<QString, bool> &featureList, QString featureName, bool isFeatureRequired);
|
||||
QMap<QString, bool> identifyMissingFeatures(QMap<QString, bool> featureListToCheck, QMap<QString, bool> featureListToCompareTo);
|
||||
bool isRequiredFeaturesMissing(QMap<QString, bool> featureListToCheck, QMap<QString, bool> featureListToCompareTo);
|
||||
private:
|
||||
QMap<QString, bool> featureList;
|
||||
};
|
||||
|
||||
|
||||
#endif // FEEATURESET_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue