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:
Robin Sommer 2013-12-12 17:39:03 -08:00
parent e9413c9361
commit 987452beff
18 changed files with 114 additions and 216 deletions

View file

@ -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(")");
}