Re: Wrapping pangocairo.h



On Tue, 2006-05-30 at 18:30 +0200, Pierre THIERRY wrote:
> Scribit Jonathon Jongsma dies 30/05/2006 hora 07:28:
> > I wonder if this function:
> > static Glib::RefPtr<Layout> create_from_cairo_context(const
> > Cairo::RefPtr<Cairo::Context>& context);
> > 
> > could be replaced with a simple overloaded create function, e.g.:
> > static Glib::RefPtr<Layout> create(const
> > Cairo::RefPtr<Cairo::Context>& context);
> 
> Why use a helper function (I suppose that it is one) instead of a
> constructor? Is it because you want it to return a RefPtr?

Yes, all classes that need to be used via RefPtr have no public
constructors. They have static create() methods instead.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]