#pragma once #include #include #include #include #include namespace backend { struct labeller_impl; struct label { label() {} label(const std::string& name, double time) : name(name), time(time) {} std::string name; double time; }; class labeller { public: labeller(const std::filesystem::path& savepath); std::pair getSurrounding(double time) const; std::vector getLabels() const; void applyLabel(std::string name, double time); void deleteLabel(double time); // Deletes closest to time, last added if ties void undo(); void redo(); void save() const; private: std::shared_ptr data; }; }