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
16namespace Format
17{
18
19class TokenTableEntry;
20
25{
26public:
27 TokenNamespace(const SBuf &nsName, TokenTableEntry const *tSet) : prefix(nsName), tokenSet(tSet) {}
28
31
35};
36
39{
40public:
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
52extern FmtConfig TheConfig;
53
54} // namespace Format
55
56#endif /* SQUID_SRC_FORMAT_CONFIG_H */
57
The set of custom formats defined in squid.conf.
Definition Config.h:39
std::list< TokenNamespace > tokens
list of token namespaces registered
Definition Config.h:49
void registerTokens(const SBuf &nsName, TokenTableEntry const *tokenArray)
Definition Config.cc:17
TokenNamespace(const SBuf &nsName, TokenTableEntry const *tSet)
Definition Config.h:27
TokenTableEntry const * tokenSet
Definition Config.h:34
SBuf prefix
prefix namespace name (excluding '::')
Definition Config.h:30
One entry in a table of format tokens.
Definition SBuf.h:94
FmtConfig TheConfig
Definition Config.cc:14