ViewFactory Class Reference
[Views]

Factory that returns the views TODO: Describe me. More...

#include <view_factory.h>

List of all members.

Public Member Functions

 ViewFactory ()
virtual ~ViewFactory ()
view_pointer_type getView (view_type requested_view)
template<class ViewType>
void registerViewType (view_type key)

Protected Types

typedef view_pointer_type(* creatorFunctionType )()
typedef std::map< view_type,
creatorFunctionType
view_map_type

Protected Attributes

view_map_type view_map_


Detailed Description

Factory that returns the views TODO: Describe me.

Author:
Tobias Gross (tobias.gross@imedgine.org)

Christian Koerner (christian.koerner@imedgine.org)

Alexander Lex (alexander.lex@imedgine.org)

Marc Streit (marc.streit@imedgine.org)

Martin Reininger (martin.reininger@imedgine.org)

Definition at line 44 of file view_factory.h.


Constructor & Destructor Documentation

ViewFactory  ) 
 

Constructor

Definition at line 20 of file view_factory.cpp.

~ViewFactory  )  [virtual]
 

Destructor

Definition at line 26 of file view_factory.cpp.


Member Function Documentation

view_pointer_type getView view_type  requested_view  ) 
 

Returns a new instance of the requested view type or 0 if no type with that key was registered.

Parameters:
requested_view The key of the view to create

Definition at line 32 of file view_factory.cpp.

References ViewFactory::view_map_.

void registerViewType view_type  key  )  [inline]
 

Associates the new view type with the given key. Subsequent calls to getView with this key will return newly created views of the registered concrete view type.

Parameters:
ViewType The type of view implementing the View interface to associated with the given key
key The key that identifies the view type uniquely

Definition at line 78 of file view_factory.h.

References ViewFactory::view_map_.

Referenced by DataViewMediator::DataViewMediator().


Member Data Documentation

view_map_type view_map_ [protected]
 

The mapping between view keys and creational functions that are templated with the type of View to create

Definition at line 92 of file view_factory.h.

Referenced by ViewFactory::getView(), and ViewFactory::registerViewType().


The documentation for this class was generated from the following files:
Generated on Sun Aug 13 18:20:06 2006 for iMEDgine by  doxygen 1.4.6