te::se::Rule Class Reference

A Rule is used to attach property/scale conditions to and group the individual symbols used for rendering. More...

#include <Rule.h>

Inheritance diagram for te::se::Rule:

Public Member Functions

Ruleclone () const
 It creates a new copy of this object. More...
 
Initializer Methods

Methods related to instantiation and destruction.

 Rule ()
 It initializes a new Rule. More...
 
 ~Rule ()
 Destructor. More...
 
Accessor methods

Methods used to get or set properties.

void setName (std::string *name)
 
const std::string * getName () const
 
void setDescription (Description *d)
 
const DescriptiongetDescription () const
 
void setLegendGraphic (Graphic *legendGraphic)
 
const GraphicgetLegendGraphic () const
 
void removeLegendGraphic ()
 
void setFilter (te::fe::Filter *f)
 
const te::fe::FiltergetFilter () const
 
void enableElseFilter ()
 
void disableElseFilter ()
 
bool hasElseFilter () const
 
void setMinScaleDenominator (const double &minScaleDenominator)
 
const double & getMinScaleDenominator () const
 
void setMaxScaleDenominator (const double &maxScaleDenominator)
 
const double & getMaxScaleDenominator () const
 
void push_back (Symbolizer *s)
 
void setSymbolizer (std::size_t i, Symbolizer *s)
 
void setSymbolizers (const std::vector< Symbolizer * > &symbs)
 
const std::vector< Symbolizer * > & getSymbolizers () const
 
const SymbolizergetSymbolizer (std::size_t i) const
 
void removeSymbolizer (std::size_t i)
 
void clearSymbolizers ()
 

Private Attributes

Descriptionm_description
 It gives the familiar short title for display lists and longer description for the rule. (Optional) More...
 
bool m_elseFilter
 It allows rules to be specified that are activated for features that are not selected by any other rule in a feature-type style. Default: false. If true, this is a Else filter rule. (Optional) More...
 
te::fe::Filterm_filter
 It allows the selection of features in rules to be controlled by attribute conditions. (Optional) More...
 
Graphicm_legendGraphic
 It allows an optional explicit Graphic Symbolizer to be displayed in a legend for this rule. (Optional) More...
 
double m_maxScaleDenominator
 It defines the range of map-rendering scales for which the rule should be applied. Default: TE_DOUBLE_INFINITY. (Optional) More...
 
double m_minScaleDenominator
 It defines the range of map-rendering scales for which the rule should be applied. Default: 0.0. (Optional) More...
 
std::string * m_name
 It allows the rule to be referenced externally, which is needed in some methods of SE usage. (Optional) More...
 
std::vector< Symbolizer * > m_symbolizers
 A Symbolizer describes how a feature/coverage is to appear on a map. (Mandatory) More...
 

Detailed Description

A Rule is used to attach property/scale conditions to and group the individual symbols used for rendering.

Rules are used to group rendering instructions by feature-property conditions and map scales. Rule definitions are placed immediately inside of featuretype- or coverage-style definitions. If a rule has no Filter element, the interpretation is that the rule condition is always true, i.e., all features are accepted and styled by the rule. The ElseFilter has a more complicated interpretation than the Filter element, and is interpreted as follows. The nominal scale of the map to be portrayed is computed (as described in the previous subclause) and all rules for scale ranges that do not include the computed nominal scale are discarded from further processing. Then, the specific condition for the ElseFilter is computed by "or-ing" together all of the other filter conditions and take the global "not" of that condition.

See also
FeatureTypeStyle, CoverageStyle, Description, Graphic, Symbolizer, te::fe::Filter

Definition at line 78 of file Rule.h.

Constructor & Destructor Documentation

te::se::Rule::Rule ( )

It initializes a new Rule.

te::se::Rule::~Rule ( )

Destructor.

Member Function Documentation

void te::se::Rule::clearSymbolizers ( )
Rule* te::se::Rule::clone ( ) const

It creates a new copy of this object.

void te::se::Rule::disableElseFilter ( )
void te::se::Rule::enableElseFilter ( )
Note
The filter must be NULL in order to call this method.
const Description* te::se::Rule::getDescription ( ) const
const te::fe::Filter* te::se::Rule::getFilter ( ) const
const Graphic* te::se::Rule::getLegendGraphic ( ) const
const double& te::se::Rule::getMaxScaleDenominator ( ) const
const double& te::se::Rule::getMinScaleDenominator ( ) const
const std::string* te::se::Rule::getName ( ) const
const Symbolizer* te::se::Rule::getSymbolizer ( std::size_t  i) const
const std::vector<Symbolizer*>& te::se::Rule::getSymbolizers ( ) const
bool te::se::Rule::hasElseFilter ( ) const
void te::se::Rule::push_back ( Symbolizer s)
void te::se::Rule::removeLegendGraphic ( )
void te::se::Rule::removeSymbolizer ( std::size_t  i)
void te::se::Rule::setDescription ( Description d)
void te::se::Rule::setFilter ( te::fe::Filter f)
Note
The ElseFilter must be false in order to set a filter.
void te::se::Rule::setLegendGraphic ( Graphic legendGraphic)
void te::se::Rule::setMaxScaleDenominator ( const double &  maxScaleDenominator)
void te::se::Rule::setMinScaleDenominator ( const double &  minScaleDenominator)
void te::se::Rule::setName ( std::string *  name)
void te::se::Rule::setSymbolizer ( std::size_t  i,
Symbolizer s 
)
void te::se::Rule::setSymbolizers ( const std::vector< Symbolizer * > &  symbs)

Member Data Documentation

Description* te::se::Rule::m_description
private

It gives the familiar short title for display lists and longer description for the rule. (Optional)

Definition at line 164 of file Rule.h.

bool te::se::Rule::m_elseFilter
private

It allows rules to be specified that are activated for features that are not selected by any other rule in a feature-type style. Default: false. If true, this is a Else filter rule. (Optional)

Definition at line 167 of file Rule.h.

te::fe::Filter* te::se::Rule::m_filter
private

It allows the selection of features in rules to be controlled by attribute conditions. (Optional)

Definition at line 166 of file Rule.h.

Graphic* te::se::Rule::m_legendGraphic
private

It allows an optional explicit Graphic Symbolizer to be displayed in a legend for this rule. (Optional)

Definition at line 165 of file Rule.h.

double te::se::Rule::m_maxScaleDenominator
private

It defines the range of map-rendering scales for which the rule should be applied. Default: TE_DOUBLE_INFINITY. (Optional)

Definition at line 169 of file Rule.h.

double te::se::Rule::m_minScaleDenominator
private

It defines the range of map-rendering scales for which the rule should be applied. Default: 0.0. (Optional)

Definition at line 168 of file Rule.h.

std::string* te::se::Rule::m_name
private

It allows the rule to be referenced externally, which is needed in some methods of SE usage. (Optional)

Definition at line 163 of file Rule.h.

std::vector<Symbolizer*> te::se::Rule::m_symbolizers
private

A Symbolizer describes how a feature/coverage is to appear on a map. (Mandatory)

Definition at line 170 of file Rule.h.


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