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/include/osgDB/Registry

    r12937 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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*/ 
     
    7575 
    7676 
    77          
     77 
    7878        static Registry* instance(bool erase = false); 
    7979 
     
    127127        /** find the library in the OSG_LIBRARY_PATH and load it.*/ 
    128128        LoadStatus loadLibrary(const std::string& fileName); 
    129          
     129 
    130130        /** close the attached library with specified name.*/ 
    131131        bool closeLibrary(const std::string& fileName); 
    132          
     132 
    133133        /** close all libraries.*/ 
    134134        void closeAllLibraries(); 
     
    142142          * the registered mime-types. */ 
    143143        ReaderWriter* getReaderWriterForMimeType(const std::string& mimeType); 
    144          
     144 
    145145        /** get list of all registered ReaderWriters.*/ 
    146146        ReaderWriterList& getReaderWriterList() { return _rwList; } 
     
    148148        /** get const list of all registered ReaderWriters.*/ 
    149149        const ReaderWriterList& getReaderWriterList() const { return _rwList; } 
    150   
     150 
    151151 
    152152        typedef std::vector< osg::ref_ptr<ImageProcessor> > ImageProcessorList; 
     
    203203        /** Get the readFile callback.*/ 
    204204        ReadFileCallback* getReadFileCallback() { return _readFileCallback.get(); } 
    205          
     205 
    206206        /** Get the const readFile callback.*/ 
    207207        const ReadFileCallback* getReadFileCallback() const { return _readFileCallback.get(); } 
     
    272272        /** Get the writeFile callback.*/ 
    273273        WriteFileCallback* getWriteFileCallback() { return _writeFileCallback.get(); } 
    274          
     274 
    275275        /** Get the const writeFile callback.*/ 
    276276        const WriteFileCallback* getWriteFileCallback() const { return _writeFileCallback.get(); } 
     
    308308        } 
    309309        ReaderWriter::WriteResult writeNodeImplementation(const osg::Node& node, const std::string& fileName,const Options* options); 
    310          
     310 
    311311        ReaderWriter::WriteResult writeShader(const osg::Shader& obj, const std::string& fileName,const Options* options) 
    312312        { 
     
    316316        } 
    317317        ReaderWriter::WriteResult writeShaderImplementation(const osg::Shader& obj, const std::string& fileName,const Options* options); 
    318          
     318 
    319319 
    320320        inline void _buildKdTreeIfRequired(ReaderWriter::ReadResult& result, const Options* options) 
     
    324324                _buildKdTreesHint == Options::BUILD_KDTREES; 
    325325 
    326             if (doKdTreeBuilder && _kdTreeBuilder.valid() && result.validNode())  
     326            if (doKdTreeBuilder && _kdTreeBuilder.valid() && result.validNode()) 
    327327            { 
    328328                osg::ref_ptr<osg::KdTreeBuilder> builder = _kdTreeBuilder->clone(); 
     
    374374        void setCreateNodeFromImage(bool flag) { _createNodeFromImage = flag; } 
    375375        bool getCreateNodeFromImage() const { return _createNodeFromImage; } 
    376          
     376 
    377377 
    378378        void setOptions(Options* opt) { _options = opt; } 
     
    381381 
    382382 
    383         /** initialize both the Data and Library FilePaths, by default called by the  
     383        /** initialize both the Data and Library FilePaths, by default called by the 
    384384          * constructor, so it should only be required if you want to force 
    385385          * the re-reading of environmental variables.*/ 
    386386        void initFilePathLists() { initDataFilePathList(); initLibraryFilePathList(); } 
    387          
     387 
    388388        /** initialize the Data FilePath by reading the OSG_FILE_PATH environmental variable.*/ 
    389389        void initDataFilePathList(); 
     
    401401        const FilePathList& getDataFilePathList() const { return _dataFilePath; } 
    402402 
    403         /** initialize the Library FilePath by reading the OSG_LIBRARY_PATH  
     403        /** initialize the Library FilePath by reading the OSG_LIBRARY_PATH 
    404404          * and the appropriate system environmental variables*/ 
    405405        void initLibraryFilePathList(); 
     
    413413        /** get the library file path which is used when search for library (dso/dll's) files.*/ 
    414414        FilePathList& getLibraryFilePathList() { return _libraryFilePath; } 
    415          
     415 
    416416        /** get the const library file path which is used when search for library (dso/dll's) files.*/ 
    417417        const FilePathList& getLibraryFilePathList() const { return _libraryFilePath; } 
    418418 
    419         /** For each object in the cache which has an reference count greater than 1  
     419        /** For each object in the cache which has an reference count greater than 1 
    420420          * (and therefore referenced by elsewhere in the application) set the time stamp 
    421421          * for that object in the cache to specified time. 
     
    437437 
    438438 
    439         /** Remove all objects in the cache regardless of having external references or expiry times.*/  
     439        /** Remove all objects in the cache regardless of having external references or expiry times.*/ 
    440440        void clearObjectCache(); 
    441441 
     
    448448        /** Get an Object from the object cache*/ 
    449449        osg::Object* getFromObjectCache(const std::string& fileName); 
    450          
     450 
    451451        /** Get an ref_ptr<Object> from the object cache*/ 
    452452        osg::ref_ptr<osg::Object> getRefFromObjectCache(const std::string& fileName); 
    453453 
    454454 
    455          
     455 
    456456        /** Add archive to archive cache so that future calls reference this archive.*/ 
    457457        void addToArchiveCache(const std::string& fileName, osgDB::Archive* archive); 
     
    459459        /** Remove Archive from cache.*/ 
    460460        void removeFromArchiveCache(const std::string& fileName); 
    461          
     461 
    462462        /** Get an Archive from the archive cache.*/ 
    463463        osgDB::Archive* getFromArchiveCache(const std::string& fileName); 
     
    465465        /** Get an ref_ptr<Archive> from the archive cache.*/ 
    466466        osg::ref_ptr<osgDB::Archive> getRefFromArchiveCache(const std::string& fileName); 
    467          
     467 
    468468        /** Remove all archives from the archive cache.*/ 
    469469        void clearArchiveCache(); 
    470          
     470 
    471471         /** If State is non-zero, this function releases OpenGL objects for 
    472472           * the specified graphics context. Otherwise, releases OpenGL objexts 
     
    482482        /** Get the SharedStateManager, creating one if one is not already created.*/ 
    483483        SharedStateManager* getOrCreateSharedStateManager(); 
    484          
     484 
    485485        /** Get the SharedStateManager. Return 0 if no SharedStateManager has been assigned.*/ 
    486486        SharedStateManager* getSharedStateManager() { return _sharedStateManager.get(); } 
     
    488488        /** Add an Archive extension.*/ 
    489489        void addArchiveExtension(const std::string ext); 
    490          
     490 
    491491        /** registers a protocol */ 
    492492        void registerProtocol(const std::string& protocol); 
    493          
     493 
    494494        /** returns true, if named protocol is registered */ 
    495495        bool isProtocolRegistered(const std::string& protocol); 
     
    510510        typedef std::vector< osg::ref_ptr<DynamicLibrary> >             DynamicLibraryList; 
    511511        typedef std::map< std::string, std::string>                     ExtensionAliasMap; 
    512          
     512 
    513513        typedef std::pair<osg::ref_ptr<osg::Object>, double >           ObjectTimeStampPair; 
    514514        typedef std::map<std::string, ObjectTimeStampPair >             ObjectCache; 
    515515        typedef std::map<std::string, osg::ref_ptr<osgDB::Archive> >    ArchiveCache; 
    516          
     516 
    517517        typedef std::set<std::string>                                   RegisteredProtocolsSet; 
    518518 
     
    527527        Options::BuildKdTreesHint     _buildKdTreesHint; 
    528528        osg::ref_ptr<osg::KdTreeBuilder>            _kdTreeBuilder; 
    529          
     529 
    530530        osg::ref_ptr<FileCache>                     _fileCache; 
    531          
     531 
    532532        osg::ref_ptr<AuthenticationMap>             _authenticationMap; 
    533          
     533 
    534534        bool                                        _createNodeFromImage; 
    535          
     535 
    536536        RegisteredProtocolsSet                      _registeredProtocols; 
    537537 
     
    556556 
    557557   protected: 
    558     
     558 
    559559        void destruct(); 
    560     
     560 
    561561        // forward declare helper classes 
    562562        struct ReadObjectFunctor; 
     
    566566        struct ReadArchiveFunctor; 
    567567        struct ReadShaderFunctor; 
    568          
     568 
    569569        // make helper classes friends to get round VS6.0 "issues" 
    570570        friend struct ReadFunctor; 
     
    601601 
    602602        bool _openingLibrary; 
    603      
     603 
    604604        // map to alias to extensions to plugins. 
    605605        ExtensionAliasMap  _extAliasMap; 
     
    610610        // Utility: Removes whitespace from both ends of a string. 
    611611        static std::string trim( const std::string& str ); 
    612          
     612 
    613613        // options to pass to reader writers. 
    614614        osg::ref_ptr<Options>     _options; 
    615          
     615 
    616616        FilePathList                            _dataFilePath; 
    617617        FilePathList                            _libraryFilePath; 
     
    620620        ObjectCache                             _objectCache; 
    621621        OpenThreads::Mutex                      _objectCacheMutex; 
    622          
     622 
    623623 
    624624        ArchiveExtensionList                    _archiveExtList; 
     
    657657            } 
    658658        } 
    659          
     659 
    660660        T* get() { return _rw.get(); } 
    661          
     661 
    662662    protected: 
    663663        osg::ref_ptr<T> _rw;