make values capable of being a list & add boost

Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
folling 2023-11-28 11:05:53 +01:00 committed by Folling
parent 08ad2c5c66
commit 733b52575b
Signed by: folling
SSH key fingerprint: SHA256:S9qEx5WCFFLK49tE/LKnKuJYM5sw+++Dn6qJbbyxnCY
16 changed files with 315 additions and 140 deletions

View file

@ -1,13 +1,14 @@
#pragma once
#include <vector>
#include <boost/container/vector.hpp>
#include <values/value.hpp>
/// \private
struct IkarusToggleValue final : IkarusValue {
public:
explicit IkarusToggleValue(bool value):
IkarusValue{this},
_value{value} {}
explicit IkarusToggleValue();
IkarusToggleValue(IkarusToggleValue const&) = default;
IkarusToggleValue(IkarusToggleValue&&) = default;
@ -18,14 +19,9 @@ public:
~IkarusToggleValue() override = default;
public:
[[nodiscard]] bool get_value() const {
return _value;
}
void set_value(bool value) {
_value = value;
}
[[nodiscard]] boost::container::vector<bool>& get_value();
[[nodiscard]] boost::container::vector<bool> const& get_value() const;
private:
bool _value;
boost::container::vector<bool> _value{};
};