osgEarth 2.1.1
Public Member Functions | Static Public Member Functions

osgEarthFeatureModelPseudoLoader Struct Reference

List of all members.

Public Member Functions

 osgEarthFeatureModelPseudoLoader ()
const char * className ()
ReadResult readNode (const std::string &uri, const Options *options) const

Static Public Member Functions

static UID registerGraph (FeatureModelGraph *graph)
static void unregisterGraph (UID uid)
static FeatureModelGraphgetGraph (UID uid)

Detailed Description

Definition at line 76 of file FeatureModelGraph.cpp.


Constructor & Destructor Documentation

osgEarthFeatureModelPseudoLoader::osgEarthFeatureModelPseudoLoader ( ) [inline]

Definition at line 78 of file FeatureModelGraph.cpp.

    {
        supportsExtension( "osgearth_pseudo_fmg", "Feature model pseudo-loader" );
    }

Member Function Documentation

const char* osgEarthFeatureModelPseudoLoader::className ( ) [inline]

Definition at line 83 of file FeatureModelGraph.cpp.

    { // override
        return "osgEarth Feature Model Pseudo-Loader";
    }
static FeatureModelGraph* osgEarthFeatureModelPseudoLoader::getGraph ( UID  uid) [inline, static]

Definition at line 118 of file FeatureModelGraph.cpp.

    {
        Threading::ScopedReadLock lock( _fmgMutex );
        std::map<UID, FeatureModelGraph*>::const_iterator i = _fmgRegistry.find( uid );
        return i != _fmgRegistry.end() ? i->second : 0L;
    }
ReadResult osgEarthFeatureModelPseudoLoader::readNode ( const std::string &  uri,
const Options *  options 
) const [inline]

Definition at line 88 of file FeatureModelGraph.cpp.

    {
        if ( !acceptsExtension( osgDB::getLowerCaseFileExtension(uri) ) )
            return ReadResult::FILE_NOT_HANDLED;

        UID uid;
        unsigned lod, x, y;
        sscanf( uri.c_str(), "%u.%d_%d_%d.%*s", &uid, &lod, &x, &y );

        FeatureModelGraph* graph = getGraph(uid);
        if ( graph )
            return ReadResult( graph->load( lod, x, y, uri ) );
        else
            return ReadResult::ERROR_IN_READING_FILE;
    }
static UID osgEarthFeatureModelPseudoLoader::registerGraph ( FeatureModelGraph graph) [inline, static]

Definition at line 104 of file FeatureModelGraph.cpp.

    {
        Threading::ScopedWriteLock lock( _fmgMutex );
        UID key = ++_uid;
        _fmgRegistry[key] = graph;
        return key;
    }

Here is the caller graph for this function:

static void osgEarthFeatureModelPseudoLoader::unregisterGraph ( UID  uid) [inline, static]

Definition at line 112 of file FeatureModelGraph.cpp.

Here is the caller graph for this function:


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