Ditto
4.6.0
Loading...
Searching...
No Matches
include
MutableCounter.hpp
1
2
#ifndef _DITTO_MUTABLE_COUNTER_
3
#define _DITTO_MUTABLE_COUNTER_
4
#include "Counter.hpp"
5
#include "MutableDocumentPath.hpp"
6
#include "json.hpp"
7
8
namespace
ditto {
9
10
class
MutableCounter
:
public
Counter
{
11
friend
class
MutableDocumentPath
;
12
13
public
:
20
void
increment
(
double
amount);
21
22
private
:
23
MutableCounter
(
const
nlohmann::json
&info,
MutableDocumentPath
doc_path);
24
MutableDocumentPath
doc_path;
25
};
26
}
// namespace ditto
27
28
#endif
ditto::Counter
Definition
Counter.hpp:9
ditto::MutableCounter
Definition
MutableCounter.hpp:10
ditto::MutableCounter::increment
void increment(double amount)
increment the value of the counter by the given amount
Definition
MutableCounter.cpp:11
ditto::MutableDocumentPath
Provides an interface to specify a path to a key in a document that you can then call various update ...
Definition
MutableDocumentPath.hpp:31
nlohmann::json
basic_json<> json
default JSON class
Definition
json.hpp:2933
Generated by
1.10.0