class TrieCaseless : public TrieCharTransform
{
- virtual char operator () (char const aChar) const {return tolower(aChar);}
+ char operator () (char const aChar) const override {return tolower(aChar);}
};
#endif /* __cplusplus */
typedef RefCount<AccessLogEntry> Pointer;
AccessLogEntry();
- virtual ~AccessLogEntry();
+ ~AccessLogEntry() override;
/* CodeContext API */
- virtual std::ostream &detailCodeContext(std::ostream &os) const override;
- virtual ScopedId codeContextGist() const override;
+ std::ostream &detailCodeContext(std::ostream &os) const override;
+ ScopedId codeContextGist() const override;
/// Fetch the client IP log string into the given buffer.
/// Knows about several alternate locations of the IP
// data from a BodyPipe
class BodySink: public BodyConsumer
{
- CBDATA_CLASS(BodySink);
+ CBDATA_CHILD(BodySink);
public:
BodySink(const BodyPipe::Pointer &bp): AsyncJob("BodySink"), body_pipe(bp) {}
- virtual ~BodySink() { assert(!body_pipe); }
+ ~BodySink() override { assert(!body_pipe); }
- virtual void noteMoreBodyDataAvailable(BodyPipe::Pointer bp) {
+ void noteMoreBodyDataAvailable(BodyPipe::Pointer bp) override {
size_t contentSize = bp->buf().contentSize();
bp->consume(contentSize);
}
- virtual void noteBodyProductionEnded(BodyPipe::Pointer) {
+ void noteBodyProductionEnded(BodyPipe::Pointer) override {
stopConsumingFrom(body_pipe);
}
- virtual void noteBodyProducerAborted(BodyPipe::Pointer) {
+ void noteBodyProducerAborted(BodyPipe::Pointer) override {
stopConsumingFrom(body_pipe);
}
- bool doneAll() const {return !body_pipe && AsyncJob::doneAll();}
+ bool doneAll() const override {return !body_pipe && AsyncJob::doneAll();}
private:
BodyPipe::Pointer body_pipe; ///< the pipe we are consuming from
Parent::Method aHandler, BodyPipe::Pointer bp):
Parent(aProducer, aHandler, bp) {}
- virtual bool canDial(AsyncCall &call);
+ bool canDial(AsyncCall &call) override;
};
// The BodyConsumerDialer is an AsyncCall class which used to schedule BodyConsumer calls.
Parent::Method aHandler, BodyPipe::Pointer bp):
Parent(aConsumer, aHandler, bp) {}
- virtual bool canDial(AsyncCall &call);
+ bool canDial(AsyncCall &call) override;
};
bool
typedef CbcPointer<BodyProducer> Pointer;
BodyProducer():AsyncJob("BodyProducer") {}
- virtual ~BodyProducer() {}
+ ~BodyProducer() override {}
virtual void noteMoreBodySpaceAvailable(RefCount<BodyPipe> bp) = 0;
virtual void noteBodyConsumerAborted(RefCount<BodyPipe> bp) = 0;
typedef CbcPointer<BodyConsumer> Pointer;
BodyConsumer():AsyncJob("BodyConsumer") {}
- virtual ~BodyConsumer() {}
+ ~BodyConsumer() override {}
virtual void noteMoreBodyDataAvailable(RefCount<BodyPipe> bp) = 0;
virtual void noteBodyProductionEnded(RefCount<BodyPipe> bp) = 0;
public:
BodyPipe(Producer *aProducer);
- ~BodyPipe(); // asserts that producer and consumer are cleared
+ ~BodyPipe() override; // asserts that producer and consumer are cleared
void setBodySize(uint64_t aSize); // set body size
bool bodySizeKnown() const { return theBodySize >= 0; }
ClientDelayPool()
: access(nullptr), rate(0), highwatermark(0) {}
- ~ClientDelayPool();
+ ~ClientDelayPool() override;
ClientDelayPool(const ClientDelayPool &) = delete;
ClientDelayPool &operator=(const ClientDelayPool &) = delete;
public:
explicit ClientInfo(const Ip::Address &);
+#if USE_DELAY_POOLS
+ ~ClientInfo() override;
+#else
~ClientInfo();
+#endif
Ip::Address addr;
void writeOrDequeue();
/* BandwidthBucket API */
- virtual int quota() override; ///< allocate quota for a just dequeued client
- virtual bool applyQuota(int &nleft, Comm::IoCallback *state) override;
- virtual void scheduleWrite(Comm::IoCallback *state) override;
- virtual void onFdClosed() override;
- virtual void reduceBucket(int len) override;
+ int quota() override; ///< allocate quota for a just dequeued client
+ bool applyQuota(int &nleft, Comm::IoCallback *state) override;
+ void scheduleWrite(Comm::IoCallback *state) override;
+ void onFdClosed() override;
+ void reduceBucket(int len) override;
void quotaDumpQueue(); ///< dumps quota queue for debugging
public:
ClientRequestContext(ClientHttpRequest *);
- ~ClientRequestContext();
+ ~ClientRequestContext() override;
bool httpStateIsValid();
void hostHeaderVerify();
public:
/* RegisteredRunner API */
CollapsedForwardingRr(): owner(nullptr) {}
- virtual ~CollapsedForwardingRr();
+ ~CollapsedForwardingRr() override;
protected:
- virtual void create();
- virtual void open();
+ void create() override;
+ void open() override;
private:
Ipc::MultiQueue::Owner *owner;
CommDialerParamsT<Params_>(aJob->toCbdata()),
method(aMeth) {}
- virtual bool canDial(AsyncCall &c) {
+ bool canDial(AsyncCall &c) override {
return JobDialer<C>::canDial(c) &&
this->params.syncWithComm();
}
- virtual void print(std::ostream &os) const {
+ void print(std::ostream &os) const override {
os << '(';
this->params.print(os);
os << ')';
Method method;
protected:
- virtual void doDial() { ((&(*this->job))->*method)(this->params); }
+ void doDial() override { ((&(*this->job))->*method)(this->params); }
};
// accept (IOACB) dialer
void dial();
- virtual void print(std::ostream &os) const;
+ void print(std::ostream &os) const override;
public:
IOACB *handler;
CommConnectCbPtrFun(CNCB *aHandler, const Params &aParams);
void dial();
- virtual void print(std::ostream &os) const;
+ void print(std::ostream &os) const override;
public:
CNCB *handler;
CommIoCbPtrFun(IOCB *aHandler, const Params &aParams);
void dial();
- virtual void print(std::ostream &os) const;
+ void print(std::ostream &os) const override;
public:
IOCB *handler;
CommCloseCbPtrFun(CLCB *aHandler, const Params &aParams);
void dial();
- virtual void print(std::ostream &os) const;
+ void print(std::ostream &os) const override;
public:
CLCB *handler;
CommTimeoutCbPtrFun(CTCB *aHandler, const Params &aParams);
void dial();
- virtual void print(std::ostream &os) const;
+ void print(std::ostream &os) const override;
public:
CTCB *handler;
AsyncCall(o.debugSection, o.debugLevel, o.name),
dialer(o.dialer) {}
- ~CommCbFunPtrCallT() {}
+ ~CommCbFunPtrCallT() override {}
- virtual CallDialer* getDialer() { return &dialer; }
+ CallDialer* getDialer() override { return &dialer; }
public:
Dialer dialer;
protected:
- inline virtual bool canFire();
- inline virtual void fire();
+ inline bool canFire() override;
+ inline void fire() override;
private:
CommCbFunPtrCallT & operator=(const CommCbFunPtrCallT &); // not defined. not permitted.
public:
typedef RefCount<CompositePoolNode> Pointer;
- virtual ~CompositePoolNode() {}
+ ~CompositePoolNode() override {}
virtual void stats(StoreEntry * sentry) =0;
virtual void dump(StoreEntry *entry) const =0;
- virtual void update(int incr) =0;
+ void update(int incr) override =0;
virtual void parse() = 0;
class CompositeSelectionDetails;
{
public:
- virtual ~ConfigOptionVector();
- virtual bool parse(char const *option, const char *value, int reconfiguring);
- virtual void dump(StoreEntry * e) const;
+ ~ConfigOptionVector() override;
+ bool parse(char const *option, const char *value, int reconfiguring) override;
+ void dump(StoreEntry * e) const override;
std::vector<ConfigOption *>options;
};
public:
ConfigOptionAdapter(C& theObject, bool (C::*parseFP)(char const *option, const char *value, int reconfiguring), void (C::*dumpFP)(StoreEntry * e) const) : object(theObject), parser(parseFP), dumper(dumpFP) {}
- bool parse(char const *option, const char *value, int isaReconf) {
+ bool parse(char const *option, const char *value, int isaReconf) override {
if (parser)
return (object.*parser)(option, value, isaReconf);
return false;
}
- void dump(StoreEntry * e) const {
+ void dump(StoreEntry * e) const override {
if (dumper)
(object.*dumper)(e);
}
public:
typedef RefCount<DelayIdComposite> Pointer;
- virtual inline ~DelayIdComposite() {}
+ inline ~DelayIdComposite() override {}
virtual int bytesWanted (int min, int max) const =0;
virtual void bytesIn(int qty) = 0;
void stats(StoreEntry *)const;
DelayTaggedBucket(String &aTag);
- ~DelayTaggedBucket();
+ ~DelayTaggedBucket() override;
DelayBucket theBucket;
String tag;
};
typedef RefCount<DelayTagged> Pointer;
DelayTagged();
- virtual ~DelayTagged();
- virtual void stats(StoreEntry * sentry);
- virtual void dump(StoreEntry *entry) const;
- virtual void update(int incr);
- virtual void parse();
+ ~DelayTagged() override;
+ void stats(StoreEntry * sentry) override;
+ void dump(StoreEntry *entry) const override;
+ void update(int incr) override;
+ void parse() override;
- virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
+ DelayIdComposite::Pointer id(CompositeSelectionDetails &) override;
private:
public:
Id (RefCount<DelayTagged>, String &);
- ~Id();
- virtual int bytesWanted (int min, int max) const;
- virtual void bytesIn(int qty);
- virtual void delayRead(const AsyncCallPointer &);
+ ~Id() override;
+ int bytesWanted (int min, int max) const override;
+ void bytesIn(int qty) override;
+ void delayRead(const AsyncCallPointer &) override;
private:
RefCount<DelayTagged> theTagged;
void stats(StoreEntry *)const;
DelayUserBucket(Auth::User::Pointer);
- ~DelayUserBucket();
+ ~DelayUserBucket() override;
DelayBucket theBucket;
Auth::User::Pointer authUser;
};
public:
typedef RefCount<DelayUser> Pointer;
DelayUser();
- virtual ~DelayUser();
- virtual void stats(StoreEntry * sentry);
- virtual void dump(StoreEntry *entry) const;
- virtual void update(int incr);
- virtual void parse();
+ ~DelayUser() override;
+ void stats(StoreEntry * sentry) override;
+ void dump(StoreEntry *entry) const override;
+ void update(int incr) override;
+ void parse() override;
- virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
+ DelayIdComposite::Pointer id(CompositeSelectionDetails &) override;
private:
public:
Id(RefCount<DelayUser>, Auth::User::Pointer);
- ~Id();
- virtual int bytesWanted (int min, int max) const;
- virtual void bytesIn(int qty);
+ ~Id() override;
+ int bytesWanted (int min, int max) const override;
+ void bytesIn(int qty) override;
private:
RefCount<DelayUser> theUser;
public:
typedef RefCount<DelayVector> Pointer;
DelayVector();
- virtual ~DelayVector();
- virtual void stats(StoreEntry * sentry);
- virtual void dump(StoreEntry *entry) const;
- virtual void update(int incr);
- virtual void parse();
+ ~DelayVector() override;
+ void stats(StoreEntry * sentry) override;
+ void dump(StoreEntry *entry) const override;
+ void update(int incr) override;
+ void parse() override;
- virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
+ DelayIdComposite::Pointer id(CompositeSelectionDetails &) override;
void push_back (CompositePoolNode::Pointer);
private:
public:
Id (RefCount<DelayVector>,CompositeSelectionDetails &);
- ~Id();
- virtual int bytesWanted (int min, int max) const;
- virtual void bytesIn(int qty);
- virtual void delayRead(const AsyncCallPointer &);
+ ~Id() override;
+ int bytesWanted (int min, int max) const override;
+ void bytesIn(int qty) override;
+ void delayRead(const AsyncCallPointer &) override;
private:
RefCount<DelayVector> theVector;
friend class AIODiskIOStrategy;
AIODiskFile (char const *path, AIODiskIOStrategy *);
- ~AIODiskFile();
+ ~AIODiskFile() override;
/// \bug the code has this as "IORequestor::Pointer callback"
- virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback);
+ void open(int flags, mode_t mode, RefCount<IORequestor> callback) override;
- virtual void create (int, mode_t, RefCount<IORequestor>);
- virtual void read(ReadRequest *);
- virtual void write(WriteRequest *);
- virtual void close ();
- virtual bool canRead() const;
- virtual bool canWrite() const;
+ void create (int, mode_t, RefCount<IORequestor>) override;
+ void read(ReadRequest *) override;
+ void write(WriteRequest *) override;
+ void close () override;
+ bool canRead() const override;
+ bool canWrite() const override;
/* During migration only */
- virtual int getFD() const;
+ int getFD() const override;
- virtual bool error() const;
+ bool error() const override;
/* Inform callers if there is IO in progress */
- virtual bool ioInProgress() const;
+ bool ioInProgress() const override;
private:
void error(bool const &);
public:
static AIODiskIOModule &GetInstance();
AIODiskIOModule();
- virtual void init();
- virtual void gracefulShutdown();
- virtual char const *type () const;
- virtual DiskIOStrategy* createStrategy();
+ void init() override;
+ void gracefulShutdown() override;
+ char const *type () const override;
+ DiskIOStrategy* createStrategy() override;
private:
static AIODiskIOModule Instance;
public:
AIODiskIOStrategy();
- virtual ~AIODiskIOStrategy();
+ ~AIODiskIOStrategy() override;
- virtual bool shedLoad();
+ bool shedLoad() override;
/* What is the current load? 999 = 99.9% */
- virtual int load();
+ int load() override;
/* Return a handle for performing IO operations */
- virtual RefCount<DiskFile> newFile (char const *path);
+ RefCount<DiskFile> newFile (char const *path) override;
/* flush all IO operations */
- virtual void sync();
+ void sync() override;
/** whether the IO Strategy can use unlinkd */
- virtual bool unlinkdUseful() const;
+ bool unlinkdUseful() const override;
/* unlink a file by path */
- virtual void unlinkFile (char const *);
+ void unlinkFile (char const *) override;
/* perform any pending callbacks */
- virtual int callback();
+ int callback() override;
/* Init per-instance logic */
- virtual void init();
+ void init() override;
/* cachemgr output on the IO instance stats */
- virtual void statfs(StoreEntry & sentry)const;
+ void statfs(StoreEntry & sentry)const override;
/* module specific options */
- virtual ConfigOption *getOptionTree() const;
+ ConfigOption *getOptionTree() const override;
/* a file descriptor */
int fd;
/* queue of requests */
public:
static BlockingDiskIOModule &GetInstance();
BlockingDiskIOModule();
- virtual void init();
- virtual void gracefulShutdown();
- virtual char const *type () const;
- virtual DiskIOStrategy* createStrategy();
+ void init() override;
+ void gracefulShutdown() override;
+ char const *type () const override;
+ DiskIOStrategy* createStrategy() override;
private:
static BlockingDiskIOModule Instance;
public:
BlockingFile(char const *path);
- ~BlockingFile();
- virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback);
- virtual void create(int flags, mode_t mode, RefCount<IORequestor> callback);
- virtual void read(ReadRequest *);
- virtual void write(WriteRequest *);
- virtual void close();
- virtual bool error() const;
- virtual int getFD() const { return fd;}
-
- virtual bool canRead() const;
- virtual bool ioInProgress() const;
+ ~BlockingFile() override;
+ void open(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+ void create(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+ void read(ReadRequest *) override;
+ void write(WriteRequest *) override;
+ void close() override;
+ bool error() const override;
+ int getFD() const override { return fd;}
+
+ bool canRead() const override;
+ bool ioInProgress() const override;
private:
static DRCB ReadDone;
{
public:
- virtual bool shedLoad();
- virtual int load();
- virtual RefCount<DiskFile> newFile(char const *path);
- virtual bool unlinkdUseful() const;
- virtual void unlinkFile (char const *);
+ bool shedLoad() override;
+ int load() override;
+ RefCount<DiskFile> newFile(char const *path) override;
+ bool unlinkdUseful() const override;
+ void unlinkFile (char const *) override;
};
#endif /* SQUID_BLOCKINGIOSTRATEGY_H */
public:
static DiskDaemonDiskIOModule &GetInstance();
DiskDaemonDiskIOModule();
- virtual void init();
- virtual void gracefulShutdown();
- virtual char const *type () const;
- virtual DiskIOStrategy* createStrategy();
+ void init() override;
+ void gracefulShutdown() override;
+ char const *type () const override;
+ DiskIOStrategy* createStrategy() override;
private:
static DiskDaemonDiskIOModule Instance;
public:
static Pointer Create(const Mgr::CommandPointer &aCmd);
/* Action API */
- virtual void add(const Mgr::Action& action);
- virtual void pack(Ipc::TypedMsgHdr& hdrMsg) const;
- virtual void unpack(const Ipc::TypedMsgHdr& hdrMsg);
+ void add(const Mgr::Action& action) override;
+ void pack(Ipc::TypedMsgHdr& hdrMsg) const override;
+ void unpack(const Ipc::TypedMsgHdr& hdrMsg) override;
protected:
/* Action API */
- virtual void collect();
- virtual void dump(StoreEntry* entry);
+ void collect() override;
+ void dump(StoreEntry* entry) override;
private:
DiskdActionData data;
public:
DiskdFile(char const *path, DiskdIOStrategy *);
- ~DiskdFile();
- virtual void open(int flags, mode_t aMode, RefCount<IORequestor> callback);
- virtual void create(int flags, mode_t aMode, RefCount<IORequestor> callback);
- virtual void read(ReadRequest *);
- virtual void write(WriteRequest *);
- virtual void close();
- virtual bool error() const;
- virtual bool canRead() const;
- virtual bool ioInProgress() const;
+ ~DiskdFile() override;
+ void open(int flags, mode_t aMode, RefCount<IORequestor> callback) override;
+ void create(int flags, mode_t aMode, RefCount<IORequestor> callback) override;
+ void read(ReadRequest *) override;
+ void write(WriteRequest *) override;
+ void close() override;
+ bool error() const override;
+ bool canRead() const override;
+ bool ioInProgress() const override;
/* Temporary */
int getID() const {return id;}
public:
DiskdIOStrategy();
- virtual bool shedLoad();
- virtual int load();
- virtual RefCount<DiskFile> newFile(char const *path);
- virtual bool unlinkdUseful() const;
- virtual void unlinkFile (char const *);
- virtual ConfigOption *getOptionTree() const;
- virtual void init();
- virtual void sync();
- virtual int callback();
- virtual void statfs(StoreEntry & sentry) const;
+ bool shedLoad() override;
+ int load() override;
+ RefCount<DiskFile> newFile(char const *path) override;
+ bool unlinkdUseful() const override;
+ void unlinkFile (char const *) override;
+ ConfigOption *getOptionTree() const override;
+ void init() override;
+ void sync() override;
+ int callback() override;
+ void statfs(StoreEntry & sentry) const override;
int send(int mtype, int id, DiskdFile *theFile, size_t size, off_t offset, ssize_t shm_offset, Lock *requestor);
/** public for accessing return address's */
public:
SingletonIOStrategy(DiskIOStrategy *anIO) : io(anIO) {}
- virtual bool shedLoad() { return io->shedLoad(); }
+ bool shedLoad() override { return io->shedLoad(); }
- virtual int load() { return io->load(); }
+ int load() override { return io->load(); }
- virtual RefCount<DiskFile> newFile (char const *path) {return io->newFile(path); }
+ RefCount<DiskFile> newFile (char const *path) override {return io->newFile(path); }
- virtual void sync() { io->sync(); }
+ void sync() override { io->sync(); }
- virtual bool unlinkdUseful() const { return io->unlinkdUseful(); }
+ bool unlinkdUseful() const override { return io->unlinkdUseful(); }
- virtual void unlinkFile(char const *path) { io->unlinkFile(path); }
+ void unlinkFile(char const *path) override { io->unlinkFile(path); }
- virtual int callback() { return io->callback(); }
+ int callback() override { return io->callback(); }
- virtual void init() { io->init(); }
+ void init() override { io->init(); }
- virtual void statfs(StoreEntry & sentry) const { io->statfs(sentry); }
+ void statfs(StoreEntry & sentry) const override { io->statfs(sentry); }
- virtual ConfigOption *getOptionTree() const { return io->getOptionTree(); }
+ ConfigOption *getOptionTree() const override { return io->getOptionTree(); }
private:
DiskIOStrategy *io;
public:
DiskThreadsDiskFile(char const *path);
- ~DiskThreadsDiskFile();
- virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback);
- virtual void create(int flags, mode_t mode, RefCount<IORequestor> callback);
- virtual void read(ReadRequest *);
- virtual void write(WriteRequest *);
- virtual void close();
- virtual bool error() const;
- virtual int getFD() const { return fd;}
-
- virtual bool canRead() const;
- virtual bool canWrite() const;
- virtual bool ioInProgress() const;
+ ~DiskThreadsDiskFile() override;
+ void open(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+ void create(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+ void read(ReadRequest *) override;
+ void write(WriteRequest *) override;
+ void close() override;
+ bool error() const override;
+ int getFD() const override { return fd;}
+
+ bool canRead() const override;
+ bool canWrite() const override;
+ bool ioInProgress() const override;
private:
#if ASYNC_READ
public:
static DiskThreadsDiskIOModule &GetInstance();
DiskThreadsDiskIOModule();
- virtual void init();
+ void init() override;
//virtual void registerWithCacheManager(void);
- virtual void gracefulShutdown();
- virtual char const *type () const;
- virtual DiskIOStrategy* createStrategy();
+ void gracefulShutdown() override;
+ char const *type () const override;
+ DiskIOStrategy* createStrategy() override;
private:
static DiskThreadsDiskIOModule Instance;
public:
DiskThreadsIOStrategy();
- virtual bool shedLoad();
- virtual int load();
- virtual RefCount<DiskFile> newFile(char const *path);
- virtual bool unlinkdUseful() const;
- virtual void unlinkFile (char const *);
- virtual int callback();
- virtual void sync();
- virtual void init();
+ bool shedLoad() override;
+ int load() override;
+ RefCount<DiskFile> newFile(char const *path) override;
+ bool unlinkdUseful() const override;
+ void unlinkFile (char const *) override;
+ int callback() override;
+ void sync() override;
+ void init() override;
void done();
/* Todo: add access limitations */
bool initialised;
public:
static IpcIoDiskIOModule &GetInstance();
IpcIoDiskIOModule();
- virtual void init();
- virtual void gracefulShutdown();
- virtual char const *type () const;
- virtual DiskIOStrategy* createStrategy();
+ void init() override;
+ void gracefulShutdown() override;
+ char const *type () const override;
+ DiskIOStrategy* createStrategy() override;
private:
static IpcIoDiskIOModule Instance;
public:
/* RegisteredRunner API */
IpcIoRr(): owner(nullptr) {}
- virtual ~IpcIoRr();
- virtual void claimMemoryNeeds();
+ ~IpcIoRr() override;
+ void claimMemoryNeeds() override;
protected:
/* Ipc::Mem::RegisteredRunner API */
- virtual void create();
+ void create() override;
private:
Ipc::FewToFewBiQueue::Owner *owner;
typedef RefCount<IpcIoFile> Pointer;
IpcIoFile(char const *aDb);
- virtual ~IpcIoFile();
+ ~IpcIoFile() override;
/* DiskFile API */
- virtual void configure(const Config &cfg);
- virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback);
- virtual void create(int flags, mode_t mode, RefCount<IORequestor> callback);
- virtual void read(ReadRequest *);
- virtual void write(WriteRequest *);
- virtual void close();
- virtual bool error() const;
- virtual int getFD() const;
- virtual bool canRead() const;
- virtual bool canWrite() const;
- virtual bool ioInProgress() const;
+ void configure(const Config &cfg) override;
+ void open(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+ void create(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+ void read(ReadRequest *) override;
+ void write(WriteRequest *) override;
+ void close() override;
+ bool error() const override;
+ int getFD() const override;
+ bool canRead() const override;
+ bool canWrite() const override;
+ bool ioInProgress() const override;
/// handle open response from coordinator
static void HandleOpenResponse(const Ipc::StrandMessage &);
{
public:
- virtual bool shedLoad();
- virtual int load();
- virtual RefCount<DiskFile> newFile(char const *path);
- virtual bool unlinkdUseful() const;
- virtual void unlinkFile (char const *);
+ bool shedLoad() override;
+ int load() override;
+ RefCount<DiskFile> newFile(char const *path) override;
+ bool unlinkdUseful() const override;
+ void unlinkFile (char const *) override;
};
#endif /* SQUID_IPC_IOIOSTRATEGY_H */
public:
static MmappedDiskIOModule &GetInstance();
MmappedDiskIOModule();
- virtual void init();
- virtual void gracefulShutdown();
- virtual char const *type () const;
- virtual DiskIOStrategy* createStrategy();
+ void init() override;
+ void gracefulShutdown() override;
+ char const *type () const override;
+ DiskIOStrategy* createStrategy() override;
private:
static MmappedDiskIOModule Instance;
public:
MmappedFile(char const *path);
- ~MmappedFile();
- virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback);
- virtual void create(int flags, mode_t mode, RefCount<IORequestor> callback);
- virtual void read(ReadRequest *);
- virtual void write(WriteRequest *);
- virtual void close();
- virtual bool error() const;
- virtual int getFD() const { return fd;}
-
- virtual bool canRead() const;
- virtual bool canWrite() const;
- virtual bool ioInProgress() const;
+ ~MmappedFile() override;
+ void open(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+ void create(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+ void read(ReadRequest *) override;
+ void write(WriteRequest *) override;
+ void close() override;
+ bool error() const override;
+ int getFD() const override { return fd;}
+
+ bool canRead() const override;
+ bool canWrite() const override;
+ bool ioInProgress() const override;
private:
char const *path_;
{
public:
- virtual bool shedLoad();
- virtual int load();
- virtual RefCount<DiskFile> newFile(char const *path);
- virtual bool unlinkdUseful() const;
- virtual void unlinkFile (char const *);
+ bool shedLoad() override;
+ int load() override;
+ RefCount<DiskFile> newFile(char const *path) override;
+ bool unlinkdUseful() const override;
+ void unlinkFile (char const *) override;
};
#endif /* SQUID_MMAPPEDIOSTRATEGY_H */
public:
typedef RefCount<ReadRequest> Pointer;
ReadRequest(char *buf, off_t offset, size_t len);
- virtual ~ReadRequest() {}
+ ~ReadRequest() override {}
char *buf;
off_t offset;
public:
typedef RefCount<WriteRequest> Pointer;
WriteRequest(char const *buf, off_t offset, size_t len, FREE *);
- virtual ~WriteRequest() {}
+ ~WriteRequest() override {}
char const *buf;
off_t offset;
typedef RefCount<DownloaderContext> Pointer;
DownloaderContext(Downloader *dl, ClientHttpRequest *h);
- ~DownloaderContext();
+ ~DownloaderContext() override;
void finished();
CbcPointer<Downloader> downloader;
/// certificate chains.
class Downloader: virtual public AsyncJob
{
- CBDATA_CLASS(Downloader);
+ CBDATA_CHILD(Downloader);
public:
using Answer = DownloaderAnswer;
Downloader(const SBuf &url, const AsyncCallback<Answer> &, const MasterXactionPointer &, unsigned int level = 0);
- virtual ~Downloader();
- virtual void swanSong();
+ ~Downloader() override;
+ void swanSong() override;
/// delays destruction to protect doCallouts()
void downloadFinished();
protected:
/* AsyncJob API */
- virtual bool doneAll() const;
- virtual void start();
+ bool doneAll() const override;
+ void start() override;
private:
public:
static ExternalACLLookup *Instance();
- virtual void checkForAsync(ACLChecklist *)const;
+ void checkForAsync(ACLChecklist *)const override;
// If possible, starts an asynchronous lookup of an external ACL.
// Otherwise, asserts (or bails if background refresh is requested).
static void ExternalAclLookup(ACLChecklist * ch, ACLExternal *);
ACLExternal(char const *);
- ~ACLExternal();
+ ~ACLExternal() override;
- virtual char const *typeString() const;
- virtual void parse();
- virtual int match(ACLChecklist *checklist);
+ char const *typeString() const override;
+ void parse() override;
+ int match(ACLChecklist *checklist) override;
/* This really should be dynamic based on the external class defn */
- virtual bool requiresAle() const {return true;}
- virtual bool requiresRequest() const {return true;}
+ bool requiresAle() const override {return true;}
+ bool requiresRequest() const override {return true;}
/* when requiresRequest is made dynamic, review this too */
// virtual bool requiresReply() const {return true;}
- virtual bool isProxyAuth() const;
- virtual SBufList dump() const;
- virtual bool valid () const;
- virtual bool empty () const;
+ bool isProxyAuth() const override;
+ SBufList dump() const override;
+ bool valid () const override;
+ bool empty () const override;
protected:
external_acl_data *data;
public:
ExternalACLEntry();
- ~ExternalACLEntry();
+ ~ExternalACLEntry() override;
void update(ExternalACLEntryData const &);
dlink_node lru;
public:
typedef RefCount<FwdState> Pointer;
- virtual ~FwdState();
+ ~FwdState() override;
static void initModule();
/// Initiates request forwarding to a peer or origin server.
void stopAndDestroy(const char *reason);
/* PeerSelectionInitiator API */
- virtual void noteDestination(Comm::ConnectionPointer conn) override;
- virtual void noteDestinationsEnd(ErrorState *selectionError) override;
+ void noteDestination(Comm::ConnectionPointer conn) override;
+ void noteDestinationsEnd(ErrorState *selectionError) override;
bool transporting() const;
PrimeChanceGiver(): HappyOrderEnforcer("happy_eyeballs_connect_timeout enforcement") {}
/* HappyOrderEnforcer API */
- virtual bool readyNow(const HappyConnOpener &job) const override;
+ bool readyNow(const HappyConnOpener &job) const override;
private:
/* HappyOrderEnforcer API */
- virtual AsyncCall::Pointer notify(const CbcPointer<HappyConnOpener> &) override;
+ AsyncCall::Pointer notify(const CbcPointer<HappyConnOpener> &) override;
};
/// enforces happy_eyeballs_connect_gap and happy_eyeballs_connect_limit
SpareAllowanceGiver(): HappyOrderEnforcer("happy_eyeballs_connect_gap/happy_eyeballs_connect_limit enforcement") {}
/* HappyOrderEnforcer API */
- virtual bool readyNow(const HappyConnOpener &job) const override;
+ bool readyNow(const HappyConnOpener &job) const override;
/// reacts to HappyConnOpener discovering readyNow() conditions for a spare path
/// the caller must attempt to open a spare connection immediately
private:
/* HappyOrderEnforcer API */
- virtual AsyncCall::Pointer notify(const CbcPointer<HappyConnOpener> &) override;
+ AsyncCall::Pointer notify(const CbcPointer<HappyConnOpener> &) override;
bool concurrencyLimitReached() const;
void recordAllowance();
public:
HappyConnOpener(const ResolvedPeersPointer &, const AsyncCallback<Answer> &, const HttpRequestPointer &, time_t aFwdStart, int tries, const AccessLogEntryPointer &);
- virtual ~HappyConnOpener() override;
+ ~HappyConnOpener() override;
/// configures reuse of old connections
void allowPersistent(bool permitted) { allowPconn_ = permitted; }
friend std::ostream &operator <<(std::ostream &, const Attempt &);
/* AsyncJob API */
- virtual void start() override;
- virtual bool doneAll() const override;
- virtual void swanSong() override;
- virtual const char *status() const override;
+ void start() override;
+ bool doneAll() const override;
+ void swanSong() override;
+ const char *status() const override;
void maybeOpenPrimeConnection();
void maybeOpenSpareConnection();
typedef RefCount<HttpReply> Pointer;
HttpReply();
- ~HttpReply();
+ ~HttpReply() override;
- virtual void reset();
+ void reset() override;
/* Http::Message API */
- virtual bool sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error);
+ bool sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error) override;
/** \par public, readable; never update these or their .hdr equivalents directly */
time_t date;
bool do_clean;
public:
- virtual int httpMsgParseError();
+ int httpMsgParseError() override;
- virtual bool expectingBody(const HttpRequestMethod&, int64_t&) const;
+ bool expectingBody(const HttpRequestMethod&, int64_t&) const override;
- virtual bool inheritProperties(const Http::Message *);
+ bool inheritProperties(const Http::Message *) override;
/// \returns nil (if no updates are necessary)
/// \returns a new reply combining this reply with 304 updates (otherwise)
/** Clone this reply.
* Could be done as a copy-contructor but we do not want to accidentally copy a HttpReply..
*/
- HttpReply *clone() const;
+ HttpReply *clone() const override;
- virtual void hdrCacheInit();
+ void hdrCacheInit() override;
/// whether our Date header value is smaller than theirs
/// \returns false if any information is missing
/// Some response status codes prohibit sending Content-Length (RFC 7230 section 3.3.2).
void removeIrrelevantContentLength();
- virtual void configureContentLengthInterpreter(Http::ContentLengthInterpreter &);
+ void configureContentLengthInterpreter(Http::ContentLengthInterpreter &) override;
/// parses reply header using Parser
bool parseHeader(Http1::Parser &hp);
HttpHdrContRange *content_range; ///< parsed Content-Range; nil for non-206 responses!
protected:
- virtual void packFirstLineInto(Packable * p, bool) const { sline.packInto(p); }
+ void packFirstLineInto(Packable * p, bool) const override { sline.packInto(p); }
- virtual bool parseFirstLine(const char *start, const char *end);
+ bool parseFirstLine(const char *start, const char *end) override;
};
#endif /* SQUID_HTTPREPLY_H */
HttpRequest(const MasterXaction::Pointer &);
HttpRequest(const HttpRequestMethod& aMethod, AnyP::ProtocolType aProtocol, const char *schemeImage, const char *aUrlpath, const MasterXaction::Pointer &);
- ~HttpRequest();
- virtual void reset();
+ ~HttpRequest() override;
+ void reset() override;
void initHTTP(const HttpRequestMethod& aMethod, AnyP::ProtocolType aProtocol, const char *schemeImage, const char *aUrlpath);
- virtual HttpRequest *clone() const;
+ HttpRequest *clone() const override;
/// Whether response to this request is potentially cachable
/// \retval false Not cacheable.
public:
bool multipartRangeRequest() const;
- bool parseFirstLine(const char *start, const char *end);
+ bool parseFirstLine(const char *start, const char *end) override;
- virtual bool expectingBody(const HttpRequestMethod& unused, int64_t&) const;
+ bool expectingBody(const HttpRequestMethod& unused, int64_t&) const override;
bool bodyNibbled() const; // the request has a [partially] consumed body
NotePairs::Pointer notes();
bool hasNotes() const { return bool(theNotes) && !theNotes->empty(); }
- virtual void configureContentLengthInterpreter(Http::ContentLengthInterpreter &) {}
+ void configureContentLengthInterpreter(Http::ContentLengthInterpreter &) override {}
/// Check whether the message framing headers are valid.
/// \returns Http::scNone or an HTTP error status
/// and(or) by annotate_transaction/annotate_client ACLs.
NotePairs::Pointer theNotes;
protected:
- virtual void packFirstLineInto(Packable * p, bool full_uri) const;
+ void packFirstLineInto(Packable * p, bool full_uri) const override;
- virtual bool sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error);
+ bool sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error) override;
- virtual void hdrCacheInit();
+ void hdrCacheInit() override;
- virtual bool inheritProperties(const Http::Message *);
+ bool inheritProperties(const Http::Message *) override;
};
class ConnStateData;
public:
ICPState(icp_common_t &aHeader, HttpRequest *aRequest);
- virtual ~ICPState();
+ ~ICPState() override;
/// whether the cache contains the requested entry
bool isHit() const;
protected:
/* StoreClient API */
- virtual LogTags *loggingTags() const override;
- virtual void fillChecklist(ACLFilledChecklist &) const override;
+ LogTags *loggingTags() const override;
+ void fillChecklist(ACLFilledChecklist &) const override;
/// either confirms and starts processing a cache hit or returns false
bool confirmAndPrepHit(const StoreEntry &) const;
capacity(0),
stolen(0)
{}
- virtual ~MemBuf() {
+ ~MemBuf() override {
if (!stolen && buf)
clean();
}
FREE *freeFunc();
/* Packable API */
- virtual void append(const char *c, int sz);
- virtual void vappendf(const char *fmt, va_list ap);
+ void append(const char *c, int sz) override;
+ void vappendf(const char *fmt, va_list ap) override;
private:
/**
ShmWriter(MemStore &aStore, StoreEntry *anEntry, const sfileno aFileNo, Ipc::StoreMapSliceId aFirstSlice = -1);
/* Packable API */
- virtual void append(const char *aBuf, int aSize) override;
- virtual void vappendf(const char *fmt, va_list ap) override;
+ void append(const char *aBuf, int aSize) override;
+ void vappendf(const char *fmt, va_list ap) override;
public:
StoreEntry *entry; ///< the entry being updated
public:
/* RegisteredRunner API */
MemStoreRr(): spaceOwner(nullptr), mapOwner(nullptr), extrasOwner(nullptr) {}
- virtual void finalizeConfig();
- virtual void claimMemoryNeeds();
- virtual void useConfig();
- virtual ~MemStoreRr();
+ void finalizeConfig() override;
+ void claimMemoryNeeds() override;
+ void useConfig() override;
+ ~MemStoreRr() override;
protected:
/* Ipc::Mem::RegisteredRunner API */
- virtual void create();
+ void create() override;
private:
Ipc::Mem::Owner<Ipc::Mem::PageStack> *spaceOwner; ///< free slices Owner
{
public:
MemStore();
- virtual ~MemStore();
+ ~MemStore() override;
/// whether e should be kept in local RAM for possible future caching
bool keepInLocalMemory(const StoreEntry &e) const;
void disconnect(StoreEntry &e);
/* Storage API */
- virtual void create() override {}
- virtual void init() override;
- virtual StoreEntry *get(const cache_key *) override;
- virtual uint64_t maxSize() const override;
- virtual uint64_t minSize() const override;
- virtual uint64_t currentSize() const override;
- virtual uint64_t currentCount() const override;
- virtual int64_t maxObjectSize() const override;
- virtual void getStats(StoreInfoStats &stats) const override;
- virtual void stat(StoreEntry &e) const override;
- virtual void reference(StoreEntry &e) override;
- virtual bool dereference(StoreEntry &e) override;
- virtual void updateHeaders(StoreEntry *e) override;
- virtual void maintain() override;
- virtual bool anchorToCache(StoreEntry &) override;
- virtual bool updateAnchored(StoreEntry &) override;
- virtual void evictCached(StoreEntry &) override;
- virtual void evictIfFound(const cache_key *) override;
+ void create() override {}
+ void init() override;
+ StoreEntry *get(const cache_key *) override;
+ uint64_t maxSize() const override;
+ uint64_t minSize() const override;
+ uint64_t currentSize() const override;
+ uint64_t currentCount() const override;
+ int64_t maxObjectSize() const override;
+ void getStats(StoreInfoStats &stats) const override;
+ void stat(StoreEntry &e) const override;
+ void reference(StoreEntry &e) override;
+ bool dereference(StoreEntry &e) override;
+ void updateHeaders(StoreEntry *e) override;
+ void maintain() override;
+ bool anchorToCache(StoreEntry &) override;
+ bool updateAnchored(StoreEntry &) override;
+ void evictCached(StoreEntry &) override;
+ void evictIfFound(const cache_key *) override;
/// whether Squid is correctly configured to use a shared memory cache
static bool Enabled() { return EntryLimit() > 0; }
sfileno reserveSapForWriting(Ipc::Mem::PageId &page);
// Ipc::StoreMapCleaner API
- virtual void noteFreeMapSlice(const Ipc::StoreMapSliceId sliceId) override;
+ void noteFreeMapSlice(const Ipc::StoreMapSliceId sliceId) override;
private:
// TODO: move freeSlots into map
MessageBucket(const int speed, const int initialLevelPercent, const double sizeLimit, MessageDelayPool::Pointer pool);
/* BandwidthBucket API */
- virtual int quota() override;
- virtual void scheduleWrite(Comm::IoCallback *state) override;
- virtual void reduceBucket(int len) override;
+ int quota() override;
+ void scheduleWrite(Comm::IoCallback *state) override;
+ void reduceBucket(int len) override;
private:
MessageDelayPool::Pointer theAggregate;
MessageDelayPool(const SBuf &name, int64_t bucketSpeed, int64_t bucketSize,
int64_t aggregateSpeed, int64_t aggregateSize, uint16_t initialBucketPercent);
- ~MessageDelayPool();
+ ~MessageDelayPool() override;
MessageDelayPool(const MessageDelayPool &) = delete;
MessageDelayPool &operator=(const MessageDelayPool &) = delete;
enum Method { mhReplace, mhAppend };
Value(const char *aVal, const bool quoted, const char *descr, const Method method = mhReplace);
- ~Value();
+ ~Value() override;
Value(const Value&) = delete;
Value &operator=(const Value&) = delete;
explicit Notes(const char *aDescr, const Keys *extraReservedKeys = nullptr, bool allowFormatted = true);
Notes() = default;
- ~Notes() { notes.clear(); }
+ ~Notes() override { notes.clear(); }
Notes(const Notes&) = delete;
Notes &operator=(const Notes&) = delete;
MEMPROXY_CLASS(NullDelayId);
public:
- virtual int bytesWanted (int minimum, int maximum) const {return max(minimum,maximum);}
+ int bytesWanted (int minimum, int maximum) const override {return max(minimum,maximum);}
- virtual void bytesIn(int) {}
+ void bytesIn(int) override {}
};
#endif
#endif /* NULLDELAYID_H */
{
public:
/* RegisteredRunner API */
- virtual void useConfig() { syncConfig(); }
- virtual void syncConfig();
+ void useConfig() override { syncConfig(); }
+ void syncConfig() override;
};
RunnerRegistrationEntry(PeerPoolMgrsRr);
/// Maintains an fixed-size "standby" PconnPool for a single CachePeer.
class PeerPoolMgr: public AsyncJob
{
- CBDATA_CLASS(PeerPoolMgr);
+ CBDATA_CHILD(PeerPoolMgr);
public:
typedef CbcPointer<PeerPoolMgr> Pointer;
static void Checkpoint(const Pointer &mgr, const char *reason);
explicit PeerPoolMgr(CachePeer *aPeer);
- virtual ~PeerPoolMgr();
+ ~PeerPoolMgr() override;
protected:
/* AsyncJob API */
- virtual void start();
- virtual void swanSong();
- virtual bool doneAll() const;
+ void start() override;
+ void swanSong() override;
+ bool doneAll() const override;
/// whether the peer is still out there and in a valid state we can safely use
bool validPeer() const;
class PeerSelectionInitiator: public CbdataParent
{
public:
- virtual ~PeerSelectionInitiator() = default;
+ ~PeerSelectionInitiator() override = default;
/// called when a new unique destination has been found
virtual void noteDestination(Comm::ConnectionPointer path) = 0;
public:
explicit PeerSelector(PeerSelectionInitiator*);
- virtual ~PeerSelector() override;
+ ~PeerSelector() override;
/* Dns::IpReceiver API */
- virtual void noteIp(const Ip::Address &ip) override;
- virtual void noteIps(const Dns::CachedIps *ips, const Dns::LookupDetails &details) override;
- virtual void noteLookup(const Dns::LookupDetails &details) override;
+ void noteIp(const Ip::Address &ip) override;
+ void noteIps(const Dns::CachedIps *ips, const Dns::LookupDetails &details) override;
+ void noteLookup(const Dns::LookupDetails &details) override;
// Produce a URL for display identifying the transaction we are
// trying to locate a peer for.
protected:
explicit SBufStatsAction(const Mgr::CommandPointer &cmd);
/* Mgr::Action API */
- virtual void collect();
- virtual void dump(StoreEntry* entry);
+ void collect() override;
+ void dump(StoreEntry* entry) override;
private:
/* Mgr::Action API */
- virtual void add(const Mgr::Action& action);
- virtual void pack(Ipc::TypedMsgHdr& msg) const;
- virtual void unpack(const Ipc::TypedMsgHdr& msg);
+ void add(const Mgr::Action& action) override;
+ void pack(Ipc::TypedMsgHdr& msg) const override;
+ void unpack(const Ipc::TypedMsgHdr& msg) override;
SBufStats sbdata;
MemBlobStats mbdata;
const char *getMD5Text() const;
StoreEntry();
- virtual ~StoreEntry();
+ ~StoreEntry() override;
MemObject &mem() { assert(mem_obj); return *mem_obj; }
const MemObject &mem() const { assert(mem_obj); return *mem_obj; }
#endif
/* Packable API */
- virtual void append(char const *, int);
- virtual void vappendf(const char *, va_list);
- virtual void buffer();
- virtual void flush();
+ void append(char const *, int) override;
+ void vappendf(const char *, va_list) override;
+ void buffer() override;
+ void flush() override;
protected:
typedef Store::EntryGuard EntryGuard;
{
public:
- virtual ~StoreClient () {}
+ ~StoreClient () override {}
/// \return LogTags (if the class logs transactions) or nil (otherwise)
virtual LogTags *loggingTags() const = 0;
void operator delete (void *address);
StoreIOState(StoreIOState::STFNCB *cbFile, StoreIOState::STIOCB *cbIo, void *data);
- virtual ~StoreIOState();
+ ~StoreIOState() override;
off_t offset() const {return offset_;}
StoreSearch() {}
StoreSearch(StoreSearch const &); /* no implementation - trigger link failures */
- virtual ~StoreSearch() {}
+ ~StoreSearch() override {}
/* not ready yet
void asList(void (*) (CbDataList<StoreEntryPointer), void *cbdata);
{
public:
/* RegisteredRunner API */
- virtual void useConfig();
- virtual ~TransientsRr();
+ void useConfig() override;
+ ~TransientsRr() override;
protected:
- virtual void create();
+ void create() override;
private:
TransientsMap::Owner *mapOwner = nullptr;
};
Transients();
- virtual ~Transients();
+ ~Transients() override;
/// return a local, previously collapsed entry
StoreEntry *findCollapsed(const sfileno xitIndex);
void disconnect(StoreEntry &);
/* Store API */
- virtual StoreEntry *get(const cache_key *) override;
- virtual void create() override {}
- virtual void init() override;
- virtual uint64_t maxSize() const override;
- virtual uint64_t minSize() const override;
- virtual uint64_t currentSize() const override;
- virtual uint64_t currentCount() const override;
- virtual int64_t maxObjectSize() const override;
- virtual void getStats(StoreInfoStats &stats) const override;
- virtual void stat(StoreEntry &e) const override;
- virtual void reference(StoreEntry &e) override;
- virtual bool dereference(StoreEntry &e) override;
- virtual void evictCached(StoreEntry &) override;
- virtual void evictIfFound(const cache_key *) override;
- virtual void maintain() override;
+ StoreEntry *get(const cache_key *) override;
+ void create() override {}
+ void init() override;
+ uint64_t maxSize() const override;
+ uint64_t minSize() const override;
+ uint64_t currentSize() const override;
+ uint64_t currentCount() const override;
+ int64_t maxObjectSize() const override;
+ void getStats(StoreInfoStats &stats) const override;
+ void stat(StoreEntry &e) const override;
+ void reference(StoreEntry &e) override;
+ bool dereference(StoreEntry &e) override;
+ void evictCached(StoreEntry &) override;
+ void evictIfFound(const cache_key *) override;
+ void maintain() override;
/// Whether an entry with the given public key exists and (but) was
/// marked for removal some time ago; get(key) returns nil in such cases.
void anchorEntry(StoreEntry &, const sfileno, const Ipc::StoreMapAnchor &);
// Ipc::StoreMapCleaner API
- virtual void noteFreeMapSlice(const Ipc::StoreMapSliceId sliceId) override;
+ void noteFreeMapSlice(const Ipc::StoreMapSliceId sliceId) override;
private:
/// shared packed info indexed by Store keys, for creating new StoreEntries
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif /* SQUID_ACLADAPTATIONSERVICE_H */
{
public:
ACLAdaptationServiceData() : ACLStringData() {}
- virtual void parse();
+ void parse() override;
};
#endif /* SQUID_ADAPTATIONSERVICEDATA_H */
public:
/* ACL API */
- virtual char const *typeString() const;
- virtual void parse();
- virtual SBufList dump() const;
+ char const *typeString() const override;
+ void parse() override;
+ SBufList dump() const override;
private:
/* Acl::InnerNode API */
- virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
+ int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const override;
};
} // namespace Acl
class ACLAnnotateClientStrategy : public Acl::AnnotationStrategy
{
public:
- virtual bool requiresRequest() const { return true; }
- virtual int match(ACLData<MatchType> * &, ACLFilledChecklist *);
+ bool requiresRequest() const override { return true; }
+ int match(ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif /* SQUID_ACLANNOTATECLIENT */
class ACLAnnotateTransactionStrategy: public Acl::AnnotationStrategy
{
public:
- virtual int match(ACLData<MatchType> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const { return true; }
+ int match(ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override { return true; }
};
#endif /* SQUID_ACLANNOTATETRANSACTION */
ACLAnnotationData();
/* ACLData<M> API */
- virtual bool match(NotePairs::Entry *) { return true; }
- virtual SBufList dump() const;
- virtual void parse();
- virtual bool empty() const { return notes->empty(); }
+ bool match(NotePairs::Entry *) override { return true; }
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override { return notes->empty(); }
/// Stores annotations into pairs.
void annotate(NotePairs::Pointer pairs, const CharacterSet *delimiters, const AccessLogEntry::Pointer &al);
public:
/* ACL API */
- virtual char const *typeString() const;
- virtual void parse();
+ char const *typeString() const override;
+ void parse() override;
};
} // namespace Acl
public:
ACLARP(char const *);
- ~ACLARP() {}
+ ~ACLARP() override {}
- virtual char const *typeString() const;
- virtual void parse();
- virtual int match(ACLChecklist *checklist);
- virtual SBufList dump() const;
- virtual bool empty () const;
+ char const *typeString() const override;
+ void parse() override;
+ int match(ACLChecklist *checklist) override;
+ SBufList dump() const override;
+ bool empty () const override;
protected:
char const *class_;
public:
ACLASN() : data(nullptr) {}
- virtual ~ACLASN();
+ ~ACLASN() override;
- virtual bool match(Ip::Address);
- virtual SBufList dump() const;
- virtual void parse();
- bool empty() const;
- virtual void prepareForUse();
+ bool match(Ip::Address) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override;
+ void prepareForUse() override;
private:
CbDataList<int> *data;
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif /* SQUID_ACLATSTEP_H */
public:
ACLAtStepData();
- virtual ~ACLAtStepData();
- bool match(XactionStep);
- virtual SBufList dump() const;
- void parse();
- bool empty() const;
+ ~ACLAtStepData() override;
+ bool match(XactionStep) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override;
std::list<XactionStep> values;
};
private:
/* ACL API */
- virtual char const *typeString() const;
- virtual void parse();
- virtual SBufList dump() const;
+ char const *typeString() const override;
+ void parse() override;
+ SBufList dump() const override;
/* Acl::InnerNode API */
- virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
+ int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const override;
};
/// An inner ACL expression tree node representing a boolean conjunction (AND)
public:
/* ACL API */
- virtual char const *typeString() const;
- virtual void parse();
+ char const *typeString() const override;
+ void parse() override;
private:
- virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
+ int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const override;
};
/// An inner ACL expression tree node representing a boolean disjuction (OR)
virtual bool bannedAction(ACLChecklist *, Nodes::const_iterator) const;
/* ACL API */
- virtual char const *typeString() const;
- virtual void parse();
+ char const *typeString() const override;
+ void parse() override;
protected:
mutable Nodes::const_iterator lastMatch_;
private:
- virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
+ int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const override;
};
} // namespace Acl
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif /* SQUID_ACLCERTIFICATE_H */
public:
ACLCertificateData(Ssl::GETX509ATTRIBUTE *, const char *attributes, bool optionalAttr = false);
- virtual ~ACLCertificateData();
- bool match(X509 *);
- virtual SBufList dump() const;
- void parse();
- bool empty() const;
+ ~ACLCertificateData() override;
+ bool match(X509 *) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override;
/// A '|'-delimited list of valid ACL attributes.
/// A "*" item means that any attribute is acceptable.
public:
static NullState *Instance();
- virtual void checkForAsync(ACLChecklist *) const;
- virtual ~NullState() {}
+ void checkForAsync(ACLChecklist *) const override;
+ ~NullState() override {}
private:
static NullState _instance;
public:
/* ACL API */
- virtual char const *typeString() const override;
- virtual void parse() override;
- virtual int match(ACLChecklist *checklist) override;
- virtual SBufList dump() const override;
- virtual bool empty() const override;
+ char const *typeString() const override;
+ void parse() override;
+ int match(ACLChecklist *checklist) override;
+ SBufList dump() const override;
+ bool empty() const override;
private:
std::vector<Ip::NfMarkConfig> marks; ///< marks/masks in configured order
public:
ConnectionsEncrypted(char const *);
- virtual ~ConnectionsEncrypted();
+ ~ConnectionsEncrypted() override;
- virtual char const *typeString() const;
- virtual void parse();
- virtual int match(ACLChecklist *checklist);
- virtual SBufList dump() const;
- virtual bool empty () const;
+ char const *typeString() const override;
+ void parse() override;
+ int match(ACLChecklist *checklist) override;
+ SBufList dump() const override;
+ bool empty () const override;
protected:
char const *class_;
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const {return true;}
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override {return true;}
};
#endif /* SQUID_ACLDESTINATIONASN_H */
public:
/* ACLStrategy API */
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const {return true;}
- virtual const Acl::Options &options();
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override {return true;}
+ const Acl::Options &options() override;
private:
Acl::BooleanOptionValue lookupBanned; ///< Are DNS lookups allowed?
public:
static DestinationDomainLookup *Instance();
- virtual void checkForAsync(ACLChecklist *)const;
+ void checkForAsync(ACLChecklist *)const override;
private:
static DestinationDomainLookup instance_;
public:
static DestinationIPLookup *Instance();
- virtual void checkForAsync(ACLChecklist *)const;
+ void checkForAsync(ACLChecklist *)const override;
private:
static DestinationIPLookup instance_;
MEMPROXY_CLASS(ACLDestinationIP);
public:
- virtual char const *typeString() const;
- virtual const Acl::Options &options();
- virtual int match(ACLChecklist *checklist);
+ char const *typeString() const override;
+ const Acl::Options &options() override;
+ int match(ACLChecklist *checklist) override;
private:
Acl::BooleanOptionValue lookupBanned; ///< are DNS lookups allowed?
public:
ACLDomainData() : domains(nullptr) {}
- virtual ~ACLDomainData();
- virtual bool match(char const *);
- virtual SBufList dump() const;
- void parse();
- bool empty() const;
+ ~ACLDomainData() override;
+ bool match(char const *) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override;
Splay<char *> *domains;
};
public:
ACLEui64(char const *);
- ~ACLEui64() {}
+ ~ACLEui64() override {}
- virtual char const *typeString() const;
- virtual void parse();
- virtual int match(ACLChecklist *checklist);
- virtual SBufList dump() const;
- virtual bool empty () const;
+ char const *typeString() const override;
+ void parse() override;
+ int match(ACLChecklist *checklist) override;
+ SBufList dump() const override;
+ bool empty () const override;
protected:
typedef std::set<Eui::Eui64> Eui64Data_t;
public:
ACLExtUser(ACLData<char const *> *newData, char const *);
- ~ACLExtUser();
+ ~ACLExtUser() override;
/* ACL API */
- virtual char const *typeString() const;
- virtual void parse();
- virtual int match(ACLChecklist *checklist);
- virtual SBufList dump() const;
- virtual bool empty () const;
+ char const *typeString() const override;
+ void parse() override;
+ int match(ACLChecklist *checklist) override;
+ SBufList dump() const override;
+ bool empty () const override;
private:
/* ACL API */
- virtual const Acl::Options &lineOptions();
+ const Acl::Options &lineOptions() override;
ACLData<char const *> *data;
char const *type_;
public:
ACLFilledChecklist();
ACLFilledChecklist(const acl_access *, HttpRequest *, const char *ident = nullptr);
- ~ACLFilledChecklist();
+ ~ACLFilledChecklist() override;
/// configure client request-related fields for the first time
void setRequest(HttpRequest *);
void markSourceDomainChecked();
// ACLChecklist API
- virtual bool hasRequest() const { return request != nullptr; }
- virtual bool hasReply() const { return reply != nullptr; }
- virtual bool hasAle() const { return al != nullptr; }
- virtual void syncAle(HttpRequest *adaptedRequest, const char *logUri) const;
- virtual void verifyAle() const;
+ bool hasRequest() const override { return request != nullptr; }
+ bool hasReply() const override { return reply != nullptr; }
+ bool hasAle() const override { return al != nullptr; }
+ void syncAle(HttpRequest *adaptedRequest, const char *logUri) const override;
+ void verifyAle() const override;
public:
Ip::Address src_addr;
class ACLHasComponentStrategy : public ACLStrategy<ACLChecklist *>
{
public:
- virtual int match(ACLData<MatchType> * &, ACLFilledChecklist *);
+ int match(ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif
ACLHasComponentData();
/* ACLData<M> API */
- virtual bool match(ACLChecklist *) override;
- virtual SBufList dump() const override;
- virtual void parse() override;
- virtual bool empty() const override { return false; }
+ bool match(ACLChecklist *) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override { return false; }
private:
enum ComponentKind { coRequest = 0, coResponse, coAle, coEnd };
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const {return true;}
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override {return true;}
};
#endif /* SQUID_ACLHIERCODE_H */
public:
ACLHierCodeData();
- virtual ~ACLHierCodeData();
- bool match(hier_code);
- virtual SBufList dump() const;
- void parse();
- bool empty() const;
+ ~ACLHierCodeData() override;
+ bool match(hier_code) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override;
/// mask of codes this ACL might match.
bool values[HIER_MAX];
public:
ACLHTTPHeaderData();
- virtual ~ACLHTTPHeaderData();
- virtual bool match(HttpHeader* hdr);
- virtual SBufList dump() const;
- virtual void parse();
- virtual bool empty() const;
+ ~ACLHTTPHeaderData() override;
+ bool match(HttpHeader* hdr) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override;
private:
/* ACLData API */
- virtual const Acl::Options &lineOptions();
+ const Acl::Options &lineOptions() override;
Http::HdrType hdrId; /**< set if header is known */
SBuf hdrName; /**< always set */
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
- virtual bool requiresReply() const { return true; }
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ bool requiresReply() const override { return true; }
};
#endif /* SQUID_ACLHTTPREPHEADER_H */
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const { return true; }
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override { return true; }
};
#endif /* SQUID_ACLHTTPREQHEADER_H */
public:
ACLHTTPStatus(char const *);
- ~ACLHTTPStatus();
-
- virtual char const *typeString() const;
- virtual void parse();
- virtual int match(ACLChecklist *checklist);
- virtual SBufList dump() const;
- virtual bool empty () const;
- virtual bool requiresReply() const { return true; }
+ ~ACLHTTPStatus() override;
+
+ char const *typeString() const override;
+ void parse() override;
+ int match(ACLChecklist *checklist) override;
+ SBufList dump() const override;
+ bool empty () const override;
+ bool requiresReply() const override { return true; }
protected:
Splay<acl_httpstatus_data*> *data;
Nodes::size_type childrenCount() const { return nodes.size(); }
/* ACL API */
- virtual void prepareForUse();
- virtual bool empty() const;
- virtual SBufList dump() const;
+ void prepareForUse() override;
+ bool empty() const override;
+ SBufList dump() const override;
/// parses a [ [!]acl1 [!]acl2... ] sequence, appending to nodes
/// \returns the number of parsed ACL names
virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const = 0;
/* ACL API */
- virtual int match(ACLChecklist *checklist);
+ int match(ACLChecklist *checklist) override;
// XXX: use refcounting instead of raw pointers
std::vector<ACL*> nodes; ///< children nodes of this intermediate node
public:
ACLIntRange() {}
- virtual ~ACLIntRange();
- virtual bool match(int);
- virtual SBufList dump() const;
- virtual void parse();
- virtual bool empty() const;
+ ~ACLIntRange() override;
+ bool match(int) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override;
private:
typedef Range<int> RangeType;
void operator delete(void *);
ACLIP() : data(nullptr) {}
- ~ACLIP();
+ ~ACLIP() override;
typedef Splay<acl_ip_data *> IPSplay;
- virtual char const *typeString() const = 0;
- virtual void parse();
+ char const *typeString() const override = 0;
+ void parse() override;
// virtual bool isProxyAuth() const {return true;}
- virtual int match(ACLChecklist *checklist) = 0;
- virtual SBufList dump() const;
- virtual bool empty () const;
+ int match(ACLChecklist *checklist) override = 0;
+ SBufList dump() const override;
+ bool empty () const override;
protected:
MEMPROXY_CLASS(ACLLocalIP);
public:
- virtual char const *typeString() const;
- virtual int match(ACLChecklist *checklist);
+ char const *typeString() const override;
+ int match(ACLChecklist *checklist) override;
};
#endif /* SQUID_ACLLOCALIP_H */
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif /* SQUID_ACLLOCALPORT_H */
public:
ACLMaxConnection(char const *);
- ~ACLMaxConnection();
-
- virtual char const *typeString() const;
- virtual void parse();
- virtual int match(ACLChecklist *checklist);
- virtual SBufList dump() const;
- virtual bool empty () const;
- virtual bool valid () const;
- virtual void prepareForUse();
+ ~ACLMaxConnection() override;
+
+ char const *typeString() const override;
+ void parse() override;
+ int match(ACLChecklist *checklist) override;
+ SBufList dump() const override;
+ bool empty () const override;
+ bool valid () const override;
+ void prepareForUse() override;
protected:
char const *class_;
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const {return true;}
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override {return true;}
};
#endif /* SQUID_ACLMETHOD_H */
public:
ACLMethodData() {}
- virtual ~ACLMethodData();
- bool match(HttpRequestMethod);
- virtual SBufList dump() const;
- void parse();
- bool empty() const {return values.empty();}
+ ~ACLMethodData() override;
+ bool match(HttpRequestMethod) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override {return values.empty();}
std::list<HttpRequestMethod> values;
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif /* SQUID_ACLMYPORTNAME_H */
public:
AnnotationStrategy(): delimiters(CharacterSet(__FILE__, ",")) {}
- virtual const Acl::Options &options() override;
+ const Acl::Options &options() override;
Acl::CharacterSetOptionValue delimiters; ///< annotation separators
};
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const { return true; }
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override { return true; }
private:
bool matchNotes(ACLData<MatchType> *, const NotePairs *) const;
public:
ACLNoteData();
- virtual ~ACLNoteData();
- virtual bool match(NotePairs::Entry *);
- virtual SBufList dump() const;
- virtual void parse();
- virtual bool empty() const;
+ ~ACLNoteData() override;
+ bool match(NotePairs::Entry *) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override;
private:
SBuf name; ///< Note name to check. It is always set
/* Option API */
- virtual bool configured() const override { return recipient_ && recipient_->configured; }
- virtual bool disabled() const override { return recipient_ && recipient_->disabled && /* paranoid: */ offName; }
- virtual bool valued() const override { return recipient_ && recipient_->valued; }
+ bool configured() const override { return recipient_ && recipient_->configured; }
+ bool disabled() const override { return recipient_ && recipient_->disabled && /* paranoid: */ offName; }
+ bool valued() const override { return recipient_ && recipient_->valued; }
- virtual void unconfigure() const override {
+ void unconfigure() const override {
assert(recipient_);
recipient_->reset();
}
- virtual void enable() const override
+ void enable() const override
{
assert(recipient_);
recipient_->configured = true;
// leave recipient_->value unchanged
}
- virtual void configureWith(const SBuf &rawValue) const override
+ void configureWith(const SBuf &rawValue) const override
{
assert(recipient_);
recipient_->configured = true;
import(rawValue);
}
- virtual void disable() const override
+ void disable() const override
{
assert(recipient_);
recipient_->configured = true;
// leave recipient_->value unchanged
}
- virtual void print(std::ostream &os) const override
+ void print(std::ostream &os) const override
{
if (configured()) {
os << ' ' << (disabled() ? offName : onName);
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif /* SQUID_ACLPEERNAME_H */
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const {return true;}
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override {return true;}
};
#endif /* SQUID_ACLPROTOCOL_H */
public:
ACLProtocolData() {}
- virtual ~ACLProtocolData();
- bool match(AnyP::ProtocolType);
- virtual SBufList dump() const;
- void parse();
- bool empty() const {return values.empty();}
+ ~ACLProtocolData() override;
+ bool match(AnyP::ProtocolType) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override {return values.empty();}
std::list<AnyP::ProtocolType> values;
};
public:
ACLRandom(char const *);
- ~ACLRandom();
-
- virtual char const *typeString() const;
- virtual void parse();
- virtual int match(ACLChecklist *checklist);
- virtual SBufList dump() const;
- virtual bool empty () const;
- virtual bool valid() const;
+ ~ACLRandom() override;
+
+ char const *typeString() const override;
+ void parse() override;
+ int match(ACLChecklist *checklist) override;
+ SBufList dump() const override;
+ bool empty () const override;
+ bool valid() const override;
protected:
double data; // value to be exceeded before this ACL will match
MEMPROXY_CLASS(ACLRegexData);
public:
- virtual ~ACLRegexData();
- virtual bool match(char const *user);
- virtual SBufList dump() const;
- virtual void parse();
- virtual bool empty() const;
+ ~ACLRegexData() override;
+ bool match(char const *user) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override;
private:
/// whether parse() is called in a case insensitive context
static Acl::BooleanOptionValue CaseInsensitive_;
/* ACLData API */
- virtual const Acl::Options &lineOptions();
+ const Acl::Options &lineOptions() override;
std::list<RegexPattern> data;
};
{
public:
- virtual int match (ACLData<char const *> * &, ACLFilledChecklist *);
- virtual bool requiresReply() const {return true;}
+ int match (ACLData<char const *> * &, ACLFilledChecklist *) override;
+ bool requiresReply() const override {return true;}
};
template <Http::HdrType header>
{
public:
- virtual int match (ACLData<char const *> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const {return true;}
+ int match (ACLData<char const *> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override {return true;}
};
template <Http::HdrType header>
class ACLServerCertificateStrategy : public ACLStrategy<X509 *>
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif /* SQUID_ACLSERVERCERTIFICATE_H */
MEMPROXY_CLASS(ACLServerNameData);
public:
ACLServerNameData() : ACLDomainData() {}
- virtual bool match(const char *);
+ bool match(const char *) override;
};
class ACLServerNameStrategy : public ACLStrategy<char const *>
public:
/* ACLStrategy API */
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const {return true;}
- virtual const Acl::Options &options();
- virtual bool valid() const;
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override {return true;}
+ const Acl::Options &options() override;
+ bool valid() const override;
private:
Acl::BooleanOptionValue useClientRequested; ///< Ignore server-supplied names
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif /* SQUID_ACL_SOURCEASN_H */
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
class SourceDomainLookup : public ACLChecklist::AsyncState
public:
static SourceDomainLookup *Instance();
- virtual void checkForAsync(ACLChecklist *)const;
+ void checkForAsync(ACLChecklist *)const override;
private:
static SourceDomainLookup instance_;
MEMPROXY_CLASS(ACLSourceIP);
public:
- virtual char const *typeString() const;
- virtual int match(ACLChecklist *checklist);
+ char const *typeString() const override;
+ int match(ACLChecklist *checklist) override;
};
#endif /* SQUID_ACLSOURCEIP_H */
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif /* SQUID_ACLSQUIDERROR_H */
public:
ACLSquidErrorData(): ACLData<err_type>() {};
- virtual ~ACLSquidErrorData() {}
- virtual bool match(err_type err);
- virtual SBufList dump() const;
- virtual void parse();
- virtual bool empty() const;
+ ~ACLSquidErrorData() override {}
+ bool match(err_type err) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override;
private:
CbDataListContainer <err_type> errors;
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif /* SQUID_ACLSSL_ERROR_H */
public:
ACLSslErrorData() = default;
- virtual ~ACLSslErrorData() {}
- bool match(const Security::CertErrors *);
- virtual SBufList dump() const;
- void parse();
- bool empty() const { return values.empty(); }
+ ~ACLSslErrorData() override {}
+ bool match(const Security::CertErrors *) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override { return values.empty(); }
Security::Errors values;
};
public:
typedef M MatchType;
- ~ACLStrategised();
+ ~ACLStrategised() override;
ACLStrategised(ACLData<MatchType> *, ACLStrategy<MatchType> *, char const *);
- virtual char const *typeString() const;
+ char const *typeString() const override;
- virtual bool requiresRequest() const {return matcher->requiresRequest();}
+ bool requiresRequest() const override {return matcher->requiresRequest();}
- virtual bool requiresReply() const {return matcher->requiresReply();}
+ bool requiresReply() const override {return matcher->requiresReply();}
- virtual void prepareForUse() { data->prepareForUse();}
- virtual void parse();
- virtual int match(ACLChecklist *checklist);
+ void prepareForUse() override { data->prepareForUse();}
+ void parse() override;
+ int match(ACLChecklist *checklist) override;
virtual int match (M const &);
- virtual SBufList dump() const;
- virtual bool empty () const;
- virtual bool valid () const;
+ SBufList dump() const override;
+ bool empty () const override;
+ bool valid () const override;
private:
/* ACL API */
- virtual const Acl::Options &options() { return matcher->options(); }
- virtual const Acl::Options &lineOptions() { return data->lineOptions(); }
+ const Acl::Options &options() override { return matcher->options(); }
+ const Acl::Options &lineOptions() override { return data->lineOptions(); }
ACLData<MatchType> *data;
char const *type_;
public:
ACLStringData() {}
- virtual ~ACLStringData() {}
+ ~ACLStringData() override {}
/// \deprecated use match(SBuf&) instead.
- bool match(char const *);
+ bool match(char const *) override;
bool match(const SBuf &);
- virtual SBufList dump() const;
- virtual void parse();
- bool empty() const;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override;
/// Insert a string data value
void insert(const char *);
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif /* SQUID_ACLMYPORTNAME_H */
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
};
#endif /* SQUID_ACLTIME_H */
public:
ACLTimeData();
- virtual ~ACLTimeData();
- bool match(time_t);
- virtual SBufList dump() const;
- void parse();
- bool empty() const;
+ ~ACLTimeData() override;
+ bool match(time_t) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override;
private:
int weekbits;
public:
TransactionInitiator(char const *);
- virtual char const *typeString() const;
- virtual void parse();
- virtual int match(ACLChecklist *checklist);
- virtual bool requiresRequest() const { return true; }
- virtual SBufList dump() const;
- virtual bool empty () const;
+ char const *typeString() const override;
+ void parse() override;
+ int match(ACLChecklist *checklist) override;
+ bool requiresRequest() const override { return true; }
+ SBufList dump() const override;
+ bool empty () const override;
protected:
char const *class_;
protected:
/// Acl::OrNode API
- virtual bool bannedAction(ACLChecklist *, Nodes::const_iterator) const override;
+ bool bannedAction(ACLChecklist *, Nodes::const_iterator) const override;
Answer actionAt(const Nodes::size_type pos) const;
/// if not empty, contains actions corresponding to InnerNode::nodes
{
public:
- virtual int match (ACLData<char const *> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const {return true;}
+ int match (ACLData<char const *> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override {return true;}
};
#endif /* SQUID_ACLURL_H */
{
public:
- virtual int match (ACLData<char const *> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const {return true;}
+ int match (ACLData<char const *> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override {return true;}
};
#endif /* SQUID_ACLURLLOGIN_H */
{
public:
- virtual int match (ACLData<char const *> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const {return true;}
+ int match (ACLData<char const *> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override {return true;}
};
#endif /* SQUID_ACLURLPATH_H */
{
public:
- virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
- virtual bool requiresRequest() const {return true;}
+ int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+ bool requiresRequest() const override {return true;}
};
#endif /* SQUID_ACLURLPORT_H */
MEMPROXY_CLASS(ACLUserData);
public:
- virtual ~ACLUserData() {}
+ ~ACLUserData() override {}
ACLUserData();
- bool match(char const *user);
- virtual SBufList dump() const;
- virtual void parse();
- bool empty() const;
+ bool match(char const *user) override;
+ SBufList dump() const override;
+ void parse() override;
+ bool empty() const override;
private:
/// whether parse() is called in a case insensitive context
static Acl::BooleanOptionValue CaseInsensitive_;
/* ACLData API */
- virtual const Acl::Options &lineOptions();
+ const Acl::Options &lineOptions() override;
typedef std::set<SBuf,bool(*)(const SBuf&, const SBuf&)> UserDataNames_t;
UserDataNames_t userDataNames;
// checks adaptation_access rules to find a matching adaptation service
class AccessCheck: public virtual AsyncJob
{
- CBDATA_CLASS(AccessCheck);
+ CBDATA_CHILD(AccessCheck);
public:
typedef void AccessCheckCallback(ServiceGroupPointer group, void *data);
protected:
// use Start to start adaptation checks
AccessCheck(const ServiceFilter &aFilter, Adaptation::Initiator *);
- ~AccessCheck();
+ ~AccessCheck() override;
private:
const ServiceFilter filter;
protected:
// AsyncJob API
- virtual void start();
- virtual bool doneAll() const { return false; } /// not done until mustStop
+ void start() override;
+ bool doneAll() const override { return false; } /// not done until mustStop
bool usedDynamicRules();
void check();
public:
AnswerCall(const char *aName, const AnswerDialer &aDialer) :
AsyncCallT<AnswerDialer>(93, 5, aName, aDialer), fired(false) {}
- virtual void fire() {
+ void fire() override {
fired = true;
AsyncCallT<AnswerDialer>::fire();
}
- virtual ~AnswerCall() {
+ ~AnswerCall() override {
if (!fired && dialer.arg1.message != nullptr && dialer.arg1.message->body_pipe != nullptr)
dialer.arg1.message->body_pipe->expectNoConsumption();
}
public:
Initiate(const char *aTypeName);
- virtual ~Initiate();
+ ~Initiate() override;
void initiator(const CbcPointer<Initiator> &i); ///< sets initiator
void tellQueryAborted(bool final); // tell initiator
void clearInitiator(); // used by noteInitiatorAborted; TODO: make private
- virtual void swanSong(); // internal cleanup
+ void swanSong() override; // internal cleanup
- virtual const char *status() const; // for debugging
+ const char *status() const override; // for debugging
CbcPointer<Initiator> theInitiator;
{
public:
Initiator(): AsyncJob("Initiator") {}
- virtual ~Initiator() {}
+ ~Initiator() override {}
/// AccessCheck calls this back with a possibly nil service group
/// to signal whether adaptation is needed and where it should start.
/// iterates services in ServiceGroup, starting adaptation launchers
class Iterator: public Initiate, public Initiator
{
- CBDATA_CLASS(Iterator);
+ CBDATA_CHILD(Iterator);
public:
Iterator(Http::Message *virginHeader, HttpRequest *virginCause,
const AccessLogEntryPointer &,
const Adaptation::ServiceGroupPointer &aGroup);
- virtual ~Iterator();
+ ~Iterator() override;
// Adaptation::Initiate: asynchronous communication with the initiator
- void noteInitiatorAborted();
+ void noteInitiatorAborted() override;
// Adaptation::Initiator: asynchronous communication with the current launcher
- virtual void noteAdaptationAnswer(const Answer &answer);
+ void noteAdaptationAnswer(const Answer &answer) override;
protected:
// Adaptation::Initiate API implementation
- virtual void start();
- virtual bool doneAll() const;
- virtual void swanSong();
+ void start() override;
+ bool doneAll() const override;
+ void swanSong() override;
/// launches adaptation for the service selected by the plan
void step();
public:
explicit Service(const ServiceConfigPointer &aConfig);
- virtual ~Service();
+ ~Service() override;
virtual bool probed() const = 0; // see comments above
virtual bool broken() const;
public:
ServiceGroup(const String &aKind, bool areAllServicesSame);
- virtual ~ServiceGroup();
+ ~ServiceGroup() override;
virtual void parse();
virtual void finalize(); // called after all are parsed
{
public:
// Adaptation::ServiceConfig API
- virtual bool grokExtension(const char *name, const char *value);
+ bool grokExtension(const char *name, const char *value) override;
public:
typedef std::pair<std::string, std::string> Extension; // name=value in cfg
public:
Config();
- ~Config();
+ ~Config() override;
- virtual bool finalize();
+ bool finalize() override;
protected:
- virtual Adaptation::ServiceConfig *newServiceConfig() const;
+ Adaptation::ServiceConfig *newServiceConfig() const override;
private:
Config(const Config &); // not implemented
Config &operator =(const Config &); // not implemented
- virtual Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg);
+ Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg) override;
};
extern Config TheConfig;
{
public:
/* libecap::host::Host API */
- virtual std::string uri() const; // unique across all vendors
- virtual void describe(std::ostream &os) const; // free-format info
- virtual void noteVersionedService(const char *libEcapVersion, const libecap::weak_ptr<libecap::adapter::Service> &s);
- virtual std::ostream *openDebug(libecap::LogVerbosity lv);
- virtual void closeDebug(std::ostream *debug);
+ std::string uri() const override; // unique across all vendors
+ void describe(std::ostream &os) const override; // free-format info
+ void noteVersionedService(const char *libEcapVersion, const libecap::weak_ptr<libecap::adapter::Service> &s) override;
+ std::ostream *openDebug(libecap::LogVerbosity lv) override;
+ void closeDebug(std::ostream *debug) override;
typedef libecap::shared_ptr<libecap::Message> MessagePtr;
- virtual MessagePtr newRequest() const;
- virtual MessagePtr newResponse() const;
+ MessagePtr newRequest() const override;
+ MessagePtr newResponse() const override;
static void Register(); ///< register adaptation host
HeaderRep(Http::Message &aMessage);
/* libecap::Header API */
- virtual bool hasAny(const Name &name) const;
- virtual Value value(const Name &name) const;
- virtual void add(const Name &name, const Value &value);
- virtual void removeAny(const Name &name);
- virtual void visitEach(libecap::NamedValueVisitor &visitor) const;
- virtual Area image() const;
- virtual void parse(const Area &buf); // throws on failures
+ bool hasAny(const Name &name) const override;
+ Value value(const Name &name) const override;
+ void add(const Name &name, const Value &value) override;
+ void removeAny(const Name &name) override;
+ void visitEach(libecap::NamedValueVisitor &visitor) const override;
+ Area image() const override;
+ void parse(const Area &buf) override; // throws on failures
protected:
static Http::HdrType TranslateHeaderId(const Name &name);
RequestLineRep(HttpRequest &aMessage);
/* libecap::RequestLine API */
- virtual void uri(const Area &aUri);
- virtual Area uri() const;
- virtual void method(const Name &aMethod);
- virtual Name method() const;
- virtual libecap::Version version() const;
- virtual void version(const libecap::Version &aVersion);
- virtual Name protocol() const;
- virtual void protocol(const Name &aProtocol);
+ void uri(const Area &aUri) override;
+ Area uri() const override;
+ void method(const Name &aMethod) override;
+ Name method() const override;
+ libecap::Version version() const override;
+ void version(const libecap::Version &aVersion) override;
+ Name protocol() const override;
+ void protocol(const Name &aProtocol) override;
private:
HttpRequest &theMessage; // the request header being translated to libecap
StatusLineRep(HttpReply &aMessage);
/* libecap::StatusLine API */
- virtual void statusCode(int code);
- virtual int statusCode() const;
- virtual void reasonPhrase(const Area &phrase);
- virtual Area reasonPhrase() const;
- virtual libecap::Version version() const;
- virtual void version(const libecap::Version &aVersion);
- virtual Name protocol() const;
- virtual void protocol(const Name &aProtocol);
+ void statusCode(int code) override;
+ int statusCode() const override;
+ void reasonPhrase(const Area &phrase) override;
+ Area reasonPhrase() const override;
+ libecap::Version version() const override;
+ void version(const libecap::Version &aVersion) override;
+ Name protocol() const override;
+ void protocol(const Name &aProtocol) override;
private:
HttpReply &theMessage; // the request header being translated to libecap
void tie(const BodyPipe::Pointer &aBody); // late binding if !theBody;
// libecap::Body API
- virtual BodySize bodySize() const;
+ BodySize bodySize() const override;
private:
BodyPipe::Pointer theBody; // the body being translated to libecap
{
public:
explicit MessageRep(Http::Message *rawHeader);
- virtual ~MessageRep();
+ ~MessageRep() override;
/* libecap::Message API */
- virtual libecap::shared_ptr<libecap::Message> clone() const;
- virtual libecap::FirstLine &firstLine();
- virtual const libecap::FirstLine &firstLine() const;
- virtual libecap::Header &header();
- virtual const libecap::Header &header() const;
- virtual void addBody();
- virtual libecap::Body *body();
- virtual const libecap::Body *body() const;
+ libecap::shared_ptr<libecap::Message> clone() const override;
+ libecap::FirstLine &firstLine() override;
+ const libecap::FirstLine &firstLine() const override;
+ libecap::Header &header() override;
+ const libecap::Header &header() const override;
+ void addBody() override;
+ libecap::Body *body() override;
+ const libecap::Body *body() const override;
void tieBody(Ecap::XactionRep *x); // to a specific transaction
ConfigRep(const Master &aMaster);
// libecap::Options API
- virtual const libecap::Area option(const libecap::Name &name) const;
- virtual void visitEachOption(libecap::NamedValueVisitor &visitor) const;
+ const libecap::Area option(const libecap::Name &name) const override;
+ void visitEachOption(libecap::NamedValueVisitor &visitor) const override;
const Master &master; ///< the configuration being wrapped
};
{
public:
/* AsyncEngine API */
- virtual int checkEvents(int timeout);
+ int checkEvents(int timeout) override;
private:
void kickAsyncServices(timeval &timeout);
{
public:
explicit ServiceRep(const ServiceConfigPointer &aConfig);
- virtual ~ServiceRep();
+ ~ServiceRep() override;
typedef libecap::shared_ptr<libecap::adapter::Service> AdapterService;
/* Adaptation::Service API */
- virtual void finalize();
- virtual bool probed() const;
- virtual bool up() const;
- virtual Adaptation::Initiate *makeXactLauncher(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp);
- virtual bool wantsUrl(const SBuf &urlPath) const;
- virtual void noteFailure();
+ void finalize() override;
+ bool probed() const override;
+ bool up() const override;
+ Adaptation::Initiate *makeXactLauncher(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp) override;
+ bool wantsUrl(const SBuf &urlPath) const override;
+ void noteFailure() override;
virtual const char *status() const;
- virtual void detach();
- virtual bool detached() const;
+ void detach() override;
+ bool detached() const override;
protected:
void tryConfigureAndStart();
OptionsExtractor(HttpHeader &aMeta): meta(aMeta) {}
// libecap::NamedValueVisitor API
- virtual void visit(const Name &name, const Area &value) {
+ void visit(const Name &name, const Area &value) override {
meta.putExt(name.image().c_str(), value.toString().c_str());
}
class XactionRep : public Adaptation::Initiate, public libecap::host::Xaction,
public BodyConsumer, public BodyProducer
{
- CBDATA_CLASS(XactionRep);
+ CBDATA_CHILD(XactionRep);
public:
XactionRep(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, const Adaptation::ServicePointer &service);
- virtual ~XactionRep();
+ ~XactionRep() override;
typedef libecap::shared_ptr<libecap::adapter::Xaction> AdapterXaction;
void master(const AdapterXaction &aMaster); // establish a link
// libecap::host::Xaction API
- virtual const libecap::Area option(const libecap::Name &name) const;
- virtual void visitEachOption(libecap::NamedValueVisitor &visitor) const;
- virtual libecap::Message &virgin();
- virtual const libecap::Message &cause();
- virtual libecap::Message &adapted();
- virtual void useVirgin();
- virtual void useAdapted(const libecap::shared_ptr<libecap::Message> &msg);
- virtual void blockVirgin();
- virtual void adaptationDelayed(const libecap::Delay &);
- virtual void adaptationAborted();
- virtual void resume();
- virtual void vbDiscard();
- virtual void vbMake();
- virtual void vbStopMaking();
- virtual void vbMakeMore();
- virtual libecap::Area vbContent(libecap::size_type offset, libecap::size_type size);
- virtual void vbContentShift(libecap::size_type size);
- virtual void noteAbContentDone(bool atEnd);
- virtual void noteAbContentAvailable();
+ const libecap::Area option(const libecap::Name &name) const override;
+ void visitEachOption(libecap::NamedValueVisitor &visitor) const override;
+ libecap::Message &virgin() override;
+ const libecap::Message &cause() override;
+ libecap::Message &adapted() override;
+ void useVirgin() override;
+ void useAdapted(const libecap::shared_ptr<libecap::Message> &msg) override;
+ void blockVirgin() override;
+ void adaptationDelayed(const libecap::Delay &) override;
+ void adaptationAborted() override;
+ void resume() override;
+ void vbDiscard() override;
+ void vbMake() override;
+ void vbStopMaking() override;
+ void vbMakeMore() override;
+ libecap::Area vbContent(libecap::size_type offset, libecap::size_type size) override;
+ void vbContentShift(libecap::size_type size) override;
+ void noteAbContentDone(bool atEnd) override;
+ void noteAbContentAvailable() override;
// BodyProducer API
- virtual void noteMoreBodySpaceAvailable(RefCount<BodyPipe> bp);
- virtual void noteBodyConsumerAborted(RefCount<BodyPipe> bp);
+ void noteMoreBodySpaceAvailable(RefCount<BodyPipe> bp) override;
+ void noteBodyConsumerAborted(RefCount<BodyPipe> bp) override;
// BodyConsumer API
- virtual void noteMoreBodyDataAvailable(RefCount<BodyPipe> bp);
- virtual void noteBodyProductionEnded(RefCount<BodyPipe> bp);
- virtual void noteBodyProducerAborted(RefCount<BodyPipe> bp);
+ void noteMoreBodyDataAvailable(RefCount<BodyPipe> bp) override;
+ void noteBodyProductionEnded(RefCount<BodyPipe> bp) override;
+ void noteBodyProducerAborted(RefCount<BodyPipe> bp) override;
// Initiate API
- virtual void noteInitiatorAborted();
+ void noteInitiatorAborted() override;
// AsyncJob API (via Initiate)
- virtual void start();
- virtual bool doneAll() const;
- virtual void swanSong();
- virtual const char *status() const;
+ void start() override;
+ bool doneAll() const override;
+ void swanSong() override;
+ const char *status() const override;
protected:
Service &service();
int repeat_limit; ///< icap_retry_limit in squid.conf
Config();
- ~Config();
+ ~Config() override;
time_t connect_timeout(bool bypassable) const;
time_t io_timeout(bool bypassable) const;
Config(const Config &); // not implemented
Config &operator =(const Config &); // not implemented
- virtual Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg);
+ Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg) override;
};
extern Config TheConfig;
{
public:
Launcher(const char *aTypeName, Adaptation::ServicePointer &aService);
- virtual ~Launcher();
+ ~Launcher() override;
// Adaptation::Initiate: asynchronous communication with the initiator
- void noteInitiatorAborted();
+ void noteInitiatorAborted() override;
// Adaptation::Initiator: asynchronous communication with the current transaction
- virtual void noteAdaptationAnswer(const Answer &answer);
+ void noteAdaptationAnswer(const Answer &answer) override;
virtual void noteXactAbort(XactAbortInfo info);
private:
protected:
// Adaptation::Initiate API implementation
- virtual void start();
- virtual bool doneAll() const;
- virtual void swanSong();
+ void start() override;
+ bool doneAll() const override;
+ void swanSong() override;
// creates the right ICAP transaction using stored configuration params
virtual Xaction *createXaction() = 0;
{
public:
/* Http1::ChunkExtensionValueParser API */
- virtual void parse(Tokenizer &tok, const SBuf &extName) override;
+ void parse(Tokenizer &tok, const SBuf &extName) override;
bool sawUseOriginalBody() const { return useOriginalBody_ >= 0; }
uint64_t useOriginalBody() const { assert(sawUseOriginalBody()); return static_cast<uint64_t>(useOriginalBody_); }
class ModXact: public Xaction, public BodyProducer, public BodyConsumer
{
- CBDATA_CLASS(ModXact);
+ CBDATA_CHILD(ModXact);
public:
ModXact(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, ServiceRep::Pointer &s);
- virtual ~ModXact();
+ ~ModXact() override;
// BodyProducer methods
- virtual void noteMoreBodySpaceAvailable(BodyPipe::Pointer);
- virtual void noteBodyConsumerAborted(BodyPipe::Pointer);
+ void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override;
+ void noteBodyConsumerAborted(BodyPipe::Pointer) override;
// BodyConsumer methods
- virtual void noteMoreBodyDataAvailable(BodyPipe::Pointer);
- virtual void noteBodyProductionEnded(BodyPipe::Pointer);
- virtual void noteBodyProducerAborted(BodyPipe::Pointer);
+ void noteMoreBodyDataAvailable(BodyPipe::Pointer) override;
+ void noteBodyProductionEnded(BodyPipe::Pointer) override;
+ void noteBodyProducerAborted(BodyPipe::Pointer) override;
/* Xaction API */
- virtual void startShoveling();
- virtual void handleCommWrote(size_t size);
- virtual void handleCommRead(size_t size);
+ void startShoveling() override;
+ void handleCommWrote(size_t size) override;
+ void handleCommRead(size_t size) override;
void handleCommWroteHeaders();
void handleCommWroteBody();
InOut adapted;
// bypasses exceptions if needed and possible
- virtual void callException(const std::exception &e);
+ void callException(const std::exception &e) override;
/// record error detail in the virgin request if possible
- virtual void detailError(const ErrorDetail::Pointer &errDetail);
+ void detailError(const ErrorDetail::Pointer &errDetail) override;
// Icap::Xaction API
- virtual void clearError();
+ void clearError() override;
/// The master transaction log entry
- virtual AccessLogEntry::Pointer masterLogEntry() { return alMaster; }
+ AccessLogEntry::Pointer masterLogEntry() override { return alMaster; }
private:
- virtual void start();
+ void start() override;
/// locates the request, either as a cause or as a virgin message itself
const HttpRequest &virginRequest() const; // Must always be available
void startReading();
void readMore();
- virtual bool doneReading() const { return commEof || state.doneParsing(); }
- virtual bool doneWriting() const { return state.doneWriting(); }
+ bool doneReading() const override { return commEof || state.doneParsing(); }
+ bool doneWriting() const override { return state.doneWriting(); }
size_t virginContentSize(const VirginBodyAct &act) const;
const char *virginContentData(const VirginBodyAct &act) const;
void echoMore();
void updateSources(); ///< Update the Http::Message sources
- virtual bool doneAll() const;
- virtual void swanSong();
+ bool doneAll() const override;
+ void swanSong() override;
void stopReceiving();
void stopSending(bool nicely);
void stopParsing(const bool checkUnparsedData = true);
void stopBackup();
- virtual void fillPendingStatus(MemBuf &buf) const;
- virtual void fillDoneStatus(MemBuf &buf) const;
- virtual bool fillVirginHttpHeader(MemBuf&) const;
+ void fillPendingStatus(MemBuf &buf) const override;
+ void fillDoneStatus(MemBuf &buf) const override;
+ bool fillVirginHttpHeader(MemBuf&) const override;
private:
/// parses a message header or trailer
bool expectIcapTrailers() const;
void checkConsuming();
- virtual void finalizeLogInfo();
+ void finalizeLogInfo() override;
SizedEstimate virginBody;
VirginBodyAct virginBodyWriting; // virgin body writing state
// creates ModXact when needed
class ModXactLauncher: public Launcher
{
- CBDATA_CLASS(ModXactLauncher);
+ CBDATA_CHILD(ModXactLauncher);
public:
ModXactLauncher(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, Adaptation::ServicePointer s);
protected:
- virtual Xaction *createXaction();
+ Xaction *createXaction() override;
- virtual void swanSong();
+ void swanSong() override;
/// starts or stops transaction accounting in ICAP history
void updateHistory(bool start);
class OptXact: public Xaction
{
- CBDATA_CLASS(OptXact);
+ CBDATA_CHILD(OptXact);
public:
OptXact(ServiceRep::Pointer &aService);
protected:
/* Xaction API */
- virtual void start();
- virtual void startShoveling();
- virtual void handleCommWrote(size_t size);
- virtual void handleCommRead(size_t size);
+ void start() override;
+ void startShoveling() override;
+ void handleCommWrote(size_t size) override;
+ void handleCommRead(size_t size) override;
void makeRequest(MemBuf &buf);
bool parseResponse();
void startReading();
- virtual bool doneReading() const { return commEof || readAll; }
+ bool doneReading() const override { return commEof || readAll; }
- virtual void swanSong();
+ void swanSong() override;
private:
- virtual void finalizeLogInfo();
+ void finalizeLogInfo() override;
bool readAll; ///< read the entire OPTIONS response
};
// creates OptXact when needed
class OptXactLauncher: public Launcher
{
- CBDATA_CLASS(OptXactLauncher);
+ CBDATA_CHILD(OptXactLauncher);
public:
OptXactLauncher(Adaptation::ServicePointer aService);
protected:
- virtual Xaction *createXaction();
+ Xaction *createXaction() override;
};
} // namespace Icap
class ServiceRep : public RefCountable, public Adaptation::Service,
public Adaptation::Initiator
{
- CBDATA_CLASS(ServiceRep);
+ CBDATA_CHILD(ServiceRep);
public:
typedef RefCount<ServiceRep> Pointer;
public:
explicit ServiceRep(const ServiceConfigPointer &aConfig);
- virtual ~ServiceRep();
+ ~ServiceRep() override;
- virtual void finalize();
+ void finalize() override;
- virtual bool probed() const; // see comments above
- virtual bool up() const; // see comments above
+ bool probed() const override; // see comments above
+ bool up() const override; // see comments above
bool availableForNew() const; ///< a new transaction may start communicating with the service
bool availableForOld() const; ///< a transaction notified about connection slot availability may start communicating with the service
- virtual Initiate *makeXactLauncher(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp);
+ Initiate *makeXactLauncher(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp) override;
void callWhenAvailable(AsyncCall::Pointer &cb, bool priority = false);
void callWhenReady(AsyncCall::Pointer &cb);
// the methods below can only be called on an up() service
- bool wantsUrl(const SBuf &urlPath) const;
+ bool wantsUrl(const SBuf &urlPath) const override;
bool wantsPreview(const SBuf &urlPath, size_t &wantedSize) const;
bool allows204() const;
bool allows206() const;
void noteConnectionUse(const Comm::ConnectionPointer &conn);
void noteConnectionFailed(const char *comment);
- void noteFailure(); // called by transactions to report service failure
+ void noteFailure() override; // called by transactions to report service failure
void noteNewWaiter() {theAllWaiters++;} ///< New xaction waiting for service to be up or available
void noteGoneWaiter(); ///< An xaction is not waiting any more for service to be available
bool existWaiters() const {return (theAllWaiters > 0);} ///< if there are xactions waiting for the service to be available
//AsyncJob virtual methods
- virtual bool doneAll() const { return Adaptation::Initiator::doneAll() && false;}
- virtual void callException(const std::exception &e);
+ bool doneAll() const override { return Adaptation::Initiator::doneAll() && false;}
+ void callException(const std::exception &e) override;
- virtual void detach();
- virtual bool detached() const;
+ void detach() override;
+ bool detached() const override;
public: // treat these as private, they are for callbacks only
void noteTimeToUpdate();
void noteTimeToNotify();
// receive either an ICAP OPTIONS response header or an abort message
- virtual void noteAdaptationAnswer(const Answer &answer);
+ void noteAdaptationAnswer(const Answer &answer) override;
Security::ContextPointer sslContext;
Security::SessionStatePointer sslSession;
*/
void busyCheckpoint();
- const char *status() const;
+ const char *status() const override;
mutable bool wasAnnouncedUp; // prevent sequential same-state announcements
bool isDetached;
ServiceRep::Pointer theService;
ConnWaiterDialer(const CbcPointer<Adaptation::Icap::ModXact> &xact, Adaptation::Icap::ConnWaiterDialer::Parent::Method aHandler);
ConnWaiterDialer(const Adaptation::Icap::ConnWaiterDialer &aConnWaiter);
- ~ConnWaiterDialer();
+ ~ConnWaiterDialer() override;
};
} // namespace Icap
{
/// A simple PeerConnector for Secure ICAP services. No SslBump capabilities.
class IcapPeerConnector: public Security::PeerConnector {
- CBDATA_CLASS(IcapPeerConnector);
+ CBDATA_CHILD(IcapPeerConnector);
public:
IcapPeerConnector(
Adaptation::Icap::ServiceRep::Pointer &service,
Security::PeerConnector(aServerConn, aCallback, alp, timeout), icapService(service) {}
/* Security::PeerConnector API */
- virtual bool initialize(Security::SessionPointer &);
- virtual void noteNegotiationDone(ErrorState *error);
- virtual Security::ContextPointer getTlsContext() {
+ bool initialize(Security::SessionPointer &) override;
+ void noteNegotiationDone(ErrorState *error) override;
+ Security::ContextPointer getTlsContext() override {
return icapService->sslContext;
}
private:
/* Acl::ChecklistFiller API */
- virtual void fillChecklist(ACLFilledChecklist &) const;
+ void fillChecklist(ACLFilledChecklist &) const override;
Adaptation::Icap::ServiceRep::Pointer icapService;
};
public:
Xaction(const char *aTypeName, ServiceRep::Pointer &aService);
- virtual ~Xaction();
+ ~Xaction() override;
void disableRetries();
void disableRepeats(const char *reason);
int attempts;
protected:
- virtual void start();
- virtual void noteInitiatorAborted(); // TODO: move to Adaptation::Initiate
+ void start() override;
+ void noteInitiatorAborted() override; // TODO: move to Adaptation::Initiate
/// starts sending/receiving ICAP messages
virtual void startShoveling() = 0;
virtual bool doneReading() const;
virtual bool doneWriting() const;
bool doneWithIo() const;
- virtual bool doneAll() const;
+ bool doneAll() const override;
// called just before the 'done' transaction is deleted
- virtual void swanSong();
+ void swanSong() override;
// returns a temporary string depicting transaction status, for debugging
- virtual const char *status() const;
+ const char *status() const override;
virtual void fillPendingStatus(MemBuf &buf) const;
virtual void fillDoneStatus(MemBuf &buf) const;
public:
// custom exception handling and end-of-call checks
- virtual void callException(const std::exception &e);
- virtual void callEnd();
+ void callException(const std::exception &e) override;
+ void callEnd() override;
/// clear stored error details, if any; used for retries/repeats
virtual void clearError() {}
virtual AccessLogEntry::Pointer masterLogEntry();
PortCfg();
// no public copying/moving but see ipV4clone()
PortCfg(PortCfg &&) = delete;
- ~PortCfg();
+ ~PortCfg() override;
/// creates the same port configuration but listening on any IPv4 address
PortCfg *ipV4clone() const;
/* CodeContext API */
- virtual ScopedId codeContextGist() const override;
- virtual std::ostream &detailCodeContext(std::ostream &os) const override;
+ ScopedId codeContextGist() const override;
+ std::ostream &detailCodeContext(std::ostream &os) const override;
PortCfgPointer next;
public:
explicit ACLMaxUserIP(char const *theClass);
- virtual char const *typeString() const;
- virtual const Acl::Options &options();
- virtual void parse();
- virtual int match(ACLChecklist *cl);
- virtual SBufList dump() const;
- virtual bool empty() const;
- virtual bool valid() const;
- virtual bool requiresRequest() const {return true;}
+ char const *typeString() const override;
+ const Acl::Options &options() override;
+ void parse() override;
+ int match(ACLChecklist *cl) override;
+ SBufList dump() const override;
+ bool empty() const override;
+ bool valid() const override;
+ bool requiresRequest() const override {return true;}
int getMaximum() const {return maximum;}
public:
static ProxyAuthLookup *Instance();
- virtual void checkForAsync(ACLChecklist *) const;
+ void checkForAsync(ACLChecklist *) const override;
private:
static ProxyAuthLookup instance_;
MEMPROXY_CLASS(ACLProxyAuth);
public:
- ~ACLProxyAuth();
+ ~ACLProxyAuth() override;
ACLProxyAuth(ACLData<char const *> *, char const *);
/* ACL API */
- virtual char const *typeString() const;
- virtual void parse();
- virtual bool isProxyAuth() const {return true;}
- virtual int match(ACLChecklist *checklist);
- virtual SBufList dump() const;
- virtual bool valid() const;
- virtual bool empty() const;
- virtual bool requiresRequest() const {return true;}
- virtual int matchForCache(ACLChecklist *checklist);
+ char const *typeString() const override;
+ void parse() override;
+ bool isProxyAuth() const override {return true;}
+ int match(ACLChecklist *checklist) override;
+ SBufList dump() const override;
+ bool valid() const override;
+ bool empty() const override;
+ bool requiresRequest() const override {return true;}
+ int matchForCache(ACLChecklist *checklist) override;
private:
/* ACL API */
- virtual const Acl::Options &lineOptions();
+ const Acl::Options &lineOptions() override;
int matchProxyAuth(ACLChecklist *);
ACLData<char const *> *data;
whichCache(c)
{}
- virtual ~CredentialCacheRr() {
+ ~CredentialCacheRr() override {
debugs(29, 5, "Terminating Auth credentials cache: " << name);
// invalidate the CBDATA reference.
// causes Auth::*::User::Cache() to produce nil / invalid pointer
delete whichCache.get();
}
- virtual void endingShutdown() override {
+ void endingShutdown() override {
debugs(29, 5, "Clearing Auth credentials cache: " << name);
whichCache->reset();
}
- virtual void syncConfig() override {
+ void syncConfig() override {
debugs(29, 5, "Reconfiguring Auth credentials cache: " << name);
whichCache->doConfigChangeCleanup();
}
public:
Scheme() : initialised (false) {};
- virtual ~Scheme() {};
+ ~Scheme() override {};
static void AddScheme(Scheme::Pointer);
protected:
User(Auth::SchemeConfig *, const char *requestRealm);
public:
- virtual ~User();
+ ~User() override;
/* extra fields for proxy_auth */
/** \deprecated this determines what scheme owns the user data. */
typedef RefCount<Auth::UserRequest> Pointer;
UserRequest();
- virtual ~UserRequest();
+ ~UserRequest() override;
void *operator new(size_t byteCount);
void operator delete(void *address);
{
public:
Config();
- virtual bool active() const;
- virtual bool configured() const;
- virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm);
- virtual void done();
- virtual void rotateHelpers();
- virtual bool dump(StoreEntry *, const char *, Auth::SchemeConfig *) const;
- virtual void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *);
- virtual void init(Auth::SchemeConfig *);
- virtual void parse(Auth::SchemeConfig *, int, char *);
+ bool active() const override;
+ bool configured() const override;
+ Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm) override;
+ void done() override;
+ void rotateHelpers() override;
+ bool dump(StoreEntry *, const char *, Auth::SchemeConfig *) const override;
+ void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *) override;
+ void init(Auth::SchemeConfig *) override;
+ void parse(Auth::SchemeConfig *, int, char *) override;
void decode(char const *httpAuthHeader, Auth::UserRequest::Pointer);
- virtual void registerWithCacheManager(void);
- virtual const char * type() const;
+ void registerWithCacheManager(void) override;
+ const char * type() const override;
public:
time_t credentialsTTL;
public:
static Auth::Scheme::Pointer GetInstance();
Scheme() {};
- virtual ~Scheme() {}
+ ~Scheme() override {}
/* per scheme */
- virtual char const *type() const;
- virtual void shutdownCleanup();
- virtual Auth::SchemeConfig *createConfig();
+ char const *type() const override;
+ void shutdownCleanup() override;
+ Auth::SchemeConfig *createConfig() override;
/* Not implemented */
Scheme(Scheme const &);
Scheme &operator=(Scheme const &);
public:
User(Auth::SchemeConfig *, const char *requestRealm);
- virtual ~User();
+ ~User() override;
bool authenticated() const;
bool valid() const;
/** Update the cached password for a username. */
void updateCached(User *from);
- virtual int32_t ttl() const override;
+ int32_t ttl() const override;
/* Auth::User API */
static CbcPointer<Auth::CredentialsCache> Cache();
- virtual void addToNameCache() override;
+ void addToNameCache() override;
char *passwd;
public:
UserRequest() {}
- virtual ~UserRequest() { assert(LockCount()==0); }
+ ~UserRequest() override { assert(LockCount()==0); }
- virtual int authenticated() const;
- virtual void authenticate(HttpRequest * request, ConnStateData *conn, Http::HdrType type);
- virtual Auth::Direction module_direction();
- virtual void startHelperLookup(HttpRequest * request, AccessLogEntry::Pointer &al, AUTHCB *, void *);
- virtual const char *credentialsStr();
+ int authenticated() const override;
+ void authenticate(HttpRequest * request, ConnStateData *conn, Http::HdrType type) override;
+ Auth::Direction module_direction() override;
+ void startHelperLookup(HttpRequest * request, AccessLogEntry::Pointer &al, AUTHCB *, void *) override;
+ const char *credentialsStr() override;
private:
static HLPCB HandleReply;
{
public:
Config();
- virtual bool active() const;
- virtual bool configured() const;
- virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm);
- virtual void done();
- virtual void rotateHelpers();
- virtual bool dump(StoreEntry *, const char *, Auth::SchemeConfig *) const;
- virtual void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *);
- virtual void init(Auth::SchemeConfig *);
- virtual void parse(Auth::SchemeConfig *, int, char *);
- virtual void registerWithCacheManager(void);
- virtual const char * type() const;
+ bool active() const override;
+ bool configured() const override;
+ Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm) override;
+ void done() override;
+ void rotateHelpers() override;
+ bool dump(StoreEntry *, const char *, Auth::SchemeConfig *) const override;
+ void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *) override;
+ void init(Auth::SchemeConfig *) override;
+ void parse(Auth::SchemeConfig *, int, char *) override;
+ void registerWithCacheManager(void) override;
+ const char * type() const override;
public:
time_t nonceGCInterval;
public:
static Auth::Scheme::Pointer GetInstance();
Scheme() {};
- virtual ~Scheme() {}
+ ~Scheme() override {}
/* per scheme */
- virtual char const *type () const;
- virtual void shutdownCleanup();
- virtual Auth::SchemeConfig *createConfig();
+ char const *type () const override;
+ void shutdownCleanup() override;
+ Auth::SchemeConfig *createConfig() override;
/* Not implemented */
Scheme(Scheme const &);
public:
User(Auth::SchemeConfig *, const char *requestRealm);
- virtual ~User();
+ ~User() override;
int authenticated() const;
- virtual int32_t ttl() const override;
+ int32_t ttl() const override;
/* Auth::User API */
static CbcPointer<Auth::CredentialsCache> Cache();
- virtual void addToNameCache() override;
+ void addToNameCache() override;
HASH HA1;
int HA1created;
public:
UserRequest();
- virtual ~UserRequest();
+ ~UserRequest() override;
- virtual int authenticated() const;
- virtual void authenticate(HttpRequest * request, ConnStateData * conn, Http::HdrType type);
- virtual Direction module_direction();
- virtual void addAuthenticationInfoHeader(HttpReply * rep, int accel);
+ int authenticated() const override;
+ void authenticate(HttpRequest * request, ConnStateData * conn, Http::HdrType type) override;
+ Direction module_direction() override;
+ void addAuthenticationInfoHeader(HttpReply * rep, int accel) override;
#if WAITING_FOR_TE
virtual void addAuthenticationInfoTrailer(HttpReply * rep, int accel);
#endif
- virtual void startHelperLookup(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *);
- virtual const char *credentialsStr();
+ void startHelperLookup(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *) override;
+ const char *credentialsStr() override;
char *noncehex; /* "dcd98b7102dd2f0e8b11d0f600bfb0c093" */
char *cnonce; /* "0a4f113b" */
class Config : public Auth::SchemeConfig
{
public:
- virtual bool active() const;
- virtual bool configured() const;
- virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm);
- virtual void done();
- virtual void rotateHelpers();
- virtual void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *);
- virtual void init(Auth::SchemeConfig *);
- virtual void registerWithCacheManager(void);
- virtual const char * type() const;
+ bool active() const override;
+ bool configured() const override;
+ Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm) override;
+ void done() override;
+ void rotateHelpers() override;
+ void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *) override;
+ void init(Auth::SchemeConfig *) override;
+ void registerWithCacheManager(void) override;
+ const char * type() const override;
};
} // namespace Negotiate
public:
static Auth::Scheme::Pointer GetInstance();
Scheme() {};
- virtual ~Scheme() {};
+ ~Scheme() override {};
/* per scheme */
- virtual char const *type() const;
- virtual void shutdownCleanup();
- virtual Auth::SchemeConfig *createConfig();
+ char const *type() const override;
+ void shutdownCleanup() override;
+ Auth::SchemeConfig *createConfig() override;
/* Not implemented */
Scheme (Scheme const &);
public:
User(Auth::SchemeConfig *, const char *requestRealm);
- virtual ~User();
- virtual int32_t ttl() const override;
+ ~User() override;
+ int32_t ttl() const override;
/* Auth::User API */
static CbcPointer<Auth::CredentialsCache> Cache();
- virtual void addToNameCache() override;
+ void addToNameCache() override;
dlink_list proxy_auth_list;
};
public:
UserRequest();
- virtual ~UserRequest();
- virtual int authenticated() const;
- virtual void authenticate(HttpRequest * request, ConnStateData * conn, Http::HdrType type);
- virtual Direction module_direction();
- virtual void startHelperLookup(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *);
- virtual const char *credentialsStr();
+ ~UserRequest() override;
+ int authenticated() const override;
+ void authenticate(HttpRequest * request, ConnStateData * conn, Http::HdrType type) override;
+ Direction module_direction() override;
+ void startHelperLookup(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *) override;
+ const char *credentialsStr() override;
- virtual const char * connLastHeader();
+ const char * connLastHeader() override;
- void releaseAuthServer(void); ///< Release the authserver helper server properly.
+ void releaseAuthServer(void) override; ///< Release the authserver helper server properly.
/* what connection is this associated with */
/* ConnStateData * conn;*/
class Config : public Auth::SchemeConfig
{
public:
- virtual bool active() const;
- virtual bool configured() const;
- virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm);
- virtual void done();
- virtual void rotateHelpers();
- virtual void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *);
- virtual void init(Auth::SchemeConfig *);
- virtual void registerWithCacheManager(void);
- virtual const char * type() const;
+ bool active() const override;
+ bool configured() const override;
+ Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm) override;
+ void done() override;
+ void rotateHelpers() override;
+ void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *) override;
+ void init(Auth::SchemeConfig *) override;
+ void registerWithCacheManager(void) override;
+ const char * type() const override;
};
} // namespace Ntlm
{
public:
/* RegisteredRunner API */
- virtual void bootstrapConfig() override {
+ void bootstrapConfig() override {
const char *type = Auth::Ntlm::Scheme::GetInstance()->type();
debugs(29, 2, "Initialized Authentication Scheme '" << type << "'");
}
public:
static Auth::Scheme::Pointer GetInstance();
Scheme() {};
- virtual ~Scheme() {};
+ ~Scheme() override {};
/* per scheme */
- virtual char const *type() const;
- virtual void shutdownCleanup();
- virtual Auth::SchemeConfig *createConfig();
+ char const *type() const override;
+ void shutdownCleanup() override;
+ Auth::SchemeConfig *createConfig() override;
/* Not implemented */
Scheme (Scheme const &);
public:
User(Auth::SchemeConfig *, const char *requestRealm);
- virtual ~User();
- virtual int32_t ttl() const override;
+ ~User() override;
+ int32_t ttl() const override;
/* Auth::User API */
static CbcPointer<Auth::CredentialsCache> Cache();
- virtual void addToNameCache() override;
+ void addToNameCache() override;
dlink_list proxy_auth_list;
};
public:
UserRequest();
- virtual ~UserRequest();
- virtual int authenticated() const;
- virtual void authenticate(HttpRequest * request, ConnStateData * conn, Http::HdrType type);
- virtual Auth::Direction module_direction();
- virtual void startHelperLookup(HttpRequest *req, AccessLogEntry::Pointer &al, AUTHCB *, void *);
- virtual const char *credentialsStr();
+ ~UserRequest() override;
+ int authenticated() const override;
+ void authenticate(HttpRequest * request, ConnStateData * conn, Http::HdrType type) override;
+ Auth::Direction module_direction() override;
+ void startHelperLookup(HttpRequest *req, AccessLogEntry::Pointer &al, AUTHCB *, void *) override;
+ const char *credentialsStr() override;
- virtual const char * connLastHeader();
+ const char * connLastHeader() override;
- virtual void releaseAuthServer(); ///< Release authserver NTLM helpers properly when finished or abandoning.
+ void releaseAuthServer() override; ///< Release authserver NTLM helpers properly when finished or abandoning.
/* our current blob to pass to the client */
char *server_blob;
typedef RefCount <AsyncCall> Pointer;
AsyncCall(int aDebugSection, int aDebugLevel, const char *aName);
- virtual ~AsyncCall();
+ ~AsyncCall() override;
void make(); // fire if we can; handles general call debugging
AsyncCall(o.debugSection, o.debugLevel, o.name),
dialer(o.dialer) {}
- ~AsyncCallT() {}
+ ~AsyncCallT() override {}
- CallDialer *getDialer() { return &dialer; }
+ CallDialer *getDialer() override { return &dialer; }
Dialer dialer;
protected:
- virtual bool canFire() {
+ bool canFire() override {
return AsyncCall::canFire() &&
dialer.canDial(*this);
}
- virtual void fire() { dialer.dial(*this); }
+ void fire() override { dialer.dial(*this); }
private:
AsyncCallT & operator=(const AsyncCallT &); // not defined. call assignments not permitted.
using Handler = void (Argument1 &);
explicit UnaryFunCallbackDialer(Handler * const aHandler): handler(aHandler) {}
- virtual ~UnaryFunCallbackDialer() = default;
+ ~UnaryFunCallbackDialer() override = default;
/* CallDialer API */
bool canDial(AsyncCall &) { return bool(handler); }
void dial(AsyncCall &) { handler(arg1); }
- virtual void print(std::ostream &os) const final { os << '(' << arg1 << ')'; }
+ void print(std::ostream &os) const final { os << '(' << arg1 << ')'; }
/* WithAnswer API */
- virtual Argument1 &answer() final { return arg1; }
+ Argument1 &answer() final { return arg1; }
private:
Handler *handler; ///< the function to call
typedef void (Destination::*Method)(Argument1 &);
UnaryCbcCallbackDialer(Method method, Destination *destination): destination_(destination), method_(method) {}
- virtual ~UnaryCbcCallbackDialer() = default;
+ ~UnaryCbcCallbackDialer() override = default;
/* CallDialer API */
bool canDial(AsyncCall &) { return destination_.valid(); }
void dial(AsyncCall &) {((*destination_).*method_)(arg1_); }
- virtual void print(std::ostream &os) const final { os << '(' << arg1_ << ')'; }
+ void print(std::ostream &os) const final { os << '(' << arg1_ << ')'; }
/* WithAnswer API */
- virtual Argument1 &answer() final { return arg1_; }
+ Argument1 &answer() final { return arg1_; }
private:
CbcPointer<Destination> destination_; ///< object to deliver the answer to
Base(aJob, aMethod, {}) {}
/* WithAnswer API */
- virtual Argument1 &answer() final { return this->arg1; }
+ Argument1 &answer() final { return this->arg1; }
};
/// whether the given type is an AsyncJob
virtual bool canDial(AsyncCall &) { return arg1.valid(); }
void dial(AsyncCall &) { handler(arg1.get()); }
- virtual void print(std::ostream &os) const { os << '(' << arg1 << ')'; }
+ void print(std::ostream &os) const override { os << '(' << arg1 << ')'; }
public:
CbcPointer<Argument1> arg1;
/* CallDialer API */
bool canDial(AsyncCall &) { return bool(handler); }
void dial(AsyncCall &) { handler(); }
- virtual void print(std::ostream &os) const override { os << "()"; }
+ void print(std::ostream &os) const override { os << "()"; }
private:
Handler *handler; ///< the function to call (or nil)
handler(aHandler),
arg1(anArg1)
{}
- virtual ~UnaryFunDialer() = default;
+ ~UnaryFunDialer() override = default;
/* CallDialer API */
bool canDial(AsyncCall &) { return bool(handler); }
void dial(AsyncCall &) { handler(std::move(arg1)); }
- virtual void print(std::ostream &os) const final { os << '(' << arg1 << ')'; }
+ void print(std::ostream &os) const final { os << '(' << arg1 << ')'; }
private:
Handler *handler; ///< the function to call
protected:
// external destruction prohibited to ensure swanSong() is called
- virtual ~AsyncJob();
+ ~AsyncJob() override;
const char *stopReason; ///< reason for forcing done() to be true
const char *typeName; ///< kid (leaf) class name, for debugging
explicit NullaryMemFunT(const CbcPointer<Job> &aJob, Method aMethod):
JobDialer<Job>(aJob), method(aMethod) {}
- virtual void print(std::ostream &os) const { os << "()"; }
+ void print(std::ostream &os) const override { os << "()"; }
public:
Method method;
protected:
- virtual void doDial() { ((&(*this->job))->*method)(); }
+ void doDial() override { ((&(*this->job))->*method)(); }
};
template <class Job, class Data, class Argument1 = Data>
const Data &anArg1): JobDialer<Job>(aJob),
method(aMethod), arg1(anArg1) {}
- virtual void print(std::ostream &os) const { os << '(' << arg1 << ')'; }
+ void print(std::ostream &os) const override { os << '(' << arg1 << ')'; }
public:
Method method;
Data arg1;
protected:
- virtual void doDial() { ((&(*this->job))->*method)(arg1); }
+ void doDial() override { ((&(*this->job))->*method)(arg1); }
};
// ... add more as needed
{
public:
/* CodeContext API */
- virtual ScopedId codeContextGist() const override { return gist; }
- virtual std::ostream &detailCodeContext(std::ostream &os) const override { return os << gist; }
+ ScopedId codeContextGist() const override { return gist; }
+ std::ostream &detailCodeContext(std::ostream &os) const override { return os << gist; }
ScopedId gist; ///< identifies the being-forgotten CodeContext
};
/// changes the current context; nil argument sets it to nil/unknown
static void Reset(const Pointer);
- virtual ~CodeContext() {}
+ ~CodeContext() override {}
/// \returns a small, permanent ID of the current context
/// gists persist forever and are suitable for passing to other SMP workers
{
public:
explicit AppendingStreamBuf(Buffer &p): buf_(p) { postInit(); }
- virtual ~AppendingStreamBuf() = default;
+ ~AppendingStreamBuf() override = default;
protected:
/* std::streambuf API */
- virtual int_type overflow(int_type aChar = traits_type::eof()) override {
+ int_type overflow(int_type aChar = traits_type::eof()) override {
std::streamsize pending(pptr() - pbase());
if (pending && sync())
return aChar;
}
- virtual int sync() override {
+ int sync() override {
std::streamsize pending(pptr() - pbase());
lowAppend(pbase(), pending);
postSync();
return 0;
}
- virtual std::streamsize xsputn(const char * chars, std::streamsize number) override {
+ std::streamsize xsputn(const char * chars, std::streamsize number) override {
lowAppend(chars, number);
return number;
}
class IndependentRunner: public RegisteredRunner
{
public:
- virtual ~IndependentRunner() { unregisterRunner(); }
+ ~IndependentRunner() override { unregisterRunner(); }
protected:
void registerRunner();
public:
/// Must be passed an object. nil pointers are not permitted.
explicit CallSubscription(const RefCount<Call_> &aCall) : call(aCall) { assert(aCall != nullptr); }
- virtual AsyncCall::Pointer callback() const
+ AsyncCall::Pointer callback() const override
{
const AsyncCall::Pointer cb = new Call_(*call);
if (!cb->codeContext || CodeContext::Current())
TextException& operator=(const TextException &) = default;
/* std::runtime_error API */
- virtual ~TextException() throw() override;
- virtual const char *what() const throw() override;
+ ~TextException() throw() override;
+ const char *what() const throw() override;
/// same-location exceptions have the same ID
SourceLocationId id() const { return where.id(); }
public:
static Ssl::BumpMode lastDeprecatedRule;
/* RegisteredRunner API */
- virtual void finalizeConfig();
+ void finalizeConfig() override;
};
Ssl::BumpMode sslBumpCfgRr::lastDeprecatedRule = Ssl::bumpEnd;
public:
ClassActionCreator(Handler *aHandler): handler(aHandler) {}
- virtual Mgr::Action::Pointer create(const Mgr::Command::Pointer &cmd) const {
+ Mgr::Action::Pointer create(const Mgr::Command::Pointer &cmd) const override {
return handler(cmd);
}
static cbdata_type CBDATA_##type;
/// Starts cbdata-protection in a class hierarchy.
-/// Child classes in the same hierarchy should use CBDATA_CHILD().
+/// Intermediate classes in the same hierarchy must use CBDATA_INTERMEDIATE() if
+/// they risk creating cbdata pointers in their constructors.
+/// Final classes in the same hierarchy must use CBDATA_CHILD().
class CbdataParent
{
public:
virtual ~CbdataParent() {}
virtual void *toCbdata() = 0;
+
+private:
+ /// hack: ensure CBDATA_CHILD() after a toCbdata()-defining CBDATA_INTERMEDIATE()
+ virtual void finalizedInCbdataChild() = 0;
};
/// cbdata-enables a stand-alone class that is not a CbdataParent child
/// use this at the start of your class declaration for consistency sake
#define CBDATA_CLASS(type) CBDATA_DECL_(type, noexcept)
-/// cbdata-enables a CbdataParent child class (including grandchildren)
+/// cbdata-enables a final CbdataParent-derived class in a hierarchy
/// sets the class declaration section to "private"
/// use this at the start of your class declaration for consistency sake
-#define CBDATA_CHILD(type) CBDATA_DECL_(type, override final)
+#define CBDATA_CHILD(type) CBDATA_DECL_(type, final) \
+ void finalizedInCbdataChild() final {}
+
+/// cbdata-enables a non-final CbdataParent-derived class T in a hierarchy.
+/// Using this macro is required to be able to create cbdata pointers in T
+/// constructors, when the current vtable is still pointing to T::toCbdata()
+/// that would have been pure without this macro, leading to FATAL runtime
+/// OnTerminate() calls. However, assuming that the final cbdata pointer will
+/// still point to T::this is risky -- multiple inheritance changes "this"!
+///
+/// sets the class declaration section to "private"
+/// use this at the start of your class declaration for consistency sake
+#define CBDATA_INTERMEDIATE() \
+ public: \
+ void *toCbdata() override { return this; } \
+ private:
/**
* Creates a global instance pointer for the CBDATA memory allocator
{
public:
/* RegisteredRunner API */
- virtual void useConfig();
+ void useConfig() override;
};
RunnerRegistrationEntry(ClientDbRr);
handler(aHandler), portCfg(aPortCfg), portTypeNote(note), sub(aSub) {}
/* CallDialer API */
- virtual void print(std::ostream &os) const {
+ void print(std::ostream &os) const override {
os << '(' << answer_ << ", " << FdNote(portTypeNote) << " port=" << (void*)&portCfg << ')';
}
virtual void dial(AsyncCall &) { (handler)(portCfg, portTypeNote, sub); }
/* WithAnswer API */
- virtual Ipc::StartListeningAnswer &answer() { return answer_; }
+ Ipc::StartListeningAnswer &answer() override { return answer_; }
public:
Handler handler;
public:
explicit ConnStateData(const MasterXactionPointer &xact);
- virtual ~ConnStateData();
+ ~ConnStateData() override;
/* ::Server API */
- virtual void receivedFirstByte();
- virtual bool handleReadData();
- virtual void afterClientRead();
- virtual void afterClientWrite(size_t);
+ void receivedFirstByte() override;
+ bool handleReadData() override;
+ void afterClientRead() override;
+ void afterClientWrite(size_t) override;
/* HttpControlMsgSink API */
- virtual void sendControlMsg(HttpControlMsg);
- virtual void doneWithControlMsg();
+ void sendControlMsg(HttpControlMsg) override;
+ void doneWithControlMsg() override;
/// Traffic parsing
bool clientParseRequests();
/* BodyPipe API */
BodyPipe::Pointer expectRequestBody(int64_t size);
- virtual void noteMoreBodySpaceAvailable(BodyPipe::Pointer) = 0;
- virtual void noteBodyConsumerAborted(BodyPipe::Pointer) = 0;
+ void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override = 0;
+ void noteBodyConsumerAborted(BodyPipe::Pointer) override = 0;
bool handleRequestBodyData();
void lifetimeTimeout(const CommTimeoutCbParams ¶ms);
// AsyncJob API
- virtual void start();
- virtual bool doneAll() const { return BodyProducer::doneAll() && false;}
- virtual void swanSong();
- virtual void callException(const std::exception &);
+ void start() override;
+ bool doneAll() const override { return BodyProducer::doneAll() && false;}
+ void swanSong() override;
+ void callException(const std::exception &) override;
/// Changes state so that we close the connection and quit after serving
/// the client-side-detected error response instead of getting stuck.
SBuf preservedClientData;
/* Registered Runner API */
- virtual void startShutdown();
- virtual void endingShutdown();
+ void startShutdown() override;
+ void endingShutdown() override;
/// \returns existing non-empty connection annotations,
/// creates and returns empty annotations otherwise
void updateError(const err_type c, const ErrorDetailPointer &d) { updateError(Error(c, d)); }
/* Acl::ChecklistFiller API */
- virtual void fillChecklist(ACLFilledChecklist &) const;
+ void fillChecklist(ACLFilledChecklist &) const override;
/// fillChecklist() obligations not fulfilled by the front request
/// TODO: This is a temporary ACLFilledChecklist::setConn() callback to
private:
/* ::Server API */
- virtual void terminateAll(const Error &, const LogTagsErrors &);
- virtual bool shouldCloseOnEof() const;
+ void terminateAll(const Error &, const LogTagsErrors &) override;
+ bool shouldCloseOnEof() const override;
void checkLogging();
static STCB SendMoreData;
clientReplyContext(ClientHttpRequest *);
- ~clientReplyContext();
+ ~clientReplyContext() override;
void saveState();
void restoreState();
Http::StatusCode purgeStatus;
/* StoreClient API */
- virtual LogTags *loggingTags() const;
+ LogTags *loggingTags() const override;
ClientHttpRequest *http;
/// Base reply header bytes received from Store.
private:
/* StoreClient API */
- virtual void fillChecklist(ACLFilledChecklist &) const;
+ void fillChecklist(ACLFilledChecklist &) const override;
clientStreamNode *getNextNode() const;
void makeThisHead();
public BodyConsumer // to receive reply bodies in request satisf. mode
#endif
{
+#if USE_ADAPTATION
+ CBDATA_CHILD(ClientHttpRequest);
+#else
CBDATA_CLASS(ClientHttpRequest);
+#endif
public:
ClientHttpRequest(ConnStateData *);
ClientHttpRequest(ClientHttpRequest &&) = delete;
+#if USE_ADAPTATION
+ ~ClientHttpRequest() override;
+#else
~ClientHttpRequest();
+#endif
String rangeBoundaryStr() const;
void freeResources();
bool requestSatisfactionMode() const { return request_satisfaction_mode; }
/* AsyncJob API */
- virtual bool doneAll() const {
+ bool doneAll() const override {
return Initiator::doneAll() &&
BodyConsumer::doneAll() &&
false; // TODO: Refactor into a proper AsyncJob
}
- virtual void callException(const std::exception &);
+ void callException(const std::exception &) override;
private:
/// Handles an adaptation client request failure.
void handleAdaptationBlock(const Adaptation::Answer &);
/* Adaptation::Initiator API */
- virtual void noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer);
- virtual void noteAdaptationAnswer(const Adaptation::Answer &);
+ void noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer) override;
+ void noteAdaptationAnswer(const Adaptation::Answer &) override;
/* BodyConsumer API */
- virtual void noteMoreBodyDataAvailable(BodyPipe::Pointer);
- virtual void noteBodyProductionEnded(BodyPipe::Pointer);
- virtual void noteBodyProducerAborted(BodyPipe::Pointer);
+ void noteMoreBodyDataAvailable(BodyPipe::Pointer) override;
+ void noteBodyProductionEnded(BodyPipe::Pointer) override;
+ void noteBodyProducerAborted(BodyPipe::Pointer) override;
void endRequestSatisfaction();
/// called by StoreEntry when it has more buffer space available
public:
Client(FwdState *);
- virtual ~Client();
+ ~Client() override;
/// \return primary or "request data connection"
virtual const Comm::ConnectionPointer & dataConnection() const = 0;
// BodyConsumer: consume request body or adapted response body.
// The implementation just calls the corresponding HTTP or ICAP handle*()
// method, depending on the pipe.
- virtual void noteMoreBodyDataAvailable(BodyPipe::Pointer);
- virtual void noteBodyProductionEnded(BodyPipe::Pointer);
- virtual void noteBodyProducerAborted(BodyPipe::Pointer);
+ void noteMoreBodyDataAvailable(BodyPipe::Pointer) override;
+ void noteBodyProductionEnded(BodyPipe::Pointer) override;
+ void noteBodyProducerAborted(BodyPipe::Pointer) override;
/// read response data from the network
virtual void maybeReadVirginBody() = 0;
#if USE_ADAPTATION
// Adaptation::Initiator API: start an ICAP transaction and receive adapted headers.
- virtual void noteAdaptationAnswer(const Adaptation::Answer &answer);
- virtual void noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer group);
+ void noteAdaptationAnswer(const Adaptation::Answer &answer) override;
+ void noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer group) override;
// BodyProducer: provide virgin response body to ICAP.
- virtual void noteMoreBodySpaceAvailable(BodyPipe::Pointer );
- virtual void noteBodyConsumerAborted(BodyPipe::Pointer );
+ void noteMoreBodySpaceAvailable(BodyPipe::Pointer ) override;
+ void noteBodyConsumerAborted(BodyPipe::Pointer ) override;
#endif
virtual bool getMoreRequestBody(MemBuf &buf);
virtual void processReplyBody() = 0;
//AsyncJob virtual methods
- virtual void swanSong();
- virtual bool doneAll() const;
+ void swanSong() override;
+ bool doneAll() const override;
public: // should be protected
void serverComplete(); /**< call when no server communication is expected */
explicit ErrorDetail(const int code): completionCode(code) {}
/* ErrorDetail API */
- virtual SBuf brief() const override;
- virtual SBuf verbose(const HttpRequestPointer &) const override;
+ SBuf brief() const override;
+ SBuf verbose(const HttpRequestPointer &) const override;
private:
int completionCode; ///< FTP reply completion code
/// FTP client functionality shared among FTP Gateway and Relay clients.
class Client: public ::Client
{
- CBDATA_CLASS(Client);
-
public:
explicit Client(FwdState *fwdState);
- virtual ~Client();
+ ~Client() override;
/// handle a fatal transaction error, closing the control connection
virtual void failed(err_type error = ERR_NONE, int xerrno = 0,
virtual void timeout(const CommTimeoutCbParams &io);
/* Client API */
- virtual void maybeReadVirginBody();
+ void maybeReadVirginBody() override;
void writeCommand(const char *buf);
protected:
/* AsyncJob API */
- virtual void start();
+ void start() override;
/* Client API */
- virtual void closeServer();
- virtual bool doneWithServer() const;
- virtual const Comm::ConnectionPointer & dataConnection() const;
- virtual void abortAll(const char *reason);
- virtual void noteDelayAwareReadChance();
+ void closeServer() override;
+ bool doneWithServer() const override;
+ const Comm::ConnectionPointer & dataConnection() const override;
+ void abortAll(const char *reason) override;
+ void noteDelayAwareReadChance() override;
virtual Http::StatusCode failedHttpStatus(err_type &error);
void ctrlClosed(const CommCloseCbParams &io);
void initReadBuf();
// sending of the request body to the server
- virtual void sentRequestBody(const CommIoCbParams &io);
- virtual void doneSendingRequestBody();
+ void sentRequestBody(const CommIoCbParams &io) override;
+ void doneSendingRequestBody() override;
/// Waits for an FTP data connection to the server to be established/opened.
/// This wait only happens in FTP passive mode (via PASV or EPSV).
/// converts one or more FTP responses into the final HTTP response.
class Gateway : public Ftp::Client
{
- CBDATA_CLASS(Gateway);
+ CBDATA_CHILD(Gateway);
public:
Gateway(FwdState *);
- virtual ~Gateway();
+ ~Gateway() override;
char user[MAX_URL];
char password[MAX_URL];
int password_url;
public:
// these should all be private
- virtual void start();
- virtual Http::StatusCode failedHttpStatus(err_type &error);
+ void start() override;
+ Http::StatusCode failedHttpStatus(err_type &error) override;
int restartable();
void appendSuccessHeader();
void hackShortcut(StateMethod *nextState);
void buildTitleUrl();
void writeReplyBody(const char *, size_t len);
void printfReplyBody(const char *fmt, ...);
- virtual void completeForwarding();
+ void completeForwarding() override;
void processHeadResponse();
- void processReplyBody();
+ void processReplyBody() override;
void setCurrentOffset(int64_t offset) { currentOffset = offset; }
int64_t getCurrentOffset() const { return currentOffset; }
- virtual void dataChannelConnected(const CommConnectCbParams &io);
+ void dataChannelConnected(const CommConnectCbParams &io) override;
static PF ftpDataWrite;
- virtual void timeout(const CommTimeoutCbParams &io);
+ void timeout(const CommTimeoutCbParams &io) override;
void ftpAcceptDataConnection(const CommAcceptCbParams &io);
static HttpReply *ftpAuthRequired(HttpRequest * request, SBuf &realm, AccessLogEntry::Pointer &);
SBuf ftpRealm();
void loginFailed(void);
- virtual void haveParsedReplyHeaders();
+ void haveParsedReplyHeaders() override;
virtual bool haveControlChannel(const char *caller_name) const;
protected:
- virtual void handleControlReply();
- virtual void dataClosed(const CommCloseCbParams &io);
+ void handleControlReply() override;
+ void dataClosed(const CommCloseCbParams &io) override;
private:
- virtual bool mayReadVirginReplyBody() const;
+ bool mayReadVirginReplyBody() const override;
// BodyConsumer for HTTP: consume request body.
- virtual void handleRequestBodyProducerAborted();
+ void handleRequestBodyProducerAborted() override;
void loginParser(const SBuf &login, bool escaped);
};
/// and then relaying FTP replies back to our FTP server.
class Relay: public Ftp::Client
{
- CBDATA_CLASS(Relay);
+ CBDATA_CHILD(Relay);
public:
explicit Relay(FwdState *const fwdState);
- virtual ~Relay();
+ ~Relay() override;
protected:
const Ftp::MasterState &master() const;
void serverState(const Ftp::ServerState newState);
/* Ftp::Client API */
- virtual void failed(err_type error = ERR_NONE, int xerrno = 0, ErrorState *ftperr = nullptr);
- virtual void dataChannelConnected(const CommConnectCbParams &io);
+ void failed(err_type error = ERR_NONE, int xerrno = 0, ErrorState *ftperr = nullptr) override;
+ void dataChannelConnected(const CommConnectCbParams &io) override;
/* Client API */
virtual void serverComplete();
- virtual void handleControlReply();
- virtual void processReplyBody();
- virtual void handleRequestBodyProducerAborted();
- virtual bool mayReadVirginReplyBody() const;
- virtual void completeForwarding();
- virtual bool abortOnData(const char *reason);
+ void handleControlReply() override;
+ void processReplyBody() override;
+ void handleRequestBodyProducerAborted() override;
+ bool mayReadVirginReplyBody() const override;
+ void completeForwarding() override;
+ bool abortOnData(const char *reason) override;
/* AsyncJob API */
- virtual void start();
- virtual void swanSong();
+ void start() override;
+ void swanSong() override;
void forwardReply();
void forwardError(err_type error = ERR_NONE, int xerrno = 0);
/// connection during these negotiations. The caller receives TunnelerAnswer.
class Tunneler: virtual public AsyncJob
{
- CBDATA_CLASS(Tunneler);
+ CBDATA_CHILD(Tunneler);
public:
using Answer = TunnelerAnswer;
protected:
/* AsyncJob API */
- virtual ~Tunneler();
- virtual void start();
- virtual bool doneAll() const;
- virtual void swanSong();
- virtual const char *status() const;
+ ~Tunneler() override;
+ void start() override;
+ bool doneAll() const override;
+ void swanSong() override;
+ const char *status() const override;
void handleConnectionClosure(const CommCloseCbParams&);
void watchForClosures();
{
public:
- virtual int checkEvents(int timeout);
+ int checkEvents(int timeout) override;
};
#endif
/// Comm::OK with an open connection or another Comm::Flag with a closed one.
class ConnOpener : public AsyncJob
{
- CBDATA_CLASS(ConnOpener);
+ CBDATA_CHILD(ConnOpener);
public:
typedef CbcPointer<ConnOpener> Pointer;
- virtual bool doneAll() const;
+ bool doneAll() const override;
ConnOpener(const Comm::ConnectionPointer &, const AsyncCall::Pointer &handler, time_t connect_timeout);
- ~ConnOpener();
+ ~ConnOpener() override;
void setHost(const char *); ///< set the hostname note for this connection
const char * getHost() const; ///< get the hostname noted for this connection
protected:
- virtual void start();
- virtual void swanSong();
+ void start() override;
+ void swanSong() override;
private:
// Undefined because two openers cannot share a connection
Connection();
/** Clear the connection properties and close any open socket. */
- virtual ~Connection();
+ ~Connection() override;
/// To prevent accidental copying of Connection objects that we started to
/// open or that are open, use cloneProfile() instead.
const Security::NegotiationHistory *hasTlsNegotiations() const {return tlsHistory;}
/* CodeContext API */
- virtual ScopedId codeContextGist() const override;
- virtual std::ostream &detailCodeContext(std::ostream &os) const override;
+ ScopedId codeContextGist() const override;
+ std::ostream &detailCodeContext(std::ostream &os) const override;
public:
/** Address/Port for the Squid end of a TCP link. */
*/
class TcpAcceptor : public AsyncJob
{
- CBDATA_CLASS(TcpAcceptor);
+ CBDATA_CHILD(TcpAcceptor);
public:
typedef CbcPointer<Comm::TcpAcceptor> Pointer;
private:
- virtual void start();
- virtual bool doneAll() const;
- virtual void swanSong();
- virtual const char *status() const;
+ void start() override;
+ bool doneAll() const override;
+ void swanSong() override;
+ const char *status() const override;
TcpAcceptor(const TcpAcceptor &); // not implemented.
protected:
/* DebugChannel API */
- virtual bool shouldWrite(const DebugMessageHeader &) const final;
- virtual void write(const DebugMessageHeader &, const CompiledDebugMessageBody &) final;
+ bool shouldWrite(const DebugMessageHeader &) const final;
+ void write(const DebugMessageHeader &, const CompiledDebugMessageBody &) final;
};
/// DebugChannel managing messages destined for "standard error stream" (stderr)
protected:
/* DebugChannel API */
- virtual bool shouldWrite(const DebugMessageHeader &) const final;
- virtual void write(const DebugMessageHeader &, const CompiledDebugMessageBody &) final;
+ bool shouldWrite(const DebugMessageHeader &) const final;
+ void write(const DebugMessageHeader &, const CompiledDebugMessageBody &) final;
private:
/// whether we are the last resort for logging debugs() messages
protected:
/* DebugChannel API */
- virtual bool shouldWrite(const DebugMessageHeader &) const final;
- virtual void write(const DebugMessageHeader &, const CompiledDebugMessageBody &) final;
+ bool shouldWrite(const DebugMessageHeader &) const final;
+ void write(const DebugMessageHeader &, const CompiledDebugMessageBody &) final;
private:
bool opened = false; ///< whether openlog() was called
public:
typedef RefCount<Aggregate> Pointer;
Aggregate();
- ~Aggregate();
+ ~Aggregate() override;
virtual DelaySpec *rate() {return &spec;}
virtual DelaySpec const *rate() const {return &spec;}
- virtual void stats(StoreEntry * sentry);
- virtual void dump(StoreEntry *entry) const;
- virtual void update(int incr);
- virtual void parse();
+ void stats(StoreEntry * sentry) override;
+ void dump(StoreEntry *entry) const override;
+ void update(int incr) override;
+ void parse() override;
- virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
+ DelayIdComposite::Pointer id(CompositeSelectionDetails &) override;
private:
public:
AggregateId (RefCount<Aggregate>);
- virtual int bytesWanted (int min, int max) const;
- virtual void bytesIn(int qty);
- virtual void delayRead(const AsyncCallPointer &);
+ int bytesWanted (int min, int max) const override;
+ void bytesIn(int qty) override;
+ void delayRead(const AsyncCallPointer &) override;
private:
RefCount<Aggregate> theAggregate;
public:
typedef RefCount<VectorPool> Pointer;
- virtual void dump(StoreEntry *entry) const;
- virtual void parse();
- virtual void update(int incr);
- virtual void stats(StoreEntry * sentry);
+ void dump(StoreEntry *entry) const override;
+ void parse() override;
+ void update(int incr) override;
+ void stats(StoreEntry * sentry) override;
- virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
+ DelayIdComposite::Pointer id(CompositeSelectionDetails &) override;
VectorMap<unsigned char, DelayBucket> buckets;
VectorPool();
- ~VectorPool();
+ ~VectorPool() override;
protected:
bool keyAllocated (unsigned char const key) const;
public:
Id (RefCount<VectorPool>, int);
- virtual int bytesWanted (int min, int max) const;
- virtual void bytesIn(int qty);
+ int bytesWanted (int min, int max) const override;
+ void bytesIn(int qty) override;
private:
RefCount<VectorPool> theVector;
MEMPROXY_CLASS(IndividualPool);
protected:
- virtual char const *label() const {return "Individual";}
- virtual unsigned int makeKey(Ip::Address &src_addr) const;
+ char const *label() const override {return "Individual";}
+ unsigned int makeKey(Ip::Address &src_addr) const override;
};
/// \ingroup DelayPoolsInternal
MEMPROXY_CLASS(ClassCNetPool);
protected:
- virtual char const *label() const {return "Network";}
- virtual unsigned int makeKey (Ip::Address &src_addr) const;
+ char const *label() const override {return "Network";}
+ unsigned int makeKey (Ip::Address &src_addr) const override;
};
/* don't use remote storage for these */
public:
typedef RefCount<ClassCHostPool> Pointer;
- virtual void dump(StoreEntry *entry) const;
- virtual void parse();
- virtual void update(int incr);
- virtual void stats(StoreEntry * sentry);
+ void dump(StoreEntry *entry) const override;
+ void parse() override;
+ void update(int incr) override;
+ void stats(StoreEntry * sentry) override;
- virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
+ DelayIdComposite::Pointer id(CompositeSelectionDetails &) override;
ClassCHostPool();
- ~ClassCHostPool();
+ ~ClassCHostPool() override;
protected:
bool keyAllocated (unsigned char const key) const;
public:
Id (RefCount<ClassCHostPool>, unsigned char, unsigned char);
- virtual int bytesWanted (int min, int max) const;
- virtual void bytesIn(int qty);
+ int bytesWanted (int min, int max) const override;
+ void bytesIn(int qty) override;
private:
RefCount<ClassCHostPool> theClassCHost;
{
public:
/* RegisteredRunner API */
- virtual void startReconfigure() override;
- virtual void endingShutdown() override;
+ void startReconfigure() override;
+ void endingShutdown() override;
};
RunnerRegistrationEntry(ConfigRr);
explicit NamedErrorDetail(const char *aName): name(aName) {}
/* ErrorDetail API */
- virtual SBuf brief() const override { return name; }
- virtual SBuf verbose(const HttpRequestPointer &) const override { return name; }
+ SBuf brief() const override { return name; }
+ SBuf verbose(const HttpRequestPointer &) const override { return name; }
private:
/// distinguishes us from all other NamedErrorDetail objects
public:
using Pointer = ErrorDetailPointer;
- virtual ~ErrorDetail() {}
+ ~ErrorDetail() override {}
/// \returns a single "token" summarizing available details
/// suitable as an access.log field and similar output processed by programs
explicit ExceptionErrorDetail(const SourceLocationId id): exceptionId(SQUID_EXCEPTION_START_BASE + id) {}
/* ErrorDetail API */
- virtual SBuf brief() const override {
+ SBuf brief() const override {
return ToSBuf("exception=", std::hex, exceptionId);
}
- virtual SBuf verbose(const HttpRequestPointer &) const override {
+ SBuf verbose(const HttpRequestPointer &) const override {
return ToSBuf("Exception (ID=", std::hex, exceptionId, ')');
}
static SBuf Brief(int errorNo);
/* ErrorDetail API */
- virtual SBuf brief() const override;
- virtual SBuf verbose(const HttpRequestPointer &) const override;
+ SBuf brief() const override;
+ SBuf verbose(const HttpRequestPointer &) const override;
private:
// hidden by NewIfAny() to avoid creating SysErrorDetail from zero errno
const char *text() { return template_.c_str(); }
protected:
- virtual void setDefault() override {
+ void setDefault() override {
template_ = "Internal Error: Missing Template ";
template_.append(templateName.termedBuf());
}
class ESIVariableExpression : public ESIVarState::Variable
{
public:
- ~ESIVariableExpression();
+ ~ESIVariableExpression() override;
ESIVariableExpression (String const &value);
- virtual void eval (ESIVarState &state, char const *, char const *) const;
+ void eval (ESIVarState &state, char const *, char const *) const override;
private:
String expression;
ESIAssign (esiTreeParentPtr, int, const char **, ESIContext *);
ESIAssign (ESIAssign const &);
ESIAssign &operator=(ESIAssign const &);
- ~ESIAssign();
- esiProcessResult_t process (int dovars);
- void render(ESISegment::Pointer);
- bool addElement(ESIElement::Pointer);
- void provideData (ESISegment::Pointer data, ESIElement * source);
- Pointer makeCacheable() const;
- Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
- void finish();
+ ~ESIAssign() override;
+ esiProcessResult_t process (int dovars) override;
+ void render(ESISegment::Pointer) override;
+ bool addElement(ESIElement::Pointer) override;
+ void provideData (ESISegment::Pointer data, ESIElement * source) override;
+ Pointer makeCacheable() const override;
+ Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
+ void finish() override;
private:
void evaluateVariable();
memset(&flags, 0, sizeof(flags));
}
- ~ESIContext();
+ ~ESIContext() override;
enum esiKick_t {
ESI_KICK_FAILED,
};
/* when esi processing completes */
- void provideData(ESISegment::Pointer, ESIElement *source);
- void fail (ESIElement *source, char const*anError = nullptr);
+ void provideData(ESISegment::Pointer, ESIElement *source) override;
+ void fail (ESIElement *source, char const*anError = nullptr) override;
void startRead();
void finishRead();
bool reading() const;
void updateCachedAST();
bool hasCachedAST() const;
void getCachedAST();
- virtual void start(const char *el, const char **attr, size_t attrCount);
- virtual void end(const char *el);
- virtual void parserDefault (const char *s, int len);
- virtual void parserComment (const char *s);
+ void start(const char *el, const char **attr, size_t attrCount) override;
+ void end(const char *el) override;
+ void parserDefault (const char *s, int len) override;
+ void parserComment (const char *s) override;
bool processing;
};
virtual void fail(ESIElement * /* source */, char const * /* reason */ = nullptr) {}
- virtual ~esiTreeParent() {}
+ ~esiTreeParent() override {}
};
typedef RefCount<esiTreeParent> esiTreeParentPtr;
MEMPROXY_CLASS(esiComment);
public:
- ~esiComment();
+ ~esiComment() override;
esiComment();
- Pointer makeCacheable() const;
- Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+ Pointer makeCacheable() const override;
+ Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
- void render(ESISegment::Pointer);
- void finish();
+ void render(ESISegment::Pointer) override;
+ void finish() override;
};
#include "esi/Literal.h"
public:
esiRemove() : ESIElement() {}
- virtual ~esiRemove() {}
+ ~esiRemove() override {}
- virtual void render(ESISegment::Pointer);
- virtual bool addElement (ESIElement::Pointer);
- virtual Pointer makeCacheable() const;
- virtual Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
- virtual void finish() {}
+ void render(ESISegment::Pointer) override;
+ bool addElement (ESIElement::Pointer) override;
+ Pointer makeCacheable() const override;
+ Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
+ void finish() override {}
};
class esiTry : public ESIElement
public:
esiTry(esiTreeParentPtr aParent);
- ~esiTry();
+ ~esiTry() override;
- void render(ESISegment::Pointer);
- bool addElement (ESIElement::Pointer);
- void fail(ESIElement *, char const * = nullptr);
- esiProcessResult_t process (int dovars);
- void provideData (ESISegment::Pointer data, ESIElement * source);
- Pointer makeCacheable() const;
- Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+ void render(ESISegment::Pointer) override;
+ bool addElement (ESIElement::Pointer) override;
+ void fail(ESIElement *, char const * = nullptr) override;
+ esiProcessResult_t process (int dovars) override;
+ void provideData (ESISegment::Pointer data, ESIElement * source) override;
+ Pointer makeCacheable() const override;
+ Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
ESIElement::Pointer attempt;
ESIElement::Pointer except;
int attemptfailed:1; /* The attempt branch failed */
int exceptfailed:1; /* the except branch failed */
} flags;
- void finish();
+ void finish() override;
private:
void notifyParent();
public:
esiChoose(esiTreeParentPtr);
- ~esiChoose();
+ ~esiChoose() override;
- void render(ESISegment::Pointer);
- bool addElement (ESIElement::Pointer);
- void fail(ESIElement *, char const * = nullptr);
- esiProcessResult_t process (int dovars);
+ void render(ESISegment::Pointer) override;
+ bool addElement (ESIElement::Pointer) override;
+ void fail(ESIElement *, char const * = nullptr) override;
+ esiProcessResult_t process (int dovars) override;
- void provideData (ESISegment::Pointer data, ESIElement *source);
+ void provideData (ESISegment::Pointer data, ESIElement *source) override;
void makeCachableElements(esiChoose const &old);
void makeUsableElements(esiChoose const &old, ESIVarState &);
- Pointer makeCacheable() const;
- Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+ Pointer makeCacheable() const override;
+ Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
void NULLUnChosen();
Esi::Elements elements;
int chosenelement;
ESIElement::Pointer otherwise;
- void finish();
+ void finish() override;
private:
esiChoose(esiChoose const &);
public:
esiWhen(esiTreeParentPtr aParent, int attributes, const char **attr, ESIVarState *);
- ~esiWhen();
- Pointer makeCacheable() const;
- Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+ ~esiWhen() override;
+ Pointer makeCacheable() const override;
+ Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
bool testsTrue() const { return testValue;}
class ExpatRr : public RegisteredRunner
{
public:
- void finalizeConfig()
+ void finalizeConfig() override
{
registration.reset(new ESIParser::Register("expat", &ESIExpatParser::NewParser));
}
public:
ESIExpatParser(ESIParserClient *);
- ~ESIExpatParser();
+ ~ESIExpatParser() override;
/** \retval true on success */
- bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream);
+ bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream) override;
- long int lineNumber() const;
- char const * errorString() const;
+ long int lineNumber() const override;
+ char const * errorString() const override;
EsiParserDeclaration;
public:
typedef RefCount<ESIStreamContext> Pointer;
ESIStreamContext();
- ~ESIStreamContext();
+ ~ESIStreamContext() override;
void freeResources();
int finished;
ESIIncludePtr include;
public:
ESIInclude(esiTreeParentPtr, int attributes, const char **attr, ESIContext *);
- ~ESIInclude();
- void render(ESISegment::Pointer);
- esiProcessResult_t process (int dovars);
- Pointer makeCacheable() const;
- Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+ ~ESIInclude() override;
+ void render(ESISegment::Pointer) override;
+ esiProcessResult_t process (int dovars) override;
+ Pointer makeCacheable() const override;
+ Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
void subRequestDone (ESIStreamContext::Pointer, bool);
struct {
ESIVarState *varState;
char *srcurl, *alturl;
void includeFail(ESIStreamContext::Pointer);
- void finish();
+ void finish() override;
private:
void Start (ESIStreamContext::Pointer, char const *, ESIVarState *);
class Libxml2Rr : public RegisteredRunner
{
public:
- void finalizeConfig()
+ void finalizeConfig() override
{
registration.reset(new ESIParser::Register("libxml2", &ESILibxml2Parser::NewParser));
}
public:
ESILibxml2Parser(ESIParserClient *);
- ~ESILibxml2Parser();
+ ~ESILibxml2Parser() override;
/* true on success */
- bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream);
- long int lineNumber() const;
- char const * errorString() const;
+ bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream) override;
+ long int lineNumber() const override;
+ char const * errorString() const override;
ESIParserClient *getClient() { return theClient; }
public:
esiLiteral(ESISegment::Pointer);
esiLiteral(ESIContext *, const char *s, int len);
- ~esiLiteral();
+ ~esiLiteral() override;
- void render(ESISegment::Pointer);
- esiProcessResult_t process (int dovars);
- Pointer makeCacheable() const;
- Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+ void render(ESISegment::Pointer) override;
+ esiProcessResult_t process (int dovars) override;
+ Pointer makeCacheable() const override;
+ Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
/* optimise copies away later */
ESISegment::Pointer buffer;
} flags;
ESIVarState *varState;
- void finish();
+ void finish() override;
private:
esiLiteral(esiLiteral const &);
ESISegment() : len(0), next(nullptr) {*buf = 0;}
ESISegment(ESISegment const &);
- ~ESISegment() {}
+ ~ESISegment() override {}
ESISegment::Pointer cloneList() const;
char *listToChar() const;
public:
esiSequence(esiTreeParentPtr, bool = false);
- ~esiSequence();
+ ~esiSequence() override;
- void render(ESISegment::Pointer);
- bool addElement (ESIElement::Pointer);
- esiProcessResult_t process (int dovars);
- void provideData (ESISegment::Pointer, ESIElement*);
- bool mayFail () const;
+ void render(ESISegment::Pointer) override;
+ bool addElement (ESIElement::Pointer) override;
+ esiProcessResult_t process (int dovars) override;
+ void provideData (ESISegment::Pointer, ESIElement*) override;
+ bool mayFail () const override;
void wontFail();
- void fail(ESIElement *, char const *anError = nullptr);
+ void fail(ESIElement *, char const *anError = nullptr) override;
void makeCachableElements(esiSequence const &old);
- Pointer makeCacheable() const;
+ Pointer makeCacheable() const override;
void makeUsableElements(esiSequence const &old, ESIVarState &);
- Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+ Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
Esi::Elements elements; /* unprocessed or rendered nodes */
size_t processedcount;
struct {
int dovars:1; /* for esiVar */
} flags;
- void finish();
+ void finish() override;
protected:
esiSequence(esiSequence const &);
{
public:
- virtual void eval (ESIVarState &state, char const *, char const *) const;
+ void eval (ESIVarState &state, char const *, char const *) const override;
};
class ESIVariableHost : public ESIVarState::Variable
{
public:
- virtual void eval (ESIVarState &state, char const *, char const *) const;
+ void eval (ESIVarState &state, char const *, char const *) const override;
};
class ESIVariableLanguage : public ESIVarState::Variable
{
public:
- virtual void eval (ESIVarState &state, char const *, char const *) const;
+ void eval (ESIVarState &state, char const *, char const *) const override;
};
class ESIVariableQuery : public ESIVarState::Variable
public:
ESIVariableQuery(char const *uri);
- ~ESIVariableQuery();
- virtual void eval (ESIVarState &state, char const *, char const *) const;
+ ~ESIVariableQuery() override;
+ void eval (ESIVarState &state, char const *, char const *) const override;
char const *queryString() const;
struct _query_elem const *queryVector() const;
{
public:
- virtual void eval (ESIVarState &state, char const *, char const *) const;
+ void eval (ESIVarState &state, char const *, char const *) const override;
};
class ESIVariableUserAgent : public ESIVarState::Variable
{
public:
- ~ESIVariableUserAgent();
+ ~ESIVariableUserAgent() override;
ESIVariableUserAgent (ESIVarState &state);
- virtual void eval (ESIVarState &state, char const *, char const *) const;
+ void eval (ESIVarState &state, char const *, char const *) const override;
private:
static char const * esiUserOs[];
EventDialer(EVH *aHandler, void *anArg, bool lockedArg);
EventDialer(const EventDialer &d);
- virtual ~EventDialer();
+ ~EventDialer() override;
- virtual void print(std::ostream &os) const;
+ void print(std::ostream &os) const override;
virtual bool canDial(AsyncCall &call);
void dial(AsyncCall &) { theHandler(theArg); }
public:
EventScheduler();
- ~EventScheduler();
+ ~EventScheduler() override;
/* cancel a scheduled but not dispatched event */
void cancel(EVH * func, void * arg);
/* clean up the used memory in the scheduler */
bool find(EVH * func, void * arg);
/* schedule a callback function to run in when seconds */
void schedule(const char *name, EVH * func, void *arg, double when, int weight, bool cbdata=true);
- int checkEvents(int timeout);
+ int checkEvents(int timeout) override;
static EventScheduler *GetInstance();
private:
ssize_t size;
};
HeaderUpdater(const Rock::SwapDir::Pointer &aStore, const Ipc::StoreMapUpdate &update);
- virtual ~HeaderUpdater() override = default;
+ ~HeaderUpdater() override = default;
protected:
/* AsyncJob API */
- virtual void start() override;
- virtual bool doneAll() const override;
- virtual void swanSong() override;
+ void start() override;
+ bool doneAll() const override;
+ void swanSong() override;
private:
static StoreIOState::STRCB NoteRead;
callback_data = cbdataReference(cb.callback_data);
}
- virtual ~StoreIOStateCb() {
+ ~StoreIOStateCb() override {
cbdataReferenceDone(callback_data); // may be nil already
}
return cbdataReferenceValid(callback_data) && callback;
}
- virtual void print(std::ostream &os) const {
+ void print(std::ostream &os) const override {
os << '(' << callback_data << ", err=" << errflag << ')';
}
typedef RefCount<IoState> Pointer;
IoState(Rock::SwapDir::Pointer &aDir, StoreEntry *e, StoreIOState::STFNCB *cbFile, StoreIOState::STIOCB *cbIo, void *data);
- virtual ~IoState();
+ ~IoState() override;
void file(const RefCount<DiskFile> &aFile);
// ::StoreIOState API
- virtual void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data);
- virtual bool write(char const *buf, size_t size, off_t offset, FREE * free_func);
- virtual void close(int how);
+ void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data) override;
+ bool write(char const *buf, size_t size, off_t offset, FREE * free_func) override;
+ void close(int how) override;
/// whether we are still waiting for the I/O results (i.e., not closed)
bool stillWaiting() const { return theFile != nullptr; }
static bool IsResponsible(const SwapDir &);
Rebuild(SwapDir *dir, const Ipc::Mem::Pointer<Stats> &);
- virtual ~Rebuild() override;
+ ~Rebuild() override;
/* Registered Runner API */
- virtual void startShutdown() override;
+ void startShutdown() override;
/* AsyncJob API */
- virtual void start() override;
- virtual bool doneAll() const override;
- virtual void swanSong() override;
+ void start() override;
+ bool doneAll() const override;
+ void swanSong() override;
bool doneLoading() const;
bool doneValidating() const;
static void Stats(StoreEntry * sentry);
StoreFileSystem();
- virtual ~StoreFileSystem();
+ ~StoreFileSystem() override;
/* StoreFileSystem API */
- virtual char const *type() const override;
- virtual SwapDir *createSwapDir() override;
+ char const *type() const override;
+ SwapDir *createSwapDir() override;
private:
//static Stats Stats_;
typedef Ipc::StoreMap DirMap;
SwapDir();
- virtual ~SwapDir();
+ ~SwapDir() override;
/* public ::SwapDir API */
- virtual void reconfigure();
- virtual StoreEntry *get(const cache_key *key);
- virtual void evictCached(StoreEntry &);
- virtual void evictIfFound(const cache_key *);
- virtual void disconnect(StoreEntry &e);
- virtual uint64_t currentSize() const;
- virtual uint64_t currentCount() const;
- virtual bool doReportStat() const;
- virtual void finalizeSwapoutSuccess(const StoreEntry &);
- virtual void finalizeSwapoutFailure(StoreEntry &);
- virtual void create();
- virtual void parse(int index, char *path);
- virtual bool smpAware() const { return true; }
- virtual bool hasReadableEntry(const StoreEntry &) const;
+ void reconfigure() override;
+ StoreEntry *get(const cache_key *key) override;
+ void evictCached(StoreEntry &) override;
+ void evictIfFound(const cache_key *) override;
+ void disconnect(StoreEntry &e) override;
+ uint64_t currentSize() const override;
+ uint64_t currentCount() const override;
+ bool doReportStat() const override;
+ void finalizeSwapoutSuccess(const StoreEntry &) override;
+ void finalizeSwapoutFailure(StoreEntry &) override;
+ void create() override;
+ void parse(int index, char *path) override;
+ bool smpAware() const override { return true; }
+ bool hasReadableEntry(const StoreEntry &) const override;
// temporary path to the shared memory map of first slots of cached entries
SBuf inodeMapPath() const;
void writeError(StoreIOState &sio);
/* StoreMapCleaner API */
- virtual void noteFreeMapSlice(const Ipc::StoreMapSliceId fileno);
+ void noteFreeMapSlice(const Ipc::StoreMapSliceId fileno) override;
uint64_t slotSize; ///< all db slots are of this size
protected:
/* Store API */
- virtual bool anchorToCache(StoreEntry &);
- virtual bool updateAnchored(StoreEntry &);
+ bool anchorToCache(StoreEntry &) override;
+ bool updateAnchored(StoreEntry &) override;
/* protected ::SwapDir API */
- virtual bool needsDiskStrand() const;
- virtual void init();
- virtual ConfigOption *getOptionTree() const;
- virtual bool allowOptionReconfigure(const char *const option) const;
- virtual bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const;
- virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *);
- virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *);
- virtual void maintain();
- virtual void diskFull();
- virtual void reference(StoreEntry &e);
- virtual bool dereference(StoreEntry &e);
- virtual void updateHeaders(StoreEntry *e);
- virtual bool unlinkdUseful() const;
- virtual void statfs(StoreEntry &e) const;
+ bool needsDiskStrand() const override;
+ void init() override;
+ ConfigOption *getOptionTree() const override;
+ bool allowOptionReconfigure(const char *const option) const override;
+ bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override;
+ StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+ StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+ void maintain() override;
+ void diskFull() override;
+ void reference(StoreEntry &e) override;
+ bool dereference(StoreEntry &e) override;
+ void updateHeaders(StoreEntry *e) override;
+ bool unlinkdUseful() const override;
+ void statfs(StoreEntry &e) const override;
/* IORequestor API */
- virtual void ioCompletedNotification();
- virtual void closeCompleted();
- virtual void readCompleted(const char *buf, int len, int errflag, RefCount< ::ReadRequest>);
- virtual void writeCompleted(int errflag, size_t len, RefCount< ::WriteRequest>);
+ void ioCompletedNotification() override;
+ void closeCompleted() override;
+ void readCompleted(const char *buf, int len, int errflag, RefCount< ::ReadRequest>) override;
+ void writeCompleted(int errflag, size_t len, RefCount< ::WriteRequest>) override;
void parseSize(const bool reconfiguring); ///< parses anonymous cache_dir size option
void validateOptions(); ///< warns of configuration problems; may quit
{
public:
/* ::RegisteredRunner API */
- virtual ~SwapDirRr();
+ ~SwapDirRr() override;
protected:
/* Ipc::Mem::RegisteredRunner API */
- virtual void create();
+ void create() override;
private:
std::vector<Ipc::Mem::Owner<Rebuild::Stats> *> rebuildStatsOwners;
public:
static StoreFileSystem &GetInstance();
StoreFSufs(char const *DefaultModuleType, char const *label);
- virtual ~StoreFSufs() {}
+ ~StoreFSufs() override {}
/* StoreFileSystem API */
- virtual const char *type() const override;
- virtual SwapDir *createSwapDir() override;
+ const char *type() const override;
+ SwapDir *createSwapDir() override;
protected:
DiskIOModule *IO;
public:
StoreSearchUFS(RefCount<UFSSwapDir> sd);
- virtual ~StoreSearchUFS();
+ ~StoreSearchUFS() override;
// TODO: misplaced Iterator API
/**
* callback the client when a new StoreEntry is available
* or an error occurs
*/
- virtual void next(void (callback)(void *cbdata), void *cbdata);
+ void next(void (callback)(void *cbdata), void *cbdata) override;
/**
\retval true if a new StoreEntry is immediately available
\retval false if a new StoreEntry is NOT immediately available
*/
- virtual bool next();
+ bool next() override;
- virtual bool error() const;
- virtual bool isDone() const;
- virtual StoreEntry *currentItem();
+ bool error() const override;
+ bool isDone() const override;
+ StoreEntry *currentItem() override;
RefCount<UFSSwapDir> sd;
RemovalPolicyWalker *walker;
public:
UFSStoreState(SwapDir * SD, StoreEntry * anEntry, STIOCB * callback_, void *callback_data_);
- ~UFSStoreState();
- virtual void close(int how);
- virtual void closeCompleted();
+ ~UFSStoreState() override;
+ void close(int how) override;
+ void closeCompleted() override;
// protected:
- virtual void ioCompletedNotification();
- virtual void readCompleted(const char *buf, int len, int errflag, RefCount<ReadRequest>);
- virtual void writeCompleted(int errflag, size_t len, RefCount<WriteRequest>);
+ void ioCompletedNotification() override;
+ void readCompleted(const char *buf, int len, int errflag, RefCount<ReadRequest>) override;
+ void writeCompleted(int errflag, size_t len, RefCount<WriteRequest>) override;
RefCount<DiskFile> theFile;
bool opening;
bool creating;
bool reading;
bool writing;
/* StoreIOState API */
- void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data);
- virtual bool write(char const *buf, size_t size, off_t offset, FREE * free_func);
+ void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data) override;
+ bool write(char const *buf, size_t size, off_t offset, FREE * free_func) override;
protected:
virtual void doCloseCallback (int errflag);
UFSCleanLog(SwapDir *aSwapDir) : sd(aSwapDir) {}
/// Get the next entry that is a candidate for clean log writing
- virtual const StoreEntry *nextEntry();
+ const StoreEntry *nextEntry() override;
/// "write" an entry to the clean log file.
- virtual void write(StoreEntry const &);
+ void write(StoreEntry const &) override;
SBuf cur;
SBuf newLog;
static bool FilenoBelongsHere(int fn, int cachedir, int level1dir, int level2dir);
UFSSwapDir(char const *aType, const char *aModuleType);
- virtual ~UFSSwapDir();
+ ~UFSSwapDir() override;
/* Store::Disk API */
- virtual void create() override;
- virtual void init() override;
- virtual void dump(StoreEntry &) const override;
- virtual bool doubleCheck(StoreEntry &) override;
- virtual bool unlinkdUseful() const override;
- virtual void statfs(StoreEntry &) const override;
- virtual void maintain() override;
- virtual void evictCached(StoreEntry &) override;
- virtual void evictIfFound(const cache_key *) override;
- virtual bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override;
- virtual void reference(StoreEntry &) override;
- virtual bool dereference(StoreEntry &) override;
- virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
- virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
- virtual void openLog() override;
- virtual void closeLog() override;
- virtual int writeCleanStart() override;
- virtual void writeCleanDone() override;
- virtual void logEntry(const StoreEntry & e, int op) const override;
- virtual void parse(int index, char *path) override;
- virtual void reconfigure() override;
- virtual int callback() override;
- virtual void sync() override;
- virtual void finalizeSwapoutSuccess(const StoreEntry &) override;
- virtual void finalizeSwapoutFailure(StoreEntry &) override;
- virtual uint64_t currentSize() const override { return cur_size; }
- virtual uint64_t currentCount() const override { return n_disk_objects; }
- virtual ConfigOption *getOptionTree() const override;
- virtual bool smpAware() const override { return false; }
+ void create() override;
+ void init() override;
+ void dump(StoreEntry &) const override;
+ bool doubleCheck(StoreEntry &) override;
+ bool unlinkdUseful() const override;
+ void statfs(StoreEntry &) const override;
+ void maintain() override;
+ void evictCached(StoreEntry &) override;
+ void evictIfFound(const cache_key *) override;
+ bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override;
+ void reference(StoreEntry &) override;
+ bool dereference(StoreEntry &) override;
+ StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+ StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+ void openLog() override;
+ void closeLog() override;
+ int writeCleanStart() override;
+ void writeCleanDone() override;
+ void logEntry(const StoreEntry & e, int op) const override;
+ void parse(int index, char *path) override;
+ void reconfigure() override;
+ int callback() override;
+ void sync() override;
+ void finalizeSwapoutSuccess(const StoreEntry &) override;
+ void finalizeSwapoutFailure(StoreEntry &) override;
+ uint64_t currentSize() const override { return cur_size; }
+ uint64_t currentCount() const override { return n_disk_objects; }
+ ConfigOption *getOptionTree() const override;
+ bool smpAware() const override { return false; }
/// as long as ufs relies on the global store_table to index entries,
/// it is wrong to ask individual ufs cache_dirs whether they have an entry
- virtual bool hasReadableEntry(const StoreEntry &) const override { return false; }
+ bool hasReadableEntry(const StoreEntry &) const override { return false; }
void unlinkFile(sfileno f);
// move down when unlink is a virtual method
record_size = sizeof(UFSSwapLogParser_v1_32bs::StoreSwapLogDataOld);
}
/// Convert the on-disk 32-bit format to our current format while reading
- bool ReadRecord(StoreSwapLogData &swapData) {
+ bool ReadRecord(StoreSwapLogData &swapData) override {
UFSSwapLogParser_v1_32bs::StoreSwapLogDataOld readData;
int bytes = sizeof(UFSSwapLogParser_v1_32bs::StoreSwapLogDataOld);
UFSSwapLogParser_v2(FILE *fp): Fs::Ufs::UFSSwapLogParser(fp) {
record_size = sizeof(StoreSwapLogData);
}
- bool ReadRecord(StoreSwapLogData &swapData) {
+ bool ReadRecord(StoreSwapLogData &swapData) override {
assert(log);
return fread(&swapData, sizeof(StoreSwapLogData), 1, log) == 1;
}
class HelperServerBase: public CbdataParent
{
public:
- virtual ~HelperServerBase();
+ ~HelperServerBase() override;
/** Closes pipes to the helper safely.
* Handles the case where the read and write pipes are the same FD.
*
typedef std::map<uint64_t, Requests::iterator> RequestIndex;
RequestIndex requestsIndex; ///< maps request IDs to requests
- virtual ~helper_server();
+ ~helper_server() override;
/// Search in queue for the request with requestId, return the related
/// Xaction object and remove it from queue.
/// If concurrency is disabled then the requestId is ignored and the
void checkForTimedOutRequests(bool const retry);
/*HelperServerBase API*/
- virtual bool reserved() override {return false;}
- virtual void dropQueued() override;
- virtual helper *getParent() const override {return parent;}
+ bool reserved() override {return false;}
+ void dropQueued() override;
+ helper *getParent() const override {return parent;}
/// Read timeout handler
static void requestTimeout(const CommTimeoutCbParams &io);
CBDATA_CHILD(helper_stateful_server);
public:
- virtual ~helper_stateful_server();
+ ~helper_stateful_server() override;
void reserve();
void clearReservation();
/* HelperServerBase API */
- virtual bool reserved() override {return reservationId.reserved();}
- virtual helper *getParent() const override {return parent;}
+ bool reserved() override {return reservationId.reserved();}
+ helper *getParent() const override {return parent;}
/// close handler to handle exited server processes
static void HelperServerClosed(helper_stateful_server *srv);
}
/* CodeContext API */
- virtual ScopedId codeContextGist() const; // override
- virtual std::ostream &detailCodeContext(std::ostream &os) const; // override
+ ScopedId codeContextGist() const override; // override
+ std::ostream &detailCodeContext(std::ostream &os) const override; // override
/* StoreClient API */
- virtual LogTags *loggingTags() const;
- virtual void fillChecklist(ACLFilledChecklist &) const;
+ LogTags *loggingTags() const override;
+ void fillChecklist(ACLFilledChecklist &) const override;
public:
const char *method = nullptr;
class HttpStateData : public Client
{
- CBDATA_CLASS(HttpStateData);
+ CBDATA_CHILD(HttpStateData);
public:
};
HttpStateData(FwdState *);
- ~HttpStateData();
+ ~HttpStateData() override;
static void httpBuildRequestHeader(HttpRequest * request,
StoreEntry * entry,
HttpHeader * hdr_out,
const Http::StateFlags &flags);
- virtual const Comm::ConnectionPointer & dataConnection() const;
+ const Comm::ConnectionPointer & dataConnection() const override;
/* should be private */
bool sendRequest();
void processReplyHeader();
- void processReplyBody();
+ void processReplyBody() override;
void readReply(const CommIoCbParams &io);
- virtual void maybeReadVirginBody(); // read response data from the network
+ void maybeReadVirginBody() override; // read response data from the network
// Checks whether the response is cacheable/shareable.
ReuseDecision::Answers reusableReply(ReuseDecision &decision);
protected:
/* Client API */
- virtual void noteDelayAwareReadChance();
+ void noteDelayAwareReadChance() override;
void processReply();
void proceedAfter1xx();
bool continueAfterParsingHeader();
void truncateVirginBody();
- virtual void start();
- virtual void haveParsedReplyHeaders();
- virtual bool getMoreRequestBody(MemBuf &buf);
- virtual void closeServer(); // end communication with the server
- virtual bool doneWithServer() const; // did we end communication?
- virtual void abortAll(const char *reason); // abnormal termination
- virtual bool mayReadVirginReplyBody() const;
+ void start() override;
+ void haveParsedReplyHeaders() override;
+ bool getMoreRequestBody(MemBuf &buf) override;
+ void closeServer() override; // end communication with the server
+ bool doneWithServer() const override; // did we end communication?
+ void abortAll(const char *reason) override; // abnormal termination
+ bool mayReadVirginReplyBody() const override;
void abortTransaction(const char *reason) { abortAll(reason); } // abnormal termination
// consuming request body
virtual void handleMoreRequestBodyAvailable();
- virtual void handleRequestBodyProducerAborted();
+ void handleRequestBodyProducerAborted() override;
void writeReplyBody();
bool decodeAndWriteReplyBody();
bool finishingBrokenPost();
bool finishingChunkedRequest();
- void doneSendingRequestBody();
+ void doneSendingRequestBody() override;
void requestBodyHandler(MemBuf &);
- virtual void sentRequestBody(const CommIoCbParams &io);
+ void sentRequestBody(const CommIoCbParams &io) override;
void wroteLast(const CommIoCbParams &io);
void sendComplete();
void httpStateConnClosed(const CommCloseCbParams ¶ms);
};
Message(http_hdr_owner_type);
- virtual ~Message();
+ ~Message() override;
virtual void reset() = 0; // will have body when http*Clean()s are gone
public:
/// construct with HTTP/1.x details
Stream(const Comm::ConnectionPointer &aConn, ClientHttpRequest *aReq);
- ~Stream();
+ ~Stream() override;
/// register this stream with the Server
void registerWithConn();
Parser &operator =(const Parser &) = default;
Parser(Parser &&) = default;
Parser &operator =(Parser &&) = default;
- virtual ~Parser() {}
+ ~Parser() override {}
/// Set this parser back to a default state.
/// Will DROP any reference to a buffer (does not free).
RequestParser &operator =(const RequestParser &) = default;
RequestParser(RequestParser &&) = default;
RequestParser &operator =(RequestParser &&) = default;
- virtual ~RequestParser() {}
+ ~RequestParser() override {}
/* Http::One::Parser API */
- virtual void clear() {*this = RequestParser();}
- virtual Http1::Parser::size_type firstLineSize() const;
- virtual bool parse(const SBuf &aBuf);
+ void clear() override {*this = RequestParser();}
+ Http1::Parser::size_type firstLineSize() const override;
+ bool parse(const SBuf &aBuf) override;
/// the HTTP method if this is a request message
const HttpRequestMethod & method() const {return method_;}
ResponseParser &operator =(const ResponseParser &) = default;
ResponseParser(ResponseParser &&) = default;
ResponseParser &operator =(ResponseParser &&) = default;
- virtual ~ResponseParser() {}
+ ~ResponseParser() override {}
/* Http::One::Parser API */
- virtual void clear() {*this=ResponseParser();}
- virtual Http1::Parser::size_type firstLineSize() const;
- virtual bool parse(const SBuf &aBuf);
+ void clear() override {*this=ResponseParser();}
+ Http1::Parser::size_type firstLineSize() const override;
+ bool parse(const SBuf &aBuf) override;
/* respone specific fields, read-only */
Http::StatusCode messageStatus() const { return statusCode_;}
{
public:
TeChunkedParser();
- virtual ~TeChunkedParser() { theOut=nullptr; /* we do not own this object */ }
+ ~TeChunkedParser() override { theOut=nullptr; /* we do not own this object */ }
/// set the buffer to be used to store decoded chunk data
void setPayloadBuffer(MemBuf *parsedContent) {theOut = parsedContent;}
bool needsMoreSpace() const;
/* Http1::Parser API */
- virtual void clear();
- virtual bool parse(const SBuf &);
- virtual Parser::size_type firstLineSize() const {return 0;} // has no meaning with multiple chunks
+ void clear() override;
+ bool parse(const SBuf &) override;
+ Parser::size_type firstLineSize() const override {return 0;} // has no meaning with multiple chunks
private:
bool parseChunkSize(Tokenizer &tok);
{
public:
Icmp4();
- virtual ~Icmp4();
+ ~Icmp4() override;
- virtual int Open();
+ int Open() override;
#if USE_ICMP
- virtual void SendEcho(Ip::Address &, int, const char*, int);
- virtual void Recv(void);
+ void SendEcho(Ip::Address &, int, const char*, int) override;
+ void Recv(void) override;
#endif
};
{
public:
Icmp6();
- virtual ~Icmp6();
+ ~Icmp6() override;
- virtual int Open();
+ int Open() override;
#if USE_ICMP
- virtual void SendEcho(Ip::Address &, int, const char*, int);
- virtual void Recv(void);
+ void SendEcho(Ip::Address &, int, const char*, int) override;
+ void Recv(void) override;
#endif
};
{
public:
IcmpPinger();
- virtual ~IcmpPinger();
+ ~IcmpPinger() override;
/// Start and initiate control channel to squid
- virtual int Open();
+ int Open() override;
/// Shutdown pinger helper and control channel
- virtual void Close();
+ void Close() override;
#if USE_ICMP
void SendResult(pingerReplyData &preply, int len);
/// Handle ICMP requests from squid, passing to helpers.
- virtual void Recv(void);
+ void Recv(void) override;
private:
// unused in IcmpPinger
- virtual void SendEcho(Ip::Address &, int, const char *, int) {}
+ void SendEcho(Ip::Address &, int, const char *, int) override {}
/**
* Control channel(s) to squid.
{
public:
IcmpSquid();
- virtual ~IcmpSquid();
+ ~IcmpSquid() override;
- virtual int Open();
- virtual void Close();
+ int Open() override;
+ void Close() override;
void DomainPing(Ip::Address &to, const char *domain);
#if USE_ICMP
- virtual void SendEcho(Ip::Address &to, int opcode, const char* payload=nullptr, int len=0);
- virtual void Recv(void);
+ void SendEcho(Ip::Address &to, int opcode, const char* payload=nullptr, int len=0) override;
+ void Recv(void) override;
#endif
};
ICP2State(icp_common_t & aHeader, HttpRequest *aRequest):
ICPState(aHeader, aRequest),rtt(0),src_rtt(0),flags(0) {}
- ~ICP2State();
+ ~ICP2State() override;
int rtt;
int src_rtt;
ICP3State(icp_common_t &aHeader, HttpRequest *aRequest) :
ICPState(aHeader, aRequest) {}
- ~ICP3State() = default;
+ ~ICP3State() override = default;
};
/// \ingroup ServerProtocolICPInternal3
public:
static IdentLookup *Instance();
- virtual void checkForAsync(ACLChecklist *)const;
+ void checkForAsync(ACLChecklist *)const override;
private:
static IdentLookup instance_;
public:
ACLIdent(ACLData<char const *> *newData, char const *);
- ~ACLIdent();
+ ~ACLIdent() override;
/* ACL API */
- virtual char const *typeString() const;
- virtual void parse();
- virtual bool isProxyAuth() const {return true;}
- virtual int match(ACLChecklist *checklist);
- virtual SBufList dump() const;
- virtual bool empty () const;
+ char const *typeString() const override;
+ void parse() override;
+ bool isProxyAuth() const override {return true;}
+ int match(ACLChecklist *checklist) override;
+ SBufList dump() const override;
+ bool empty () const override;
private:
/* ACL API */
- virtual const Acl::Options &lineOptions();
+ const Acl::Options &lineOptions() override;
ACLData<char const *> *data;
char const *type_;
/// Coordinates shared activities of Strands (Squid processes or threads)
class Coordinator: public Port
{
- CBDATA_CLASS(Coordinator);
+ CBDATA_CHILD(Coordinator);
public:
static Coordinator* Instance();
const StrandCoords &strands() const; ///< currently registered strands
protected:
- virtual void start(); // Port (AsyncJob) API
- virtual void receive(const TypedMsgHdr& message); // Port API
+ void start() override; // Port (AsyncJob) API
+ void receive(const TypedMsgHdr& message) override; // Port API
StrandCoord* findStrand(int kidId); ///< registered strand or NULL
void registerStrand(const StrandCoord &); ///< adds or updates existing
#include "ipc/RequestId.h"
#include "ipc/TypedMsgHdr.h"
-CBDATA_NAMESPACED_CLASS_INIT(Ipc, Forwarder);
-
Ipc::Forwarder::RequestsMap Ipc::Forwarder::TheRequestsMap;
Ipc::RequestId::Index Ipc::Forwarder::LastRequestId = 0;
*/
class Forwarder: public AsyncJob
{
- CBDATA_CLASS(Forwarder);
+ CBDATA_INTERMEDIATE();
public:
Forwarder(Request::Pointer aRequest, double aTimeout);
- virtual ~Forwarder();
+ ~Forwarder() override;
/// finds and calls the right Forwarder upon Coordinator's response
static void HandleRemoteAck(RequestId);
/* has-to-be-public AsyncJob API */
- virtual void callException(const std::exception& e);
+ void callException(const std::exception& e) override;
CodeContextPointer codeContext;
protected:
/* AsyncJob API */
- virtual void start();
- virtual void swanSong();
- virtual bool doneAll() const;
+ void start() override;
+ void swanSong() override;
+ bool doneAll() const override;
virtual void handleError();
virtual void handleTimeout();
#include <algorithm>
#include <unordered_map>
-CBDATA_NAMESPACED_CLASS_INIT(Ipc, Inquirer);
-
Ipc::RequestId::Index Ipc::Inquirer::LastRequestId = 0;
namespace Ipc {
/// aggregating individual strand responses and dumping the result if needed
class Inquirer: public AsyncJob
{
- CBDATA_CLASS(Inquirer);
+ CBDATA_INTERMEDIATE();
public:
Inquirer(Request::Pointer aRequest, const Ipc::StrandCoords& coords, double aTimeout);
- virtual ~Inquirer();
+ ~Inquirer() override;
/// finds and calls the right Inquirer upon strand's response
static void HandleRemoteAck(const Response& response);
/* has-to-be-public AsyncJob API */
- virtual void callException(const std::exception& e);
+ void callException(const std::exception& e) override;
CodeContextPointer codeContext;
protected:
/* AsyncJob API */
- virtual void start();
- virtual void swanSong();
- virtual bool doneAll() const;
- virtual const char *status() const;
+ void start() override;
+ void swanSong() override;
+ bool doneAll() const override;
+ const char *status() const override;
/// inquire the next strand
virtual void inquire();
static String CoordinatorAddr();
protected:
- virtual void start() = 0; // UdsOp (AsyncJob) API; has body
- virtual bool doneAll() const; // UdsOp (AsyncJob) API
+ void start() override = 0; // UdsOp (AsyncJob) API; has body
+ bool doneAll() const override; // UdsOp (AsyncJob) API
/// read the next incoming message
void doListen();
template<class Value> bool findOldest(const int remoteProcessId, Value &value) const;
protected:
- virtual const OneToOneUniQueue &inQueue(const int remoteProcessId) const;
- virtual const OneToOneUniQueue &outQueue(const int remoteProcessId) const;
- virtual const QueueReader &localReader() const;
- virtual const QueueReader &remoteReader(const int processId) const;
- virtual int remotesCount() const;
- virtual int remotesIdOffset() const;
+ const OneToOneUniQueue &inQueue(const int remoteProcessId) const override;
+ const OneToOneUniQueue &outQueue(const int remoteProcessId) const override;
+ const QueueReader &localReader() const override;
+ const QueueReader &remoteReader(const int processId) const override;
+ int remotesCount() const override;
+ int remotesIdOffset() const override;
private:
bool validProcessId(const Group group, const int processId) const;
MultiQueue(const String &id, const int localProcessId);
protected:
- virtual const OneToOneUniQueue &inQueue(const int remoteProcessId) const;
- virtual const OneToOneUniQueue &outQueue(const int remoteProcessId) const;
- virtual const QueueReader &localReader() const;
- virtual const QueueReader &remoteReader(const int remoteProcessId) const;
- virtual int remotesCount() const;
- virtual int remotesIdOffset() const;
+ const OneToOneUniQueue &inQueue(const int remoteProcessId) const override;
+ const OneToOneUniQueue &outQueue(const int remoteProcessId) const override;
+ const QueueReader &localReader() const override;
+ const QueueReader &remoteReader(const int remoteProcessId) const override;
+ int remotesCount() const override;
+ int remotesIdOffset() const override;
private:
bool validProcessId(const int processId) const;
/// Receives coordination messages on behalf of its process or thread
class Strand: public Port
{
- CBDATA_CLASS(Strand);
+ CBDATA_CHILD(Strand);
public:
Strand();
- virtual void start(); // Port (AsyncJob) API
+ void start() override; // Port (AsyncJob) API
protected:
- virtual void timedout(); // Port (UsdOp) API
- virtual void receive(const TypedMsgHdr &message); // Port API
+ void timedout() override; // Port (UsdOp) API
+ void receive(const TypedMsgHdr &message) override; // Port API
private:
void registerSelf(); /// let Coordinator know this strand exists
{
public:
UdsOp(const String &pathAddr);
- virtual ~UdsOp();
+ ~UdsOp() override;
public:
struct sockaddr_un address; ///< UDS address from path; treat as read-only
/// attempts to send an IPC message a few times, with a timeout
class UdsSender: public UdsOp
{
- CBDATA_CLASS(UdsSender);
+ CBDATA_CHILD(UdsSender);
public:
UdsSender(const String& pathAddr, const TypedMsgHdr& aMessage);
CodeContextPointer codeContext;
protected:
- virtual void swanSong(); // UdsOp (AsyncJob) API
- virtual void start(); // UdsOp (AsyncJob) API
- virtual bool doneAll() const; // UdsOp (AsyncJob) API
- virtual void timedout(); // UdsOp API
+ void swanSong() override; // UdsOp (AsyncJob) API
+ void start() override; // UdsOp (AsyncJob) API
+ bool doneAll() const override; // UdsOp (AsyncJob) API
+ void timedout() override; // UdsOp API
private:
void startSleep();
public:
/* RegisteredRunner API */
SharedMemPagesRr(): owner(nullptr) {}
- virtual void useConfig();
- virtual void create();
- virtual void open();
- virtual ~SharedMemPagesRr();
+ void useConfig() override;
+ void create() override;
+ void open() override;
+ ~SharedMemPagesRr() override;
private:
Ipc::Mem::PagePool::Owner *owner;
{
public:
/* RegisteredRunner API */
- virtual void useConfig();
+ void useConfig() override;
protected:
/// called when the runner should create a new memory segment
class IpReceiver: public virtual CbdataParent
{
public:
- virtual ~IpReceiver() {}
+ ~IpReceiver() override {}
/// Called when nbgethostbyname() fully resolves the name.
/// The `ips` may contain both bad and good IP addresses, but each good IP
*/
class TcpLogger : public AsyncJob
{
- CBDATA_CLASS(TcpLogger);
+ CBDATA_CHILD(TcpLogger);
public:
typedef CbcPointer<TcpLogger> Pointer;
protected:
TcpLogger(size_t, bool, Ip::Address);
- virtual ~TcpLogger();
+ ~TcpLogger() override;
/// Called when Squid is reconfiguring (or exiting) to give us a chance to
/// flush remaining buffers and end this job w/o loss of data. No new log
void flush();
/* AsyncJob API */
- virtual void start();
- virtual bool doneAll() const;
- virtual void swanSong();
+ void start() override;
+ bool doneAll() const override;
+ void swanSong() override;
private:
/* Logfile API. Map c-style Logfile calls to TcpLogger method calls. */
{
public:
- int checkEvents(int) {
+ int checkEvents(int) override {
Store::Root().callback();
return EVENT_IDLE;
};
{
public:
- virtual int checkEvents(int timeout);
+ int checkEvents(int timeout) override;
private:
static void StopEventLoop(void *) {
virtual void clean(time_t maxage) = 0;
/* Mem::Allocator API */
- virtual PoolMeter const &getMeter() const;
- virtual void *alloc();
- virtual void freeOne(void *);
- virtual size_t objectSize() const;
- virtual int getInUseCount() = 0;
+ PoolMeter const &getMeter() const override;
+ void *alloc() override;
+ void freeOne(void *) override;
+ size_t objectSize() const override;
+ int getInUseCount() override = 0;
protected:
virtual void *allocate() = 0;
public:
friend class MemChunk;
MemPoolChunked(const char *label, size_t obj_size);
- ~MemPoolChunked();
+ ~MemPoolChunked() override;
void convertFreeCacheToChunkFreeCache();
- virtual void clean(time_t maxage);
+ void clean(time_t maxage) override;
void createChunk();
void *get();
void push(void *obj);
/* Mem::Allocator API */
- virtual size_t getStats(Mem::PoolStats &);
- virtual int getInUseCount();
- virtual void setChunkSize(size_t);
+ size_t getStats(Mem::PoolStats &) override;
+ int getInUseCount() override;
+ void setChunkSize(size_t) override;
protected:
- virtual void *allocate();
- virtual void deallocate(void *, bool aggressive);
+ void *allocate() override;
+ void deallocate(void *, bool aggressive) override;
public:
- virtual bool idleTrigger(int shift) const;
+ bool idleTrigger(int shift) const override;
size_t chunk_size;
int chunk_capacity;
{
public:
MemPoolMalloc(char const *label, size_t aSize);
- ~MemPoolMalloc();
- virtual bool idleTrigger(int shift) const;
- virtual void clean(time_t maxage);
+ ~MemPoolMalloc() override;
+ bool idleTrigger(int shift) const override;
+ void clean(time_t maxage) override;
/* Mem::Allocator API */
- virtual size_t getStats(Mem::PoolStats &);
- virtual int getInUseCount();
+ size_t getStats(Mem::PoolStats &) override;
+ int getInUseCount() override;
protected:
- virtual void *allocate();
- virtual void deallocate(void *, bool aggressive);
+ void *allocate() override;
+ void deallocate(void *, bool aggressive) override;
private:
std::stack<void *> freelist;
};
public:
Action(const CommandPointer &aCmd);
- virtual ~Action();
+ ~Action() override;
/* for local Cache Manager use */
public:
typedef RefCount<ActionCreator> Pointer;
- virtual ~ActionCreator() {}
+ ~ActionCreator() override {}
/// returns a pointer to the new Action object for cmd; never nil
virtual ActionPointer create(const CommandPointer &cmd) const = 0;
/// Comm-writes it using parent StoreToCommWriter.
class ActionWriter: public StoreToCommWriter
{
- CBDATA_CLASS(ActionWriter);
+ CBDATA_CHILD(ActionWriter);
public:
ActionWriter(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn);
protected:
/* AsyncJob API */
- virtual void start();
+ void start() override;
private:
Action::Pointer action; ///< action that fills the entry
public:
static Pointer Create(const CommandPointer &cmd);
/* Action API */
- virtual void dump(StoreEntry *entry);
+ void dump(StoreEntry *entry) override;
protected:
IndexAction(const CommandPointer &cmd);
public:
static Pointer Create(const CommandPointer &cmd);
/* Action API */
- virtual void dump(StoreEntry *entry);
+ void dump(StoreEntry *entry) override;
protected:
MenuAction(const CommandPointer &cmd);
public:
static Pointer Create(const CommandPointer &cmd);
/* Action API */
- virtual void dump(StoreEntry *entry);
+ void dump(StoreEntry *entry) override;
protected:
ShutdownAction(const CommandPointer &cmd);
public:
static Pointer Create(const CommandPointer &cmd);
/* Action API */
- virtual void dump(StoreEntry *entry);
+ void dump(StoreEntry *entry) override;
protected:
ReconfigureAction(const CommandPointer &cmd);
public:
static Pointer Create(const CommandPointer &cmd);
/* Action API */
- virtual void dump(StoreEntry *entry);
+ void dump(StoreEntry *entry) override;
protected:
RotateAction(const CommandPointer &cmd);
public:
static Pointer Create(const CommandPointer &cmd);
/* Action API */
- virtual void dump(StoreEntry *entry);
+ void dump(StoreEntry *entry) override;
protected:
OfflineToggleAction(const CommandPointer &cmd);
public:
static Pointer Create(const CommandPointer &cmd);
/* Action API */
- virtual void add(const Action& action);
- virtual void pack(Ipc::TypedMsgHdr& msg) const;
- virtual void unpack(const Ipc::TypedMsgHdr& msg);
+ void add(const Action& action) override;
+ void pack(Ipc::TypedMsgHdr& msg) const override;
+ void unpack(const Ipc::TypedMsgHdr& msg) override;
protected:
/* Action API */
- virtual void collect();
- virtual void dump(StoreEntry* entry);
+ void collect() override;
+ void dump(StoreEntry* entry) override;
private:
CountersActionData data;
/// provides Coordinator with a local cache manager response
class Filler: public StoreToCommWriter
{
- CBDATA_CLASS(Filler);
+ CBDATA_CHILD(Filler);
public:
Filler(const Action::Pointer &, const Comm::ConnectionPointer &, Ipc::RequestId);
protected:
/* AsyncJob API */
- virtual void start();
- virtual void swanSong();
+ void start() override;
+ void swanSong() override;
private:
Action::Pointer action; ///< action that will run() and sendResponse()
*/
class Forwarder: public Ipc::Forwarder
{
- CBDATA_CLASS(Forwarder);
+ CBDATA_CHILD(Forwarder);
public:
Forwarder(const Comm::ConnectionPointer &aConn, const ActionParams &aParams, HttpRequest* aRequest,
StoreEntry* anEntry, const AccessLogEntryPointer &anAle);
- virtual ~Forwarder();
+ ~Forwarder() override;
protected:
/* Ipc::Forwarder API */
- virtual void swanSong();
- virtual void handleError();
- virtual void handleTimeout();
- virtual void handleException(const std::exception& e);
+ void swanSong() override;
+ void handleError() override;
+ void handleTimeout() override;
+ void handleException(const std::exception& e) override;
private:
void noteCommClosed(const CommCloseCbParams& params);
static Pointer Create(const CommandPointer &cmd, OBJH *aHandler);
/* Action API */
- virtual void respond(const Request& request);
+ void respond(const Request& request) override;
// we cannot aggregate because we do not even know what the handler does
- virtual bool aggregatable() const { return false; }
+ bool aggregatable() const override { return false; }
protected:
/* Action API */
- virtual void dump(StoreEntry *entry);
+ void dump(StoreEntry *entry) override;
private:
OBJH *handler; ///< legacy function that collects and dumps info
explicit FunActionCreator(OBJH *aHandler): handler(aHandler) {}
/* ActionCreator API */
- virtual Action::Pointer create(const CommandPointer &cmd) const {
+ Action::Pointer create(const CommandPointer &cmd) const override {
return FunAction::Create(cmd, handler);
}
public:
static Pointer Create(const CommandPointer &cmd);
/* Action API */
- virtual void add(const Action& action);
- virtual void respond(const Request& request);
- virtual void pack(Ipc::TypedMsgHdr& msg) const;
- virtual void unpack(const Ipc::TypedMsgHdr& msg);
+ void add(const Action& action) override;
+ void respond(const Request& request) override;
+ void pack(Ipc::TypedMsgHdr& msg) const override;
+ void unpack(const Ipc::TypedMsgHdr& msg) override;
protected:
/* Action API */
- virtual void collect();
- virtual void dump(StoreEntry* entry);
+ void collect() override;
+ void dump(StoreEntry* entry) override;
private:
InfoActionData data;
/// aggregating individual strand responses and dumping the result if needed
class Inquirer: public Ipc::Inquirer
{
- CBDATA_CLASS(Inquirer);
+ CBDATA_CHILD(Inquirer);
public:
Inquirer(Action::Pointer anAction, const Request &aCause,
protected:
/* AsyncJob API */
- virtual void start();
- virtual bool doneAll() const;
+ void start() override;
+ bool doneAll() const override;
/* Ipc::Inquirer API */
- virtual void cleanup();
- virtual void sendResponse();
- virtual bool aggregate(Ipc::Response::Pointer aResponse);
+ void cleanup() override;
+ void sendResponse() override;
+ bool aggregate(Ipc::Response::Pointer aResponse) override;
private:
void noteWroteHeader(const CommIoCbParams& params);
public:
IntParam();
IntParam(const std::vector<int>& anArray);
- virtual void pack(Ipc::TypedMsgHdr& msg) const;
- virtual void unpackValue(const Ipc::TypedMsgHdr& msg);
+ void pack(Ipc::TypedMsgHdr& msg) const override;
+ void unpackValue(const Ipc::TypedMsgHdr& msg) override;
const std::vector<int>& value() const;
private:
static Pointer Create5min(const CommandPointer &cmd);
static Pointer Create60min(const CommandPointer &cmd);
/* Action API */
- virtual void add(const Action& action);
- virtual void pack(Ipc::TypedMsgHdr& msg) const;
- virtual void unpack(const Ipc::TypedMsgHdr& msg);
+ void add(const Action& action) override;
+ void pack(Ipc::TypedMsgHdr& msg) const override;
+ void unpack(const Ipc::TypedMsgHdr& msg) override;
protected:
/* Action API */
- virtual void collect();
- virtual void dump(StoreEntry* entry);
+ void collect() override;
+ void dump(StoreEntry* entry) override;
private:
int minutes;
public:
static Pointer Create(const CommandPointer &cmd);
/* Action API */
- virtual void add(const Action& action);
- virtual void pack(Ipc::TypedMsgHdr& msg) const;
- virtual void unpack(const Ipc::TypedMsgHdr& msg);
+ void add(const Action& action) override;
+ void pack(Ipc::TypedMsgHdr& msg) const override;
+ void unpack(const Ipc::TypedMsgHdr& msg) override;
protected:
/* Action API */
- virtual void collect();
- virtual void dump(StoreEntry* entry);
+ void collect() override;
+ void dump(StoreEntry* entry) override;
private:
IoActionData data;
public:
QueryParam(Type aType): type(aType) {}
- virtual ~QueryParam() {}
+ ~QueryParam() override {}
virtual void pack(Ipc::TypedMsgHdr& msg) const = 0; ///< store parameter into msg
virtual void unpackValue(const Ipc::TypedMsgHdr& msg) = 0; ///< load parameter value from msg
explicit Request(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
/* Ipc::Request API */
- virtual void pack(Ipc::TypedMsgHdr& msg) const;
- virtual Pointer clone() const;
+ void pack(Ipc::TypedMsgHdr& msg) const override;
+ Pointer clone() const override;
public:
Comm::ConnectionPointer conn; ///< HTTP client connection descriptor
explicit Response(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
/* Ipc::Response API */
- virtual void pack(Ipc::TypedMsgHdr& msg) const;
- virtual Ipc::Response::Pointer clone() const;
+ void pack(Ipc::TypedMsgHdr& msg) const override;
+ Ipc::Response::Pointer clone() const override;
bool hasAction() const; ///< whether response contain action object
const Action& getAction() const; ///< returns action object
public:
static Pointer Create(const CommandPointer &cmd);
/* Action API */
- virtual void add(const Action& action);
- virtual void pack(Ipc::TypedMsgHdr& msg) const;
- virtual void unpack(const Ipc::TypedMsgHdr& msg);
+ void add(const Action& action) override;
+ void pack(Ipc::TypedMsgHdr& msg) const override;
+ void unpack(const Ipc::TypedMsgHdr& msg) override;
protected:
/* Action API */
- virtual void collect();
- virtual void dump(StoreEntry* entry);
+ void collect() override;
+ void dump(StoreEntry* entry) override;
private:
ServiceTimesActionData data;
public:
static Pointer Create(const CommandPointer &cmd);
/* Action API */
- virtual void add(const Action& action);
- virtual void pack(Ipc::TypedMsgHdr& msg) const;
- virtual void unpack(const Ipc::TypedMsgHdr& msg);
+ void add(const Action& action) override;
+ void pack(Ipc::TypedMsgHdr& msg) const override;
+ void unpack(const Ipc::TypedMsgHdr& msg) override;
protected:
/* Action API */
- virtual void collect();
- virtual void dump(StoreEntry* entry);
+ void collect() override;
+ void dump(StoreEntry* entry) override;
private:
StoreIoActionData data;
#include "Store.h"
#include "StoreClient.h"
-CBDATA_NAMESPACED_CLASS_INIT(Mgr, StoreToCommWriter);
-
Mgr::StoreToCommWriter::StoreToCommWriter(const Comm::ConnectionPointer &conn, StoreEntry* anEntry):
AsyncJob("Mgr::StoreToCommWriter"),
clientConnection(conn), entry(anEntry), sc(nullptr), writeOffset(0), closer(nullptr)
/// for the given StoreEntry and client FD
class StoreToCommWriter: public AsyncJob
{
- CBDATA_CLASS(StoreToCommWriter);
+ CBDATA_INTERMEDIATE();
public:
StoreToCommWriter(const Comm::ConnectionPointer &conn, StoreEntry *anEntry);
- virtual ~StoreToCommWriter();
+ ~StoreToCommWriter() override;
protected:
/* AsyncJob API */
- virtual void start();
- virtual void swanSong();
- virtual bool doneAll() const;
+ void start() override;
+ void swanSong() override;
+ bool doneAll() const override;
/// request more action results from the store
void scheduleStoreCopy();
public:
StringParam();
StringParam(const String& aString);
- virtual void pack(Ipc::TypedMsgHdr& msg) const;
- virtual void unpackValue(const Ipc::TypedMsgHdr& msg);
+ void pack(Ipc::TypedMsgHdr& msg) const override;
+ void unpackValue(const Ipc::TypedMsgHdr& msg) override;
const String& value() const;
private:
public:
explicit MimeIcon(const char *aName);
- ~MimeIcon();
+ ~MimeIcon() override;
void setName(char const *);
SBuf getName() const;
void load();
/* StoreClient API */
- virtual LogTags *loggingTags() const { return nullptr; } // no access logging/ACLs
- virtual void fillChecklist(ACLFilledChecklist &) const;
+ LogTags *loggingTags() const override { return nullptr; } // no access logging/ACLs
+ void fillChecklist(ACLFilledChecklist &) const override;
private:
SBuf icon_;
public:
IdleConnList(const char *key, PconnPool *parent);
- ~IdleConnList();
+ ~IdleConnList() override;
/// Pass control of the connection to the idle list.
void push(const Comm::ConnectionPointer &conn);
void closeN(size_t count);
// IndependentRunner API
- virtual void endingShutdown();
+ void endingShutdown() override;
private:
bool isAvailable(int i) const;
bool removeAt(int index);
/// create a MemBlob containing a copy of the buffer of a given size
MemBlob(const char *buffer, const size_type bufferSize);
- virtual ~MemBlob();
+ ~MemBlob() override;
/// the number unused bytes at the end of the allocated blob
size_type spaceSize() const { return capacity - size; }
/// A simple PeerConnector for SSL/TLS cache_peers. No SslBump capabilities.
class BlindPeerConnector: public Security::PeerConnector {
- CBDATA_CLASS(BlindPeerConnector);
+ CBDATA_CHILD(BlindPeerConnector);
public:
BlindPeerConnector(HttpRequestPointer &aRequest,
const Comm::ConnectionPointer &aServerConn,
/// to try and reuse a TLS session and sets the hostname to use for
/// certificate validation
/// \returns true on successful initialization
- virtual bool initialize(Security::SessionPointer &);
+ bool initialize(Security::SessionPointer &) override;
/// Return the configured TLS context object
- virtual Security::ContextPointer getTlsContext();
+ Security::ContextPointer getTlsContext() override;
/// On success, stores the used TLS session for later use.
/// On error, informs the peer.
- virtual void noteNegotiationDone(ErrorState *);
+ void noteNegotiationDone(ErrorState *) override;
};
} // namespace Security
#endif
/* ErrorDetail API */
- virtual SBuf brief() const;
- virtual SBuf verbose(const HttpRequestPointer &) const;
+ SBuf brief() const override;
+ SBuf verbose(const HttpRequestPointer &) const override;
/// \returns error category; \see ErrorCode
ErrorCode errorNo() const { return error_no; }
#include "ssl/helper.h"
#endif
-CBDATA_NAMESPACED_CLASS_INIT(Security, PeerConnector);
-
Security::PeerConnector::PeerConnector(const Comm::ConnectionPointer &aServerConn, const AsyncCallback<EncryptorAnswer> &aCallback, const AccessLogEntryPointer &alp, const time_t timeout):
AsyncJob("Security::PeerConnector"),
noteFwdPconnUse(false),
*/
class PeerConnector: virtual public AsyncJob, public Acl::ChecklistFiller
{
- CBDATA_CLASS(PeerConnector);
+ CBDATA_INTERMEDIATE();
public:
typedef CbcPointer<PeerConnector> Pointer;
const AsyncCallback<EncryptorAnswer> &,
const AccessLogEntryPointer &alp,
const time_t timeout = 0);
- virtual ~PeerConnector();
+ ~PeerConnector() override;
/// hack: whether the connection requires fwdPconnPool->noteUses()
bool noteFwdPconnUse;
protected:
// AsyncJob API
- virtual void start();
- virtual bool doneAll() const;
- virtual void swanSong();
- virtual const char *status() const;
+ void start() override;
+ bool doneAll() const override;
+ void swanSong() override;
+ const char *status() const override;
/* Acl::ChecklistFiller API */
- virtual void fillChecklist(ACLFilledChecklist &) const;
+ void fillChecklist(ACLFilledChecklist &) const override;
/// The connection read timeout callback handler.
void commTimeoutHandler(const CommTimeoutCbParams &);
ServerOptions &operator =(const ServerOptions &);
ServerOptions(ServerOptions &&o) { this->operator =(o); }
ServerOptions &operator =(ServerOptions &&o) { this->operator =(o); return *this; }
- virtual ~ServerOptions() = default;
+ ~ServerOptions() override = default;
/* Security::PeerOptions API */
- virtual void parse(const char *);
- virtual void clear() {*this = ServerOptions();}
- virtual Security::ContextPointer createBlankContext() const;
- virtual void dumpCfg(Packable *, const char *pfx) const;
+ void parse(const char *) override;
+ void clear() override {*this = ServerOptions();}
+ Security::ContextPointer createBlankContext() const override;
+ void dumpCfg(Packable *, const char *pfx) const override;
/// initialize all server contexts as-needed and load PEM files.
/// if none can be created this may do nothing.
public:
/* RegisteredRunner API */
SharedSessionCacheRr(): owner(nullptr) {}
- virtual void useConfig();
- virtual ~SharedSessionCacheRr();
+ void useConfig() override;
+ ~SharedSessionCacheRr() override;
protected:
- virtual void create();
+ void create() override;
private:
Ipc::MemMap::Owner *owner;
public:
explicit Server(const MasterXaction::Pointer &xact);
- virtual ~Server() override;
+ ~Server() override;
/* AsyncJob API */
- virtual void callException(const std::exception &e) override;
+ void callException(const std::exception &e) override;
/// Called by Ftp::Client class when it is start receiving or
/// sending data.
};
/* ConnStateData API */
- virtual Http::Stream *parseOneRequest() override;
- virtual void processParsedRequest(Http::StreamPointer &context) override;
- virtual void notePeerConnection(Comm::ConnectionPointer conn) override;
- virtual void clientPinnedConnectionClosed(const CommCloseCbParams &io) override;
- virtual void handleReply(HttpReply *header, StoreIOBuffer receivedData) override;
- virtual int pipelinePrefetchMax() const override;
- virtual bool writeControlMsgAndCall(HttpReply *rep, AsyncCall::Pointer &call) override;
- virtual time_t idleTimeout() const override;
+ Http::Stream *parseOneRequest() override;
+ void processParsedRequest(Http::StreamPointer &context) override;
+ void notePeerConnection(Comm::ConnectionPointer conn) override;
+ void clientPinnedConnectionClosed(const CommCloseCbParams &io) override;
+ void handleReply(HttpReply *header, StoreIOBuffer receivedData) override;
+ int pipelinePrefetchMax() const override;
+ bool writeControlMsgAndCall(HttpReply *rep, AsyncCall::Pointer &call) override;
+ time_t idleTimeout() const override;
/* BodyPipe API */
- virtual void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override;
- virtual void noteBodyConsumerAborted(BodyPipe::Pointer ptr) override;
+ void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override;
+ void noteBodyConsumerAborted(BodyPipe::Pointer ptr) override;
/* AsyncJob API */
- virtual void start() override;
+ void start() override;
/* Comm callbacks */
static void AcceptCtrlConnection(const CommAcceptCbParams ¶ms);
/// Manages a connection from an HTTP/1 or HTTP/0.9 client.
class Server: public ConnStateData
{
- CBDATA_CLASS(Server);
+ CBDATA_CHILD(Server);
public:
Server(const MasterXaction::Pointer &xact, const bool beHttpsServer);
- virtual ~Server() {}
+ ~Server() override {}
void readSomeHttpData();
protected:
/* ConnStateData API */
- virtual Http::Stream *parseOneRequest();
- virtual void processParsedRequest(Http::StreamPointer &context);
- virtual void handleReply(HttpReply *rep, StoreIOBuffer receivedData);
- virtual bool writeControlMsgAndCall(HttpReply *rep, AsyncCall::Pointer &call);
- virtual int pipelinePrefetchMax() const;
- virtual time_t idleTimeout() const;
- virtual void noteTakeServerConnectionControl(ServerConnectionContext);
+ Http::Stream *parseOneRequest() override;
+ void processParsedRequest(Http::StreamPointer &context) override;
+ void handleReply(HttpReply *rep, StoreIOBuffer receivedData) override;
+ bool writeControlMsgAndCall(HttpReply *rep, AsyncCall::Pointer &call) override;
+ int pipelinePrefetchMax() const override;
+ time_t idleTimeout() const override;
+ void noteTakeServerConnectionControl(ServerConnectionContext) override;
/* BodyPipe API */
- virtual void noteMoreBodySpaceAvailable(BodyPipe::Pointer);
- virtual void noteBodyConsumerAborted(BodyPipe::Pointer);
+ void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override;
+ void noteBodyConsumerAborted(BodyPipe::Pointer) override;
/* AsyncJob API */
- virtual void start();
+ void start() override;
void proceedAfterBodyContinuation(Http::StreamPointer context);
{
public:
Server(const MasterXactionPointer &xact);
- virtual ~Server() {}
+ ~Server() override {}
/* AsyncJob API */
- virtual void start();
- virtual bool doneAll() const;
- virtual void swanSong();
+ void start() override;
+ bool doneAll() const override;
+ void swanSong() override;
/// whether to stop serving our client after reading EOF on its connection
virtual bool shouldCloseOnEof() const = 0;
*/
class Forwarder: public Ipc::Forwarder
{
- CBDATA_CLASS(Forwarder);
+ CBDATA_CHILD(Forwarder);
public:
Forwarder(const Pdu& aPdu, const Session& aSession, int aFd,
protected:
/* Ipc::Forwarder API */
- virtual void swanSong();
- virtual void handleTimeout();
- virtual void handleException(const std::exception& e);
+ void swanSong() override;
+ void handleTimeout() override;
+ void handleException(const std::exception& e) override;
private:
void noteCommClosed(const CommCloseCbParams& params);
/// aggregates strand responses and send back the result to client
class Inquirer: public Ipc::Inquirer
{
- CBDATA_CLASS(Inquirer);
+ CBDATA_CHILD(Inquirer);
public:
Inquirer(const Request& aRequest, const Ipc::StrandCoords& coords);
protected:
/* AsyncJob API */
- virtual void start();
- virtual bool doneAll() const;
+ void start() override;
+ bool doneAll() const override;
/* Ipc::Inquirer API */
- virtual void cleanup();
- virtual void handleException(const std::exception& e);
- virtual void sendResponse();
- virtual bool aggregate(Ipc::Response::Pointer aResponse);
+ void cleanup() override;
+ void handleException(const std::exception& e) override;
+ void sendResponse() override;
+ bool aggregate(Ipc::Response::Pointer aResponse) override;
private:
void noteCommClosed(const CommCloseCbParams& params);
explicit Request(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
/* Ipc::Request API */
- virtual void pack(Ipc::TypedMsgHdr& msg) const;
- virtual Pointer clone() const;
+ void pack(Ipc::TypedMsgHdr& msg) const override;
+ Pointer clone() const override;
public:
Pdu pdu; ///< SNMP protocol data unit
explicit Response(Ipc::RequestId); ///< sender's constructor
explicit Response(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
/* Ipc::Response API */
- virtual void pack(Ipc::TypedMsgHdr& msg) const;
- virtual Ipc::Response::Pointer clone() const;
+ void pack(Ipc::TypedMsgHdr& msg) const override;
+ Ipc::Response::Pointer clone() const override;
public:
Pdu pdu; ///< SNMP protocol data unit
class ACLSNMPCommunityStrategy: public ACLStrategy<char const *>
{
public:
- virtual int match (ACLData<MatchType> *&data, ACLFilledChecklist *checklist) override;
+ int match (ACLData<MatchType> *&data, ACLFilledChecklist *checklist) override;
};
#endif /* SQUID_SNMP_CORE_H */
private:
ErrorDetailsList::Pointer theDetails;
- virtual bool parse() override;
+ bool parse() override;
};
}// namespace Ssl
/// A PeerConnector for HTTP origin servers. Capable of SslBumping.
class PeekingPeerConnector: public Security::PeerConnector {
- CBDATA_CLASS(PeekingPeerConnector);
+ CBDATA_CHILD(PeekingPeerConnector);
public:
PeekingPeerConnector(HttpRequestPointer &aRequest,
const Comm::ConnectionPointer &aServerConn,
time_t timeout = 0);
/* Security::PeerConnector API */
- virtual bool initialize(Security::SessionPointer &);
- virtual Security::ContextPointer getTlsContext();
- virtual void noteWantWrite();
- virtual void noteNegotiationError(const Security::ErrorDetailPointer &);
- virtual void noteNegotiationDone(ErrorState *error);
+ bool initialize(Security::SessionPointer &) override;
+ Security::ContextPointer getTlsContext() override;
+ void noteWantWrite() override;
+ void noteNegotiationError(const Security::ErrorDetailPointer &) override;
+ void noteNegotiationDone(ErrorState *error) override;
/// Updates associated client connection manager members
/// if the server certificate was received from the server.
/// The ClientBio version of the Ssl::Bio::stateChanged method
/// When the client hello message retrieved, fill the
/// "features" member with the client provided information.
- virtual void stateChanged(const SSL *ssl, int where, int ret);
+ void stateChanged(const SSL *ssl, int where, int ret) override;
/// The ClientBio version of the Ssl::Bio::write method
- virtual int write(const char *buf, int size, BIO *table);
+ int write(const char *buf, int size, BIO *table) override;
/// The ClientBio version of the Ssl::Bio::read method
/// If the holdRead flag is true then it does not write any data
/// to socket and sets the "read retry" flag of the BIO to true
- virtual int read(char *buf, int size, BIO *table);
+ int read(char *buf, int size, BIO *table) override;
/// Prevents or allow writing on socket.
void hold(bool h) {holdRead_ = holdWrite_ = h;}
explicit ServerBio(const int anFd);
/// The ServerBio version of the Ssl::Bio::stateChanged method
- virtual void stateChanged(const SSL *ssl, int where, int ret);
+ void stateChanged(const SSL *ssl, int where, int ret) override;
/// The ServerBio version of the Ssl::Bio::write method
/// If a clientRandom number is set then rewrites the raw hello message
/// "client random" field with the provided random number.
/// It may buffer the output packets.
- virtual int write(const char *buf, int size, BIO *table);
+ int write(const char *buf, int size, BIO *table) override;
/// The ServerBio version of the Ssl::Bio::read method
/// If the record flag is set then append the data to the rbuf member
- virtual int read(char *buf, int size, BIO *table);
+ int read(char *buf, int size, BIO *table) override;
/// The ServerBio version of the Ssl::Bio::flush method.
/// Flushes any buffered data
- virtual void flush(BIO *table);
+ void flush(BIO *table) override;
/// Sets the random number to use in client SSL HELLO message
void setClientFeatures(Security::TlsDetails::Pointer const &details, SBuf const &hello);
public:
CertificateStorageAction(const Mgr::Command::Pointer &cmd);
static Pointer Create(const Mgr::Command::Pointer &cmd);
- virtual void dump (StoreEntry *sentry);
+ void dump (StoreEntry *sentry) override;
/**
* We do not support aggregation of information across workers
* TODO: aggregate these stats
*/
- virtual bool aggregatable() const { return false; }
+ bool aggregatable() const override { return false; }
};
inline uint64_t MemoryUsedByContext(const Security::ContextPointer &) {
{
public:
Controller();
- virtual ~Controller() override;
+ ~Controller() override;
/* Storage API */
- virtual void create() override;
- virtual void init() override;
- virtual uint64_t maxSize() const override;
- virtual uint64_t minSize() const override;
- virtual uint64_t currentSize() const override;
- virtual uint64_t currentCount() const override;
- virtual int64_t maxObjectSize() const override;
- virtual void getStats(StoreInfoStats &stats) const override;
- virtual void stat(StoreEntry &) const override;
- virtual void sync() override;
- virtual void maintain() override;
- virtual void evictCached(StoreEntry &) override;
- virtual void evictIfFound(const cache_key *) override;
- virtual int callback() override;
+ void create() override;
+ void init() override;
+ uint64_t maxSize() const override;
+ uint64_t minSize() const override;
+ uint64_t currentSize() const override;
+ uint64_t currentCount() const override;
+ int64_t maxObjectSize() const override;
+ void getStats(StoreInfoStats &stats) const override;
+ void stat(StoreEntry &) const override;
+ void sync() override;
+ void maintain() override;
+ void evictCached(StoreEntry &) override;
+ void evictIfFound(const cache_key *) override;
+ int callback() override;
/// \returns a locally indexed and SMP-tracked matching StoreEntry (or nil)
/// Slower than peek() but does not restrict StoreEntry use and storage.
typedef RefCount<Disk> Pointer;
explicit Disk(char const *aType);
- virtual ~Disk();
+ ~Disk() override;
virtual void reconfigure() = 0;
char const *type() const;
virtual void diskFull();
/* Controlled API */
- virtual void create() override;
- virtual StoreEntry *get(const cache_key *) override;
- virtual uint64_t maxSize() const override { return max_size; }
- virtual uint64_t minSize() const override;
- virtual int64_t maxObjectSize() const override;
- virtual void getStats(StoreInfoStats &stats) const override;
- virtual void stat(StoreEntry &) const override;
- virtual void reference(StoreEntry &e) override;
- virtual bool dereference(StoreEntry &e) override;
- virtual void maintain() override;
+ void create() override;
+ StoreEntry *get(const cache_key *) override;
+ uint64_t maxSize() const override { return max_size; }
+ uint64_t minSize() const override;
+ int64_t maxObjectSize() const override;
+ void getStats(StoreInfoStats &stats) const override;
+ void stat(StoreEntry &) const override;
+ void reference(StoreEntry &e) override;
+ bool dereference(StoreEntry &e) override;
+ void maintain() override;
/// whether this disk storage is capable of serving multiple workers
virtual bool smpAware() const = 0;
Disks();
/* Storage API */
- virtual void create() override;
- virtual void init() override;
- virtual StoreEntry *get(const cache_key *) override;
- virtual uint64_t maxSize() const override;
- virtual uint64_t minSize() const override;
- virtual uint64_t currentSize() const override;
- virtual uint64_t currentCount() const override;
- virtual int64_t maxObjectSize() const override;
- virtual void getStats(StoreInfoStats &stats) const override;
- virtual void stat(StoreEntry &) const override;
- virtual void sync() override;
- virtual void reference(StoreEntry &) override;
- virtual bool dereference(StoreEntry &e) override;
- virtual void updateHeaders(StoreEntry *) override;
- virtual void maintain() override;
- virtual bool anchorToCache(StoreEntry &) override;
- virtual bool updateAnchored(StoreEntry &) override;
- virtual void evictCached(StoreEntry &) override;
- virtual void evictIfFound(const cache_key *) override;
- virtual int callback() override;
+ void create() override;
+ void init() override;
+ StoreEntry *get(const cache_key *) override;
+ uint64_t maxSize() const override;
+ uint64_t minSize() const override;
+ uint64_t currentSize() const override;
+ uint64_t currentCount() const override;
+ int64_t maxObjectSize() const override;
+ void getStats(StoreInfoStats &stats) const override;
+ void stat(StoreEntry &) const override;
+ void sync() override;
+ void reference(StoreEntry &) override;
+ bool dereference(StoreEntry &e) override;
+ void updateHeaders(StoreEntry *) override;
+ void maintain() override;
+ bool anchorToCache(StoreEntry &) override;
+ bool updateAnchored(StoreEntry &) override;
+ void evictCached(StoreEntry &) override;
+ void evictIfFound(const cache_key *) override;
+ int callback() override;
/// update configuration, including limits (re)calculation
void configure();
public:
/* StoreSearch API */
- virtual void next(void (callback)(void *cbdata), void *cbdata) override;
- virtual bool next() override;
- virtual bool error() const override;
- virtual bool isDone() const override;
- virtual StoreEntry *currentItem() override;
+ void next(void (callback)(void *cbdata), void *cbdata) override;
+ bool next() override;
+ bool error() const override;
+ bool isDone() const override;
+ StoreEntry *currentItem() override;
private:
void copyBucket();
class Storage: public RefCountable
{
public:
- virtual ~Storage() {}
+ ~Storage() override {}
/// create system resources needed for this store to operate in the future
virtual void create() = 0;
int _buffer_calls;
int _flush_calls;
- virtual void buffer() {
+ void buffer() override {
_buffer_calls += 1;
}
- virtual void flush() {
+ void flush() override {
_flush_calls += 1;
}
- virtual void append(char const * buf, int len) {
+ void append(char const * buf, int len) override {
if (!buf || len < 0) // old 'String' can't handle these cases
return;
_appended_text.append(buf, len);
bool statsCalled;
/* Store::Disk API */
- virtual uint64_t maxSize() const override;
- virtual uint64_t currentSize() const override;
- virtual uint64_t currentCount() const override;
- virtual void stat(StoreEntry &) const override;
- virtual void finalizeSwapoutSuccess(const StoreEntry &) override {}
- virtual void finalizeSwapoutFailure(StoreEntry &) override {}
- virtual void reconfigure() override;
- virtual void init() override;
- virtual bool unlinkdUseful() const override;
- virtual bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override;
- virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
- virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
- virtual void parse(int, char*) override;
- virtual void evictCached(StoreEntry &) override {}
- virtual void evictIfFound(const cache_key *) override {}
- virtual bool hasReadableEntry(const StoreEntry &) const override { return false; }
- virtual bool smpAware() const override { return false; }
+ uint64_t maxSize() const override;
+ uint64_t currentSize() const override;
+ uint64_t currentCount() const override;
+ void stat(StoreEntry &) const override;
+ void finalizeSwapoutSuccess(const StoreEntry &) override {}
+ void finalizeSwapoutFailure(StoreEntry &) override {}
+ void reconfigure() override;
+ void init() override;
+ bool unlinkdUseful() const override;
+ bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override;
+ StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+ StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+ void parse(int, char*) override;
+ void evictCached(StoreEntry &) override {}
+ void evictIfFound(const cache_key *) override {}
+ bool hasReadableEntry(const StoreEntry &) const override { return false; }
+ bool smpAware() const override { return false; }
};
typedef RefCount<TestSwapDir> TestSwapDirPointer;
*/
#include "squid.h"
-#include "ipc/Forwarder.h"
-//Avoid linker errors about Ipc::Forwarder
-void foo_stub_ipc_forwarder();
-void foo_stub_ipc_forwarder()
-{
- Ipc::Forwarder foo(nullptr,1.0);
-}
+#define STUB_API "ipc/Forwarder.cc"
+#include "tests/STUB.h"
+
+#include "ipc/Forwarder.h"
+Ipc::Forwarder::Forwarder(Request::Pointer, double): AsyncJob("Ipc::Forwarder"), timeout(0) {STUB}
+Ipc::Forwarder::~Forwarder() STUB
+void Ipc::Forwarder::start() STUB
+bool Ipc::Forwarder::doneAll() const STUB_RETVAL(false)
+void Ipc::Forwarder::swanSong() STUB
+void Ipc::Forwarder::callException(const std::exception &) STUB
+void Ipc::Forwarder::handleError() STUB
+void Ipc::Forwarder::handleTimeout() STUB
+void Ipc::Forwarder::handleException(const std::exception &) STUB
#include "security/PeerConnector.h"
class TlsNegotiationDetails: public RefCountable {};
-CBDATA_NAMESPACED_CLASS_INIT(Security, PeerConnector);
namespace Security
{
PeerConnector::PeerConnector(const Comm::ConnectionPointer &, const AsyncCallback<EncryptorAnswer> &, const AccessLogEntryPointer &, const time_t):
CPPUNIT_TEST_SUITE_END();
public:
- virtual void setUp() override;
+ void setUp() override;
protected:
void testDefaults();
CPPUNIT_TEST_SUITE_END();
public:
- void setUp();
+ void setUp() override;
protected:
void testCreate();
CPPUNIT_TEST_SUITE_END();
public:
- void setUp();
+ void setUp() override;
protected:
bool doParseQuotedTest(const char *, const char *);
CPPUNIT_TEST_SUITE_END();
public:
- void setUp();
+ void setUp() override;
protected:
void testFindDefault();
CPPUNIT_TEST_SUITE_END();
public:
- void setUp();
+ void setUp() override;
protected:
void testCreate();
public:
RecordingEngine(int aTimeout = 0) : return_timeout(aTimeout) {}
- virtual int checkEvents(int timeout) {
+ int checkEvents(int timeout) override {
++calls;
lasttimeout = timeout;
return return_timeout;
StubTime() : calls(0) {}
int calls;
- void tick() {
+ void tick() override {
++calls;
}
};
CPPUNIT_TEST_SUITE_END();
public:
- void setUp();
+ void setUp() override;
protected:
void testSanityCheckFirstLine();
CPPUNIT_TEST_SUITE_END();
public:
- void setUp();
+ void setUp() override;
protected:
void testCreateFromUrl();
{
public:
stubIcmp() {};
- virtual ~stubIcmp() {};
- virtual int Open() { return 0; };
- virtual void Close() {};
+ ~stubIcmp() override {};
+ int Open() override { return 0; };
+ void Close() override {};
/// Construct ECHO request
- virtual void SendEcho(Ip::Address &, int, const char *, int) {}
+ void SendEcho(Ip::Address &, int, const char *, int) override {}
/// Handle ICMP responses.
- virtual void Recv(void) {};
+ void Recv(void) override {};
/* methods to relay test data from tester to private methods being tested */
int testChecksum(unsigned short *ptr, int size) { return CheckSum(ptr,size); };
CPPUNIT_TEST_SUITE_END();
public:
- void setUp();
+ void setUp() override;
protected:
void testGetStream();
{
public:
_ToRefCount () {++Instances;}
- ~_ToRefCount() {--Instances;}
+ ~_ToRefCount() override {--Instances;}
int someMethod() {
if (!Instances)
public:
testRock() : rr(nullptr) {}
- virtual void setUp();
- virtual void tearDown();
+ void setUp() override;
+ void tearDown() override;
typedef RefCount<Rock::SwapDir> SwapDirPointer;
bool statsCalled;
- virtual int callback();
+ int callback() override;
virtual StoreEntry* get(const cache_key*);
virtual void get(String, void (*)(StoreEntry*, void*), void*);
- virtual void init();
+ void init() override;
- virtual void maintain() {};
+ void maintain() override {};
- virtual uint64_t maxSize() const;
+ uint64_t maxSize() const override;
- virtual uint64_t minSize() const;
+ uint64_t minSize() const override;
- virtual uint64_t currentSize() const;
+ uint64_t currentSize() const override;
- virtual uint64_t currentCount() const;
+ uint64_t currentCount() const override;
- virtual int64_t maxObjectSize() const;
+ int64_t maxObjectSize() const override;
- virtual void getStats(StoreInfoStats &) const;
+ void getStats(StoreInfoStats &) const override;
- virtual void stat(StoreEntry &) const; /* output stats to the provided store entry */
+ void stat(StoreEntry &) const override; /* output stats to the provided store entry */
virtual void reference(StoreEntry &) {} /* Reference this object */
CPPUNIT_TEST_SUITE_END();
public:
- void setUp();
+ void setUp() override;
protected:
void testCmpDefault();
CPPUNIT_TEST_SUITE_END();
public:
- void setUp();
+ void setUp() override;
protected:
CPPUNIT_TEST_SUITE_END();
public:
- void setUp();
+ void setUp() override;
protected:
void testAssignFromprotocol_t();
public:
TunnelStateData(ClientHttpRequest *);
- virtual ~TunnelStateData();
+ ~TunnelStateData() override;
TunnelStateData(const TunnelStateData &); // do not implement
TunnelStateData &operator =(const TunnelStateData &); // do not implement
void secureConnectionToPeer(const Comm::ConnectionPointer &);
/* PeerSelectionInitiator API */
- virtual void noteDestination(Comm::ConnectionPointer conn) override;
- virtual void noteDestinationsEnd(ErrorState *selectionError) override;
+ void noteDestination(Comm::ConnectionPointer conn) override;
+ void noteDestinationsEnd(ErrorState *selectionError) override;
void syncHierNote(const Comm::ConnectionPointer &server, const char *origin);
void start (HttpRequest *, StoreEntry *);
void setUriResFromRequest(HttpRequest *);
- virtual ~UrnState();
+ ~UrnState() override;
StoreEntry *entry = nullptr;
store_client *sc = nullptr;
private:
/* StoreClient API */
- virtual LogTags *loggingTags() const { return ale ? &ale->cache.code : nullptr; }
- virtual void fillChecklist(ACLFilledChecklist &) const;
+ LogTags *loggingTags() const override { return ale ? &ale->cache.code : nullptr; }
+ void fillChecklist(ACLFilledChecklist &) const override;
char *urlres = nullptr;
};
public:
void *operator new (size_t);
void operator delete (void *);
- virtual ~ChildVirtual();
+ ~ChildVirtual() override;
static CallCounter Calls;
};