]> sigrok.org Git - libsigrok.git/blobdiff - bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp
C++: Make some methods static to match the C API
[libsigrok.git] / bindings / cxx / include / libsigrokcxx / libsigrokcxx.hpp
index e93a5fb5942f5b4b8689824840ef21d8cd5bbd6d..6fdb153fe14a6af86310f2ada0783cd24e8ba1bf 100644 (file)
@@ -121,9 +121,9 @@ class SR_API Error: public exception
 {
 public:
        explicit Error(int result);
-       ~Error() throw();
+       ~Error() noexcept;
        const int result;
-       const char *what() const throw();
+       const char *what() const noexcept;
 };
 
 /* Base template for classes whose resources are owned by a parent object. */
@@ -246,11 +246,11 @@ private:
        virtual size_t read(const struct sr_resource *res, void *buf, size_t count) = 0;
 
        static SR_PRIV int open_callback(struct sr_resource *res,
-                       const char *name, void *cb_data);
+                       const char *name, void *cb_data) noexcept;
        static SR_PRIV int close_callback(struct sr_resource *res,
-                       void *cb_data);
+                       void *cb_data) noexcept;
        static SR_PRIV ssize_t read_callback(const struct sr_resource *res,
-                       void *buf, size_t count, void *cb_data);
+                       void *buf, size_t count, void *cb_data) noexcept;
        friend class Context;
 };
 
@@ -261,9 +261,9 @@ public:
        /** Create new context */
        static shared_ptr<Context> create();
        /** libsigrok package version. */
-       string package_version();
+       static string package_version();
        /** libsigrok library version. */
-       string lib_version();
+       static string lib_version();
        /** Available hardware drivers, indexed by name. */
        map<string, shared_ptr<Driver> > drivers();
        /** Available input formats, indexed by name. */