]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/getopt.h
Add decorations for things which are considered part of the API
[libs/core.git] / source / core / getopt.h
index 575184f3400b2699cf3ba078a90633550ffd9e6d..59c810c5e4a5ff4182cd42d9736f8af9d708eae9 100644 (file)
@@ -6,20 +6,20 @@
 #include <string>
 #include <vector>
 #include <msp/strings/lexicalcast.h>
+#include "mspcore_api.h"
 #include "noncopyable.h"
 
 namespace Msp {
 
-class usage_error: public std::runtime_error
+class MSPCORE_API usage_error: public std::runtime_error
 {
 private:
        std::string m_help;
 
 public:
        usage_error(const std::string &w, const std::string &h = std::string()): std::runtime_error(w), m_help(h) { }
-       ~usage_error() throw() override = default;
 
-       const char *help() const throw() { return m_help.c_str(); }
+       const char *help() const noexcept { return m_help.c_str(); }
 };
 
 
@@ -59,7 +59,7 @@ A built-in --help option is provided and will output a list of options,
 arguments and their associated help texts.  An application may override this by
 providing its own option with the same name.
 */
-class GetOpt: private NonCopyable
+class MSPCORE_API GetOpt: private NonCopyable
 {
 public:
        enum ArgType
@@ -69,7 +69,7 @@ public:
                REQUIRED_ARG
        };
 
-       class Option
+       class MSPCORE_API Option
        {
        protected:
                Option() = default;
@@ -89,7 +89,7 @@ public:
                virtual unsigned get_seen_count() const = 0;
        };
 
-       class Argument
+       class MSPCORE_API Argument
        {
        protected:
                Argument() = default;