MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLAttributeValueOperation Class Referenceabstract
Inheritance diagram for TSLAttributeValueOperation:

Detailed Description

The base class for a MapLink classification operation, for use with TSLFeatureClassConfig and TSLFeatureClassifierGraduated classes. It is a virtual base class, and so cannot be used directly.

Its implementation relies on the following derived classes:

Public Types

enum  OperationType {
  OperationTypeAnd , OperationTypeElse , OperationTypeEqualTo , OperationTypeGreaterThan ,
  OperationTypeGreaterThanOrEqualTo , OperationTypeLessThan , OperationTypeLessThanOrEqualTo , OperationTypeNot ,
  OperationTypeNotEqualTo , OperationTypeOr
}
 

Public Member Functions

virtual ~TSLAttributeValueOperation ()
 Destructor.
 
virtual TSLAttributeValueOperation::OperationType type () const =0
 
virtual TSLSimpleString operationType () const =0
 
virtual TSLSimpleString operationValue () const =0
 
TSLRenderingAttributesrendering ()
 
const TSLRenderingAttributesrendering () const
 
const char * featureName () const
 
const char * operationName () const
 
void setOperationName (const char *pOperationName)
 
virtual bool operator() (const char *attributeValue) const =0
 
const TSLAttributeValueOperationoperationLHS () const
 
const TSLAttributeValueOperationoperationRHS () const
 

Protected Types

enum  ValueType { ValueTypeString , ValueTypeInteger , ValueTypeDouble }
 

Protected Member Functions

TSLAttributeValueOperationoperator= (const TSLAttributeValueOperation &)
 Assignment operation.
 
 TSLAttributeValueOperation ()
 Constructor.
 
 TSLAttributeValueOperation (const char *value, bool caseSensitive, const TSLRenderingAttributes &rendering=TSLRenderingAttributes(), const char *featureName=NULL)
 
 TSLAttributeValueOperation (double value, const TSLRenderingAttributes &rendering=TSLRenderingAttributes(), const char *featureName=NULL)
 
 TSLAttributeValueOperation (int value, const TSLRenderingAttributes &rendering=TSLRenderingAttributes(), const char *featureName=NULL)
 
 TSLAttributeValueOperation (const TSLAttributeValueOperation &other)
 Copy constructor.
 
double attributeValueAsDouble (const char *attributeValue) const
 
int attributeValueAsInteger (const char *attributeValue) const
 
TSLSimpleString valueAsString () const
 
ValueType repurposeType (const char *attributeValue) const
 
ValueType isNumber (const char *attributeValue) const
 
virtual TSLAttributeValueOperationclone () const =0
 

Protected Attributes

ValueType m_valueType
 
TSLSimpleString m_value_s
 
ValueType m_value_s_also_n
 
TSLSimpleString m_value_us
 
int m_value_i
 
double m_value_d
 
TSLSimpleString m_operationName
 
TSLSimpleString m_featureName
 
bool m_caseSensitive
 
TSLRenderingAttributes m_renderingAttributes
 
TSLAttributeValueOperationm_a
 
TSLAttributeValueOperationm_b
 

Member Enumeration Documentation

◆ OperationType

Enumerator
OperationTypeAnd 
OperationTypeElse 
OperationTypeEqualTo 
OperationTypeGreaterThan 
OperationTypeGreaterThanOrEqualTo 
OperationTypeLessThan 
OperationTypeLessThanOrEqualTo 
OperationTypeNot 
OperationTypeNotEqualTo 
OperationTypeOr 

◆ ValueType

Enumerator
ValueTypeString 
ValueTypeInteger 
ValueTypeDouble 

Constructor & Destructor Documentation

◆ ~TSLAttributeValueOperation()

virtual TSLAttributeValueOperation::~TSLAttributeValueOperation ( )
virtual

Destructor.

◆ TSLAttributeValueOperation() [1/5]

TSLAttributeValueOperation::TSLAttributeValueOperation ( )
protected

Constructor.

◆ TSLAttributeValueOperation() [2/5]

TSLAttributeValueOperation::TSLAttributeValueOperation ( const char * value,
bool caseSensitive,
const TSLRenderingAttributes & rendering = TSLRenderingAttributes(),
const char * featureName = NULL )
protected

Constructor.

Parameters
valueThe attribute value to compare against when performing this operation.
caseSensitiveWhether or not comparisons should be case-sensitive.
renderingThe rendering to apply to features that match this operation.
featureNameThe name to assign to features that match this operation. If null an automatically generated feature name will be used.

◆ TSLAttributeValueOperation() [3/5]

TSLAttributeValueOperation::TSLAttributeValueOperation ( double value,
const TSLRenderingAttributes & rendering = TSLRenderingAttributes(),
const char * featureName = NULL )
protected

Constructor.

Parameters
valueThe attribute value to compare against when performing this operation.
renderingThe rendering to apply to features that match this operation.
featureNameThe name to assign to features that match this operation. If null an automatically generated feature name will be used.

◆ TSLAttributeValueOperation() [4/5]

TSLAttributeValueOperation::TSLAttributeValueOperation ( int value,
const TSLRenderingAttributes & rendering = TSLRenderingAttributes(),
const char * featureName = NULL )
protected

Constructor.

Parameters
valueThe attribute value to compare against when performing this operation.
renderingThe rendering to apply to features that match this operation.
featureNameThe name to assign to features that match this operation. If null an automatically generated feature name will be used.

◆ TSLAttributeValueOperation() [5/5]

TSLAttributeValueOperation::TSLAttributeValueOperation ( const TSLAttributeValueOperation & other)
protected

Copy constructor.

Member Function Documentation

◆ attributeValueAsDouble()

double TSLAttributeValueOperation::attributeValueAsDouble ( const char * attributeValue) const
protected

◆ attributeValueAsInteger()

int TSLAttributeValueOperation::attributeValueAsInteger ( const char * attributeValue) const
protected

◆ clone()

◆ featureName()

const char * TSLAttributeValueOperation::featureName ( ) const

Query the feature name for this operation.

If no feature name was specified when the operation was constructed this will return an automatically generated name, based on the type of operation and the value specified.

Returns
The feature name.

◆ isNumber()

ValueType TSLAttributeValueOperation::isNumber ( const char * attributeValue) const
protected

◆ operationLHS()

const TSLAttributeValueOperation * TSLAttributeValueOperation::operationLHS ( ) const

◆ operationName()

const char * TSLAttributeValueOperation::operationName ( ) const

Query the operation name for this operation.

This is a generic identifier for the operation. It is used in the TSLFeatureClassConfig::load() and TSLFeatureClassConfig::save() in the <Name> tag.

For example, the <Name> could be 'Small Pop', <PropertyName> of 'pop' and <Literal> of '50000'.

Returns
The operation name.

◆ operationRHS()

const TSLAttributeValueOperation * TSLAttributeValueOperation::operationRHS ( ) const

◆ operationType()

◆ operationValue()

◆ operator()()

virtual bool TSLAttributeValueOperation::operator() ( const char * attributeValue) const
pure virtual

◆ operator=()

TSLAttributeValueOperation & TSLAttributeValueOperation::operator= ( const TSLAttributeValueOperation & )
protected

Assignment operation.

◆ rendering() [1/2]

TSLRenderingAttributes & TSLAttributeValueOperation::rendering ( )

Access the rendering attributes for this operation.

These rendering attributes may be modified.

Returns
A reference to the operation's rendering attributes (TSLRenderingAttributes).

◆ rendering() [2/2]

const TSLRenderingAttributes & TSLAttributeValueOperation::rendering ( ) const

Query the rendering attributes for this operation.

Returns
The operation's rendering attributes (TSLRenderingAttributes).

◆ repurposeType()

ValueType TSLAttributeValueOperation::repurposeType ( const char * attributeValue) const
protected

◆ setOperationName()

void TSLAttributeValueOperation::setOperationName ( const char * pOperationName)

Set the operation name for this operation.

Parameters
pOperationNameThe operation name.

◆ type()

◆ valueAsString()

TSLSimpleString TSLAttributeValueOperation::valueAsString ( ) const
protected

Member Data Documentation

◆ m_a

TSLAttributeValueOperation* TSLAttributeValueOperation::m_a
protected

◆ m_b

TSLAttributeValueOperation* TSLAttributeValueOperation::m_b
protected

◆ m_caseSensitive

bool TSLAttributeValueOperation::m_caseSensitive
protected

◆ m_featureName

TSLSimpleString TSLAttributeValueOperation::m_featureName
protected

◆ m_operationName

TSLSimpleString TSLAttributeValueOperation::m_operationName
protected

◆ m_renderingAttributes

TSLRenderingAttributes TSLAttributeValueOperation::m_renderingAttributes
protected

◆ m_value_d

double TSLAttributeValueOperation::m_value_d
protected

◆ m_value_i

int TSLAttributeValueOperation::m_value_i
protected

◆ m_value_s

TSLSimpleString TSLAttributeValueOperation::m_value_s
protected

◆ m_value_s_also_n

ValueType TSLAttributeValueOperation::m_value_s_also_n
protected

◆ m_value_us

TSLSimpleString TSLAttributeValueOperation::m_value_us
protected

◆ m_valueType

ValueType TSLAttributeValueOperation::m_valueType
protected