1#ifndef _DITTO_ABSTRACT_DOCUMENT_PATH_
2#define _DITTO_ABSTRACT_DOCUMENT_PATH_
5#include "UpdateResult.hpp"
8typedef struct CDocument CDocument_t;
23 CDocument_t
const *document;
39 std::string initial_path);
79 PathAccessorType path_type)
const;
84 PathAccessorType path_type)
const;
88 get_mut_object_or_default(json_callback json_cb,
89 PathAccessorType path_type)
const;
Provides an interface to specify a path to a key in a document that you can then call various update ...
Definition AbstractDocumentPath.hpp:21
int get_int_value() const
Returns the value at the previously specified key in the document as an int. If the key was invalid a...
Definition AbstractDocumentPath.cpp:146
double get_double_value() const
Returns the value at the previously specified key in the document as a double. If the key was invalid...
Definition AbstractDocumentPath.cpp:151
std::shared_ptr< T > get_object_or_default(json_callback json_cb, PathAccessorType path_type) const
Helper function to retrieve crdt objects.
Definition AbstractDocumentPath.cpp:109
float get_float_value() const
Returns the value at the previously specified key in the document as a float. If the key was invalid ...
Definition AbstractDocumentPath.cpp:156
AbstractDocumentPath operator[](std::string path)
Used to specify a path to a key in the document that you can subscript further to access a nested key...
Definition AbstractDocumentPath.cpp:52
T get_primitive_or_default(T default_value, json_callback json_cb, PathAccessorType path_type) const
Get the primitive stored at a given path or the correspondign default value.
Definition AbstractDocumentPath.cpp:83
std::string get_string_value() const
Returns the value at the previously specified key in the document as a std::string....
Definition AbstractDocumentPath.cpp:141
bool get_bool_value() const
Returns the value at the previously specified key in the document as a bool. If the key was invalid a...
Definition AbstractDocumentPath.cpp:161
nlohmann::json get_json() const
Returns the value at the previously specified key in the document as a nlohmann::json object....
Definition AbstractDocumentPath.cpp:166
basic_json<> json
default JSON class
Definition json.hpp:2933
An identifier for a Document.
Definition DocumentId.hpp:21