osgEarth 2.1.1
Static Public Member Functions

osgEarth::TileSourceFactory Class Reference

List of all members.

Static Public Member Functions

static TileSourcecreate (const TileSourceOptions &options)

Detailed Description

Creates TileSource instances and chains them together to create tile source "pipelines" for data access and processing.

Definition at line 404 of file TileSource.


Member Function Documentation

TileSource * TileSourceFactory::create ( const TileSourceOptions options) [static]

Definition at line 392 of file TileSource.cpp.

{
    TileSource* result = 0L;

    std::string driver = options.getDriver();
    if ( driver.empty() )
    {
        OE_WARN << "ILLEGAL- no driver set for tile source" << std::endl;
        return 0L;
    }

    osg::ref_ptr<osgDB::ReaderWriter::Options> rwopt = new osgDB::ReaderWriter::Options();
    rwopt->setPluginData( TILESOURCEOPTIONS_TAG, (void*)&options );

    std::string driverExt = std::string( ".osgearth_" ) + driver;
    result = dynamic_cast<TileSource*>( osgDB::readObjectFile( driverExt, rwopt.get() ) );
    if ( !result )
    {
        OE_WARN << "WARNING: Failed to load TileSource driver for \"" << driver << "\"" << std::endl;
    }

    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines