StoreFileSystem.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 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 92 Storage File System */
10
11#include "squid.h"
12#include "StoreFileSystem.h"
13
14std::vector<StoreFileSystem*> *StoreFileSystem::_FileSystems = nullptr;
15
16void
18{
19 iterator i = GetFileSystems().begin();
20
21 while (i != GetFileSystems().end()) {
22 assert(strcmp((*i)->type(), instance.type()) != 0);
23 ++i;
24 }
25
26 GetFileSystems().push_back (&instance);
27}
28
29std::vector<StoreFileSystem *> const &
31{
32 return GetFileSystems();
33}
34
35std::vector<StoreFileSystem*> &
37{
38 if (!_FileSystems)
39 _FileSystems = new std::vector<StoreFileSystem *>;
40
41 return *_FileSystems;
42}
43
46{
47 for (const auto fs: FileSystems()) {
48 if (strcasecmp(type, fs->type()) == 0)
49 return fs;
50 }
51 return nullptr;
52}
53
#define assert(EX)
Definition: assert.h:19
virtual char const * type() const =0
static std::vector< StoreFileSystem * > const & FileSystems()
static std::vector< StoreFileSystem * > & GetFileSystems()
static void FsAdd(StoreFileSystem &)
static std::vector< StoreFileSystem * > * _FileSystems
static StoreFileSystem * FindByType(const char *type)
std::vector< StoreFileSystem * >::iterator iterator
int type
Definition: errorpage.cc:152
static CacheManager * instance

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors