ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
ControllerFrame< T > Class Template Reference

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>

Inheritance diagram for ControllerFrame< T >:
Inheritance graph
[legend]
Collaboration diagram for ControllerFrame< T >:
Collaboration graph
[legend]

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
 
ControllerBaseGetParentController ()
 
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...
 

Detailed Description

template<class T>
class ControllerFrame< T >

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.

Todo:
Case if no sub-controllers can be improved.

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.

Constructor & Destructor Documentation

template<class T>
ControllerFrame< T >::ControllerFrame ( )
inline

Definition at line 212 of file Controller.h.

template<class T>
ControllerFrame< T >::ControllerFrame ( ControllerBase parent,
std::string  name = "" 
)
inline

Definition at line 217 of file Controller.h.

template<class T>
virtual ControllerFrame< T >::~ControllerFrame ( )
inlinevirtual

Definition at line 223 of file Controller.h.


The documentation for this class was generated from the following file: