StringParserInput.h

Go to the documentation of this file.
00001 #ifndef STRINGPARSERINPUT_H
00002 #define STRINGPARSERINPUT_H
00003 
00008 /*
00009  * Copyright (C) 2003,2004,2005  Enrico Zini <enrico@debian.org>
00010  *
00011  * This library is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU Lesser General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2.1 of the License, or (at your option) any later version.
00015  *
00016  * This library is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * Lesser General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public
00022  * License along with this library; if not, write to the Free Software
00023  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00024  */
00025 
00026 #include <tagcoll/ParserBase.h>
00027 #include <string>
00028 
00029 namespace Tagcoll {
00030 
00034 class StringParserInput : public ParserInput
00035 {
00036 protected:
00037     static const std::string fname;
00038     std::string _str;
00039     std::string::const_iterator _s;
00040     int _line;
00041     
00042 public:
00043     StringParserInput(const std::string& str) throw ();
00044     virtual ~StringParserInput() throw () {}
00045     
00046     virtual const std::string& fileName() const throw () { return fname; }
00047     virtual int lineNumber() const throw () { return _line; }
00048 
00049     virtual int nextChar() throw ();
00050     virtual void pushChar(int c) throw ();
00051 };
00052 
00053 }
00054 
00055 // vim:set ts=4 sw=4:
00056 #endif

Generated on Mon Jun 19 17:32:09 2006 for libtagcoll by  doxygen 1.4.6