LuciadCPillar 2023.1.04
luciad::ExpressionFactory Class Referencefinal

Class containing static factory methods to create different types of expressions and conditions. More...

#include <luciad/expressions/ExpressionFactory.h>

Public Member Functions

 ExpressionFactory ()=delete
 
 ~ExpressionFactory ()=delete
 

Static Public Member Functions

static Expression andOp (std::vector< Expression > conditions)
 Creates a new and condition that evaluates to true if all of the conditions in conditions are true. More...
 
static Expression bbox (Expression expression)
 Creates a condition that evaluates to true when the given expression interacts with the feature geometry. More...
 
static Expression bbox (Expression left, Expression right)
 Creates a condition that evaluates to true when left interacts with right bounding box. More...
 
static Expression equal (Expression left, Expression right)
 Creates a condition that evaluates to true when left is equal to right. More...
 
static Expression gt (Expression left, Expression right)
 Creates a condition that evaluates to true when left is greater than right. More...
 
static Expression gte (Expression left, Expression right)
 Creates a condition that evaluates to true when left is greater than or equal to right. More...
 
static Expression like (std::string propertyPath, std::string pattern, bool matchCase)
 Creates a like expression using a value reference (property name) based on a simple xpath expression and a pattern. More...
 
static Expression like (std::string propertyPath, std::string pattern, bool matchCase, char wildCard, char singleChar, char escapeChar)
 Creates a like expression using a value reference (property name) based on a simple xpath expression and a pattern. More...
 
static Expression literal (ExpressionValue value)
 Creates a literal for the ExpressionValue value. More...
 
static Expression lt (Expression left, Expression right)
 Creates a condition that evaluates to true when left is less than right. More...
 
static Expression lte (Expression left, Expression right)
 Creates a condition that evaluates to true when left is less than or equal to right. More...
 
static Expression notEqual (Expression left, Expression right)
 Creates a condition that evaluates to true when left is not equal to right. More...
 
static Expression notOp (Expression condition)
 Creates a condition that evaluates to true when the given condition is false and vice versa. More...
 
static Expression orOp (std::vector< Expression > conditions)
 Creates a new or condition that evaluates to true if one of the conditions in conditions is true. More...
 
static Expression valueReference (std::string propertyPath)
 Creates a value reference (property name) based on a simple xpath expression. More...
 

Detailed Description

Class containing static factory methods to create different types of expressions and conditions.

Constructor & Destructor Documentation

◆ ExpressionFactory()

luciad::ExpressionFactory::ExpressionFactory ( )
delete

◆ ~ExpressionFactory()

luciad::ExpressionFactory::~ExpressionFactory ( )
delete

Member Function Documentation

◆ andOp()

static Expression luciad::ExpressionFactory::andOp ( std::vector< Expression conditions)
static

Creates a new and condition that evaluates to true if all of the conditions in conditions are true.

Parameters
conditionsTwo or more conditions.
Returns
the and operator.
Exceptions
luciad::LogicExceptionwhen there are less than 2 conditions.

◆ bbox() [1/2]

static Expression luciad::ExpressionFactory::bbox ( Expression  expression)
static

Creates a condition that evaluates to true when the given expression interacts with the feature geometry.

Parameters
expressionmust be a Geometry Expression containing a Bounds.
Returns
the bounding box operator expression.

◆ bbox() [2/2]

static Expression luciad::ExpressionFactory::bbox ( Expression  left,
Expression  right 
)
static

Creates a condition that evaluates to true when left interacts with right bounding box.

Parameters
leftLeft expression.
rightRight expression.
Returns
the bounding box operator expression.

◆ equal()

static Expression luciad::ExpressionFactory::equal ( Expression  left,
Expression  right 
)
static

Creates a condition that evaluates to true when left is equal to right.

Parameters
leftLeft expression.
rightRight expression.
Returns
the equals operator.

◆ gt()

static Expression luciad::ExpressionFactory::gt ( Expression  left,
Expression  right 
)
static

Creates a condition that evaluates to true when left is greater than right.

Parameters
leftLeft expression.
rightRight expression.
Returns
the greater than operator.

◆ gte()

static Expression luciad::ExpressionFactory::gte ( Expression  left,
Expression  right 
)
static

Creates a condition that evaluates to true when left is greater than or equal to right.

Parameters
leftLeft expression.
rightRight expression.
Returns
the greater than or equal to operator.

◆ like() [1/2]

static Expression luciad::ExpressionFactory::like ( std::string  propertyPath,
std::string  pattern,
bool  matchCase 
)
static

Creates a like expression using a value reference (property name) based on a simple xpath expression and a pattern.

Nested properties can be referenced by using the '/' as separator.

The pattern uses default values for a wildcard ('*'), a single char ('?') and the escape character ('\').

Parameters
propertyPathPath for the property whose value needs to be retrieved.
patternThe pattern to match.
matchCaseWhether to match case sensitive or case insensitive.
Returns
the like expression.
Since
2023.1

◆ like() [2/2]

static Expression luciad::ExpressionFactory::like ( std::string  propertyPath,
std::string  pattern,
bool  matchCase,
char  wildCard,
char  singleChar,
char  escapeChar 
)
static

Creates a like expression using a value reference (property name) based on a simple xpath expression and a pattern.

Nested properties can be referenced by using the '/' as separator.

Parameters
propertyPathPath for the property whose value needs to be retrieved.
patternThe pattern to match.
matchCaseWhether to match case sensitive or case insensitive.
wildCardThe character used as wild card to match zero or more characters.
singleCharThe character used as single character to match exactly one character.
escapeCharThe character used to escape the meaning of the wildCard, singleChar and escapeChar itself.
Returns
the like expression.
Since
2023.1

◆ literal()

static Expression luciad::ExpressionFactory::literal ( ExpressionValue  value)
static

Creates a literal for the ExpressionValue value.

Parameters
valueThe expression value.
Returns
the literal expression.

◆ lt()

static Expression luciad::ExpressionFactory::lt ( Expression  left,
Expression  right 
)
static

Creates a condition that evaluates to true when left is less than right.

Parameters
leftLeft expression.
rightRight expression.
Returns
the less than operator.

◆ lte()

static Expression luciad::ExpressionFactory::lte ( Expression  left,
Expression  right 
)
static

Creates a condition that evaluates to true when left is less than or equal to right.

Parameters
leftLeft expression.
rightRight expression.
Returns
the less than or equal to operator.

◆ notEqual()

static Expression luciad::ExpressionFactory::notEqual ( Expression  left,
Expression  right 
)
static

Creates a condition that evaluates to true when left is not equal to right.

Parameters
leftLeft expression.
rightRight expression.
Returns
the not equals operator.

◆ notOp()

static Expression luciad::ExpressionFactory::notOp ( Expression  condition)
static

Creates a condition that evaluates to true when the given condition is false and vice versa.

Parameters
conditionCondition to invert.
Returns
the condition that is the inverse of the given condition

◆ orOp()

static Expression luciad::ExpressionFactory::orOp ( std::vector< Expression conditions)
static

Creates a new or condition that evaluates to true if one of the conditions in conditions is true.

Parameters
conditionsTwo or more conditions.
Returns
the or operator.
Exceptions
luciad::LogicExceptionwhen there are less than 2 conditions.

◆ valueReference()

static Expression luciad::ExpressionFactory::valueReference ( std::string  propertyPath)
static

Creates a value reference (property name) based on a simple xpath expression.

Nested properties can be referenced by using the '/' as separator.

Parameters
propertyPathPath for the property whose value needs to be retrieved.
Returns
the value reference expression.