]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonGroup.cxx
avoid "warning: control reaches end of non-void function "
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / buttonGroup.cxx
1 /*!
2  * @file buttonGroup.cxx
3  * @brief Implements the ButtonGroup class.
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-06-02
6  */
7
8 #include "buttonGroup.h"
9
10 namespace creaButtonContainer
11 {
12         namespace view
13         {
14                 // ----------------------------------------------------------------------------------
15                 ButtonGroup::ButtonGroup( wxStaticText* groupName,
16                     ButtonContainer cartoButtons )
17                 {
18                         this->m_GroupName = groupName;
19                         this->m_Buttons = cartoButtons;
20                 }
21                 // ----------------------------------------------------------------------------------
22                 ButtonGroup::~ButtonGroup( )
23                 {
24                 }
25                 // ----------------------------------------------------------------------------------
26                 ButtonGroup::ButtonContainer
27                 ButtonGroup::GetButtonContainer( )
28                 {
29                         return ( this->m_Buttons );
30                 }
31                 // ----------------------------------------------------------------------------------
32                 wxStaticText*
33                 ButtonGroup::GetGroupName( )
34                 {
35                         return ( this->m_GroupName );
36                 }
37                 // ----------------------------------------------------------------------------------
38                 ButtonGroup::IdButtonContainer
39                 ButtonGroup::GetButtonIdContainer( )
40                 {
41                         IdButtonContainer idContainer;
42                         try
43                         {
44                                 for( ButtonContainer::iterator it = this->m_Buttons.begin( ); it
45                                     != this->m_Buttons.end( ); ++it )
46                                 {
47                                         idContainer.push_back( ( *it ).first );
48                                 }//rof
49                         }//yrt
50                         catch ( std::exception& e )
51                         {
52                                 std::cerr << "ButtonGroup::GetButtonIdContainer( )" << "exception: "
53                                     << e.what( ) << std::endl;
54                         }//hctac
55                         return ( idContainer );
56                 }
57                 // ----------------------------------------------------------------------------------
58                 Button*
59                 ButtonGroup::GetButton( long id )
60                 {
61                         try
62                         {
63                                 //return ( this->m_Buttons[ id ] ); // JPR
64                         }//yrt
65                         catch ( std::exception& e )
66                         {
67                                 std::cerr << "ButtonGroup::GetButton( long id )" << "exception: "
68                                     << e.what( ) << std::endl;
69                         }//hctac
70                         return ( this->m_Buttons[ id ] );// JPR
71                 }
72         // ----------------------------------------------------------------------------------
73         }//ecapseman
74 }//ecapseman