#include <InstanceId.h>
![Inheritance graph](classInstanceId__inherit__graph.png)
![Collaboration graph](classInstanceId__coll__graph.png)
Public Types | |
typedef ValueType | Value |
id storage type More... | |
Public Member Functions | |
InstanceId () | |
InstanceId (InstanceId &&)=delete | |
operator Value () const | |
bool | operator== (const InstanceId &o) const |
bool | operator!= (const InstanceId &o) const |
void | change () |
std::ostream & | print (std::ostream &) const |
writes a compact text representation of the ID More... | |
const char * | prefix () const |
ScopedId | detach () const |
Public Attributes | |
Value | value = Value() |
instance identifier More... | |
Detailed Description
template<class Class, class ValueType = InstanceIdDefaultValueType>
class InstanceId< Class, ValueType >
Identifier for class instances
- unique IDs for a large number of concurrent instances, but may wrap;
- useful for debugging and insecure request/response matching;
- sequential IDs within a class except when wrapping;
- always positive IDs. TODO: add creation/destruction debugging?
Definition at line 46 of file InstanceId.h.
Member Typedef Documentation
◆ Value
typedef ValueType InstanceId< Class, ValueType >::Value |
Definition at line 49 of file InstanceId.h.
Constructor & Destructor Documentation
◆ InstanceId() [1/2]
|
inline |
Definition at line 51 of file InstanceId.h.
◆ InstanceId() [2/2]
|
delete |
Member Function Documentation
◆ change()
void InstanceId< Class, ValueType >::change | ( | ) |
Referenced by InstanceId< AsyncJob >::InstanceId().
◆ detach()
|
inline |
- Returns
- a copy of the ID usable outside our Class context
Definition at line 67 of file InstanceId.h.
◆ operator Value()
|
inline |
Definition at line 54 of file InstanceId.h.
◆ operator!=()
|
inline |
Definition at line 56 of file InstanceId.h.
◆ operator==()
|
inline |
Definition at line 55 of file InstanceId.h.
◆ prefix()
const char* InstanceId< Class, ValueType >::prefix | ( | ) | const |
- Returns
- Class-specific nickname (with endless lifetime)
Referenced by InstanceId< AsyncJob >::detach().
◆ print()
std::ostream& InstanceId< Class, ValueType >::print | ( | std::ostream & | ) | const |
Member Data Documentation
◆ value
Value InstanceId< Class, ValueType >::value = Value() |
Definition at line 70 of file InstanceId.h.
Referenced by Format::Format::assemble(), InstanceId< AsyncJob >::detach(), InstanceId< AsyncJob >::operator Value(), operator<<(), and InstanceId< AsyncJob >::operator==().
The documentation for this class was generated from the following file:
- src/base/InstanceId.h
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products