Re: [gtkmm] Using gmmproc: not expand _CONVERT



On Wed, 2004-02-04 at 17:08, Alberto Paro wrote:
> Trying to port to c++ diacanvas, I notice that there are not automatic 
> conversion of wrap function in some class (not all).
> 
> Here there is an example:
> 
> constraint.hg:
> 
> _DEFS(diacanvasmm,diacanvas)
>  
> _PINCLUDE(glibmm/private/object_p.h)
> namespace Dia
> {
> class Constraint: public Glib::Object
> {
>         
> _CLASS_GOBJECT(Constraint,DiaConstraint,DIA_TYPE_CONSTRAINT,Glib::Object,GObject)
>  
> public:
>  
>   _WRAP_METHOD(bool has_variables(),dia_constraint_has_variables)
>   _WRAP_METHOD(void optimize(),dia_constraint_optimize)
> };
> }
> 
> 
>  Generated Constraint.cc
> 
> ....
> bool Constraint::has_variables()
> {
>   return 
> _CONVERT(gboolean,bool,dia_constraint_has_variables`'(ifelse(`',1,const_cast<__CNAME__*>(gobj()),gobj())`'ifelse(`',,,`, 
> ')));
> }

I have never seen that in a generated .cc file. Didn't gmmproc complain
on the command line? I will try to look at your code some time, but I
can't promise to do it soon.

By the way, has_variables() should probably be const.

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




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