Andre Poenitz wrote: > On Thu, Mar 06, 2003 at 01:00:33PM +0000, Angus Leeming wrote: >> Andre Poenitz wrote: >> >> > >> > Any problem with attached solution? >> >> You mean virtual printcontroller() ? > > A virtual "whoami". > >> In this case no. More generally yes since the different controllers >> have very different contents. Eg it doesn't make much sense to have >> vector<string> & getListofCitations(); >> in ControlTabular. > > Could you try to re-formualte your problem in simple words? > > You need in the View access to the Controler without making all > possible controler functions virtual in the ViewBase?
Each View (ViewTabular, ViewCitation etc) has a common ViewBase that has access to ControlBase. ControlTabular and ControlCitation have many different methods which it is ridiculous to make virtual. ViewCitation ControlCitation | | ViewBase------------>ControlBase In contrast, ControlCitation needs know nothing about the View at all. (I think that this is right ;-). See Dialog.C for how it all fits together. -- Angus