Greetings: I've been going a few rounds with Glib::RefPtr<>s and could use some help. What is the "proper" way to access the underlying instance (foo *) of a Glib::RefPtr<foo>? For example: If I want to test to see if 2 RefPtrs refer to the same class, I can use a == b. How do I test to see if 2 separate classes have the same value? In pointer terms I'd use *a == *b. I know I can add a member function to foo which hands itself back. Something like "foo *self() { return this; }". Then I can use *(a->self()) == *(b->self()). Is this the "right" way? The underlying instance is also necessary when calling an external library that wants a pointer to a instance and doesn't understand Glib::RefPtr<>s. Dale
Attachment:
pgpHps5wt8TjJ.pgp
Description: PGP signature