2 * @file buttonGroupFactory.h
3 * @brief Contains ButtonGroupFactory class
4 * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
8 #ifndef BUTTONGROUPFACTORY_H
9 #define BUTTONGROUPFACTORY_H
11 #include <wx/window.h>
19 #include "buttonGroup.h"
20 #include "containerSettings.h"
23 /*! @namespace <creaButtonContainer>
24 * @brief Contains the creaButtonContainer library included in creaMaracasVisu.
26 namespace creaButtonContainer
28 /*! @namespace <creaButtonContainer::model>
29 * @brief Contains the implementation of the model in creaButtonContainer library.
30 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
34 /*! @class ButtonGroupFactory buttonGroupFactory.h "buttonGroupFactory.h"
35 * @brief This class contains the ButtonGroup factory.
36 * @details This class creates a container of group of buttons.
37 * @see <a href="http://en.wikipedia.org/wiki/Factory_method_pattern">Factory Pattern</a>
39 class ButtonGroupFactory
43 /*! @typedef creaButtonContainer::view::Button Button;
44 * @brief Defines the Button type.
46 typedef creaButtonContainer::view::Button Button;
47 // ----------------------------------------------------------------------------------
48 /*! @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
49 * @brief Defines the ButtonGroup type.
51 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
52 // ----------------------------------------------------------------------------------
53 /*! @typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
54 * @brief Defines the ButtonGroupModel type.
56 typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
57 // ----------------------------------------------------------------------------------
58 /*! @typedef std::list< ButtonGroup* > ButtonGroupContainer;
59 * @brief Defines the ButtonGroupContainer type.
61 typedef std::list< ButtonGroup* > ButtonGroupContainer;
62 // ----------------------------------------------------------------------------------
63 /*! @typedef std::map< long, Button* > ButtonContainer;
64 * @brief Defines the ButtonContainer type.
66 typedef std::map< long, Button* > ButtonContainer;
67 // ----------------------------------------------------------------------------------
68 //end of typedef definition
70 /*! @fn ButtonGroupFactory::ButtonGroupFactory( );
71 * @brief This is the default constructor.
73 ButtonGroupFactory( );
74 // -------------------------------------------------------------------------------
75 /*! @fn virtual ButtonGroupFactory::~ButtonGroupFactory( );
76 * @brief This is the destructor.
79 ~ButtonGroupFactory( );
80 /*! @fn ButtonGroupContainer ButtonGroupFactory::CreateButtonGroupContainer( wxWindow* parent, ButtonGroupModel* settings );
81 * @brief This method allows to create the ButtonGroupContainer.
82 * @param parent the wxWindow* parent to be attached.
83 * @param settings The Container settings.
84 * @exception std::bad_alloc
85 * @return ButtonGroupContainer The wx button group container.
88 CreateButtonGroupContainer( wxWindow* parent,
89 ButtonGroupModel* settings );
91 /*! @fn ButtonContainer ButtonGroupFactory::GetButtons( wxWindow* parent, ButtonList buttonModel );
92 * @brief This method allows to create a wx button container for a group.
93 * @param parent the wxWindow* parent to be attached.
94 * @param buttonModel The button list with its own information.
95 * @exception std::bad_alloc
96 * @return ButtonContainer The wx button container.
99 GetButtons( wxWindow* parent, ButtonList buttonModel );
104 #endif // CARTOBUTTONFACTORY_H