Fawkes API
Fawkes Development Version
mongodb.h
1
2
/***************************************************************************
3
* mongodb.h - MongoDB aspect for Fawkes
4
*
5
* Created: Mon Dec 06 00:24:43 2010
6
* Copyright 2006-2017 Tim Niemueller [www.niemueller.de]
7
****************************************************************************/
8
9
/* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version. A runtime exception applies to
13
* this software (see LICENSE.GPL_WRE file mentioned below for details).
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Library General Public License for more details.
19
*
20
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
21
*/
22
23
#ifndef _PLUGINS_MONGODB_ASPECT_MONGODB_H_
24
#define _PLUGINS_MONGODB_ASPECT_MONGODB_H_
25
26
#include <aspect/aspect.h>
27
28
#include <string>
29
30
// We can't cleanly forward-declare mongocxx::client due to inline namespacing in mongocxx.
31
#include <mongocxx/client.hpp>
32
33
namespace
fawkes
{
34
class
MongoDBConnCreator;
35
36
class
MongoDBAspectIniFin;
37
38
class
MongoDBAspect :
public
virtual
Aspect
39
{
40
friend
MongoDBAspectIniFin;
41
42
public
:
43
MongoDBAspect
(
const
char
*config_prefix);
44
MongoDBAspect
();
45
virtual
~MongoDBAspect
();
46
47
const
std::string &
48
mongodb_config_name
()
const
49
{
50
return
mongodb_config_name_;
51
}
52
53
protected
:
54
mongocxx::client *
mongodb_client
;
55
MongoDBConnCreator
*
mongodb_connmgr
;
56
57
private
:
58
void
init_MongoDBAspect(mongocxx::client *
mongodb_client
,
MongoDBConnCreator
*
mongodb_connmgr
);
59
60
private
:
61
std::string mongodb_config_name_;
62
};
63
64
}
// end namespace fawkes
65
66
#endif
fawkes::MongoDBAspect::mongodb_config_name
const std::string & mongodb_config_name() const
Definition:
mongodb.h:53
fawkes::MongoDBConnCreator
Definition:
mongodb_conncreator.h:42
fawkes::MongoDBAspect::mongodb_client
mongocxx::client * mongodb_client
Definition:
mongodb.h:59
fawkes::MongoDBAspect::mongodb_connmgr
MongoDBConnCreator * mongodb_connmgr
Definition:
mongodb.h:60
fawkes::MongoDBAspect::~MongoDBAspect
virtual ~MongoDBAspect()
Virtual empty destructor.
Definition:
mongodb.cpp:82
fawkes
fawkes::MongoDBAspect::MongoDBAspect
MongoDBAspect()
Constructor.
Definition:
mongodb.cpp:76
src
plugins
mongodb
aspect
mongodb.h
Generated by
1.8.17