Packable.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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_BASE_PACKABLE_H
10#define SQUID_SRC_BASE_PACKABLE_H
11
53{
54public:
55 virtual ~Packable() {}
56
58 virtual void append(const char *buf, int size) = 0;
59
61 void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
62 {
63 va_list args;
64 va_start(args, fmt);
65 vappendf(fmt, args);
66 va_end(args);
67 }
68
80 virtual void vappendf(const char *fmt, va_list ap) = 0;
81
88 virtual void buffer() {}
89
95 virtual void flush() {}
96};
97
98#endif /* SQUID_SRC_BASE_PACKABLE_H */
99
int size
Definition: ModDevPoll.cc:75
virtual void buffer()
Definition: Packable.h:88
virtual void flush()
Definition: Packable.h:95
virtual ~Packable()
Definition: Packable.h:55
virtual void vappendf(const char *fmt, va_list ap)=0
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
Definition: Packable.h:61
virtual void append(const char *buf, int size)=0
Appends a c-string to existing packed data.
#define PRINTF_FORMAT_ARG2

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors