![]() |
VR-Forces 4.1.1 Class Documentation
|
Represents a GIS feature. More...

Classes | |
| struct | AttributeConverter |
| struct | Key |
| Key used to lookup attributes. More... | |
Public Types | |
| typedef boost::shared_ptr < DtFeature > | Ptr |
| typedef boost::shared_ptr < const DtFeature > | CPtr |
| typedef boost::variant < std::string, int, double > | Attribute |
| boost::variant type for accessing attributes. | |
| typedef boost::function< void(const Key &, const Attribute &)> | ForEachFunction |
| Callback used to iterating through attributes with ForEachAttribute. | |
Public Member Functions | |
| virtual | ~DtFeature () |
| Virtual destructor. | |
| virtual CPtr | getPtr () const |
| Return a pointer to an object which represents the current feature. | |
| virtual DtFeatureGeometry | geometry () const =0 |
| Get the geometry associated with this feature. | |
| virtual void | forEachAttribute (ForEachFunction f) const =0 |
| Calls the provided callback on each attribute. | |
| virtual unsigned | numberOfAttributes (const Key::String &) const =0 |
| Number of attributes with a given name. | |
| virtual bool | hasAttribute (const Key &k) const |
| Check to see if this feature has an attribute of a specific type. | |
| virtual boost::optional < Attribute > | attribute (const Key &) const =0 |
| Get attribute at a certain key. | |
| template<typename T > | |
| boost::optional< T > | attributeAs (const Key &k) const |
Static Public Member Functions | |
| static std::string | TypeOfAttribute (const Attribute &) |
| String type description of an attribute's type. | |
| static CPtr | GetPtr (const DtFeature &) |
| Static function for invoking getPtr-like functions in subclasses. | |
| static Ptr | CreateEmptyFeature () |
| Factory function for creating features with no data. | |
| static Ptr | CreateGeometryFeature (DtFeatureGeometry) |
| Create a feature with the given geometry and no attributes. | |
| static Ptr | CreateCopy (const DtFeature &feature) |
| Create a copy of a feature. | |
| static bool | Equal (const Attribute &, const Attribute &) |
| Attribute compare attributes with intelligent conversions. | |
| static bool | NotEqual (const Attribute &, const Attribute &) |
| Attribute compare attributes with intelligent conversions. | |
| static bool | Less (const Attribute &, const Attribute &) |
| Attribute compare attributes with intelligent conversions. | |
| static bool | LessOrEqual (const Attribute &, const Attribute &) |
| Attribute compare attributes with intelligent conversions. | |
| static bool | Greater (const Attribute &, const Attribute &) |
| Attribute compare attributes with intelligent conversions. | |
| static bool | GreaterOrEqual (const Attribute &, const Attribute &) |
| Attribute compare attributes with intelligent conversions. | |
Static Public Attributes | |
| static const char * | TypeName |
Represents a GIS feature.
GIS features are represented as dictionaries mapping keys to attribute values. A key consists of a case insensitive string and an unsigned integer index. The attribute values can be either an int, a double, a std::string, or a DtFeatureGeometry. Sets of attributes are accessed by using the index part of the key, and single value attributes are accessed as if they were one items sets, with the key index defaulting to zero to facilitate this.
| typedef boost::shared_ptr<DtFeature> MAKVRinTerra::DtFeature::Ptr |
| typedef boost::shared_ptr<const DtFeature> MAKVRinTerra::DtFeature::CPtr |
| typedef boost::variant< std::string, int, double > MAKVRinTerra::DtFeature::Attribute |
boost::variant type for accessing attributes.
| typedef boost::function<void (const Key&, const Attribute&)> MAKVRinTerra::DtFeature::ForEachFunction |
Callback used to iterating through attributes with ForEachAttribute.
|
virtual |
Virtual destructor.
Attribute compare attributes with intelligent conversions.
Attribute compare attributes with intelligent conversions.
Attribute compare attributes with intelligent conversions.
Attribute compare attributes with intelligent conversions.
Attribute compare attributes with intelligent conversions.
|
static |
Attribute compare attributes with intelligent conversions.
|
static |
String type description of an attribute's type.
Static function for invoking getPtr-like functions in subclasses.
|
static |
Factory function for creating features with no data.
|
static |
Create a feature with the given geometry and no attributes.
Create a copy of a feature.
| feature | Feature to copy. |
|
virtual |
Return a pointer to an object which represents the current feature.
In order to enable paging and efficient representation of features, this method should return a pointer to feature which contains all the same data as the current feature but may be a different object. This allows DtFeature objects to be created on the stack and to not create the actual heap allocated and page tracked object until the point at which it is needed.
Reimplemented in MAKVRinTerra::DtTransformFeatureSet::FeatureWrapper, MAKVRinTerra::DtGdbVectorFeature, MAKVRinTerra::DtFeatureWrapper< DtObstacleFeature >, and MAKVRinTerra::DtObstacleFeature.
|
pure virtual |
Get the geometry associated with this feature.
GIS features each typically each associated with one geometry. Other geometries can be stored as attributes in DtFeature objects, but all functionality that makes references to a specific geometry (like paging or spatial indexing) shall obtain that geometry from this function.
Implemented in MAKVRinTerra::DtTransformFeatureSet::FeatureWrapper, MAKVRinTerra::DtSimplePathFeature, MAKVRinTerra::DtFeatureWrapper< DtObstacleFeature >, MAKVRinTerra::DtGdbVectorFeature, MAKVRinTerra::DtObstacleFeature, MAKVRinTerra::DtOgrFeature, MAKVRinTerra::DtSimpleFeature, and MAKVRinTerra::DtOsgEarthFeature.
|
pure virtual |
Calls the provided callback on each attribute.
Implemented in MAKVRinTerra::DtTransformFeatureSet::FeatureWrapper, MAKVRinTerra::DtGdbVectorFeature, MAKVRinTerra::DtFeatureWrapper< DtObstacleFeature >, MAKVRinTerra::DtSimplePathFeature, MAKVRinTerra::DtSimpleFeature, MAKVRinTerra::DtOgrFeature, and MAKVRinTerra::DtOsgEarthFeature.
Referenced by MAKVRinTerra::DtSimpleFeature::DtSimpleFeature().
|
pure virtual |
Number of attributes with a given name.
Check to see if this feature has an attribute of a specific type.
|
pure virtual |
Get attribute at a certain key.
Implemented in MAKVRinTerra::DtTransformFeatureSet::FeatureWrapper, MAKVRinTerra::DtFeatureWrapper< DtObstacleFeature >, MAKVRinTerra::DtGdbVectorFeature, MAKVRinTerra::DtSimplePathFeature, MAKVRinTerra::DtSimpleFeature, MAKVRinTerra::DtOgrFeature, and MAKVRinTerra::DtOsgEarthFeature.
|
inline |
|
static |