mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
lib/plugin: make type an argument of constructor
This commit is contained in:
parent
3cf50db98d
commit
09534e83a6
4 changed files with 6 additions and 7 deletions
|
@ -106,8 +106,7 @@ class PCIeCardFactory : public Plugin {
|
|||
public:
|
||||
|
||||
PCIeCardFactory() :
|
||||
Plugin("FPGA Card plugin")
|
||||
{ pluginType = Plugin::Type::FpgaCard; }
|
||||
Plugin(Plugin::Type::FpgaCard, "FPGA Card plugin") {}
|
||||
|
||||
static CardList
|
||||
make(json_t *json, struct pci* pci, ::vfio_container* vc);
|
||||
|
|
|
@ -145,8 +145,8 @@ using IpCoreList = std::list<std::unique_ptr<IpCore>>;
|
|||
class IpCoreFactory : public Plugin {
|
||||
public:
|
||||
IpCoreFactory(std::string concreteName) :
|
||||
Plugin(std::string("IpCore - ") + concreteName)
|
||||
{ pluginType = Plugin::Type::FpgaIp; }
|
||||
Plugin(Plugin::Type::FpgaIp, std::string("IpCore - ") + concreteName)
|
||||
{}
|
||||
|
||||
/// Returns a running and checked FPGA IP
|
||||
static IpCoreList
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
FpgaCard,
|
||||
};
|
||||
|
||||
Plugin(std::string name);
|
||||
Plugin(Type type, const std::string& name);
|
||||
virtual ~Plugin();
|
||||
|
||||
// copying a plugin doesn't make sense, so explicitly deny it
|
||||
|
|
|
@ -45,8 +45,8 @@ Plugin::pluginListBuffer;
|
|||
int Plugin::pluginListNiftyCounter;
|
||||
|
||||
|
||||
Plugin::Plugin(std::string name) :
|
||||
pluginType(Plugin::Type::Unknown),
|
||||
Plugin::Plugin(Type type, const std::string& name) :
|
||||
pluginType(type),
|
||||
name(name),
|
||||
description(""),
|
||||
path(""),
|
||||
|
|
Loading…
Add table
Reference in a new issue