memgraph/storage/model/json/bool.hpp
2015-12-07 21:51:55 +01:00

31 lines
412 B
C++

#pragma once
#include "primitive.hpp"
namespace json {
class Bool final : public Primitive<bool>
{
public:
Bool() {}
Bool(bool value)
: Primitive<bool>(value) {}
virtual bool is_boolean() const;
virtual operator std::string() const;
};
bool Bool::is_boolean() const
{
return true;
}
Bool::operator std::string() const
{
return value == true ? "true" : "false";
}
}