]> git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/ActionCreator.h
Merge form trunk
[thirdparty/squid.git] / src / mgr / ActionCreator.h
1 /*
2 * $Id$
3 *
4 * DEBUG: section 16 Cache Manager API
5 *
6 */
7
8 #ifndef SQUID_MGR_ACTION_CREATOR_H
9 #define SQUID_MGR_ACTION_CREATOR_H
10
11 #include "mgr/forward.h"
12
13 namespace Mgr
14 {
15
16 /** Creates objects of the right Action class, parameterized with Command.
17 * A part of the Action profile that allows Cache Manager be ignorant about
18 * specific Action classes (\see Mgr::ActionProfile).
19 */
20 class ActionCreator: public RefCountable
21 {
22 public:
23 typedef RefCount<ActionCreator> Pointer;
24
25 virtual ~ActionCreator() {}
26
27 /// returns a pointer to the new Action object for cmd; never nil
28 virtual ActionPointer create(const CommandPointer &cmd) const = 0;
29 };
30
31 } // namespace Mgr
32
33 #endif /* SQUID_MGR_ACTION_CREATOR_H */