00001 // ---------------------------------------------------------------------------- 00002 // 00003 // $Id$ 00004 // 00005 // Copyright 2008, 2009, 2010, 2011, 2012 Antonio Franchi and Paolo Stegagno 00006 // 00007 // This file is part of MIP. 00008 // 00009 // MIP is free software: you can redistribute it and/or modify 00010 // it under the terms of the GNU General Public License as published by 00011 // the Free Software Foundation, either version 3 of the License, or 00012 // (at your option) any later version. 00013 // 00014 // MIP is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 // GNU General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU General Public License 00020 // along with MIP. If not, see <http://www.gnu.org/licenses/>. 00021 // 00022 // Contact info: antonio.franchi@tuebingen.mpg.de stegagno@diag.uniroma1.it 00023 // 00024 // ---------------------------------------------------------------------------- 00025 00026 00030 00034 00036 /* @{ */ 00037 00038 #ifndef __EXT_STRING_H_ 00039 #define __EXT_STRING_H_ 00040 00041 #ifdef MIP_HOST_APPLE 00042 #include <applePatch.h> 00043 #endif 00044 00045 #include <string> 00046 00047 00048 00049 using namespace std; 00050 00060 class ExtString :public string 00061 { 00062 public: 00064 explicit ExtString() : string () {} 00065 ExtString ( const string& str ) :string ( str ) {} 00066 ExtString ( const string& str, size_t pos, size_t n = npos ) :string ( str, pos, n = npos ) {} 00067 ExtString ( const char * s, size_t n ) :string ( s, n ) {} 00068 ExtString ( const char * s ) :string ( s ) {} 00069 ExtString ( size_t n, char c ) : string ( n, c ) {} 00071 using string::operator =; 00072 /*************************************************************************************************** 00073 *********************************** ADDICTIONAL FUNCTIONS ********************************** 00074 ***************************************************************************************************/ 00076 ExtString getline(); 00077 00079 ExtString eraseline(); 00080 00082 int countlines(); 00083 }; 00084 00085 #endif 00086 00087 00088 /* @} */ 00089 00090 00091 00092