]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.h
creaButtonContainer: exceptions added, doxygen documentation added :)
[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                 //! @class ButtonGroupFactory
42                 //! @brief This class is the factory of a group of wxButtons.
43
44                 /*! @class ButtonGroupFactory buttonGroupFactory.h "buttonGroupFactory.h"
45                  *      @brief This class contains the ButtonContainer factory.
46                  *  This class describes the factory of the ButtonContainer using design patterns.
47                  */
48                 class ButtonGroupFactory
49                 {
50                         public:
51                                 //typedef definition
52                                 /*!     @typedef creaButtonContainer::view::Button Button;
53                                  *      @brief Defines the Button type.
54                                  */
55                                 typedef creaButtonContainer::view::Button Button;
56                                 // ----------------------------------------------------------------------------------
57                                 /*!     @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
58                                  *      @brief Defines the ButtonGroup type.
59                                  */
60                                 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
61                                 // ----------------------------------------------------------------------------------
62                                 /*!     @typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
63                                  *      @brief Defines the ButtonGroupModel type.
64                                  */
65                                 typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
66                                 // ----------------------------------------------------------------------------------
67                                 /*!     @typedef std::list< ButtonGroup* > ButtonGroupContainer;
68                                  *      @brief Defines the ButtonGroupContainer type.
69                                  */
70                                 typedef std::list< ButtonGroup* > ButtonGroupContainer;
71                                 // ----------------------------------------------------------------------------------
72                                 /*!     @typedef std::map< long, Button* > ButtonContainer;
73                                  *      @brief Defines the ButtonContainer type.
74                                  */
75                                 typedef std::map< long, Button* > ButtonContainer;
76                                 // ----------------------------------------------------------------------------------
77                         public:
78                                 /*!     @fn ButtonGroupFactory::ButtonGroupFactory( )
79                                  *      @brief This is the default constructor.
80                                  */
81                                 ButtonGroupFactory( );
82                                 // -------------------------------------------------------------------------------
83                                 /*!     @fn virtual ButtonGroupFactory::~ButtonGroupFactory( )
84                                  *      @brief This is the destructor.
85                                  */
86                                 virtual
87                                 ~ButtonGroupFactory( );
88                                 /*! @fn ButtonGroupContainer ButtonGroupFactory::CreateButtonGroupContainer( wxWindow* parent, ButtonGroupModel* settings );
89                                  * @brief This function allows to create the ButtonGroupContainer.
90                                  * @param parent the wxWindow* parent to be attached.
91                                  * @param settings The Container settings.
92                                  * @exception std::bad_alloc
93                                  * @return ButtonGroupContainer The wx button group container.
94                                  */
95                                 ButtonGroupContainer
96                                 CreateButtonGroupContainer( wxWindow* parent,
97                                     ButtonGroupModel* settings );
98                         private:
99                                 /*! @fn ButtonContainer ButtonGroupFactory::GetButtons( wxWindow* parent, ButtonList buttonModel );
100                                  * @brief  This function allows to create a wx button container for a group.
101                                  * @param parent the wxWindow* parent to be attached.
102                                  * @param buttonModel The button list with its own information.
103                                  * @exception std::bad_alloc
104                                  * @return ButtonContainer The wx button container.
105                                  */
106                                 ButtonContainer
107                                 GetButtons( wxWindow* parent, ButtonList buttonModel );
108                 };
109         }//ecapseman
110 }//ecapseman
111
112 #endif // CARTOBUTTONFACTORY_H