STUB.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 STUB
10
27#include <iostream>
28
29// Internal Special: the STUB framework requires this function
30#define stub_fatal(m) { std::cerr<<"FATAL: "<<(m)<<" for use of "<<__FUNCTION__<<"\n"; exit(EXIT_FAILURE); }
31
33#define STUB { stub_fatal(STUB_API " required"); }
34
37#define STUB_NOP { std::cerr<<"SKIP: "<<STUB_API<<" "<<__FUNCTION__<<" (not implemented).\n"; }
38
41#define STUB_RETVAL(x) { stub_fatal(STUB_API " required"); return x; }
42
45#define STUB_RETVAL_NOP(x) { std::cerr<<"SKIP: "<<STUB_API<<" "<<__FUNCTION__<<" (not implemented).\n"; return x; }
46
51#define STUB_RETREF(x) { stub_fatal(STUB_API " required"); return *(x *)nullptr; }
52
54#define STUB_RETSTATREF(x) STUB_RETREF(x)
55
56#endif /* STUB */
57

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors