Show
Ignore:
Timestamp:
03/21/12 18:36:20 (2 years ago)
Author:
robert
Message:

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/curl/ReaderWriterCURL.h

    r12906 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield 
    22 * 
    3  * This library is open source and may be redistributed and/or modified under   
    4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or  
     3 * This library is open source and may be redistributed and/or modified under 
     4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
    55 * (at your option) any later version.  The full license is in LICENSE file 
    66 * included with this distribution, and on the openscenegraph.org website. 
    7  *  
     7 * 
    88 * This library is distributed in the hope that it will be useful, 
    99 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
     10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1111 * OpenSceneGraph Public License for more details. 
    1212*/ 
     
    2929    NODE 
    3030}; 
    31                                                                                              
     31 
    3232class EasyCurl : public osg::Referenced 
    3333{ 
    3434    public: 
    35      
     35 
    3636        struct StreamObject 
    3737        { 
    3838            StreamObject(std::ostream* outputStream, std::istream* inputStream, const std::string& cacheFileName); 
    39              
     39 
    4040            void write(const char* ptr, size_t realsize); 
    4141            size_t read(char* ptr, size_t maxsize); 
    42          
     42 
    4343            std::ostream*   _outputStream; 
    4444            std::istream*   _inputStream; 
    45              
     45 
    4646            bool            _foutOpened; 
    4747            std::string     _cacheFileName; 
     
    4949            std::string     _resultMimeType; 
    5050        }; 
    51      
     51 
    5252        static size_t StreamMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data); 
    5353 
     
    6262        inline void setTimeout(long val) { _timeout = val; } 
    6363 
    64         // Perform HTTP GET to download data from web server.  
     64        // Perform HTTP GET to download data from web server. 
    6565        osgDB::ReaderWriter::ReadResult read(const std::string& proxyAddress, const std::string& fileName, StreamObject& sp, const osgDB::ReaderWriter::Options *options); 
    6666 
     
    8585        void setOptions(const std::string& proxyAddress, const std::string& fileName, StreamObject& sp, const osgDB::ReaderWriter::Options *options); 
    8686        osgDB::ReaderWriter::ReadResult processResponse(CURLcode responseCode, const std::string& proxyAddress, const std::string& fileName, StreamObject& sp); 
    87          
     87 
    8888        CURL* _curl; 
    89          
     89 
    9090        std::string     _previousPassword; 
    9191        long            _previousHttpAuthentication; 
     
    9898{ 
    9999    public: 
    100      
     100 
    101101        ReaderWriterCURL(); 
    102        
     102 
    103103        ~ReaderWriterCURL(); 
    104104 
    105105        virtual const char* className() const { return "HTTP Protocol Model Reader"; } 
    106                                                                                              
     106 
    107107        virtual bool acceptsExtension(const std::string& extension) const 
    108108        { 
     
    122122            return readFile(OBJECT,fileName,options); 
    123123        } 
    124                                                                                              
     124 
    125125        virtual ReadResult readImage(const std::string& fileName, const Options *options) const 
    126126        { 
     
    138138        } 
    139139 
    140         virtual WriteResult writeObject(const osg::Object& obj, const std::string& fileName, const Options* options) const  
     140        virtual WriteResult writeObject(const osg::Object& obj, const std::string& fileName, const Options* options) const 
    141141        { 
    142142            return writeFile(obj,fileName,options); 
    143143        } 
    144144 
    145         virtual WriteResult writeImage(const osg::Image& image, const std::string& fileName, const Options* options) const  
     145        virtual WriteResult writeImage(const osg::Image& image, const std::string& fileName, const Options* options) const 
    146146        { 
    147147            return writeFile(image,fileName,options); 
    148148        } 
    149149 
    150         virtual WriteResult writeHeightField(const osg::HeightField& heightField, const std::string& fileName, const Options* options) const  
     150        virtual WriteResult writeHeightField(const osg::HeightField& heightField, const std::string& fileName, const Options* options) const 
    151151        { 
    152152            return writeFile(heightField,fileName,options); 
    153153        } 
    154154 
    155         virtual WriteResult writeNode(const osg::Node& node, const std::string& fileName, const Options* options) const  
    156         {  
     155        virtual WriteResult writeNode(const osg::Node& node, const std::string& fileName, const Options* options) const 
     156        { 
    157157            return writeFile(node,fileName,options); 
    158158        } 
     
    160160        ReadResult readFile(ObjectType objectType, osgDB::ReaderWriter* rw, std::istream& fin, const Options *options) const; 
    161161        WriteResult writeFile(const osg::Object& obj, osgDB::ReaderWriter* rw, std::ostream& fout, const Options *options) const; 
    162          
     162 
    163163        virtual ReadResult readFile(ObjectType objectType, const std::string& fullFileName, const Options *options) const; 
    164164        virtual WriteResult writeFile(const osg::Object& obj, const std::string& fullFileName, const Options *options) const; 
    165          
     165 
    166166        EasyCurl& getEasyCurl() const 
    167167        { 
     
    170170            osg::ref_ptr<EasyCurl>& ec = _threadCurlMap[OpenThreads::Thread::CurrentThread()]; 
    171171            if (!ec) ec = new EasyCurl; 
    172              
     172 
    173173            return *ec; 
    174174        } 
     
    178178    protected: 
    179179        void getConnectionOptions(const osgDB::ReaderWriter::Options *options, std::string& proxyAddress, long& connectTimeout, long& timeout) const; 
    180      
     180 
    181181        typedef std::map< OpenThreads::Thread*, osg::ref_ptr<EasyCurl> >    ThreadCurlMap; 
    182          
     182 
    183183        mutable OpenThreads::Mutex          _threadCurlMapMutex; 
    184184        mutable ThreadCurlMap               _threadCurlMap;