mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Move all of the base plugin classes into the zeek::plugin namespace
This commit is contained in:
parent
cbdb8ee074
commit
e77e8c4b7b
28 changed files with 404 additions and 240 deletions
|
@ -9,7 +9,7 @@
|
|||
using namespace file_analysis;
|
||||
|
||||
Component::Component(const std::string& name, factory_callback arg_factory, Tag::subtype_t subtype)
|
||||
: plugin::Component(plugin::component::FILE_ANALYZER, name),
|
||||
: zeek::plugin::Component(zeek::plugin::component::FILE_ANALYZER, name),
|
||||
plugin::TaggedComponent<file_analysis::Tag>(subtype)
|
||||
{
|
||||
factory = arg_factory;
|
||||
|
@ -17,7 +17,7 @@ Component::Component(const std::string& name, factory_callback arg_factory, Tag:
|
|||
}
|
||||
|
||||
Component::Component(const std::string& name, factory_function arg_factory, Tag::subtype_t subtype)
|
||||
: plugin::Component(plugin::component::FILE_ANALYZER, name),
|
||||
: zeek::plugin::Component(zeek::plugin::component::FILE_ANALYZER, name),
|
||||
plugin::TaggedComponent<file_analysis::Tag>(subtype)
|
||||
{
|
||||
factory = nullptr;
|
||||
|
|
|
@ -22,7 +22,7 @@ class Manager;
|
|||
* A plugin can provide a specific file analyzer by registering this
|
||||
* analyzer component, describing the analyzer.
|
||||
*/
|
||||
class Component : public plugin::Component,
|
||||
class Component : public zeek::plugin::Component,
|
||||
public plugin::TaggedComponent<file_analysis::Tag> {
|
||||
public:
|
||||
typedef Analyzer* (*factory_callback)(RecordVal* args, File* file);
|
||||
|
|
|
@ -7,11 +7,17 @@
|
|||
|
||||
class EnumVal;
|
||||
|
||||
namespace zeek::plugin {
|
||||
template <class T> class TaggedComponent;
|
||||
template <class T, class C> class ComponentManager;
|
||||
}
|
||||
namespace plugin {
|
||||
template <class T>
|
||||
class TaggedComponent;
|
||||
template <class T, class C>
|
||||
class ComponentManager;
|
||||
template <class T>
|
||||
using TaggedComponent [[deprecated("Remove in v4.1. Use zeek::plugin::TaggedComponent instead.")]] =
|
||||
zeek::plugin::TaggedComponent<T>;
|
||||
template <class T, class C>
|
||||
using ComponentManager [[deprecated("Remove in v4.1. Use zeek::plugin::ComponentManager instead.")]] =
|
||||
zeek::plugin::ComponentManager<T, C>;
|
||||
}
|
||||
|
||||
namespace file_analysis {
|
||||
|
@ -90,8 +96,8 @@ public:
|
|||
static const Tag Error;
|
||||
|
||||
protected:
|
||||
friend class plugin::ComponentManager<Tag, Component>;
|
||||
friend class plugin::TaggedComponent<Tag>;
|
||||
friend class zeek::plugin::ComponentManager<Tag, Component>;
|
||||
friend class zeek::plugin::TaggedComponent<Tag>;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue