00001 /* 00002 * 00003 * This file is part of the 'NewsService Journaline(R) Decoder' 00004 * 00005 * Copyright (c) 2003, 2004 by Fraunhofer IIS, Erlangen, Germany 00006 * 00007 * -------------------------------------------------------------------- 00008 * 00009 * For NON-COMMERCIAL USE, 00010 * the 'NewsService Journaline(R) Decoder' is free software; 00011 * you can redistribute it and/or modify it under the terms of 00012 * the GNU General Public License as published by the 00013 * Free Software Foundation; either version 2 of the License, or 00014 * (at your option) any later version. 00015 * 00016 * The 'NewsService Journaline(R) Decoder' is distributed in the hope 00017 * that it will be useful, but WITHOUT ANY WARRANTY; 00018 * without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with the 'NewsService Journaline(R) Decoder'; 00024 * if not, write to the Free Software Foundation, Inc., 00025 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00026 * 00027 * 00028 * If you use this software in a project with user interaction, please 00029 * provide the following text to the user in an appropriate place: 00030 * "Features NewsService Journaline(R) decoder technology by 00031 * Fraunhofer IIS, Erlangen, Germany. 00032 * For more information visit http://www.iis.fhg.de/dab" 00033 * 00034 * -------------------------------------------------------------------- 00035 * 00036 * To use the 'NewsService Journaline(R) Decoder' software for 00037 * COMMERCIAL purposes, please contact Fraunhofer IIS for a 00038 * commercial license (see below for contact information)! 00039 * 00040 * -------------------------------------------------------------------- 00041 * 00042 * Contact: 00043 * Fraunhofer IIS, Department 'Broadcast Applications' 00044 * Am Wolfsmantel 33, 91058 Erlangen, Germany 00045 * http://www.iis.fraunhofer.de/dab 00046 * mailto:bc-info@iis.fraunhofer.de 00047 * 00048 */ 00049 00066 00067 00068 #ifndef _SPLITTER_H_ 00069 #define _SPLITTER_H_ 00070 00071 #ifdef WIN32 00072 #pragma warning(push,3) 00073 #pragma warning(disable:4514) 00074 #pragma warning(disable:4786) 00075 #endif 00076 00077 #include <string> 00078 #include <vector> 00079 00080 #ifdef WIN32 00081 #pragma warning(pop) 00082 #pragma warning(disable:4786) 00083 #pragma warning(disable:4514) 00084 #endif 00085 00086 00087 00089 class StringSplitter 00090 { 00091 public: 00092 virtual bool Split(std::vector<std::string> & dest, 00093 const std::string & src) const = 0; 00094 }; 00095 00096 00098 class Splitter 00099 { 00100 public: 00101 Splitter(); 00102 virtual ~Splitter(); 00103 00104 virtual bool SetLineBreakCharacter(char lbc); 00105 virtual bool Split(std::vector<std::string> & dest, 00106 const std::string & src); 00107 private: 00108 char _LineBreak; 00109 }; 00110 00111 00112 #endif 00113