void
ID::init ()
{
- counter_lock = new Glib::Mutex;
+ if (!counter_lock)
+ counter_lock = new Glib::Mutex;
}
ID::ID ()
_id = _counter++;
}
+ID::ID (const ID& other)
+{
+ _id = other._id;
+}
+
ID::ID (string str)
{
string_assign (str);
return *this;
}
+ID&
+ID::operator= (const ID& other)
+{
+ if (&other != this) {
+ _id = other._id;
+ }
+ return *this;
+}
+
ostream&
operator<< (ostream& ostr, const ID& _id)
{