00001 /* 00002 * ExpatMM - C++ Wrapper for Expat available at http://expat.sourceforge.net/ 00003 * Copyright (c) 2007, 2008 IntelliTree Solutions llc 00004 * Author: Coleman Kane <ckane@intellitree.com> 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General 00017 * Public License along with this library; if not, please feel free 00018 * to contact the author listed above. 00019 */ 00020 /* 00021 * IntelliTree ExpatMM C++ Parser Library 00022 * Copyright (C) 2006, 2007 IntelliTree Solutions llc 00023 * Written by Coleman Kane <ckane@intellitree.com> 00024 * 00025 * Extension of the ExpatXMLParser to handle named files 00026 * 00027 */ 00028 #ifndef _EXPATMM_EXPATXMLFILEPARSER_H 00029 #define _EXPATMM_EXPATXMLFILEPARSER_H 00030 #include "ExpatXMLParser.h" 00031 #include "expatmm-libdef.h" 00032 00033 namespace expatmm { 00034 class FormRuleset; 00035 00036 class /*EXPATMM_LIBEXPORT*/ ExpatXMLFileParser : public ExpatXMLParser { 00037 private: 00038 bool init; 00039 FILE *fhandle; 00040 std::string fname; 00041 protected: 00042 virtual ssize_t read_block(void); 00043 public: 00044 ExpatXMLFileParser(std::string filename); 00045 ExpatXMLFileParser(): init(false) {}; 00046 virtual ~ExpatXMLFileParser(void); 00047 void setFile(std::string filename); 00048 }; 00049 }; 00050 00051 #endif /* _EXPATMM_EXPATXMLFILEPARSER_H */