racemanager.h 632 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef INCLUDEACEMANAGER_H
  2. #define INCLUDEACEMANAGER_H
  3. #include <QObject>
  4. #include <vector>
  5. #include <memory>
  6. class Race;
  7. class RaceManager : public QObject
  8. {
  9. Q_OBJECT
  10. private:
  11. explicit RaceManager(QObject *parent = nullptr);
  12. public:
  13. static RaceManager& getInstance() {
  14. static RaceManager instance;
  15. return instance;
  16. }
  17. std::shared_ptr<Race> getRace(QString race_name);
  18. const std::vector<QString>& getAvailableRacesList();
  19. private:
  20. std::vector<QString> available_races_;
  21. std::map<QString, std::shared_ptr<Race>> races_;
  22. signals:
  23. public slots:
  24. };
  25. #endif // INCLUDEACEMANAGER_H