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 43b53fd565
commit 2e41c36d84
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 IkarusNumberValue final : IkarusValue {
public:
explicit IkarusNumberValue(long double value):
IkarusValue{this},
_value{value} {}
explicit IkarusNumberValue();
IkarusNumberValue(IkarusNumberValue const&) = default;
IkarusNumberValue(IkarusNumberValue&&) = default;
@ -18,14 +19,9 @@ public:
~IkarusNumberValue() override = default;
public:
[[nodiscard]] long double get_value() const {
return _value;
}
void set_value(long double value) {
_value = value;
}
[[nodiscard]] boost::container::vector<long double>& get_value();
[[nodiscard]] boost::container::vector<long double> const& get_value() const;
private:
long double _value;
boost::container::vector<long double> _value{};
};