H3D API  2.4.1
IStreamInputSource.h
Go to the documentation of this file.
1 // Copyright 2004-2019, SenseGraphics AB
3 //
4 // This file is part of H3D API.
5 //
6 // H3D API is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // H3D API is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with H3D API; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // A commercial license is also available. Please contact us at
21 // www.sensegraphics.com for more information.
22 //
23 //
26 //
28 
29 #ifndef __ISTREAMINPUTSOURCE_H__
30 #define __ISTREAMINPUTSOURCE_H__
31 
32 #include <H3D/H3DApi.h>
33 
34 #ifdef HAVE_XERCES
35 
36 #include <xercesc/sax/InputSource.hpp>
37 #include <iostream>
38 
39 XERCES_CPP_NAMESPACE_USE
40 
41 namespace H3D {
42  namespace X3D {
43 
48  class H3DAPI_API IStreamInputSource : public InputSource {
49  public :
54  IStreamInputSource( istream &_is,
55  MemoryManager* const manager =
56  XMLPlatformUtils::fgMemoryManager ) :
57  InputSource( manager ),
58  is( _is ) {}
59 
65  IStreamInputSource( istream &_is,
66  const XMLCh *const system_id,
67  MemoryManager* const manager =
68  XMLPlatformUtils::fgMemoryManager ):
69  InputSource( system_id, manager ),
70  is( _is ) {}
71 
79  BinInputStream* makeStream() const;
80 
81  protected:
82  istream &is;
83  public:
88  };
89  }
90 }
91 
92 #endif
93 #endif
Base header file that handles all configuration related settings.
This class is a derivative of the standard Xerxes C InputSource class.
Definition: IStreamInputSource.h:48
IStreamInputSource(istream &_is, const XMLCh *const system_id, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
Constructor.
Definition: IStreamInputSource.h:65
IStreamInputSource(istream &_is, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
Constructor.
Definition: IStreamInputSource.h:54
IStreamInputSource(const IStreamInputSource &)
unimplemented copy constructors
IStreamInputSource & operator=(const IStreamInputSource &)
unimplemented assignment operator
H3D API namespace.
Definition: Anchor.h:38