mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 20:48:21 +00:00
Cleanup of plugin component API.
- Move more functionality into base class. - Remove cctors and assignment operators (weren't actually needed anymore) - Switch from const char* to std::string.
This commit is contained in:
parent
e9413c9361
commit
987452beff
18 changed files with 114 additions and 216 deletions
|
@ -7,15 +7,21 @@
|
|||
|
||||
using namespace plugin;
|
||||
|
||||
Component::Component(component::Type arg_type)
|
||||
Component::Component(component::Type arg_type, const std::string& arg_name)
|
||||
{
|
||||
type = arg_type;
|
||||
name = arg_name;
|
||||
}
|
||||
|
||||
Component::~Component()
|
||||
{
|
||||
}
|
||||
|
||||
const std::string& Component::Name() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
component::Type Component::Type() const
|
||||
{
|
||||
return type;
|
||||
|
@ -51,4 +57,8 @@ void Component::Describe(ODesc* d) const
|
|||
|
||||
d->Add("]");
|
||||
d->Add(" ");
|
||||
d->Add(name);
|
||||
d->Add(" (");
|
||||
DoDescribe(d);
|
||||
d->Add(")");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue