mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
Reformat the world
This commit is contained in:
parent
194cb24547
commit
b2f171ec69
714 changed files with 35149 additions and 35203 deletions
|
@ -2,18 +2,19 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "zeek/zeek-config.h"
|
||||
|
||||
#include "zeek/file_analysis/Tag.h"
|
||||
#include "zeek/plugin/Component.h"
|
||||
#include "zeek/plugin/TaggedComponent.h"
|
||||
#include "zeek/zeek-config.h"
|
||||
|
||||
namespace zeek {
|
||||
namespace zeek
|
||||
{
|
||||
|
||||
class RecordVal;
|
||||
using RecordValPtr = zeek::IntrusivePtr<RecordVal>;
|
||||
|
||||
namespace file_analysis {
|
||||
namespace file_analysis
|
||||
{
|
||||
|
||||
class File;
|
||||
class Analyzer;
|
||||
|
@ -25,8 +26,8 @@ class Manager;
|
|||
* A plugin can provide a specific file analyzer by registering this
|
||||
* analyzer component, describing the analyzer.
|
||||
*/
|
||||
class Component : public plugin::Component,
|
||||
public plugin::TaggedComponent<file_analysis::Tag> {
|
||||
class Component : public plugin::Component, public plugin::TaggedComponent<file_analysis::Tag>
|
||||
{
|
||||
public:
|
||||
using factory_function = Analyzer* (*)(RecordValPtr args, File* file);
|
||||
|
||||
|
@ -53,7 +54,8 @@ public:
|
|||
* hence won't be used. It can still be enabled later via the
|
||||
* manager, including from script-land.
|
||||
*/
|
||||
Component(const std::string& name, factory_function factory, Tag::subtype_t subtype = 0, bool enabled = true);
|
||||
Component(const std::string& name, factory_function factory, Tag::subtype_t subtype = 0,
|
||||
bool enabled = true);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
@ -70,14 +72,13 @@ public:
|
|||
/**
|
||||
* Returns the analyzer's factory function.
|
||||
*/
|
||||
factory_function FactoryFunction() const
|
||||
{ return factory_func; }
|
||||
factory_function FactoryFunction() const { return factory_func; }
|
||||
|
||||
/**
|
||||
* Returns true if the analyzer is currently enabled and hence
|
||||
* available for use.
|
||||
*/
|
||||
bool Enabled() const { return enabled; }
|
||||
bool Enabled() const { return enabled; }
|
||||
|
||||
/**
|
||||
* Enables or disables this analyzer.
|
||||
|
@ -85,20 +86,20 @@ public:
|
|||
* @param arg_enabled True to enabled, false to disable.
|
||||
*
|
||||
*/
|
||||
void SetEnabled(bool arg_enabled) { enabled = arg_enabled; }
|
||||
void SetEnabled(bool arg_enabled) { enabled = arg_enabled; }
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Overriden from plugin::Component.
|
||||
*/
|
||||
* Overriden from plugin::Component.
|
||||
*/
|
||||
void DoDescribe(ODesc* d) const override;
|
||||
|
||||
private:
|
||||
friend class Manager;
|
||||
|
||||
factory_function factory_func; // The analyzer's factory callback.
|
||||
bool enabled; // True if the analyzer is enabled.
|
||||
};
|
||||
factory_function factory_func; // The analyzer's factory callback.
|
||||
bool enabled; // True if the analyzer is enabled.
|
||||
};
|
||||
|
||||
} // namespace file_analysis
|
||||
} // namespace zeek
|
||||
} // namespace file_analysis
|
||||
} // namespace zeek
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue