fhq-server  v0.2.33
Documentation for fhq-server. FreeHackQuest is an open source platform for competitions of computer security.
employ_games.h
Go to the documentation of this file.
1 #ifndef EMPLOY_GAMES_H
2 #define EMPLOY_GAMES_H
3 
4 #include <employees.h>
5 #include <model_game.h>
6 
7 class EmployGames : public WsjcppEmployBase {
8  public:
9 
10  EmployGames();
11  static std::string name() { return "EmployGames"; }
12  virtual bool init();
13  virtual bool deinit();
14 
15  bool findGame(int nLocalId, ModelGame &modelGame);
16  bool findGame(const std::string &sUuid, ModelGame &modelGame);
17  EmployResult addGame(const ModelGame &modelGame, std::string &sError);
18  EmployResult updateGame(const ModelGame &modelGame, std::string &sError);
19  EmployResult removeGame(const std::string &sUuid);
20 
21  private:
22  std::string TAG;
23  std::vector<ModelGame*> m_vectCacheGame;
24  std::map<std::string, ModelGame*> m_mapCacheGames;
25 };
26 
27 #endif // EMPLOY_GAMES_H
std::map< std::string, ModelGame * > m_mapCacheGames
Definition: employ_games.h:24
virtual bool deinit()
Definition: employ_games.cpp:78
static std::string name()
Definition: employ_games.h:11
EmployResult removeGame(const std::string &sUuid)
Definition: employ_games.cpp:338
EmployResult
Definition: employees.h:14
Definition: wsjcpp_employees.h:13
virtual bool init()
Definition: employ_games.cpp:21
EmployGames()
Definition: employ_games.cpp:14
EmployResult updateGame(const ModelGame &modelGame, std::string &sError)
Definition: employ_games.cpp:182
bool findGame(int nLocalId, ModelGame &modelGame)
Definition: employ_games.cpp:85
std::vector< ModelGame * > m_vectCacheGame
Definition: employ_games.h:23
Definition: model_game.h:8
Definition: employ_games.h:7
EmployResult addGame(const ModelGame &modelGame, std::string &sError)
Definition: employ_games.cpp:108
std::string TAG
Definition: employ_games.h:22