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

27 lines
356 B
C++

#pragma once
#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;
};
}