]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.cxx
ManualPaint RangeSlider 50% DFCH
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / model / containerSettings.cxx
index 10e387a71764ddccdbbf33386295331da857c81e..a85aff5c7f58a862258c2266a2a3c5bf709d44f6 100644 (file)
@@ -2,7 +2,7 @@
  * @file containerSettings.cxx
  * @brief Implements the ContainerSettings class.
  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
- * @date  2011-05-24
+ * @date  2011-06-02
  */
 
 #include "containerSettings.h"
@@ -23,13 +23,13 @@ namespace creaButtonContainer
                ButtonGroupMap
                ContainerSettings::GetButtonGroupContainer( )
                {
-                       return this->m_ButtonGroupContainer;
+                       return ( this->m_ButtonGroupContainer );
                }
                // ----------------------------------------------------------------------------------
                KeyMapList
                ContainerSettings::GetGroupNameList( )
                {
-                       return this->m_GroupNameList;
+                       return ( this->m_GroupNameList );
                }
                // ----------------------------------------------------------------------------------
                void
@@ -45,15 +45,15 @@ namespace creaButtonContainer
                }
                // ----------------------------------------------------------------------------------
                void
-               ContainerSettings::AddButton( const std::string & groupName,
-                   const std::string buttonName, const std::string iconpath,
-                   const std::string buttonDescription, FunctionEventType event )
+               ContainerSettings::AddButton( const StringType & groupName,
+                   const StringType &buttonName, const StringType &iconpath,
+                   const StringType &buttonDescription, FunctionEventType event )
                {
+                       ButtonPair* pair = new ButtonPair(
+                           new ButtonInfo( buttonName, iconpath ),
+                           new ButtonAction( buttonDescription, event ) );
                        try
                        {
-                               ButtonPair* pair = new ButtonPair(
-                                   new ButtonInfo( buttonName, iconpath ),
-                                   new ButtonAction( buttonDescription, event ) );
                                for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
                                    != this->m_GroupNameList.end( ); ++it )
                                {
@@ -66,7 +66,7 @@ namespace creaButtonContainer
                                this->m_GroupNameList.push_back( groupName );
                                this->m_ButtonGroupContainer[ groupName ].push_back( pair );
                        }//yrt
-                       catch ( std::exception& e )
+                       catch ( const std::exception& e )
                        {
                                std::cerr
                                    << "ContainerSettings::AddButton( const std::string & groupName,"
@@ -79,11 +79,11 @@ namespace creaButtonContainer
                void
                ContainerSettings::AddButton( BCSettingsStruct* info )
                {
+                       ButtonPair* pair = new ButtonPair(
+                           new ButtonInfo( info->buttonName, info->iconpath ),
+                           new ButtonAction( info->buttonDescription, info->eventFunction ) );
                        try
                        {
-                               ButtonPair* pair = new ButtonPair(
-                                   new ButtonInfo( info->buttonName, info->iconpath ),
-                                   new ButtonAction( info->buttonDescription, info->eventFunction ) );
                                for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
                                    != this->m_GroupNameList.end( ); ++it )
                                {
@@ -96,7 +96,7 @@ namespace creaButtonContainer
                                this->m_GroupNameList.push_back( info->groupName );
                                this->m_ButtonGroupContainer[ info->groupName ].push_back( pair );
                        }//yrt
-                       catch ( std::exception& e )
+                       catch ( const std::exception& e )
                        {
                                std::cerr
                                    << "void ContainerSettings::AddButton( BCSettingsStruct* info ) "
@@ -115,7 +115,7 @@ namespace creaButtonContainer
                                        this->AddButton( *it );
                                }//rof
                        }//yrt
-                       catch ( std::exception& e )
+                       catch ( const std::exception& e )
                        {
                                std::cerr
                                    << "ContainerSettings::AddButtons( BCStructVectorType infoList ) "