2016-07-05 11:01:22 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "storage/model/properties/property.hpp"
|
|
|
|
|
|
|
|
class String : public Property
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static constexpr Flags type = Flags::String;
|
|
|
|
|
2016-08-15 20:21:38 +08:00
|
|
|
String(const String &) = default;
|
|
|
|
String(String &&) = default;
|
2016-07-05 11:01:22 +08:00
|
|
|
|
2016-08-15 20:21:38 +08:00
|
|
|
String(const std::string &value);
|
|
|
|
String(std::string &&value);
|
2016-07-05 11:01:22 +08:00
|
|
|
|
2016-08-15 20:21:38 +08:00
|
|
|
operator const std::string &() const;
|
2016-07-05 11:01:22 +08:00
|
|
|
|
2016-08-15 20:21:38 +08:00
|
|
|
bool operator==(const Property &other) const override;
|
2016-07-05 11:01:22 +08:00
|
|
|
|
2016-08-15 20:21:38 +08:00
|
|
|
bool operator==(const String &other) const;
|
2016-07-05 11:01:22 +08:00
|
|
|
|
2016-08-15 20:21:38 +08:00
|
|
|
bool operator==(const std::string &other) const;
|
2016-07-05 11:01:22 +08:00
|
|
|
|
2016-08-15 20:21:38 +08:00
|
|
|
friend std::ostream &operator<<(std::ostream &stream, const String &prop);
|
2016-07-05 11:01:22 +08:00
|
|
|
|
2016-08-15 20:21:38 +08:00
|
|
|
std::ostream &print(std::ostream &stream) const override;
|
|
|
|
|
|
|
|
std::string const &value_ref() const { return value; }
|
2016-07-05 11:01:22 +08:00
|
|
|
|
|
|
|
std::string value;
|
|
|
|
};
|