I need to create an MVC architecture, where both the View and the Controller classes have already been written as templates as follows:
template<class Model, class View>
class Controller { /* Implement Controller */ };
template<class Model, class Controller>
class View { /* Implement View */ };
I also have a model class:
class Model { /* Implement Model */ };
I have no control over how the Model, View, and Controller classes have been created. Now, how do I instantiate the controller, or the view?
To better explain the situation, if I want to create a Controller using the View and Model classes above (I am NOT allowed to use any other classes), I get:
NOTE: Invalid C++ code follows
Controller< Model, View< Model, // ad infinitum
whereas the following is also invalid:
NOTE: Invalid C++ code follows
Controller< Model, View< Model, Controller > > c;