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 __ISTREAMINPUTSTREAM_H__ 00050 #define __ISTREAMINPUTSTREAM_H__ 00051 00052 //#include <H3D/H3DApi.h> 00053 00054 #include <xercesc/util/BinInputStream.hpp> 00055 #include <iostream> 00056 00057 using namespace std; 00058 XERCES_CPP_NAMESPACE_USE 00059 00060 //namespace H3D { 00061 // namespace X3D { 00064 class IStreamInputStream : public BinInputStream { 00065 public : 00067 IStreamInputStream ( istream &_is ) : is( _is ), total_count( 0 ) {} 00068 00069 virtual XMLFilePos curPos() const; 00070 00071 virtual XMLSize_t readBytes( XMLByte* const toFill, 00072 const XMLSize_t maxToRead ); 00073 00074 virtual const XMLCh* getContentType() const { 00075 return 0; 00076 } 00077 00078 protected : 00079 //BinFileInputStream(const BinFileInputStream&); 00080 // BinFileInputStream& operator=(const BinFileInputStream&); 00081 00082 istream &is; 00083 unsigned int total_count; 00084 00085 }; 00086 // } 00087 //} 00088 00089 #endif
1.7.1