ROOT_Application
2.0
C++ Core modules and GUIStock
|
see remark below, much easier if composition than derivation in the case of ListController, same for parent_controller as member <U> easily extends to View as well ( ListView possible ), but strong coupling again More...
#include <Controller.h>
Public Member Functions | |
ControllerFrame () | |
ControllerFrame (ControllerBase *parent, std::string name="") | |
virtual | ~ControllerFrame () |
Public Member Functions inherited from ControllerBase | |
ControllerBase () | |
ControllerBase (ControllerBase *parent, std::string cont_name) | |
virtual | ~ControllerBase () |
std::string | GetName () const |
ControllerBase * | GetParentController () |
virtual void | Updated (std::vector< std::string > &)=0 |
Public Member Functions inherited from ListController< T > | |
ListController () | |
virtual | ~ListController () |
void | AddController (T *control) |
Common Function for dealing with the list, need a name, may call other controllers... More... | |
void | RemoveController (T *control) |
T * | GetController (std::string name) |
T * | GetFirstController () |
get the first controller in list, useful after a delete More... | |
virtual void | DeleteList (bool call_delete=true) |
Iterative call for deleting child controller. More... | |
virtual unsigned int | GetSizeListController () const |
Additional Inherited Members | |
Protected Types inherited from ListController< T > | |
typedef std::list< T * >::iterator | it_list |
useful typedef for the class ( and derivatives !) More... | |
Protected Attributes inherited from ListController< T > | |
std::list< T * > | list_controller |
list more convenient, remove if not shown ?, or insert More... | |
see remark below, much easier if composition than derivation in the case of ListController, same for parent_controller as member <U> easily extends to View as well ( ListView possible ), but strong coupling again
Main class to derive from the application.
\ Intermediate class, useful for GUIStock because avoid explicit 2 derivation for the final class.
http://stackoverflow.com/questions/872675/policy-based-design-and-best-practices-c In general, policy-based design does not require inheritance. Adding it as a member works just as well. If you do go for inheritance, make it private so you don't get the problem you mentioned as #4.
Inheritance only for ControllerBase, add convenient overload function of the Base in this ControllerFrame. Maybe need a ControllerSpec<T> :: ControllerBase as a member And need correct specialization if no argument given ( where orthogonal policy is better... )
Definition at line 209 of file Controller.h.
|
inline |
Definition at line 212 of file Controller.h.
|
inline |
Definition at line 217 of file Controller.h.
|
inlinevirtual |
Definition at line 223 of file Controller.h.