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