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,33 +1,28 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/container/vector.hpp>
|
||||
|
||||
#include <values/value.hpp>
|
||||
|
||||
/// \private
|
||||
struct IkarusTextValue final : IkarusValue {
|
||||
public:
|
||||
explicit IkarusTextValue(std::string value):
|
||||
IkarusValue{this},
|
||||
_value(std::move(value)) {}
|
||||
explicit IkarusTextValue();
|
||||
|
||||
IkarusTextValue(IkarusTextValue const&) = default;
|
||||
IkarusTextValue(IkarusTextValue&&) noexcept = default;
|
||||
IkarusTextValue(IkarusTextValue&&) = default;
|
||||
|
||||
IkarusTextValue& operator=(IkarusTextValue const&) = default;
|
||||
IkarusTextValue& operator=(IkarusTextValue&&) noexcept = default;
|
||||
IkarusTextValue& operator=(IkarusTextValue&&) = default;
|
||||
|
||||
~IkarusTextValue() override = default;
|
||||
|
||||
public:
|
||||
[[nodiscard]] std::string_view get_value() const noexcept {
|
||||
return _value;
|
||||
}
|
||||
|
||||
void set_value(std::string_view value) {
|
||||
_value = value;
|
||||
}
|
||||
[[nodiscard]] boost::container::vector<char const *>& get_value();
|
||||
[[nodiscard]] boost::container::vector<char const *> const& get_value() const;
|
||||
|
||||
private:
|
||||
std::string _value;
|
||||
boost::container::vector<char const *> _value{};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue