make values capable of being a list & add boost
Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
parent
08ad2c5c66
commit
733b52575b
16 changed files with 315 additions and 140 deletions
|
|
@ -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{};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue