From 954e6596af5f39316ded5b0c677e7b2b3015d3f6 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Sat, 28 Jul 2018 18:12:13 -0700 Subject: [PATCH] common: add templated Context factory For use to create Contexts only when needed. Signed-off-by: Patrick Donnelly --- src/include/Context.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/include/Context.h b/src/include/Context.h index a801578a598a1..4cd77850cb677 100644 --- a/src/include/Context.h +++ b/src/include/Context.h @@ -492,6 +492,13 @@ private: boost::function m_callback; }; +template +class ContextFactory { +public: + virtual ~ContextFactory() {} + virtual ContextType *build() = 0; +}; + #undef mydout #endif -- 2.39.5