mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
More final markings.
These classes were recommended by gcc's -Wsugggest-final-types as places where large numbers of virtual functions could be optimized away.
This commit is contained in:
parent
9c89cd4a47
commit
4035ec7760
21 changed files with 26 additions and 27 deletions
|
@ -38,7 +38,7 @@ enum DNS_MgrMode {
|
|||
// Number of seconds we'll wait for a reply.
|
||||
#define DNS_TIMEOUT 5
|
||||
|
||||
class DNS_Mgr : public iosource::IOSource {
|
||||
class DNS_Mgr final : public iosource::IOSource {
|
||||
public:
|
||||
explicit DNS_Mgr(DNS_MgrMode mode);
|
||||
~DNS_Mgr() override;
|
||||
|
|
|
@ -48,7 +48,7 @@ protected:
|
|||
extern uint64_t num_events_queued;
|
||||
extern uint64_t num_events_dispatched;
|
||||
|
||||
class EventMgr : public BroObj, public iosource::IOSource {
|
||||
class EventMgr final : public BroObj, public iosource::IOSource {
|
||||
public:
|
||||
EventMgr();
|
||||
~EventMgr() override;
|
||||
|
|
|
@ -92,7 +92,7 @@ protected:
|
|||
int bytes_read;
|
||||
};
|
||||
|
||||
class BinarySerializationFormat : public SerializationFormat {
|
||||
class BinarySerializationFormat final : public SerializationFormat {
|
||||
public:
|
||||
BinarySerializationFormat();
|
||||
~BinarySerializationFormat() override;
|
||||
|
|
|
@ -65,7 +65,7 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
class ProfileLogger : public SegmentStatsReporter {
|
||||
class ProfileLogger final : public SegmentStatsReporter {
|
||||
public:
|
||||
ProfileLogger(BroFile* file, double interval);
|
||||
~ProfileLogger() override;
|
||||
|
@ -84,7 +84,7 @@ private:
|
|||
|
||||
|
||||
// Generates load_sample() events.
|
||||
class SampleLogger : public SegmentStatsReporter {
|
||||
class SampleLogger final : public SegmentStatsReporter {
|
||||
public:
|
||||
SampleLogger();
|
||||
~SampleLogger() override;
|
||||
|
|
|
@ -114,7 +114,7 @@ private:
|
|||
ValCache cache;
|
||||
};
|
||||
|
||||
class Manager : public iosource::IOSource {
|
||||
class Manager final : public iosource::IOSource {
|
||||
public:
|
||||
|
||||
Manager();
|
||||
|
|
|
@ -165,7 +165,7 @@ private:
|
|||
/**
|
||||
* Represents a request to add an analyzer to an analyzer set.
|
||||
*/
|
||||
class AddMod : public Modification {
|
||||
class AddMod final : public Modification {
|
||||
public:
|
||||
/**
|
||||
* Construct request which can add an analyzer to an analyzer set.
|
||||
|
@ -186,7 +186,7 @@ private:
|
|||
/**
|
||||
* Represents a request to remove an analyzer from an analyzer set.
|
||||
*/
|
||||
class RemoveMod : public Modification {
|
||||
class RemoveMod final : public Modification {
|
||||
public:
|
||||
/**
|
||||
* Construct request which can remove an analyzer from an analyzer set.
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace file_analysis {
|
|||
|
||||
class File;
|
||||
|
||||
class FileReassembler : public Reassembler {
|
||||
class FileReassembler final : public Reassembler {
|
||||
public:
|
||||
|
||||
FileReassembler(File* f, uint64_t starting_offset);
|
||||
|
|
|
@ -94,7 +94,7 @@ Manager::Stream::~Stream()
|
|||
delete reader;
|
||||
}
|
||||
|
||||
class Manager::TableStream: public Manager::Stream {
|
||||
class Manager::TableStream final : public Manager::Stream {
|
||||
public:
|
||||
|
||||
unsigned int num_idx_fields;
|
||||
|
@ -116,7 +116,7 @@ public:
|
|||
~TableStream() override;
|
||||
};
|
||||
|
||||
class Manager::EventStream: public Manager::Stream {
|
||||
class Manager::EventStream final : public Manager::Stream {
|
||||
public:
|
||||
EventHandlerPtr event;
|
||||
|
||||
|
@ -128,7 +128,7 @@ public:
|
|||
~EventStream() override;
|
||||
};
|
||||
|
||||
class Manager::AnalysisStream: public Manager::Stream {
|
||||
class Manager::AnalysisStream final : public Manager::Stream {
|
||||
public:
|
||||
string file_id;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ struct FieldMapping {
|
|||
/**
|
||||
* Reader for structured ASCII files.
|
||||
*/
|
||||
class Ascii : public ReaderBackend {
|
||||
class Ascii final : public ReaderBackend {
|
||||
public:
|
||||
explicit Ascii(ReaderFrontend* frontend);
|
||||
~Ascii() override;
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace input { namespace reader {
|
|||
/**
|
||||
* A benchmark reader to measure performance of the input framework.
|
||||
*/
|
||||
class Benchmark : public ReaderBackend {
|
||||
class Benchmark final : public ReaderBackend {
|
||||
public:
|
||||
explicit Benchmark(ReaderFrontend* frontend);
|
||||
~Benchmark() override;
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace input { namespace reader {
|
|||
/**
|
||||
* Binary mode file reader.
|
||||
*/
|
||||
class Binary : public ReaderBackend {
|
||||
class Binary final : public ReaderBackend {
|
||||
public:
|
||||
explicit Binary(ReaderFrontend* frontend);
|
||||
~Binary() override;
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace input { namespace reader {
|
|||
/**
|
||||
* Reader for Configuration files.
|
||||
*/
|
||||
class Config : public ReaderBackend {
|
||||
class Config final : public ReaderBackend {
|
||||
public:
|
||||
explicit Config(ReaderFrontend* frontend);
|
||||
~Config() override;
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace input { namespace reader {
|
|||
* A reader that returns a file (or the output of a command) as a single
|
||||
* blob.
|
||||
*/
|
||||
class Raw : public ReaderBackend {
|
||||
class Raw final : public ReaderBackend {
|
||||
public:
|
||||
explicit Raw(ReaderFrontend* frontend);
|
||||
~Raw() override;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
namespace input { namespace reader {
|
||||
|
||||
class SQLite : public ReaderBackend {
|
||||
class SQLite final : public ReaderBackend {
|
||||
public:
|
||||
explicit SQLite(ReaderFrontend* frontend);
|
||||
~SQLite() override;
|
||||
|
|
|
@ -159,7 +159,7 @@ private:
|
|||
|
||||
void RemoveAll();
|
||||
|
||||
class WakeupHandler : public IOSource {
|
||||
class WakeupHandler final : public IOSource {
|
||||
public:
|
||||
WakeupHandler();
|
||||
~WakeupHandler();
|
||||
|
|
|
@ -13,7 +13,7 @@ extern "C" {
|
|||
namespace iosource {
|
||||
namespace pcap {
|
||||
|
||||
class PcapSource : public iosource::PktSrc {
|
||||
class PcapSource final : public iosource::PktSrc {
|
||||
public:
|
||||
PcapSource(const std::string& path, bool is_live);
|
||||
~PcapSource() override;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
namespace logging { namespace writer {
|
||||
|
||||
class Ascii : public WriterBackend {
|
||||
class Ascii final : public WriterBackend {
|
||||
public:
|
||||
explicit Ascii(WriterFrontend* frontend);
|
||||
~Ascii() override;
|
||||
|
@ -75,4 +75,3 @@ private:
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
namespace logging { namespace writer {
|
||||
|
||||
class None : public WriterBackend {
|
||||
class None final : public WriterBackend {
|
||||
public:
|
||||
explicit None(WriterFrontend* frontend) : WriterBackend(frontend) {}
|
||||
~None() override {};
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
namespace logging { namespace writer {
|
||||
|
||||
class SQLite : public WriterBackend {
|
||||
class SQLite final : public WriterBackend {
|
||||
public:
|
||||
explicit SQLite(WriterFrontend* frontend);
|
||||
~SQLite() override;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
namespace threading { namespace formatter {
|
||||
|
||||
class Ascii : public Formatter {
|
||||
class Ascii final : public Formatter {
|
||||
public:
|
||||
/**
|
||||
* A struct to pass the necessary configuration values to the
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace threading { namespace formatter {
|
|||
* A thread-safe class for converting values into a JSON representation
|
||||
* and vice versa.
|
||||
*/
|
||||
class JSON : public Formatter {
|
||||
class JSON final : public Formatter {
|
||||
public:
|
||||
enum TimeFormat {
|
||||
TS_EPOCH, // Doubles that represents seconds from the UNIX epoch.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue