From 9f5936bf64deb625a27259d778937e281ca19cea Mon Sep 17 00:00:00 2001 From: _ov4 Date: Mon, 21 Sep 2026 03:13:22 +0000 Subject: add history manager --- include/history.h | 14 ++++++++++++++ src/history.cc | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 include/history.h create mode 100644 src/history.cc diff --git a/include/history.h b/include/history.h new file mode 100644 index 0000000..77ab9ed --- /dev/null +++ b/include/history.h @@ -0,0 +1,14 @@ +#pragma once + +#include +#include + +namespace ov4 +{ + +inline std::vector history_vec; + +void add_history(const std::string &s); +void clear_history(); + +} diff --git a/src/history.cc b/src/history.cc new file mode 100644 index 0000000..79f0ee2 --- /dev/null +++ b/src/history.cc @@ -0,0 +1,18 @@ +#include "history.h" + +using namespace std; + +namespace ov4 +{ + +void add_history(const std::string &s) +{ + history_vec.push_back(s); +} + +void clear_history() +{ + history_vec.clear(); +} + +} -- cgit v1.3.1-4-g156e