]> git.tdb.fi Git - builder.git/blobdiff - source/buildercli.h
Convert all list containers to vectors
[builder.git] / source / buildercli.h
index ac8875231ff27ddba88fa6844edc33a31c67c115..4fcdb0395052913b217f529f31b8b66c2e4d494e 100644 (file)
@@ -6,12 +6,13 @@
 
 class Analyzer;
 
+/**
+Provides a command-line interface for Builder.
+*/
 class BuilderCLI: public Msp::RegisteredApplication<BuilderCLI>
 {
 private:
-       typedef std::list<std::string> NameList;
-
-       NameList cmdline_targets;
+       std::vector<std::string> cmdline_targets;
        Config::InputOptions cmdline_options;
        Msp::FS::Path cwd;
 
@@ -22,27 +23,26 @@ private:
        unsigned clean;
        bool dry_run;
        bool help;
+       std::string helpmsg;
        bool show_progress;
        std::string build_file;
        unsigned jobs;
-       NameList what_if;
+       std::vector<std::string> what_if;
        bool conf_all;
        bool conf_only;
        bool build_all;
        bool create_makefile;
 
-       static std::string usagemsg;
-       static std::string helpmsg;
-
 public:
        BuilderCLI(int, char **);
        ~BuilderCLI();
 
-       virtual int main();
+       int main() override;
 
+private:
        bool prepare_build();
+       Target *resolve_target(const std::string &);
 
-       static void usage(const char *, const char *, bool);
        void package_help();
 };