Ditto  3.0.4
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
Definition: Counter.hpp:9
Definition: MutableCounter.hpp:10
void increment(double amount)
increment the value of the counter by the given amount
Definition: MutableCounter.cpp:11
Provides an interface to specify a path to a key in a document that you can then call various update ...
Definition: MutableDocumentPath.hpp:32
basic_json<> json
default JSON class
Definition: json.hpp:2933