osgEarth 2.1.1
Public Member Functions | Protected Attributes

osgEarth::Features::FeatureListCursor Class Reference

Inheritance diagram for osgEarth::Features::FeatureListCursor:
Collaboration diagram for osgEarth::Features::FeatureListCursor:

List of all members.

Public Member Functions

 FeatureListCursor (const FeatureList &input, bool cloneFeatures=false)
virtual bool hasMore () const
virtual FeaturenextFeature ()

Protected Attributes

FeatureList _features
FeatureList::iterator _iter
bool _clone

Detailed Description

A simple cursor implementation that returns features from an in-memory feature list.

Definition at line 50 of file FeatureCursor.


Constructor & Destructor Documentation

FeatureListCursor::FeatureListCursor ( const FeatureList input,
bool  cloneFeatures = false 
)

Definition at line 38 of file FeatureCursor.cpp.

                                                                              :
_features( features ),
_clone   ( clone )
{
    _iter = _features.begin();
}

Member Function Documentation

bool FeatureListCursor::hasMore ( ) const [virtual]

Implements osgEarth::Features::FeatureCursor.

Definition at line 46 of file FeatureCursor.cpp.

{
    return _iter != _features.end();
}
Feature * FeatureListCursor::nextFeature ( ) [virtual]

Implements osgEarth::Features::FeatureCursor.

Definition at line 52 of file FeatureCursor.cpp.

{
    Feature* r = _iter->get();
    _iter++;
    return _clone ? osg::clone(r, osg::CopyOp::DEEP_COPY_ALL) : r;
}

Member Data Documentation

Definition at line 60 of file FeatureCursor.

Definition at line 58 of file FeatureCursor.

FeatureList::iterator osgEarth::Features::FeatureListCursor::_iter [protected]

Definition at line 59 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