blob: fcad4b94c8f168b6c037e2597255594384594de9 (
plain)
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
30
31
32
33
34
35
36
37
|
#ifndef SESSIONCONTAINER_H
#define SESSIONCONTAINER_H
#include "uuid.h"
#include "session.h"
#include <intrusivePtrBase.h>
class SessionContainer : public IntrusivePtrBase {
public:
SessionContainer();
virtual ~SessionContainer() = 0;
SessionPtr GetSession(UUID & sid);
protected:
virtual SessionPtr getSession(UUID & sid) = 0;
};
typedef boost::intrusive_ptr<SessionContainer> SessionContainerPtr;
/// Base class to implement session container imlpementations
class SessionContainerLoader : public ComponentLoader {
public:
virtual SessionContainerPtr open() const = 0;
};
/// Helper implemention for specific container types
template <class SCType>
class SessionContainerLoaderImpl : public SessionContainerLoader {
public:
virtual SessionContainerPtr open() const
{
return new SCType();
}
};
#endif
|