diff --git a/src/signalvector.hpp b/src/signalvector.hpp new file mode 100644 index 00000000..9d39867a --- /dev/null +++ b/src/signalvector.hpp @@ -0,0 +1,34 @@ +#pragma once + +#include + +#include +#include + +namespace chatterino { + +template +class SignalVector +{ +public: + SignalVector &operator=(std::vector &other) + { + this->data = other; + + this->updated.invoke(); + + return *this; + } + + operator std::vector &() + { + return this->data; + } + + pajlada::Signals::NoArgSignal updated; + +private: + std::vector data; +}; + +} // namespace chatterino