|
libosmscout 1.1.1
|
#include <libosmscout/include/osmscout/FeatureReader.h>
Public Member Functions | |
| FeatureReader (const TypeConfig &typeConfig) | |
| bool | GetIndex (const FeatureValueBuffer &buffer, size_t &index) const |
| bool | IsSet (const FeatureValueBuffer &buffer) const |
Helper template class for easy access to flag-like Features.
Each type may have stored the feature in request at a different index. The FeatureReader caches the index for each type once in the constructor and later on allows access to the feature in O(1) - without iterating of all feature(values) of an object.
|
explicit |
| bool osmscout::FeatureReader< F >::GetIndex | ( | const FeatureValueBuffer & | buffer, |
| size_t & | index ) const |
Returns the index of the Feature/FeatureValue within the given FeatureValueBuffer.
| buffer | The FeatureValueBuffer instance |
| index | The index |
| bool osmscout::FeatureReader< F >::IsSet | ( | const FeatureValueBuffer & | buffer | ) | const |
Returns true, if the feature is set for the given FeatureValueBuffer
| buffer | The FeatureValueBuffer instance |