]> git.ipfire.org Git - thirdparty/squid.git/blame - src/format/TokenTableEntry.h
Maintenance: automate header guards 2/3 (#1655)
[thirdparty/squid.git] / src / format / TokenTableEntry.h
CommitLineData
bbc27441 1/*
b8ae064d 2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
bbc27441
AJ
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
ff9d9458
FC
9#ifndef SQUID_SRC_FORMAT_TOKENTABLEENTRY_H
10#define SQUID_SRC_FORMAT_TOKENTABLEENTRY_H
31971e6a
AJ
11
12#include "format/ByteCode.h"
13
14/*
15 * Squid configuration allows users to define custom formats in
16 * several components.
17 * - logging
18 * - external ACL input
19 * - deny page URL
20 *
21 * These enumerations and classes define the API for parsing of
22 * format directives to define these patterns. Along with output
23 * functionality to produce formatted buffers.
24 */
25
26namespace Format
27{
28
29/// One entry in a table of format tokens.
e83cdc25
A
30class TokenTableEntry
31{
31971e6a 32public:
aee3523a 33 TokenTableEntry() : configTag(nullptr), tokenType(LFT_NONE), options(0) {}
26735116
AJ
34 TokenTableEntry(const char *aTag, const ByteCode_t &aType) : configTag(aTag), tokenType(aType), options(0) {}
35 // nothing to destruct configTag is pointer to global const string
36 ~TokenTableEntry() {}
95cc1e3e 37 TokenTableEntry(const TokenTableEntry& t) : configTag(t.configTag), tokenType(t.tokenType), options(t.options) {}
26735116 38
31971e6a
AJ
39 /// the config file ASCII representation for this token
40 /// just the base tag bytes, excluding any option syntax bytes
41 const char *configTag;
42
43 /// the internal byte code representatio of this token
44 ByteCode_t tokenType;
45
46 /// 32-bit mask? of options affecting the output display of this token
47 uint32_t options;
26735116
AJ
48
49private:
26735116 50 TokenTableEntry &operator =(const TokenTableEntry&); // not implemented
31971e6a
AJ
51};
52
53} // namespace Format
54
ff9d9458 55#endif /* SQUID_SRC_FORMAT_TOKENTABLEENTRY_H */
f53969cc 56