/*! * @file buttonGroup.cxx * @brief Implements the ButtonGroup class. * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) * @date 2011-06-02 */ #include "buttonGroup.h" namespace creaButtonContainer { namespace view { // ---------------------------------------------------------------------------------- ButtonGroup::ButtonGroup( wxStaticText* groupName, ButtonContainer cartoButtons ) { this->m_GroupName = groupName; this->m_Buttons = cartoButtons; } // ---------------------------------------------------------------------------------- ButtonGroup::~ButtonGroup( ) { } // ---------------------------------------------------------------------------------- ButtonGroup::ButtonContainer ButtonGroup::GetButtonContainer( ) { return ( this->m_Buttons ); } // ---------------------------------------------------------------------------------- wxStaticText* ButtonGroup::GetGroupName( ) { return ( this->m_GroupName ); } // ---------------------------------------------------------------------------------- ButtonGroup::IdButtonContainer ButtonGroup::GetButtonIdContainer( ) { IdButtonContainer idContainer; try { for( ButtonContainer::iterator it = this->m_Buttons.begin( ); it != this->m_Buttons.end( ); ++it ) { idContainer.push_back( ( *it ).first ); }//rof }//yrt catch ( std::exception& e ) { std::cerr << "ButtonGroup::GetButtonIdContainer( )" << "exception: " << e.what( ) << std::endl; }//hctac return ( idContainer ); } // ---------------------------------------------------------------------------------- Button* ButtonGroup::GetButton( long id ) { try { //return ( this->m_Buttons[ id ] ); // JPR }//yrt catch ( std::exception& e ) { std::cerr << "ButtonGroup::GetButton( long id )" << "exception: " << e.what( ) << std::endl; }//hctac return ( this->m_Buttons[ id ] );// JPR } // ---------------------------------------------------------------------------------- }//ecapseman }//ecapseman