diff options
Diffstat (limited to 'image/backends/basic.hh')
-rw-r--r-- | image/backends/basic.hh | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/image/backends/basic.hh b/image/backends/basic.hh index 3181f69..95b94ae 100644 --- a/image/backends/basic.hh +++ b/image/backends/basic.hh @@ -19,14 +19,6 @@ namespace Horizon { namespace Image { -class BasicBackend; - -struct BackendDescriptor { - std::string type_code; - std::string description; - std::function<BasicBackend *(std::string, std::string)> creation_fn; -}; - class BasicBackend { public: /*! Create the backend object. @@ -53,9 +45,6 @@ public: */ virtual int finalise(); - /*! Returns a list of available backends. */ - static const std::vector<BackendDescriptor> available_backends(); - /*! The intermediate directory which contains the sysroot the image * should contain. */ const std::string &ir_dir; @@ -63,5 +52,20 @@ public: const std::string &out_path; }; +struct BackendDescriptor { + std::string type_code; + std::string description; + std::function<BasicBackend *(std::string, std::string)> creation_fn; +}; + +class BackendManager { +public: + /*! Returns a list of available backends. */ + static const std::vector<BackendDescriptor> available_backends(); + + /*! Register a new backend. */ + static void register_backend(BackendDescriptor desc); +}; + } } |