5 #ifndef __STDC_FORMAT_MACROS
6 #define __STDC_FORMAT_MACROS
16 Glib::Mutex* ID::counter_lock = 0;
17 uint64_t ID::_counter = 0;
22 counter_lock = new Glib::Mutex;
27 Glib::Mutex::Lock lm (*counter_lock);
37 ID::string_assign (string str)
39 return sscanf (str.c_str(), "%" PRIu64, &_id) != 0;
43 ID::print (char* buf, uint32_t bufsize) const
45 snprintf (buf, bufsize, "%" PRIu64, _id);
48 string ID::to_s() const
50 char buf[32]; // see print()
51 print(buf, sizeof (buf));
56 ID::operator= (string str)
63 operator<< (ostream& ostr, const ID& _id)
66 _id.print (buf, sizeof (buf));