source: experimental/distortionNG/ReaderWriterDist.h @ 367

Last change on this file since 367 was 367, checked in by Torben Dannhauer, 12 years ago

Dist-Plugin compiles, but not yet tested

File size: 1.5 KB
RevLine 
[365]1#pragma once
2
[366]3
4
[365]5#include <osg/Notify>
6#include <osgDB/FileNameUtils>
7#include <osgDB/FileUtils>
8#include <osgDB/Registry>
9#include <osgDB/ReadFile>
[367]10#include <osgDB/WriteFile>
11#include <stdlib.h>
[365]12
13
14class ReaderWriterDist : public osgDB::ReaderWriter
15{
16public:
17        ReaderWriterDist();
18
[366]19        virtual const char* className() const { return "distortion set loader"; };
[367]20        Options* prepareReading( ReadResult& result, std::string& fileName, std::ios::openmode& mode, const Options* options ) const;
21        Options* prepareWriting( WriteResult& result, const std::string& fileName, std::ios::openmode& mode, const Options* options ) const;
22        virtual ReadResult readObject( const std::string& file, const osgDB::ReaderWriter::Options* options) const;     // passes the call to the stream function
23        virtual ReadResult readObject( std::istream& fin, const osgDB::ReaderWriter::Options* options ) const;  // passes the call to the readwriter defined in the ctor
24    virtual WriteResult writeObject( const osg::Object& object, const std::string& fileName, const osgDB::ReaderWriter::Options* options ) const;       // passes the call to the stream function
25    virtual WriteResult writeObject( const osg::Object& object, std::ostream& fout, const osgDB::ReaderWriter::Options* options ) const;        // passes the call to the readwriter defined in the ctor
[365]26
[366]27
[365]28private:
29        std::string extensionToAdd;
[366]30
31        osg::ref_ptr<osgDB::Options> readOptions;
32        osg::ref_ptr<osgDB::Options> writeOptions;
33        osg::ref_ptr<osgDB::ReaderWriter> rw;
[365]34};
Note: See TracBrowser for help on using the repository browser.