libosmscout 0.1
Loading...
Searching...
No Matches
osmscout::TagCondition Class Referenceabstract

Abstract base class for all tag based conditions. More...

#include <Tag.h>

+ Inheritance diagram for osmscout::TagCondition:

Public Member Functions

virtual void CollectTagKeys (std::vector< TagId > &keys, bool &guaranteed) const =0
 Collects the tag keys that act as primary discriminators for this condition.
 
virtual bool Evaluate (const TagMap &tagMap) const =0
 
virtual ~TagCondition ()=default
 

Detailed Description

Abstract base class for all tag based conditions.

Constructor & Destructor Documentation

◆ ~TagCondition()

virtual osmscout::TagCondition::~TagCondition ( )
virtualdefault

Member Function Documentation

◆ CollectTagKeys()

virtual void osmscout::TagCondition::CollectTagKeys ( std::vector< TagId > &  keys,
bool &  guaranteed 
) const
pure virtual

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.

Implemented in osmscout::TagNotCondition, osmscout::TagBoolCondition, osmscout::TagExistsCondition, osmscout::TagBinaryCondition, and osmscout::TagIsInCondition.

◆ Evaluate()

virtual bool osmscout::TagCondition::Evaluate ( const TagMap tagMap) const
pure virtual

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