Squid Web Cache
master
Loading...
Searching...
No Matches
Config.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2025 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_FORMAT_CONFIG_H
10
#define SQUID_SRC_FORMAT_CONFIG_H
11
12
#include "
sbuf/SBuf.h
"
13
14
#include <list>
15
16
namespace
Format
17
{
18
19
class
TokenTableEntry;
20
24
class
TokenNamespace
25
{
26
public
:
27
TokenNamespace
(
const
SBuf
&nsName,
TokenTableEntry
const
*tSet) :
prefix
(nsName),
tokenSet
(tSet) {}
28
30
SBuf
prefix
;
31
34
TokenTableEntry
const
*
tokenSet
;
35
};
36
38
class
FmtConfig
39
{
40
public
:
41
/* Register a namespace set of tokens to be accepted by the format parser.
42
* Multiple arrays can be registered, they will be scanned for
43
* in order registered. So care needs to be taken that arrays registered
44
* first do not overlap or consume tokens registered later for a namespace.
45
*/
46
void
registerTokens
(
const
SBuf
&nsName,
TokenTableEntry
const
*tokenArray);
47
49
std::list<TokenNamespace>
tokens
;
50
};
51
52
extern
FmtConfig
TheConfig
;
53
54
}
// namespace Format
55
56
#endif
/* SQUID_SRC_FORMAT_CONFIG_H */
57
SBuf.h
Format::FmtConfig
The set of custom formats defined in squid.conf.
Definition
Config.h:39
Format::FmtConfig::tokens
std::list< TokenNamespace > tokens
list of token namespaces registered
Definition
Config.h:49
Format::FmtConfig::registerTokens
void registerTokens(const SBuf &nsName, TokenTableEntry const *tokenArray)
Definition
Config.cc:17
Format::TokenNamespace
Definition
Config.h:25
Format::TokenNamespace::TokenNamespace
TokenNamespace(const SBuf &nsName, TokenTableEntry const *tSet)
Definition
Config.h:27
Format::TokenNamespace::tokenSet
TokenTableEntry const * tokenSet
Definition
Config.h:34
Format::TokenNamespace::prefix
SBuf prefix
prefix namespace name (excluding '::')
Definition
Config.h:30
Format::TokenTableEntry
One entry in a table of format tokens.
Definition
TokenTableEntry.h:31
SBuf
Definition
SBuf.h:94
Format
Definition
SchemeConfig.h:28
Format::TheConfig
FmtConfig TheConfig
Definition
Config.cc:14
squid
src
format
Config.h
Generated by
1.9.8