Public Types | |
using | Parameters = typename Parent::Parameters |
Public Member Functions | |
FinalizedParameterizedNode (TypeName typeName, Parameters *const params) | |
~FinalizedParameterizedNode () override=default | |
const char * | typeString () const override |
Static Public Member Functions | |
static void | PreferAllocatorLabelPrefix (const char *const suffix) |
Private Member Functions | |
MEMPROXY_CLASS (Acl::FinalizedParameterizedNode< Parent >) | |
Static Private Member Functions | |
static void | FinalizePoolLabel (const TypeName typeName) |
Private Attributes | |
TypeName | typeName_ |
the "acltype" name in its canonical spelling More... | |
Static Private Attributes | |
static const char * | PreferredAllocatorLabelSuffix = nullptr |
if set, overrules FinalizePoolLabel() argument More... | |
static const char * | FinalPoolLabel = nullptr |
custom allocator label set by FinalizePoolLabel() More... | |
Detailed Description
Constructs a ParameterizedNode-derived ACL (specified as a Parent class). This template exists to avoid placing a variant of this ACL construction code in each ParameterizedNode-derived ACL class just to pass through TypeName and Parameters onto ParameterizedNode (and to add MEMPROXY_CLASS).
Definition at line 119 of file AclRegs.cc.
Member Typedef Documentation
◆ Parameters
using Acl::FinalizedParameterizedNode< Parent >::Parameters = typename Parent::Parameters |
Definition at line 124 of file AclRegs.cc.
Constructor & Destructor Documentation
◆ FinalizedParameterizedNode()
|
inline |
Definition at line 143 of file AclRegs.cc.
References Assure, and Acl::FinalizedParameterizedNode< Parent >::FinalizePoolLabel().
◆ ~FinalizedParameterizedNode()
|
overridedefault |
Member Function Documentation
◆ FinalizePoolLabel()
|
inlinestaticprivate |
A constructor helper function that replaces generic memory allocator label X set by our MEMPROXY_CLASS(X) with an admin-friendly label based on the acltype name from squid.conf. Meant to be called from the constructor so that no mgr:mem report lists this C++ template class statistics using label X. Repeated calls are allowed but have no effect.
- See also
- PreferAllocatorLabelPrefix()
Definition at line 165 of file AclRegs.cc.
References assert, Acl::FinalizedParameterizedNode< Parent >::FinalPoolLabel, Acl::FinalizedParameterizedNode< Parent >::PreferredAllocatorLabelSuffix, SBufToCstring(), and ToSBuf().
Referenced by Acl::FinalizedParameterizedNode< Parent >::FinalizedParameterizedNode().
◆ MEMPROXY_CLASS()
|
private |
◆ PreferAllocatorLabelPrefix()
|
inlinestatic |
Replaces generic memory allocator label X set by our MEMPROXY_CLASS(X) with an admin-friendly label based on the given acltype-like name. Normally, our class constructor sets the right allocator label using the actlype name, but that algorithm results in unstable and misleading labels when the same instantiation of this template class is used for multiple acltype names. Calling this method corrects that behavior. \prec this method must be called at most once \prec if called, this method must be called before the class constructor
Definition at line 135 of file AclRegs.cc.
References assert, Acl::FinalizedParameterizedNode< Parent >::FinalPoolLabel, and Acl::FinalizedParameterizedNode< Parent >::PreferredAllocatorLabelSuffix.
Referenced by Acl::Init().
◆ typeString()
|
inlineoverride |
Definition at line 156 of file AclRegs.cc.
References Acl::FinalizedParameterizedNode< Parent >::typeName_.
Member Data Documentation
◆ FinalPoolLabel
|
inlinestaticprivate |
Definition at line 180 of file AclRegs.cc.
Referenced by Acl::FinalizedParameterizedNode< Parent >::FinalizePoolLabel(), and Acl::FinalizedParameterizedNode< Parent >::PreferAllocatorLabelPrefix().
◆ PreferredAllocatorLabelSuffix
|
inlinestaticprivate |
Definition at line 177 of file AclRegs.cc.
Referenced by Acl::FinalizedParameterizedNode< Parent >::FinalizePoolLabel(), and Acl::FinalizedParameterizedNode< Parent >::PreferAllocatorLabelPrefix().
◆ typeName_
|
private |
Definition at line 184 of file AclRegs.cc.
Referenced by Acl::FinalizedParameterizedNode< Parent >::typeString().
The documentation for this class was generated from the following file:
- src/AclRegs.cc