Concrete implementation of the luciad::IAttributeResolver
.
More...
#include <luciad/layers/styles/expressions/IAttributeResolver.h>
|
static std::shared_ptr< IAttributeResolver > | create (DataPropertyPath propertyPath, double defaultValue) |
| Creates an attribute resolver that retrieves a given property from the feature and returns it as attribute value. More...
|
|
static std::shared_ptr< IAttributeResolver > | create (std::string propertyName, double defaultValue) |
| Creates an attribute resolver that retrieves a given property from the feature and returns it as attribute value. More...
|
|
static std::shared_ptr< IAttributeResolver > | create (std::function< AttributeValue(const Feature &)> resolverFn) |
| Creates an attribute resolver that delegates the retrieval or computation of the attribute value to a given function. More...
|
|
◆ create() [1/2]
Creates an attribute resolver that retrieves a given property from the feature and returns it as attribute value.
The property must be of one of the following types: int32_t
, int64_t
, float
, double
. The resulting attribute value will be of type double
.
- Parameters
-
propertyPath | the path to the property within the feature. |
defaultValue | default value returned by the resolver if the property is not present. |
- Returns
- The attribute resolver.
◆ create() [2/2]
static std::shared_ptr< IAttributeResolver > luciad::AttributeResolver::create |
( |
std::string |
propertyName, |
|
|
double |
defaultValue |
|
) |
| |
|
static |
Creates an attribute resolver that retrieves a given property from the feature and returns it as attribute value.
The property must be of one of the following types: int32_t
, int64_t
, float
, double
. The resulting attribute value will be of type double
.
- Parameters
-
propertyName | name of the property within the feature. |
defaultValue | default value returned by the resolver if the property is not present. |
- Returns
- the attribute resolver.
◆ resolve()
Resolves the attribute value for the provided feature.
- Parameters
-
feature | the feature for which the attribute value should be resolved. |
- Returns
- the attribute value for the given feature.
Implements luciad::IAttributeResolver.