extend PBD::ID API to allow construction and operator== using uint64_t
[ardour.git] / libs / pbd / pbd / id.h
index ca62b10dc231540062ba93acccb4cf54178e1a46..a597b6512b471397973225cb3132c41fbb3fb9c7 100644 (file)
@@ -35,6 +35,7 @@ class LIBPBD_API ID {
        ID ();
        ID (std::string);
        ID (const ID&);
+       ID (uint64_t);
 
        void reset ();
 
@@ -47,6 +48,9 @@ class LIBPBD_API ID {
        }
 
        bool operator== (const std::string&) const;
+       bool operator== (uint64_t n) const {
+               return _id == n;
+       }
 
        ID& operator= (std::string);
        ID& operator= (const ID&);
@@ -55,8 +59,6 @@ class LIBPBD_API ID {
                return _id < other._id;
        }
 
-       void print (char* buf, uint32_t bufsize) const;
-
        std::string to_s () const;
 
        static uint64_t counter() { return _counter; }