mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Unify plugin::Component and plugin::TaggedComponent into a single class
These two are almost always used in conjunction with each other, and TaggedComponent is never used by itself. Combining them together into a single class will help simplify some of the code around managing the mapping between Tags and Components.
This commit is contained in:
parent
8b544d648d
commit
7d66f4252f
18 changed files with 90 additions and 158 deletions
|
@ -11,9 +11,7 @@ namespace zeek::file_analysis
|
|||
|
||||
Component::Component(const std::string& name, factory_function arg_factory, Tag::subtype_t subtype,
|
||||
bool arg_enabled)
|
||||
: plugin::Component(plugin::component::FILE_ANALYZER, name), plugin::TaggedComponent(
|
||||
subtype,
|
||||
file_mgr->GetTagType())
|
||||
: plugin::Component(plugin::component::FILE_ANALYZER, name, subtype, file_mgr->GetTagType())
|
||||
{
|
||||
factory_func = arg_factory;
|
||||
enabled = arg_enabled;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "zeek/Tag.h"
|
||||
#include "zeek/plugin/Component.h"
|
||||
#include "zeek/plugin/TaggedComponent.h"
|
||||
|
||||
namespace zeek
|
||||
{
|
||||
|
@ -27,7 +26,7 @@ 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
|
||||
class Component : public plugin::Component
|
||||
{
|
||||
public:
|
||||
using factory_function = Analyzer* (*)(RecordValPtr args, File* file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue