1 // Copyright (C) 2012 Mathias Froehlich
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License as
5 // published by the Free Software Foundation; either version 2 of the
6 // License, or (at your option) any later version.
8 // This program is distributed in the hope that it will be useful, but
9 // WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 # include <simgear_config.h>
22 #include "OptionsReadFileCallback.hxx"
24 #include <osgDB/Registry>
28 OptionsReadFileCallback::~OptionsReadFileCallback()
32 osgDB::ReaderWriter::ReadResult
33 OptionsReadFileCallback::openArchive(const std::string& name, osgDB::ReaderWriter::ArchiveStatus status,
34 unsigned int indexBlockSizeHint, const osgDB::Options* options)
36 osgDB::ReadFileCallback* callback = osgDB::Registry::instance()->getReadFileCallback();
38 return callback->openArchive(name, status, indexBlockSizeHint, options);
40 return osgDB::ReadFileCallback::openArchive(name, status, indexBlockSizeHint, options);
43 osgDB::ReaderWriter::ReadResult
44 OptionsReadFileCallback::readObject(const std::string& name, const osgDB::Options* options)
46 osgDB::ReadFileCallback* callback = osgDB::Registry::instance()->getReadFileCallback();
48 return callback->readObject(name, options);
50 return osgDB::ReadFileCallback::readObject(name, options);
53 osgDB::ReaderWriter::ReadResult
54 OptionsReadFileCallback::readImage(const std::string& name, const osgDB::Options* options)
56 osgDB::ReadFileCallback* callback = osgDB::Registry::instance()->getReadFileCallback();
58 return callback->readImage(name, options);
60 return osgDB::ReadFileCallback::readImage(name, options);
63 osgDB::ReaderWriter::ReadResult
64 OptionsReadFileCallback::readHeightField(const std::string& name, const osgDB::Options* options)
66 osgDB::ReadFileCallback* callback = osgDB::Registry::instance()->getReadFileCallback();
68 return callback->readHeightField(name, options);
70 return osgDB::ReadFileCallback::readHeightField(name, options);
73 osgDB::ReaderWriter::ReadResult
74 OptionsReadFileCallback::readNode(const std::string& name, const osgDB::Options* options)
76 osgDB::ReadFileCallback* callback = osgDB::Registry::instance()->getReadFileCallback();
78 return callback->readNode(name, options);
80 return osgDB::ReadFileCallback::readNode(name, options);
83 osgDB::ReaderWriter::ReadResult
84 OptionsReadFileCallback::readShader(const std::string& name, const osgDB::Options* options)
86 osgDB::ReadFileCallback* callback = osgDB::Registry::instance()->getReadFileCallback();
88 return callback->readShader(name, options);
90 return osgDB::ReadFileCallback::readShader(name, options);