From c6b0e5fc81d905f57688c696f80e480712f612ab Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 2 Apr 2020 05:08:04 -0500 Subject: image: Significantly refactor how backends are registered --- image/backends/basic.hh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'image/backends/basic.hh') diff --git a/image/backends/basic.hh b/image/backends/basic.hh index d39c57e..3181f69 100644 --- a/image/backends/basic.hh +++ b/image/backends/basic.hh @@ -12,11 +12,21 @@ #pragma once +#include #include +#include namespace Horizon { namespace Image { +class BasicBackend; + +struct BackendDescriptor { + std::string type_code; + std::string description; + std::function creation_fn; +}; + class BasicBackend { public: /*! Create the backend object. @@ -43,6 +53,9 @@ public: */ virtual int finalise(); + /*! Returns a list of available backends. */ + static const std::vector available_backends(); + /*! The intermediate directory which contains the sysroot the image * should contain. */ const std::string &ir_dir; -- cgit v1.2.3-70-g09d2