osgEarth 2.1.1
|
Public Member Functions | |
VirtualFeatureSource () | |
void | add (FeatureSource *source, FeaturePredicate *predicate) |
virtual FeatureCursor * | createFeatureCursor (const Query &query) |
virtual void | initialize (const std::string &referenceURI) |
virtual const FeatureProfile * | createFeatureProfile () |
virtual const FeatureSchema & | getSchema () const |
virtual Feature * | getFeature (FeatureID id) |
Protected Attributes | |
FeatureSourceMappingVector | _sources |
Definition at line 52 of file VirtualFeatureSource.
osgEarth::Features::VirtualFeatureSource::VirtualFeatureSource | ( | ) | [inline] |
void VirtualFeatureSource::add | ( | FeatureSource * | source, |
FeaturePredicate * | predicate | ||
) |
Adds a feature source/predicate mapping. This FeatureSource will draw from "source" and filter based on the predicate.
Definition at line 109 of file VirtualFeatureSource.cpp.
{ _sources.push_back( FeatureSourceMapping(source, predicate) ); dirty(); }
FeatureCursor * VirtualFeatureSource::createFeatureCursor | ( | const Query & | query | ) | [virtual] |
Creates a cursor that iterates over all the features corresponding to the specified query.
Caller takes ownership of the returned object.
Implements osgEarth::Features::FeatureSource.
Definition at line 116 of file VirtualFeatureSource.cpp.
{ return new VirtualFeatureCursor( _sources, query ); }
const FeatureProfile * VirtualFeatureSource::createFeatureProfile | ( | ) | [virtual] |
Creates and returns a metadata structure describing the features in a named feature class. This method is called by the public function getFeatureProfile() in this same object to create the metadata structure.
Implements osgEarth::Features::FeatureSource.
Definition at line 131 of file VirtualFeatureSource.cpp.
virtual Feature* osgEarth::Features::VirtualFeatureSource::getFeature | ( | FeatureID | fid | ) | [inline, virtual] |
Gets the Feature with the given FID
Reimplemented from osgEarth::Features::FeatureSource.
Definition at line 69 of file VirtualFeatureSource.
{ return 0L; }
const FeatureSchema & VirtualFeatureSource::getSchema | ( | ) | const [virtual] |
Gets the FeatureSchema for this FeatureSource. If the schema doesn't publish a source, this might be empty.
Reimplemented from osgEarth::Features::FeatureSource.
Definition at line 140 of file VirtualFeatureSource.cpp.
{ static FeatureSchema s_emptySchema; return _sources.size() > 0 ?_sources.front()._source->getSchema() : s_emptySchema; }
void VirtualFeatureSource::initialize | ( | const std::string & | referenceURI | ) | [virtual] |
Initialize the FeatureSource. The profile should be computed and set here using setProfile()
Implements osgEarth::Features::FeatureSource.
Definition at line 122 of file VirtualFeatureSource.cpp.
Definition at line 72 of file VirtualFeatureSource.