Inheritance diagram for Acl::FinalizedParameterizedNode< Parent >:
Collaboration diagram for Acl::FinalizedParameterizedNode< Parent >:

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

template<class Parent>
class Acl::FinalizedParameterizedNode< Parent >

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

template<class Parent >
using Acl::FinalizedParameterizedNode< Parent >::Parameters = typename Parent::Parameters

Definition at line 124 of file AclRegs.cc.

Constructor & Destructor Documentation

◆ FinalizedParameterizedNode()

template<class Parent >
Acl::FinalizedParameterizedNode< Parent >::FinalizedParameterizedNode ( TypeName  typeName,
Parameters *const  params 
)
inline

◆ ~FinalizedParameterizedNode()

Member Function Documentation

◆ FinalizePoolLabel()

template<class Parent >
static void Acl::FinalizedParameterizedNode< Parent >::FinalizePoolLabel ( const TypeName  typeName)
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()

◆ PreferAllocatorLabelPrefix()

template<class Parent >
static void Acl::FinalizedParameterizedNode< Parent >::PreferAllocatorLabelPrefix ( const char *const  suffix)
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()

template<class Parent >
const char * Acl::FinalizedParameterizedNode< Parent >::typeString ( ) const
inlineoverride

Definition at line 156 of file AclRegs.cc.

References Acl::FinalizedParameterizedNode< Parent >::typeName_.

Member Data Documentation

◆ FinalPoolLabel

◆ PreferredAllocatorLabelSuffix

template<class Parent >
const char* Acl::FinalizedParameterizedNode< Parent >::PreferredAllocatorLabelSuffix = nullptr
inlinestaticprivate

◆ typeName_

template<class Parent >
TypeName Acl::FinalizedParameterizedNode< Parent >::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:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors