]> git.sesse.net Git - pkanalytics/blobdiff - events.h
Backdate substitutions so that they're a bit easier to deal with.
[pkanalytics] / events.h
index 946ebb543b2dc7db95a6bb4461f1df3c35cdd205..62f1f7e772d68611bd7020f4aa37223d129a5784 100644 (file)
--- a/events.h
+++ b/events.h
@@ -25,19 +25,24 @@ public:
        QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
        QVariant data(const QModelIndex &index, int role) const override;
 
-       unsigned insert_event(uint64_t t, int player_id, const std::string &type = "unknown");  // Returns the row.
+       unsigned insert_event(uint64_t t, std::optional<int> player_id, const std::string &type = "unknown");  // Returns the row.
        void delete_event(unsigned row);
        void set_event_type(unsigned row, const std::string &type);
        uint64_t get_time(unsigned row) { return events[row].t; }
+       std::optional<int> get_player_id(unsigned row) { return events[row].player_id; }
 
        struct Status {
                unsigned our_score, their_score;
                bool offense;
+               bool stoppage;
+               bool should_pull;
                unsigned num_passes;
                unsigned possession_sec;
+               unsigned stoppage_sec;
        };
        Status get_status_at(uint64_t t);
        std::set<int> get_team_at(uint64_t t);
+       void set_team_at(uint64_t, const std::set<int> &new_team);
 
 private:
        struct Player {