2#ifndef DITTO_REGISTER_H
3#define DITTO_REGISTER_H
5#include "AbstractDocumentPath.hpp"
7#include "internal_errors.hpp"
15class DITTO_DEPRECATED_BECAUSE(
16 "Use DQL (Ditto Query Language) instead. For more information see: "
17 "https://ditto.com/link/legacy-to-dql-guide") Register {
18 friend class AbstractDocumentPath;
21 template <
class T>
explicit Register(T value);
22 explicit Register(
const nlohmann::json &info);
27 template <
typename T> T
get_value()
const;
28 nlohmann::json get_json_value()
const;
29 DittoCrdtType get_type()
const;
35DITTO_DISABLE_DEPRECATED_WARNINGS(
36 "Register is deprecated, and will be removed in v5")
37void to_json(nlohmann::json &j, const
Register &a);
38DITTO_REENABLE_WARNINGS
Definition Register.hpp:17
T get_value() const
Get the value of the register in the current view of the document.
Definition Register.hpp:43
Namespace for the Ditto C++ SDK types and functions.
Definition AbstractDocumentPath.hpp:19