This allows using SwapDir API without dynamic_cast.
class AsyncCall;
class StoreClient;
class MemObject;
-class Store;
class StoreSearch;
+class SwapDir;
typedef struct {
bool hasIfNoneMatchEtag(const HttpRequest &request) const;
/** What store does this entry belong too ? */
- virtual RefCount<Store> store() const;
+ virtual RefCount<SwapDir> store() const;
MemObject *mem_obj;
MemObject *hidden_mem_obj; ///< mem_obj created before URLs were known
{
public:
+ typedef RefCount<SwapDir> Pointer;
+
SwapDir(char const *aType);
virtual ~SwapDir();
virtual void reconfigure(int, char *) = 0;
return matched;
}
-StorePointer
+SwapDir::Pointer
StoreEntry::store() const
{
assert(0 <= swap_dirn && swap_dirn < Config.cacheSwap.n_configured);
{
if (swap->swapDirs == NULL) {
swap->n_allocated = 4;
- swap->swapDirs = static_cast<StorePointer *>(xcalloc(swap->n_allocated, sizeof(StorePointer)));
+ swap->swapDirs = static_cast<SwapDir::Pointer *>(xcalloc(swap->n_allocated, sizeof(SwapDir::Pointer)));
}
if (swap->n_allocated == swap->n_configured) {
- StorePointer *tmp;
swap->n_allocated <<= 1;
- tmp = static_cast<StorePointer *>(xcalloc(swap->n_allocated, sizeof(StorePointer)));
+ SwapDir::Pointer *const tmp = static_cast<SwapDir::Pointer *>(xcalloc(swap->n_allocated, sizeof(SwapDir::Pointer)));
memcpy(tmp, swap->swapDirs, swap->n_configured * sizeof(SwapDir *));
xfree(swap->swapDirs);
swap->swapDirs = tmp;
class CpuAffinityMap;
class RemovalPolicySettings;
class external_acl;
-class Store;
+class SwapDir;
struct SquidConfig {
refresh_t *Refresh;
struct _cacheSwap {
- RefCount<class Store> *swapDirs;
+ RefCount<SwapDir> *swapDirs;
int n_allocated;
int n_configured;
///< number of disk processes required to support all cache_dirs