StoreFileSystem.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 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 #ifndef SQUID_SRC_STOREFILESYSTEM_H
10 #define SQUID_SRC_STOREFILESYSTEM_H
11 
12 #include "base/TypeTraits.h"
13 #include "store/forward.h"
14 #include <vector>
15 
16 /* ****** DOCUMENTATION ***** */
17 
91 {
92 
93 public:
94  static void FsAdd(StoreFileSystem &);
95  static StoreFileSystem *FindByType(const char *type);
96  static std::vector<StoreFileSystem*> const &FileSystems();
97  typedef std::vector<StoreFileSystem*>::iterator iterator;
98  typedef std::vector<StoreFileSystem*>::const_iterator const_iterator;
99 
100  StoreFileSystem() = default;
101  StoreFileSystem(StoreFileSystem &&) = delete; // no copying/moving of any kind
102 
103  virtual char const *type () const = 0;
104  virtual SwapDir *createSwapDir() = 0;
105 
106 private:
107  static std::vector<StoreFileSystem*> &GetFileSystems();
108  static std::vector<StoreFileSystem*> *_FileSystems;
109 };
110 
111 // TODO: Kill this typedef!
113 
114 #endif /* SQUID_SRC_STOREFILESYSTEM_H */
115 
static std::vector< StoreFileSystem * > * _FileSystems
manages a single cache_dir
Definition: Disk.h:21
static void FsAdd(StoreFileSystem &)
std::vector< StoreFileSystem * >::const_iterator const_iterator
convenience base for any class with pure virtual method(s)
Definition: TypeTraits.h:18
StoreFileSystem storefs_entry_t
static StoreFileSystem * FindByType(const char *type)
static std::vector< StoreFileSystem * > & GetFileSystems()
std::vector< StoreFileSystem * >::iterator iterator
virtual const char * type() const =0
virtual SwapDir * createSwapDir()=0
static const std::vector< StoreFileSystem * > & FileSystems()
StoreFileSystem()=default

 

Introduction

Documentation

Support

Miscellaneous