memgraph/data_model/json/primitive.hpp
Dominik Tomičević b4a6ca3487 added a JSON class
2015-06-21 21:15:46 +02:00

30 lines
397 B
C++

#ifndef JSON_PRIMITIVE
#define JSON_PRIMITIVE
#include "json.hpp"
namespace json {
template <class T>
class Primitive : public Json
{
public:
Primitive() {}
Primitive(const T& value)
: value(value) {}
T get() const { return value; }
void set(T value) { this->value = value; }
operator T() const { return this->get(); }
protected:
T value;
};
}
#endif