/* * mp3plot - Bitrate analysis tool * * Copyright (C) 2007 Toni Corvera * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // $Id: mp3_bitrate_plotter.cc 749 2007-05-24 22:44:28Z $ #include #include "mp3_bitrate_plotter.h" #include "mp3_file.h" namespace net_outlyer { namespace mp3 { // static member definition bitrate_plotter::reg_plotters_map_t bitrate_plotter::registered_plotters; // static void bitrate_plotter::register_plotter(plotter_type_t type, boost::shared_ptr plotter) { registered_plotters[type] = plotter; } // static bitrate_plotter & bitrate_plotter::choose(plotter_type_t type) throw (e_unregistered_plotter_type) { const reg_plotters_map_t::const_iterator fit = registered_plotters.find(type); if (registered_plotters.end() == fit) { throw e_unregistered_plotter_type(); } return * registered_plotters[type]; } } // namespace mp3 } // namespace net_outlyer /* vim:set ts=4 et ai: */