osgEarth 2.1.1
Functions

anonymous_namespace{HTTPClient.cpp} Namespace Reference

Functions

osgDB::ReaderWriter * getReader (const std::string &url, const HTTPResponse &response)

Function Documentation

osgDB::ReaderWriter* anonymous_namespace{HTTPClient.cpp}::getReader ( const std::string &  url,
const HTTPResponse response 
)

Definition at line 795 of file HTTPClient.cpp.

    {
        osgDB::ReaderWriter* reader = 0L;

        // try to look up a reader by mime-type first:
        std::string mimeType = response.getMimeType();
        if ( !mimeType.empty() )
        {
            reader = osgEarth::Registry::instance()->getReaderWriterForMimeType(mimeType);
        }

        if ( !reader )
        {
            // Try to find a reader by file extension.
            std::string ext = osgDB::getFileExtension( url );
            reader = osgDB::Registry::instance()->getReaderWriterForExtension( ext );
        }

        return reader;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines