From e20a23b370e64c6f09a57b4ddefd6f650e89ba13 Mon Sep 17 00:00:00 2001 From: "Charles E. Rolke" Date: Thu, 20 Sep 2012 13:48:40 +0000 Subject: QPID-3500 C++ qpidd broker --help should work despite parse errors This patch finds and processes --version before anything else. Then it finds --help before fully parsing command line options. In the event of a parse error, help usage may be shown as requested. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1388032 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/include/qpid/Options.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qpid/cpp/include') diff --git a/qpid/cpp/include/qpid/Options.h b/qpid/cpp/include/qpid/Options.h index 0bbe7b704f..feef5d8b98 100644 --- a/qpid/cpp/include/qpid/Options.h +++ b/qpid/cpp/include/qpid/Options.h @@ -149,6 +149,11 @@ struct Options : public po::options_description { const std::string& configfile=std::string(), bool allowUnknown = false); + /** + * Tests for presence of argc/argv switch + */ + QPID_COMMON_EXTERN bool findArg(int argc, char const* const* argv, + const std::string& theArg); boost::program_options::options_description_easy_init addOptions() { return add_options(); -- cgit v1.2.1