LuciadCPillar 2025.0.01
luciad::AttributeValue Class Reference

This class contains the concrete value of an attribute used in a style expression. More...

#include <luciad/layers/styles/expressions/AttributeValue.h>

Public Member Functions

 AttributeValue (const Color &value)
 Creates an attribute value of type Color. More...
 
 AttributeValue (const Coordinate &value)
 Creates an attribute value of type Coordinate. More...
 
 AttributeValue (double value)
 Creates an attribute value of type double. More...
 
Color getColor () const
 Returns the attribute value if it is of type Color. More...
 
Coordinate getCoordinate () const
 Returns the attribute value if it is of type Coordinate. More...
 
double getDouble () const
 Returns the attribute value if it is of type double. More...
 
bool isColor () const
 Returns true if the attribute value is of type Color. More...
 
bool isCoordinate () const
 Returns true if the attribute value is of type Coordinate. More...
 
bool isDouble () const
 Returns true if the attribute value is of type double. More...
 

Detailed Description

This class contains the concrete value of an attribute used in a style expression.

Attributes can hold a value of one of the following types:

Since
2025.0

Constructor & Destructor Documentation

◆ AttributeValue() [1/3]

luciad::AttributeValue::AttributeValue ( double  value)

Creates an attribute value of type double.

Parameters
valuethe attribute value.

◆ AttributeValue() [2/3]

luciad::AttributeValue::AttributeValue ( const Color value)

Creates an attribute value of type Color.

Parameters
valuethe attribute value.

◆ AttributeValue() [3/3]

luciad::AttributeValue::AttributeValue ( const Coordinate value)

Creates an attribute value of type Coordinate.

Parameters
valuethe attribute value.

Member Function Documentation

◆ getColor()

Color luciad::AttributeValue::getColor ( ) const

Returns the attribute value if it is of type Color.

Returns
the attribute value if it is of type Color.
Exceptions
LogicExceptionif the attribute value is not of type Color.

◆ getCoordinate()

Coordinate luciad::AttributeValue::getCoordinate ( ) const

Returns the attribute value if it is of type Coordinate.

Returns
the attribute value if it is of type Coordinate.
Exceptions
LogicExceptionif the attribute value is not of type Coordinate.

◆ getDouble()

double luciad::AttributeValue::getDouble ( ) const

Returns the attribute value if it is of type double.

Returns
the attribute value if it is of type double.
Exceptions
LogicExceptionif the attribute value is not of type double.

◆ isColor()

bool luciad::AttributeValue::isColor ( ) const

Returns true if the attribute value is of type Color.

Returns
true if the attribute value is of type Color.

◆ isCoordinate()

bool luciad::AttributeValue::isCoordinate ( ) const

Returns true if the attribute value is of type Coordinate.

Returns
true if the attribute value is of type Coordinate.

◆ isDouble()

bool luciad::AttributeValue::isDouble ( ) const

Returns true if the attribute value is of type double.

Returns
true if the attribute value is of type double.