Squid Web Cache master
Loading...
Searching...
No Matches
ActionFeatures.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_MGR_ACTIONFEATURES_H
10#define SQUID_SRC_MGR_ACTIONFEATURES_H
11
12namespace Mgr
13{
14
15// Scoped enumeration declarations below solve two problems with ActionProfile
16// constructor, RegisterAction(), and related function calls, making argument
17// lists readable and safe:
18// 1. They eliminate dangerous guessing of f(..., 0, 1, false) meaning by
19// converting each anonymous constant into a named one (e.g., Atomic::no).
20// 2. They prevent accidental argument reordering by prohibiting implicit value
21// casts (e.g., both f(1, false) and f(false, 1) would otherwise compile).
22
24enum class Protected { no, yes };
25
27enum class Atomic { no, yes };
28
30enum class Format { informal, yaml };
31
32} // namespace Mgr
33
34#endif /* SQUID_SRC_MGR_ACTIONFEATURES_H */
35
Cache Manager API.
Definition Action.h:21
Protected
whether default cachemgr_passwd configuration denies the Action
Atomic
whether Action::dump() writes the entire report before returning