libosmscout 0.1
Loading...
Searching...
No Matches
osmscout::TagBoolCondition Class Reference

Allows a boolean and/or condition between a number of child conditions. More...

#include <Tag.h>

+ Inheritance diagram for osmscout::TagBoolCondition:

Public Types

enum  Type { boolAnd , boolOr }
 

Public Member Functions

void AddCondition (const TagConditionRef &condition)
 
void CollectTagKeys (std::vector< TagId > &keys, bool &guaranteed) const override
 Collects the tag keys that act as primary discriminators for this condition.
 
bool Evaluate (const TagMap &tagMap) const override
 
 TagBoolCondition (Type type)
 
- Public Member Functions inherited from osmscout::TagCondition
virtual ~TagCondition ()=default
 

Detailed Description

Allows a boolean and/or condition between a number of child conditions.

Member Enumeration Documentation

◆ Type

Enumerator
boolAnd 
boolOr 

Constructor & Destructor Documentation

◆ TagBoolCondition()

osmscout::TagBoolCondition::TagBoolCondition ( Type  type)
explicit

Member Function Documentation

◆ AddCondition()

void osmscout::TagBoolCondition::AddCondition ( const TagConditionRef condition)

◆ CollectTagKeys()

void osmscout::TagBoolCondition::CollectTagKeys ( std::vector< TagId > &  keys,
bool &  guaranteed 
) const
overridevirtual

Collects the tag keys that act as primary discriminators for this condition.

If 'guaranteed' is true, at least one of the returned keys is guaranteed to be present in the tag map whenever this condition evaluates to true, i.e. the condition can only match objects that carry one of these keys. If 'guaranteed' is false, the condition may evaluate to true even if none of the returned keys is present (e.g. conditions containing negation) and the caller has to always evaluate the condition.

Implements osmscout::TagCondition.

References boolAnd, and boolOr.

◆ Evaluate()

bool osmscout::TagBoolCondition::Evaluate ( const TagMap tagMap) const
overridevirtual

Implements osmscout::TagCondition.

References boolAnd, and boolOr.


The documentation for this class was generated from the following files: