00001 /* 00002 Copyright 2011, CERTEC 00003 00004 This file is part of HIPP. 00005 00006 HIPP is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 3 of the License, or 00009 (at your option) any later version. 00010 00011 HIPP 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 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with HIPP. If not, see <http://www.gnu.org/licenses/>. 00018 00019 */ 00020 00022 // Copyright 2004-2007, SenseGraphics AB 00023 // 00024 // This file is part of H3D API. 00025 // 00026 // H3D API is free software; you can redistribute it and/or modify 00027 // it under the terms of the GNU General Public License as published by 00028 // the Free Software Foundation; either version 2 of the License, or 00029 // (at your option) any later version. 00030 // 00031 // H3D API is distributed in the hope that it will be useful, 00032 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00033 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00034 // GNU General Public License for more details. 00035 // 00036 // You should have received a copy of the GNU General Public License 00037 // along with H3D API; if not, write to the Free Software 00038 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00039 // 00040 // A commercial license is also available. Please contact us at 00041 // www.sensegraphics.com for more information. 00042 // 00043 // 00046 // 00048 00049 #ifndef __ISTREAMINPUTSOURCE_H__ 00050 #define __ISTREAMINPUTSOURCE_H__ 00051 00052 #include <xercesc/sax/InputSource.hpp> 00053 #include <iostream> 00054 00055 using namespace std; 00056 XERCES_CPP_NAMESPACE_USE 00057 00062 class IStreamInputSource : public InputSource { 00063 public : 00068 IStreamInputSource( istream &_is, 00069 MemoryManager* const manager = 00070 XMLPlatformUtils::fgMemoryManager ) : 00071 InputSource( manager ), 00072 is( _is ) {} 00073 00079 IStreamInputSource( istream &_is, 00080 const XMLCh *const system_id, 00081 MemoryManager* const manager = 00082 XMLPlatformUtils::fgMemoryManager ): 00083 InputSource( system_id, manager ), 00084 is( _is ) {} 00085 00093 BinInputStream* makeStream() const; 00094 00095 protected: 00096 istream &is; 00097 public: 00099 IStreamInputSource( const IStreamInputSource & ); 00101 IStreamInputSource& operator=(const IStreamInputSource&); 00102 }; 00103 // }; 00104 //} 00105 00106 #endif
1.7.1