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