memgraph/data_model/json/real.hpp
2015-06-21 22:20:36 +02:00

34 lines
476 B
C++

#ifndef MEMGRAPH_DATA_MODEL_JSON_REAL_HPP
#define MEMGRAPH_DATA_MODEL_JSON_REAL_HPP
#include "primitive.hpp"
namespace json {
class Real final : public Primitive<float>
{
public:
Real() {}
Real(float value)
: Primitive<float>(value) {}
virtual bool is_real() const;
virtual operator std::string() const;
};
bool Real::is_real() const
{
return true;
}
Real::operator std::string() const
{
return std::to_string(value);
}
}
#endif