]> git.tdb.fi Git - builder.git/blobdiff - source/builder.h
Use ObjectLoaders where appropriate
[builder.git] / source / builder.h
index 0dc16d175d5c75cfbd60a3f60db1a96f50af2dc0..e524864564cfee83b64d59acddea2709eb334b6e 100644 (file)
@@ -9,6 +9,7 @@
 #include <msp/fs/path.h>
 #include "architecture.h"
 #include "config.h"
+#include "logger.h"
 #include "misc.h"
 #include "packagemanager.h"
 #include "problem.h"
@@ -29,10 +30,9 @@ The main application class.  Controls and owns everything.  Rules the world.
 class Builder: public Msp::RegisteredApplication<Builder>
 {
 private:
-       class Loader: public Msp::DataFile::Loader
+       class Loader: public Msp::DataFile::ObjectLoader<Builder>
        {
        private:
-               Builder &bld;
                Msp::FS::Path src;
 
        public:
@@ -77,6 +77,7 @@ private:
        ProfileTemplateMap profile_tmpl;
        Toolchain toolchain;
        VirtualFileSystem vfs;
+       Logger logger;
 
        ProblemList problems;
        Analyzer *analyzer;
@@ -84,7 +85,6 @@ private:
        unsigned clean;
        bool dry_run;
        bool help;
-       unsigned verbose;
        bool show_progress;
        std::string build_file;
        unsigned jobs;
@@ -104,7 +104,6 @@ public:
        ~Builder();
 
        int main();
-       unsigned get_verbose() const { return verbose; }
        bool get_dry_run() const { return dry_run; }
 
        PackageManager &get_package_manager() { return package_manager; }
@@ -124,6 +123,7 @@ public:
 
        const Toolchain &get_toolchain() const { return toolchain; }
        VirtualFileSystem &get_vfs() { return vfs; }
+       const Logger &get_logger() const { return logger; }
 
        /** Adds a target to both the target map and the new target queue.  Called
        from Target constructor. */