Angus Leeming <[EMAIL PROTECTED]> writes:
| Index: src/lyxtext.h
| - InsetOld::RESULT dispatch(FuncRequest const & cmd);
| Does this mean you can remove #include "insets/insetbase.h" from
| lyxtext.h?
I have no idea. Not part of the exercise.
| Index: src/insets/insetbase.h
| +protected:
| + // the real dispatcher
| + virtual dispatch_result priv_dispatch
| + (FuncRequest const & cmd, idx_type & idx, pos_type & pos);
| Is that the 'standard' naming convention for virtual functions doing
| the work of the public interface, non-virtual function? Thanks, I'd
| been calling them '_impl'.
Are there a standard way? If there are a standard way it would be to
call the public interface "pubdispatch" and the private one
"dispatch".
| Can you not make it private?
| Which derived class calls priv_dispatch?
| None should. They should go through the public interface.
Not possible. When a derived class' priv_dispatch wants to call its
base::dispatch it has to be done through the base::priv_dispatch or
you get a loop. (if not the base::dispatch will just call the
derived::priv_dispatch and round and round you go...)
(btw... this direct calling of base::functions indicates some bad
design.)
| Index: src/insets/insetcollapsable.C
| Ok, this somethimes invokes 'dispatch' and sometimes invokes
| 'priv_dispatch'.
only priv_dispatch are supposed to call priv_dispatch and only in base
classes.
--
Lgb