From 5685bf95a62896aea2742894e5ff42877794c4a2 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 2 Nov 2014 22:46:11 -0500 Subject: [PATCH] CLI - Implemented ::insert. --- src/CLI.cpp | 12 ++++++++++++ src/CLI.h | 1 + 2 files changed, 13 insertions(+) diff --git a/src/CLI.cpp b/src/CLI.cpp index 25cf561da..381b32270 100644 --- a/src/CLI.cpp +++ b/src/CLI.cpp @@ -279,6 +279,18 @@ void CLI::add (const std::string& arg) analyze (); } +//////////////////////////////////////////////////////////////////////////////// +// Capture a single argument, after BINARY. +void CLI::insert (const std::string& arg) +{ + // Clean the ID/UUID lists, because they will be rebuilt. + _id_ranges.clear (); + _uuid_list.clear (); + + addArg (arg, true); + analyze (); +} + //////////////////////////////////////////////////////////////////////////////// // Intended to be called after ::initialize() and ::add(), to perform the final // analysis. Analysis is also performed directly after the above, because there diff --git a/src/CLI.h b/src/CLI.h index 480a070c5..1e92bfa23 100644 --- a/src/CLI.h +++ b/src/CLI.h @@ -70,6 +70,7 @@ public: void entity (const std::string&, const std::string&); void initialize (int, const char**); void add (const std::string&); + void insert (const std::string&); void analyze (bool parse = true); void applyOverrides (); void getOverride (std::string&, File&);