[cairo] cairomm RefPtr
Bertram Felgenhauer
bertram.felgenhauer at googlemail.com
Sat Dec 1 09:56:52 PST 2007
Larry Lewis wrote:
> Is there a specific reason why cairomm's RefPtr implementation
> (along with glibmm) does not provide the T_CppObject& operator*()
> and T_CppObject* get() methods? Both reference-counting pointer
> implementations I use on a regular basis (boost::shared_ptr and
> Poco::SharedPtr) provide this functionality, which is extremely
> useful for passing the object by reference or directly accessing
> the raw pointer. It's unfortunate to have to resort to the ugly
> operator->() syntax to access the pointer.
You can get the pointer with ref->cobj(). (Cairo::Context and
Cairo::Surface provide this method for a reason.)
As for T_CppObject& operator*(), that operator isn't all that useful
for glib style, opaque C objects.
HTH,
Bertram
More information about the cairo
mailing list