diff --git a/include/osgDB/DataTypes b/include/osgDB/DataTypes index 8014c244e..ee480ed72 100644 --- a/include/osgDB/DataTypes +++ b/include/osgDB/DataTypes @@ -16,6 +16,7 @@ #define OSGDB_DATATYPES #include +#include namespace osgDB { diff --git a/include/osgDB/StreamOperator b/include/osgDB/StreamOperator index 2813f017c..61c7f4daa 100644 --- a/include/osgDB/StreamOperator +++ b/include/osgDB/StreamOperator @@ -3,6 +3,8 @@ #include #include +#include +#include #include namespace osgDB diff --git a/src/osgDB/CMakeLists.txt b/src/osgDB/CMakeLists.txt index e79f67148..b4adbdcfe 100644 --- a/src/osgDB/CMakeLists.txt +++ b/src/osgDB/CMakeLists.txt @@ -114,6 +114,7 @@ SET(TARGET_SRC ReadFile.cpp Registry.cpp SharedStateManager.cpp + StreamOperator.cpp Version.cpp WriteFile.cpp XmlParser.cpp diff --git a/src/osgDB/StreamOperator.cpp b/src/osgDB/StreamOperator.cpp new file mode 100644 index 000000000..add39443d --- /dev/null +++ b/src/osgDB/StreamOperator.cpp @@ -0,0 +1,24 @@ +/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2011 Robert Osfield + * + * This library is open source and may be redistributed and/or modified under + * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or + * (at your option) any later version. The full license is in LICENSE file + * included with this distribution, and on the openscenegraph.org website. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * OpenSceneGraph Public License for more details. +*/ + +#include +#include + +using namespace osgDB; + +void InputIterator::throwException( const std::string& msg ) +{ + if (_inputStream) _inputStream->throwException(msg); + else OSG_WARN << msg << std::endl; +} +