cancel
Showing results for 
Search instead for 
Did you mean: 

Why are ModelListener::model and Model::modelListener data members declared protected rather than private?

AndrewM
Associate III

I notice that both ModelListener::model and Model::modelListener data members are declared protected rather than private.

This would indicate the provision for inheriting from ModelListener and/or Model.

Under what circumstances might one want to do that and more importantly, how would that work in terms of memory allocation?

ie how would one organise for TouchGFX to allocate the derived class instances?

1 REPLY 1
Martin KJELDSEN
Chief III

I think, initially, the idea was that you could have sub models that inherited from the Model class, but in reality this is not the best or easiest solution - So you could say that they might as well be private.

/Martin