summaryrefslogtreecommitdiff
path: root/qpid/cpp/examples/messaging
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/examples/messaging')
-rw-r--r--qpid/cpp/examples/messaging/OptionParser.cpp14
-rw-r--r--qpid/cpp/examples/messaging/OptionParser.h11
2 files changed, 13 insertions, 12 deletions
diff --git a/qpid/cpp/examples/messaging/OptionParser.cpp b/qpid/cpp/examples/messaging/OptionParser.cpp
index 661d0a988a..41a71af49a 100644
--- a/qpid/cpp/examples/messaging/OptionParser.cpp
+++ b/qpid/cpp/examples/messaging/OptionParser.cpp
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -93,12 +93,6 @@ class OptionMatch
std::string name;
};
-class OptionsError : public qpid::types::Exception
-{
- public:
- OptionsError(const std::string& message) : qpid::types::Exception(message) {}
-};
-
Option::Option(const std::string& name, const std::string& desc) : description(desc)
{
std::string::size_type i = name.find(",");
@@ -197,7 +191,7 @@ Option* OptionParser::getOption(const std::string& argument)
throw OptionsError(error.str());
} else {
return *i;
- }
+ }
} else {
return 0;
}
@@ -251,7 +245,7 @@ bool OptionParser::parse(int argc, char** argv)
OptionParser::~OptionParser()
{
- for (Options::iterator i = options.begin(); i != options.end(); ++i) {
+ for (Options::iterator i = options.begin(); i != options.end(); ++i) {
delete *i;
}
}
diff --git a/qpid/cpp/examples/messaging/OptionParser.h b/qpid/cpp/examples/messaging/OptionParser.h
index 4cda53f92a..72fe2e4bf9 100644
--- a/qpid/cpp/examples/messaging/OptionParser.h
+++ b/qpid/cpp/examples/messaging/OptionParser.h
@@ -10,9 +10,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -25,6 +25,7 @@
#include <map>
#include <string>
#include <vector>
+#include "qpid/CommonImportExport.h"
class Option;
@@ -53,4 +54,10 @@ class OptionParser
Option* getOption(const std::string& argument);
};
+class QPID_COMMON_CLASS_EXTERN OptionsError : public qpid::types::Exception
+{
+ public:
+ OptionsError(const std::string& message) : qpid::types::Exception(message) {}
+};
+
#endif /*!OPTIONPARSER_H*/