#ifndef CARDSET_H_09C0428F #define CARDSET_H_09C0428F #include #include #include #include "prefix_search.h" using ps_type = prefix_search>; enum class card_frame { m2015, modern }; struct card { size_t id; std::string name; std::string imageUri; card_frame frame; std::string uuid; card(size_t id, std::string name, std::string imageUri, card_frame frame, std::string uuid) : id(id), name(std::move(name)), imageUri(std::move(imageUri)), frame(frame), uuid(std::move(uuid)) {} }; class cardset { public: explicit cardset(std::string filename); const card& getCard(size_t id) const { return cards_.at(id); } const ps_type& getTitles() const { return titles_; } const std::set& getCharacters() const { return chars_; } private: std::vector cards_; ps_type titles_; std::set chars_; }; #endif /* end of include guard: CARDSET_H_09C0428F */