blob: 3cee472ce00ffb235c231f79355b2a7a159a876b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#ifndef MONGOSTUB_HPP
#define MONGOSTUB_HPP
#include <boost/utility.hpp>
#include <cstdint>
#include <iostream>
#include <vector>
#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>
#include <mongocxx/v_noabi/mongocxx/change_stream.hpp>
#include <bsoncxx/json.hpp>
class mongoStub : boost::noncopyable {
public:
mongoStub();
std::vector<std::string> getNewMessages(mongocxx::change_stream* colCs);
mongocxx::collection getCol() const { return col; }
private:
mongocxx::instance instance;
mongocxx::client client{mongocxx::uri{}};
mongocxx::database db;
mongocxx::collection col;
mongocxx::change_stream* colCs = nullptr;
};
#endif
|