]> git.ipfire.org Git - thirdparty/squid.git/blob - src/CommonPool.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / CommonPool.h
1 /*
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 /* DEBUG: section 77 Delay Pools */
10
11 #ifndef COMMONPOOL_H
12 #define COMMONPOOL_H
13
14 #if USE_DELAY_POOLS
15 #include "CompositePoolNode.h"
16 #include "SquidString.h"
17
18 /*
19 \ingroup DelayPoolsAPI
20 *
21 \todo Next steps: make this a composite, and TypeLabel a composite method.
22 * Then we have a legacy composite which returns class 1/2/3, and new
23 * composites which return a descriptor of some sort.
24 */
25 class CommonPool
26 {
27
28 public:
29 void *operator new(size_t);
30 void operator delete (void *);
31 static CommonPool *Factory (unsigned char _class, CompositePoolNode::Pointer&);
32 char const* theClassTypeLabel() const {return typeLabel.termedBuf();}
33
34 protected:
35 CommonPool();
36 String typeLabel;
37 };
38
39 #endif /* USE_DELAY_POOLS */
40 #endif /* COMMONPOOL_H */
41