]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.h
b12cfb5edcbfa7554b8253b88ea94dc5dd1b8dd8
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / model / buttonGroupFactory.h
1 /*!
2  * @file buttonGroupFactory.h
3  * @brief Contains ButtonGroupFactory class
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-05-24
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                 /*! @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>
38                  */
39                 class ButtonGroupFactory
40                 {
41                         public:
42                                 //typedef definition
43                                 /*!     @typedef creaButtonContainer::view::Button Button;
44                                  *      @brief Defines the Button type.
45                                  */
46                                 typedef creaButtonContainer::view::Button Button;
47                                 // ----------------------------------------------------------------------------------
48                                 /*!     @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
49                                  *      @brief Defines the ButtonGroup type.
50                                  */
51                                 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
52                                 // ----------------------------------------------------------------------------------
53                                 /*!     @typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
54                                  *      @brief Defines the ButtonGroupModel type.
55                                  */
56                                 typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
57                                 // ----------------------------------------------------------------------------------
58                                 /*!     @typedef std::list< ButtonGroup* > ButtonGroupContainer;
59                                  *      @brief Defines the ButtonGroupContainer type.
60                                  */
61                                 typedef std::list< ButtonGroup* > ButtonGroupContainer;
62                                 // ----------------------------------------------------------------------------------
63                                 /*!     @typedef std::map< long, Button* > ButtonContainer;
64                                  *      @brief Defines the ButtonContainer type.
65                                  */
66                                 typedef std::map< long, Button* > ButtonContainer;
67                                 // ----------------------------------------------------------------------------------
68                                 //end of typedef definition
69                         public:
70                                 /*!     @fn ButtonGroupFactory::ButtonGroupFactory( );
71                                  *      @brief This is the default constructor.
72                                  */
73                                 ButtonGroupFactory( );
74                                 // -------------------------------------------------------------------------------
75                                 /*!     @fn virtual ButtonGroupFactory::~ButtonGroupFactory( );
76                                  *      @brief This is the destructor.
77                                  */
78                                 virtual
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.
86                                  */
87                                 ButtonGroupContainer
88                                 CreateButtonGroupContainer( wxWindow* parent,
89                                     ButtonGroupModel* settings );
90                         private:
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.
97                                  */
98                                 ButtonContainer
99                                 GetButtons( wxWindow* parent, ButtonList buttonModel );
100                 };
101         }//ecapseman
102 }//ecapseman
103
104 #endif // CARTOBUTTONFACTORY_H