]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.h
246a6f2b1c88f859e2faea5165d5671e60162f79
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / model / buttonGroupFactory.h
1 /*!
2  * @file buttonGroupFactory.h
3  * @brief This contains ButtonGroupFactory class
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-05-19
6  */
7
8 #ifndef BUTTONGROUPFACTORY_H
9 #define BUTTONGROUPFACTORY_H
10
11 #include <wx/window.h>
12 #include <list>
13 #include <map>
14 #include <iostream>
15 #include <exception>
16
17 #include "system.h"
18 #include "button.h"
19 #include "buttonGroup.h"
20 #include "containerSettings.h"
21 #include "functor.h"
22
23 /*!     @namespace <creaButtonContainer>
24  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
25  */
26 namespace creaButtonContainer
27 {
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>
31          */
32         namespace model
33         {
34
35                 /*! @class ButtonGroupFactory buttonGroupFactory.h "buttonGroupFactory.h"
36                  *      @brief This class contains the ButtonGroup factory.
37                  *  @details This class creates a container of group of buttons.
38                  *  @see <a href="http://en.wikipedia.org/wiki/Factory_method_pattern">Factory Pattern</a>
39                  */
40                 class ButtonGroupFactory
41                 {
42                         public:
43                                 //typedef definition
44                                 /*!     @typedef creaButtonContainer::view::Button Button;
45                                  *      @brief Defines the Button type.
46                                  */
47                                 typedef creaButtonContainer::view::Button Button;
48                                 // ----------------------------------------------------------------------------------
49                                 /*!     @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
50                                  *      @brief Defines the ButtonGroup type.
51                                  */
52                                 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
53                                 // ----------------------------------------------------------------------------------
54                                 /*!     @typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
55                                  *      @brief Defines the ButtonGroupModel type.
56                                  */
57                                 typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
58                                 // ----------------------------------------------------------------------------------
59                                 /*!     @typedef std::list< ButtonGroup* > ButtonGroupContainer;
60                                  *      @brief Defines the ButtonGroupContainer type.
61                                  */
62                                 typedef std::list< ButtonGroup* > ButtonGroupContainer;
63                                 // ----------------------------------------------------------------------------------
64                                 /*!     @typedef std::map< long, Button* > ButtonContainer;
65                                  *      @brief Defines the ButtonContainer type.
66                                  */
67                                 typedef std::map< long, Button* > ButtonContainer;
68                                 // ----------------------------------------------------------------------------------
69                                 //end of typedef definition
70                         public:
71                                 /*!     @fn ButtonGroupFactory::ButtonGroupFactory( );
72                                  *      @brief This is the default constructor.
73                                  */
74                                 ButtonGroupFactory( );
75                                 // -------------------------------------------------------------------------------
76                                 /*!     @fn virtual ButtonGroupFactory::~ButtonGroupFactory( );
77                                  *      @brief This is the destructor.
78                                  */
79                                 virtual
80                                 ~ButtonGroupFactory( );
81                                 /*! @fn ButtonGroupContainer ButtonGroupFactory::CreateButtonGroupContainer( wxWindow* parent, ButtonGroupModel* settings );
82                                  * @brief This function allows to create the ButtonGroupContainer.
83                                  * @param parent the wxWindow* parent to be attached.
84                                  * @param settings The Container settings.
85                                  * @exception std::bad_alloc
86                                  * @return ButtonGroupContainer The wx button group container.
87                                  */
88                                 ButtonGroupContainer
89                                 CreateButtonGroupContainer( wxWindow* parent,
90                                     ButtonGroupModel* settings );
91                         private:
92                                 /*! @fn ButtonContainer ButtonGroupFactory::GetButtons( wxWindow* parent, ButtonList buttonModel );
93                                  * @brief  This function allows to create a wx button container for a group.
94                                  * @param parent the wxWindow* parent to be attached.
95                                  * @param buttonModel The button list with its own information.
96                                  * @exception std::bad_alloc
97                                  * @return ButtonContainer The wx button container.
98                                  */
99                                 ButtonContainer
100                                 GetButtons( wxWindow* parent, ButtonList buttonModel );
101                 };
102         }//ecapseman
103 }//ecapseman
104
105 #endif // CARTOBUTTONFACTORY_H