osgEarth 2.1.1
Public Member Functions | Protected Attributes

osgEarth::Features::GeometryFeatureCursor Class Reference

Inheritance diagram for osgEarth::Features::GeometryFeatureCursor:
Collaboration diagram for osgEarth::Features::GeometryFeatureCursor:

List of all members.

Public Member Functions

 GeometryFeatureCursor (Symbology::Geometry *geom)
 GeometryFeatureCursor (Symbology::Geometry *geom, const FeatureProfile *fp, const FeatureFilterList &filters)
virtual bool hasMore () const
virtual FeaturenextFeature ()

Protected Attributes

osg::ref_ptr< Symbology::Geometry_geom
osg::ref_ptr< const
FeatureProfile
_featureProfile
const FeatureFilterList _filters
osg::ref_ptr< Feature_lastFeature

Detailed Description

A simple cursor that returns each Geometry wrapped in a feature.

Definition at line 66 of file FeatureCursor.


Constructor & Destructor Documentation

GeometryFeatureCursor::GeometryFeatureCursor ( Symbology::Geometry geom)

Definition at line 61 of file FeatureCursor.cpp.

                                                             :
_geom( geom )
{
    //nop
}
GeometryFeatureCursor::GeometryFeatureCursor ( Symbology::Geometry geom,
const FeatureProfile fp,
const FeatureFilterList filters 
)

Definition at line 67 of file FeatureCursor.cpp.

                                                                                :
_geom( geom ),
_featureProfile( fp ),
_filters( filters )
{
    //nop
}

Member Function Documentation

bool GeometryFeatureCursor::hasMore ( ) const [virtual]

Implements osgEarth::Features::FeatureCursor.

Definition at line 78 of file FeatureCursor.cpp.

                                     {
    return _geom.valid();
}

Here is the caller graph for this function:

Feature * GeometryFeatureCursor::nextFeature ( ) [virtual]

Implements osgEarth::Features::FeatureCursor.

Definition at line 83 of file FeatureCursor.cpp.

{
    if ( hasMore() )
    {
        _lastFeature = new Feature();
        _lastFeature->setGeometry( _geom.get() );
        FilterContext cx;
        cx.profile() = _featureProfile.get();
        FeatureList list;
        list.push_back( _lastFeature.get() );
        for( FeatureFilterList::const_iterator i = _filters.begin(); i != _filters.end(); ++i ) {
            cx = i->get()->push( list, cx );
        }
        _geom = 0L;
    }
    return _lastFeature.get();
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 75 of file FeatureCursor.

Definition at line 76 of file FeatureCursor.

Definition at line 74 of file FeatureCursor.

Definition at line 77 of file FeatureCursor.


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