dmlite
0.6
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
dmlite
cpp
base.h
Go to the documentation of this file.
1
/// @file include/dmlite/cpp/base.h
2
/// @brief Base interfaces.
3
/// @author Alejandro Álvarez Ayllón <aalvarez@cern.ch>
4
#ifndef DMLITE_CPP_BASE_H
5
#define DMLITE_CPP_BASE_H
6
7
#include "
dmlite/common/config.h
"
8
#include "
exceptions.h
"
9
#include <string>
10
11
namespace
dmlite {
12
13
// Forward declarations.
14
class
StackInstance;
15
class
SecurityContext;
16
17
/// Base class for interfaces.
18
class
BaseInterface
{
19
public
:
20
/// Virtual destructor
21
virtual
~BaseInterface
();
22
23
/// String ID of the implementation.
24
virtual
std::string
getImplId
(
void
)
const
throw
() = 0;
25
26
protected
:
27
friend
class
StackInstance
;
28
29
/// Set the StackInstance.
30
/// Some plugins may need to access other stacks (i.e. the pool may need the catalog)
31
/// However, at construction time not all the stacks have been populated, so this will
32
/// be called once all are instantiated.
33
virtual
void
setStackInstance
(
StackInstance
* si)
throw
(
DmException
);
34
35
/// Set the security context.
36
virtual
void
setSecurityContext
(
const
SecurityContext
* ctx)
throw
(
DmException
);
37
38
/// These method allows plugins to call other plugins setStackInstance and setSecurityContext
39
static
void
setStackInstance
(
BaseInterface
* i,
40
StackInstance
* si)
throw
(
DmException
);
41
42
static
void
setSecurityContext
(
BaseInterface
* i,
43
const
SecurityContext
* ctx)
throw
(
DmException
);
44
};
45
46
47
/// Base class for factories.
48
class
BaseFactory
{
49
public
:
50
/// Virtual destructor
51
virtual
~BaseFactory
();
52
53
/// Set a configuration parameter
54
/// @param key The configuration parameter
55
/// @param value The value for the configuration parameter
56
virtual
void
configure
(
const
std::string& key,
const
std::string& value)
throw
(
DmException
);
57
};
58
59
};
60
61
#endif // DMLITE_CPP_BASE_H
dmlite::BaseInterface
Base class for interfaces.
Definition:
base.h:18
dmlite::BaseFactory::~BaseFactory
virtual ~BaseFactory()
Virtual destructor.
dmlite::StackInstance
Definition:
dmlite.h:161
dmlite::BaseInterface::setSecurityContext
virtual void setSecurityContext(const SecurityContext *ctx)
Set the security context.
dmlite::SecurityContext
Security context. To be created by the Authn.
Definition:
authn.h:64
config.h
Header generated by CMake with the build configuration used.
dmlite::DmException
Base exception class.
Definition:
exceptions.h:17
exceptions.h
Exceptions used by the API.
dmlite::BaseFactory
Base class for factories.
Definition:
base.h:48
dmlite::BaseInterface::setStackInstance
virtual void setStackInstance(StackInstance *si)
dmlite::BaseInterface::~BaseInterface
virtual ~BaseInterface()
Virtual destructor.
dmlite::BaseFactory::configure
virtual void configure(const std::string &key, const std::string &value)
dmlite::BaseInterface::getImplId
virtual std::string getImplId(void) const =0
String ID of the implementation.
Generated on Wed May 4 2016 12:27:39 for dmlite by
1.8.5