CartoType API
Classes | Public Member Functions
CartoType::CMapAttributeTest Class Reference

#include <cartotype_map_data.h>

List of all members.

Classes

class  TRange

Public Member Functions

 CMapAttributeTest (int32 aNestingLevel=0)
CT_IMPORT TResult Set (const MString &aString, TText &aAttribName)
CT_IMPORT bool Matches (TMapAttribute aAttribute) const
CT_IMPORT int32 HighestFirstAttributeValue () const
int32 NestingLevel () const

Detailed Description

A test that an attribute must fulfil in a search of a database.


Member Function Documentation

CT_EXPORT int32 CMapAttributeTest::HighestFirstAttributeValue ( ) const

Return the highest first attribute value allowed by a test. This is used to optimise searches.

CT_EXPORT bool CMapAttributeTest::Matches ( TMapAttribute  aAttribute) const

Return true if aAttribute passes the test in this object.

CT_EXPORT TResult CMapAttributeTest::Set ( const MString aString,
TText aAttribName 
)

Set a map attribute test object from a string and return the name of the attribute to be tested.

Possible conditions are relational tests of integer values, either against a single value or a set of values consisting of ranges and separate values.

The syntax of aString is

ATTRIB_NAME { MASK } RELATION VALUE_SET, where

MASK is an optional hexadecimal integer preceded by # defining a mask to be applied to the attribute value before the comparison is made.

RELATION is '=', '!=', '>', '<', '>=', or '<='.

VALUE_SET is RANGE or RANGE { ;RANGE }*

RANGE is VALUE or VALUE { ,VALUE }*

VALUE is either a decimal integer, or '#' followed by a hexadecimal integer, or a three-letter tag encoding an OSM type as defined in cartotype_osm_attrib.h.


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