Ditto
4.7.2-rc.2
Loading...
Searching...
No Matches
include
Counter.hpp
1
2
#ifndef _DITTO_COUNTER_
3
#define _DITTO_COUNTER_
4
5
#include "dittoffi.hpp"
6
#include "json.hpp"
7
8
namespace
ditto {
9
class
Counter
{
10
friend
class
AbstractDocumentPath
;
11
friend
class
MutableCounter
;
12
13
public
:
14
explicit
Counter
();
20
double
get_value
()
const
;
21
DittoCrdtType
get_type()
const
;
22
23
protected
:
24
explicit
Counter
(
const
nlohmann::json
&info);
25
double
value;
26
};
27
28
void
to_json(
nlohmann::json
&
j
,
const
Counter
&
a
);
29
}
// namespace ditto
30
31
#endif
ditto::AbstractDocumentPath
Provides an interface to specify a path to a key in a document that you can then call various update ...
Definition
AbstractDocumentPath.hpp:21
ditto::Counter
Definition
Counter.hpp:9
ditto::Counter::get_value
double get_value() const
Get the value of the counter in the current view of the document.
Definition
Counter.cpp:13
ditto::MutableCounter
Definition
MutableCounter.hpp:10
nlohmann::json
basic_json<> json
default JSON class
Definition
json.hpp:2933
ditto::ArcPointee
Definition
Arc.hpp:11
Generated by
1.10.0