|
osgEarth 2.1.1
|
Inheritance diagram for osgEarth::Features::FeatureListSource:
Collaboration diagram for osgEarth::Features::FeatureListSource:Public Member Functions | |
| FeatureListSource () | |
| virtual FeatureCursor * | createFeatureCursor (const Symbology::Query &query) |
| virtual bool | isWritable () const |
| virtual bool | deleteFeature (FeatureID fid) |
| virtual int | getFeatureCount () const |
| virtual Feature * | getFeature (FeatureID fid) |
| virtual bool | insertFeature (Feature *feature) |
| virtual Geometry::Type | getGeometryType () const |
| FeatureList & | getFeatures () |
| virtual bool | hasEmbeddedStyles () const |
| virtual const char * | className () const |
| virtual const char * | libraryName () const |
| virtual void | initialize (const std::string &referenceURI) |
Protected Member Functions | |
| virtual const FeatureProfile * | createFeatureProfile () |
Protected Attributes | |
| FeatureList | _features |
| osg::ref_ptr< FeatureProfile > | _profile |
Definition at line 33 of file FeatureListSource.
| FeatureListSource::FeatureListSource | ( | ) |
Definition at line 23 of file FeatureListSource.cpp.
: FeatureSource() { _profile = new FeatureProfile(GeoExtent(osgEarth::SpatialReference::create("epsg:4326"), -180, -90, 180, 90)); }
Here is the call graph for this function:| virtual const char* osgEarth::Features::FeatureListSource::className | ( | ) | const [inline, virtual] |
Reimplemented from osgEarth::Features::FeatureSource.
Definition at line 55 of file FeatureListSource.
{ return "FeatureListSource"; }
| FeatureCursor * FeatureListSource::createFeatureCursor | ( | const Symbology::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 30 of file FeatureListSource.cpp.
{
//Create a copy of all of the features before returning the cursor.
//The processing filters in osgEarth can modify the features as they are operating and we don't want our original data destroyed.
FeatureList cursorFeatures;
for (FeatureList::iterator itr = _features.begin(); itr != _features.end(); ++itr)
{
Feature* feature = new osgEarth::Features::Feature(*(itr->get()), osg::CopyOp::DEEP_COPY_ALL);
cursorFeatures.push_back( feature );
}
return new FeatureListCursor( cursorFeatures );
}
| const FeatureProfile * FeatureListSource::createFeatureProfile | ( | ) | [protected, 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 49 of file FeatureListSource.cpp.
{
return _profile.get();
}
| bool FeatureListSource::deleteFeature | ( | FeatureID | fid | ) | [virtual] |
Deletes the feature with the given FID
Reimplemented from osgEarth::Features::FeatureSource.
Definition at line 55 of file FeatureListSource.cpp.
{
for (FeatureList::iterator itr = _features.begin(); itr != _features.end(); ++itr)
{
if (itr->get()->getFID() == fid)
{
_features.erase( itr );
dirty();
return true;
}
}
return false;
}
Here is the call graph for this function:Gets the Feature with the given FID
Reimplemented from osgEarth::Features::FeatureSource.
Definition at line 70 of file FeatureListSource.cpp.
| virtual int osgEarth::Features::FeatureListSource::getFeatureCount | ( | ) | const [inline, virtual] |
Gets the number of features in this FeatureSource
Reimplemented from osgEarth::Features::FeatureSource.
Definition at line 42 of file FeatureListSource.
{ return _features.size(); }
| FeatureList& osgEarth::Features::FeatureListSource::getFeatures | ( | ) | [inline] |
Definition at line 47 of file FeatureListSource.
{ return _features; }
| virtual Geometry::Type osgEarth::Features::FeatureListSource::getGeometryType | ( | ) | const [inline, virtual] |
Gets the Geometry type of the FeatureSource
Reimplemented from osgEarth::Features::FeatureSource.
Definition at line 45 of file FeatureListSource.
{ return Geometry::TYPE_UNKNOWN; }
| virtual bool osgEarth::Features::FeatureListSource::hasEmbeddedStyles | ( | ) | const [inline, virtual] |
Returns true if this source creates features with embedded style information. By default, this is false (features are not expected to carry their own style definitions).
Reimplemented from osgEarth::Features::FeatureSource.
Definition at line 51 of file FeatureListSource.
{ return false; }
| void FeatureListSource::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 44 of file FeatureListSource.cpp.
{
}
| bool FeatureListSource::insertFeature | ( | Feature * | feature | ) | [virtual] |
Inserts the given feature into the FeatureSource
Reimplemented from osgEarth::Features::FeatureSource.
Definition at line 82 of file FeatureListSource.cpp.
Here is the call graph for this function:| virtual bool osgEarth::Features::FeatureListSource::isWritable | ( | ) | const [inline, virtual] |
Whether this FeatureSource supports inserting and deleting features
Reimplemented from osgEarth::Features::FeatureSource.
Definition at line 40 of file FeatureListSource.
{ return true; }
| virtual const char* osgEarth::Features::FeatureListSource::libraryName | ( | ) | const [inline, virtual] |
Reimplemented from osgEarth::Features::FeatureSource.
Definition at line 56 of file FeatureListSource.
{ return "osgEarthFeatures"; }
Definition at line 63 of file FeatureListSource.
osg::ref_ptr< FeatureProfile > osgEarth::Features::FeatureListSource::_profile [protected] |
Definition at line 64 of file FeatureListSource.
1.7.3