Use std::function instead of a function pointer in packet_analysis::Component

This commit is contained in:
Tim Wojtulewicz 2020-11-02 13:05:05 -07:00
parent 43f7b3beab
commit 1f02bd5147

View file

@ -17,7 +17,7 @@ using AnalyzerPtr = std::shared_ptr<Analyzer>;
class Component : public plugin::Component,
public plugin::TaggedComponent<packet_analysis::Tag> {
public:
typedef AnalyzerPtr (*factory_callback)();
using factory_callback = std::function<AnalyzerPtr ()>;
Component(const std::string& name, factory_callback factory, Tag::subtype_t subtype = 0);
~Component() override = default;