AtMostOnce< T > Class Template Reference
#include <IoManip.h>
Collaboration diagram for AtMostOnce< T >:
Public Member Functions | |
AtMostOnce (const T &t) | |
caller must ensure t lifetime extends to the last use of this AtMostOnce instance More... | |
void | print (std::ostream &os) |
Private Attributes | |
const T & | toPrint |
bool | printed = false |
Detailed Description
template<class T>
class AtMostOnce< T >
Helps print T object at most once per AtMostOnce<T> object lifetime. T objects are printed to std::ostream using operator "<<".
if (detailOne)
os << headerOnce << *detailOne;
if (const auto detailTwo = findAnotherDetail())
os << headerOnce << *detailTwo;
Constructor & Destructor Documentation
◆ AtMostOnce()
template<class T >
|
inlineexplicit |
Member Function Documentation
◆ print()
template<class T >
|
inline |
Definition at line 265 of file IoManip.h.
References AtMostOnce< T >::printed, and AtMostOnce< T >::toPrint.
Referenced by operator<<().
Member Data Documentation
◆ printed
template<class T >
|
private |
Definition at line 274 of file IoManip.h.
Referenced by AtMostOnce< T >::print().
◆ toPrint
template<class T >
|
private |
Definition at line 273 of file IoManip.h.
Referenced by AtMostOnce< T >::print().
The documentation for this class was generated from the following file:
- src/base/IoManip.h
AtMostOnce(const T &t)
caller must ensure t lifetime extends to the last use of this AtMostOnce instance
Definition: IoManip.h:263
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
Miscellaneous
- Developer Resources
- Related Writings
- Related Software:
- Squid Artwork
Web Site Translations
Mirrors
- Website:
- ... full list