Lars> | Lars,
Lars> | I think I understand your reasoning behind removing the hide()
Lars> | signal from the 
Lars> | Inset d-tor, but I also think that it's incorrect. We don't want the
Lars> | signal to 
Lars> | be copyable.
Lars> | 
Lars> 
Lars> In insetref.C you used this construct:
Lars> 
Lars>         InsetCommand clone = InsetCommand(...);
Lars> 
Lars> It sees that gcc 2.95.2 has a problem wit seeing this as just a
Lars> initialization, so I changed the code to:
Lars> 
Lars>         InsetCommand clone(...);
Lars> 
Lars> Which leaves no room for doubt, and looks a lot better to. Reenabled
Lars> the hide signal in InsetCommand. Everythings sees to work fine.
Lars> 
Lars>         Lgb

Hmmm! I was perhaps jumping the gun when I put the hide signal in the base
class InsetCommand, rather than in the derived classes as I ported them. I
haven't got as far as insetref.C.

Why don't we make InsetCommand (or the subclasses as we port them) noncopyable.
The Clone() method is used for cut and paste and it just calls some (any
--- our choice --- c-tor).

For example (I have used InsetCitation here but this could be equally true of
InsetCommand if we placed the hide signal there). Note that I'm learning my
lesson about initialisation!

Any comments?
Angus

class InsetCitation : public InsetCommand, public noncopyable {
public:
        InsetCitation(InsetCommandParams const &);
        Inset * Clone() const { return new InsetCitation(params()); }

        Signal0<void> hide;
}

InsetCitation::InsetCitation(InsetCommandParams const & p)
                : InsetCommand(p), hide(0)
{}

Reply via email to