Shape text using Pango and HarfBuzz; gives us nice ligatures and exotic scripts.
[ccbs] / bigscreen / fetch_list_of_active_groups.cpp
1 #include "fetch_list_of_active_groups.h"
2
3 FetchListOfActiveGroups::FetchListOfActiveGroups(std::vector<SkeletonGroup> *active) : active(active) {}
4 void FetchListOfActiveGroups::operator() (pqxx::transaction<> &t)
5 {
6         // make sure we start with an empty list
7         active->erase(active->begin(), active->end());
8         
9         pqxx::result res( t.exec("SELECT * FROM bigscreen.active_groups") );
10         for (pqxx::result::const_iterator i = res.begin(); i != res.end(); ++i) {
11                 SkeletonGroup g;
12
13                 g.tournament = i["tournament"].as(g.tournament);
14                 g.round = i["round"].as(g.round);
15                 g.parallel = i["parallel"].as(g.parallel);
16                 g.num_machines = i["num_machines"].as(g.num_machines);
17                 g.players_per_machine = i["players_per_machine"].as(g.players_per_machine);
18
19                 active->push_back(g);
20         }
21 }