From 3d394d673203680adbd98449f700ae209a9f39f1 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 2 Jun 2008 21:38:25 +0000 Subject: Separate option parsing from qpid::client::ClientSettings. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@662581 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/TestOptions.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'qpid/cpp/src/tests/TestOptions.h') diff --git a/qpid/cpp/src/tests/TestOptions.h b/qpid/cpp/src/tests/TestOptions.h index 3013ffa773..a400fe5ecb 100644 --- a/qpid/cpp/src/tests/TestOptions.h +++ b/qpid/cpp/src/tests/TestOptions.h @@ -26,7 +26,7 @@ #include "qpid/Url.h" #include "qpid/log/Logger.h" #include "qpid/client/Connection.h" -#include "qpid/client/ConnectionSettings.h" +#include "ConnectionOptions.h" #include #include @@ -35,12 +35,14 @@ namespace qpid { struct TestOptions : public qpid::Options { - TestOptions(const std::string& helpText_=std::string()) : - Options("Test Options"), help(false), helpText(helpText_) + TestOptions(const std::string& helpText_=std::string(), + const std::string& argv0=std::string()) + : Options("Test Options"), help(false), log(argv0), helpText(helpText_) { addOptions() ("help", optValue(help), "print this usage statement"); add(con); + add(log); } /** As well as parsing, throw help message if requested. */ @@ -52,7 +54,7 @@ struct TestOptions : public qpid::Options msg << *this << std::endl << std::endl << e.what() << std::endl; throw qpid::Options::Exception(msg.str()); } - qpid::log::Logger::instance().configure(con.log); + qpid::log::Logger::instance().configure(log); if (help) { std::ostringstream msg; msg << *this << std::endl << std::endl << helpText << std::endl; @@ -67,7 +69,8 @@ struct TestOptions : public qpid::Options bool help; - client::ConnectionSettings con; + ConnectionOptions con; + qpid::log::Options log; std::string helpText; }; -- cgit v1.2.1