mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Reduce includes in plugin/Component.h
This commit is contained in:
parent
ff9f0f7a5c
commit
c659592773
7 changed files with 27 additions and 17 deletions
|
@ -10,22 +10,16 @@
|
||||||
#include <variant>
|
#include <variant>
|
||||||
|
|
||||||
#include "zeek/EventHandler.h"
|
#include "zeek/EventHandler.h"
|
||||||
#include "zeek/IntrusivePtr.h"
|
|
||||||
#include "zeek/Span.h"
|
#include "zeek/Span.h"
|
||||||
#include "zeek/Tag.h"
|
#include "zeek/Tag.h"
|
||||||
|
#include "zeek/Val.h"
|
||||||
|
#include "zeek/ZeekArgs.h"
|
||||||
|
#include "zeek/cluster/BifSupport.h"
|
||||||
#include "zeek/cluster/Serializer.h"
|
#include "zeek/cluster/Serializer.h"
|
||||||
#include "zeek/logging/Types.h"
|
#include "zeek/logging/Types.h"
|
||||||
|
|
||||||
namespace zeek {
|
namespace zeek {
|
||||||
|
|
||||||
class FuncVal;
|
|
||||||
|
|
||||||
using FuncValPtr = IntrusivePtr<FuncVal>;
|
|
||||||
|
|
||||||
class Val;
|
|
||||||
using ValPtr = IntrusivePtr<Val>;
|
|
||||||
using ArgsSpan = Span<const ValPtr>;
|
|
||||||
|
|
||||||
namespace detail {
|
namespace detail {
|
||||||
template<class Proc, class Work>
|
template<class Proc, class Work>
|
||||||
class OnLoopProcess;
|
class OnLoopProcess;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "zeek/Desc.h"
|
#include "zeek/Desc.h"
|
||||||
#include "zeek/Reporter.h"
|
#include "zeek/Reporter.h"
|
||||||
|
#include "zeek/Type.h"
|
||||||
|
|
||||||
namespace zeek::iosource {
|
namespace zeek::iosource {
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#include "zeek/Desc.h"
|
#include "zeek/Desc.h"
|
||||||
#include "zeek/Reporter.h"
|
#include "zeek/Reporter.h"
|
||||||
|
#include "zeek/Type.h"
|
||||||
|
#include "zeek/Val.h"
|
||||||
|
|
||||||
namespace zeek::plugin {
|
namespace zeek::plugin {
|
||||||
|
|
||||||
|
@ -16,6 +18,8 @@ Component::Component(component::Type arg_type, const std::string& arg_name, Tag:
|
||||||
canon_name_val = make_intrusive<StringVal>(canon_name);
|
canon_name_val = make_intrusive<StringVal>(canon_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component::~Component() {}
|
||||||
|
|
||||||
void Component::Describe(ODesc* d) const {
|
void Component::Describe(ODesc* d) const {
|
||||||
d->Add(" ");
|
d->Add(" ");
|
||||||
d->Add("[");
|
d->Add("[");
|
||||||
|
@ -95,4 +99,7 @@ void Component::SetEnabled(bool arg_enabled) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StringValPtr Component::CanonicalNameVal() const { return canon_name_val; }
|
||||||
|
|
||||||
} // namespace zeek::plugin
|
} // namespace zeek::plugin
|
||||||
|
|
|
@ -2,17 +2,20 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "zeek/zeek-config.h"
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "zeek/IntrusivePtr.h"
|
||||||
#include "zeek/Tag.h"
|
#include "zeek/Tag.h"
|
||||||
#include "zeek/Type.h"
|
|
||||||
#include "zeek/Val.h"
|
|
||||||
|
|
||||||
namespace zeek {
|
namespace zeek {
|
||||||
|
|
||||||
class ODesc;
|
class ODesc;
|
||||||
|
class EnumType;
|
||||||
|
using EnumTypePtr = IntrusivePtr<EnumType>;
|
||||||
|
class EnumVal;
|
||||||
|
using EnumValPtr = IntrusivePtr<EnumVal>;
|
||||||
|
class StringVal;
|
||||||
|
using StringValPtr = IntrusivePtr<StringVal>;
|
||||||
|
|
||||||
namespace plugin {
|
namespace plugin {
|
||||||
namespace component {
|
namespace component {
|
||||||
|
@ -69,7 +72,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Destructor.
|
* Destructor.
|
||||||
*/
|
*/
|
||||||
virtual ~Component() = default;
|
virtual ~Component();
|
||||||
|
|
||||||
// Disable.
|
// Disable.
|
||||||
Component(const Component& other) = delete;
|
Component(const Component& other) = delete;
|
||||||
|
@ -99,7 +102,7 @@ public:
|
||||||
* ID.
|
* ID.
|
||||||
*/
|
*/
|
||||||
const std::string& CanonicalName() const { return canon_name; }
|
const std::string& CanonicalName() const { return canon_name; }
|
||||||
StringValPtr CanonicalNameVal() const { return canon_name_val; }
|
StringValPtr CanonicalNameVal() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a textual representation of the component. This goes into
|
* Returns a textual representation of the component. This goes into
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include "zeek/IntrusivePtr.h"
|
||||||
#include "zeek/plugin/Component.h"
|
#include "zeek/plugin/Component.h"
|
||||||
|
|
||||||
namespace zeek::storage {
|
namespace zeek::storage {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "zeek/Reporter.h"
|
#include "zeek/Reporter.h"
|
||||||
|
#include "zeek/Type.h"
|
||||||
#include "zeek/zeekygen/utils.h"
|
#include "zeek/zeekygen/utils.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <zeek/Flare.h>
|
|
||||||
#include <zeek/plugin/Plugin.h>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
|
#include "zeek/Flare.h"
|
||||||
|
#include "zeek/RunState.h"
|
||||||
#include "zeek/iosource/Manager.h"
|
#include "zeek/iosource/Manager.h"
|
||||||
|
#include "zeek/plugin/Plugin.h"
|
||||||
|
|
||||||
namespace btest::plugin::Demo_Iosource {
|
namespace btest::plugin::Demo_Iosource {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue