Lomse library. API documentation
0.30.0
|
#include <lomse_presenter.h>
The Presenter is a facade object responsible for maintaining the life cycle and relationships between the objects in the Lomse MVC model: Views, Interactors and the Document.
All these objects are created when invoking one of the LomseDoorway::new_document() or LomseDoorway::open_document() methods.
The Presenter, returned by previous methods, gives acess to the Document and to the Interactors associated to the existing View objects for the Document.
Public Member Functions | |
virtual | ~Presenter () |
int | get_num_interactors () |
SpInteractor | get_interactor_shared_ptr (int iIntor) |
WpInteractor | get_interactor (int iIntor) |
SpDocument | get_document_shared_ptr () |
WpDocument | get_document_weak_ptr () |
Document * | get_document_raw_ptr () |
ADocument | get_document () |
void | set_user_data (void *pData) |
void * | get_user_data () |
|
virtual |
Destructor
|
inline |
Returns an ADocument object for interacting with the internal model.
|
inline |
Returns the raw pointer to the Document associated to this Presenter.
|
inline |
Returns a shared pointer to the Document associated to this Presenter.
WpDocument Presenter::get_document_weak_ptr | ( | ) |
Returns a shared pointer to the Document associated to this Presenter.
WpInteractor Presenter::get_interactor | ( | int | iIntor | ) |
Returns a weak pointer to the specified Interactor index.
iIntor | is the number of the desired Interactor. It must be 0 for the first interactor, and it must be lower than the value returned by method get_num_interactors(); otherwise an exception will be thrown. |
SpInteractor Presenter::get_interactor_shared_ptr | ( | int | iIntor | ) |
Returns a shared pointer to the specified Interactor index.
iIntor | is the number of the desired Interactor. It must be 0 for the first interactor, and it must be lower than the value returned by method get_num_interactors(); otherwise an exception will be thrown. |
|
inline |
Returns the number of Interactors associated to the Presenter, at least 1. There exist as many Interactors as document Views.
|
inline |
Returns a pointer to the user data associated with this Presenter (if any).
|
inline |
Associates the given untyped application data pointer with this Presenter.
pData | The application data to associate with the Presenter. |
This method is a commodity for your application, in case you would like to save some data associated to Presenter objects, e.g., for Document identification or other.