Skip to main content
This topic has been closed for replies.

3 replies

HP_it
Senior II
January 18, 2020

I might be wrong about this but the way I do it is to have a function prototype in my .hpp file and then the function itself in the .cpp file.

If you are writing in the .cpp file and the headers for the model and view are already created you should be able to tab-complete on the names.

You might find more inspiration in my video here: https://www.youtube.com/watch?v=SYdyJBehcYY

Ebun.1
Ebun.1Author
Senior
January 20, 2020

Hello Mr.HP

The pointer was accessible as it was defined in the base class.

Thank you very much.

Martin KJELDSEN
Principal III
January 20, 2020

> How do you get an instance of model?

A Presenter already has this instance (in base class, yes). The binding is done in some general bootstrapping code to bind the ONLY instance of model to each active presenter.

And same goes for presenter. A view always has a presenter instance according to the Model-View-Presenter (MVP) software pattern.

/Martin