rwlogo

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
List of all members | Public Member Functions | Static Public Member Functions
IlvMapAttributeProperty Class Reference

Associates additional attributes with graphic objects. More...

#include <ilviews/maps/attrinfo.h>

Inheritance diagram for IlvMapAttributeProperty:
IlvNamedProperty

Public Member Functions

 IlvMapAttributeProperty (IlvMapAttributeInfo *info, IlBoolean persistent=IlTrue)
 Initializes an instance of IlvMapAttributeProperty. More...
 
IlvMapAttributeInfogetInfo () const
 Returns the object that specifies the names and types of the attributes. More...
 
IlvMapsError getValue (const char *name, IlvValue &x) const
 Puts the value of the attribute name into x. More...
 
IlvMapsError getValue (IlUInt index, IlvValue &x) const
 Puts the value of the attribute index into x. More...
 
IlBoolean isBad () const
 Checks the state of the attribute property. More...
 
virtual IlBoolean isPersistent () const
 Checks if the attribute property is to be saved. More...
 
IlBoolean isSet (const char *name) const
 Checks if an attribute is set. More...
 
IlBoolean isSet (IlUInt index) const
 Checks if an attribute is set. More...
 
void setPersistent (IlBoolean value)
 Specifies whether the attribute property must be saved when the object it is attached to is saved. More...
 
IlvMapsError setValue (const char *name, IlInt value)
 Sets the value of the attribute specified by its name. More...
 
IlvMapsError setValue (const char *name, IlUInt value)
 Sets the value of the attribute specified by its name. More...
 
IlvMapsError setValue (const char *name, IlFloat value)
 Sets the value of the attribute specified by its name. More...
 
IlvMapsError setValue (const char *name, IlDouble value)
 Sets the value of the attribute specified by its name. More...
 
IlvMapsError setValue (const char *name, const char *value)
 Sets the value of the attribute specified by its name. More...
 
IlvMapsError setValue (const char *name, IlBoolean value)
 Sets the value of the attribute specified by its name. More...
 
IlvMapsError setValue (IlUInt index, IlInt value)
 Sets the value of the attribute specified by its index. More...
 
IlvMapsError setValue (IlUInt index, IlUInt value)
 Sets the value of the attribute specified by its index. More...
 
IlvMapsError setValue (IlUInt index, IlFloat value)
 Sets the value of the attribute specified by its index. More...
 
IlvMapsError setValue (IlUInt index, IlDouble value)
 Sets the value of the attribute specified by its index. More...
 
IlvMapsError setValue (IlUInt index, const char *value)
 Sets the value of the attribute specified by its index. More...
 
IlvMapsError setValue (IlUInt index, IlBoolean value)
 Sets the value of the attribute specified by its index. More...
 

Static Public Member Functions

static IlvMapsError AttributeTypeMismatchError ()
 The error code returned when an attribute is assigned a value with an incorrect type. More...
 
static const IlvSymbolGetName ()
 Returns the property name of the instances of IlvMapAttributeProperty. More...
 
static IlvMapsError UnsetAttributeError ()
 The error code returned when a non nullable attribute has not been assigned a value. More...
 

Detailed Description

Associates additional attributes with graphic objects.

Library: ilvmaps

This class is used in conjunction with the IlvMapAttributeInfo class to associate additional attributes with graphic objects. Using this class, for example, an application can associate a number of attributes with a polyline representing a road segment: the ID of the road, the state of the road segment (open, closed, road works...), the speed limit, and so on.

The attribute values (stored by an instance of IlvMapAttributeProperty) and the attribute descriptions (stored by an instance of IlvMapAttributeInfo) are automatically saved to an .ilv file when they are attached to a graphic object because the IlvMapAttributeProperty class extends the IlvNamedProperty class.

Constructor & Destructor Documentation

IlvMapAttributeProperty::IlvMapAttributeProperty ( IlvMapAttributeInfo info,
IlBoolean  persistent = IlTrue 
)

Initializes an instance of IlvMapAttributeProperty.

Note
You can attach an IlvNamedProperty to an IlvGraphic or to an IlvManager with the methods IlvGraphic::setNamedProperty() or IlvManager::setNamedProperty().
Parameters
infoThe object that specifies the attributes (names, types, nullable...). The same instance of IlvMapAttributeInfo can be shared among many IlvMapAttributeProperty instances.
persistentSpecifies whether the attribute property must be saved when the object it is attached to is saved.

Member Function Documentation

static IlvMapsError IlvMapAttributeProperty::AttributeTypeMismatchError ( )
static

The error code returned when an attribute is assigned a value with an incorrect type.

Returns
An IlvMapsError indicating that an attribute is assigned a value with an incorrect type.
IlvMapAttributeInfo* IlvMapAttributeProperty::getInfo ( ) const

Returns the object that specifies the names and types of the attributes.

Returns
The object that specifies the names and types of the attributes.
static const IlvSymbol* IlvMapAttributeProperty::GetName ( )
static

Returns the property name of the instances of IlvMapAttributeProperty.

Returns
The property name of the instances of IlvMapAttributeProperty.
IlvMapsError IlvMapAttributeProperty::getValue ( const char *  name,
IlvValue x 
) const

Puts the value of the attribute name into x.

The function returns an error code if name is not the name of an attribute, or if the attribute is non-nullable and has not been assigned a value.

Parameters
nameThe name of the attribute.
xThe returned attribute value.
Returns
IlvMaps::UnsetAttributeError() if an error occurred, IlvMaps::NoError() otherwise.
IlvMapsError IlvMapAttributeProperty::getValue ( IlUInt  index,
IlvValue x 
) const

Puts the value of the attribute index into x.

The function returns an error code if the attribute is non-nullable and has not been assigned a value.

Parameters
indexThe index of the attribute.
xThe returned attribute value.
Returns
IlvMaps::UnsetAttributeError() if an error occurred, IlvMaps::NoError() otherwise.
IlBoolean IlvMapAttributeProperty::isBad ( ) const

Checks the state of the attribute property.

An attribute property can be in an inconsistent state, for example, if some non nullable attributes have not been assigned a value.

Returns
IlTrue if the attribute property is in an inconsistent state, IlFalse otherwise.
virtual IlBoolean IlvMapAttributeProperty::isPersistent ( ) const
virtual

Checks if the attribute property is to be saved.

Returns
IlTrue if the attribute property must be saved when the object it is attached to is saved, IlFalse otherwise.
IlBoolean IlvMapAttributeProperty::isSet ( const char *  name) const

Checks if an attribute is set.

Parameters
nameThe name of the attribute.
Returns
IlTrue if the value of the specified attribute has been set, IlFalse otherwise.
IlBoolean IlvMapAttributeProperty::isSet ( IlUInt  index) const

Checks if an attribute is set.

Parameters
indexThe index of the attribute to be checked.
Returns
IlTrue if the value of the specified attribute has been set, IlFalse otherwise.
void IlvMapAttributeProperty::setPersistent ( IlBoolean  value)

Specifies whether the attribute property must be saved when the object it is attached to is saved.

Parameters
valueIf set to IlTrue, the attribute property must be saved.
IlvMapsError IlvMapAttributeProperty::setValue ( const char *  name,
IlInt  value 
)

Sets the value of the attribute specified by its name.

Parameters
nameThe name of the attribute.
valueThe value to be set.
Returns
IlvMaps::AttributeTypeMismatchError() if an error occurred.
IlvMapsError IlvMapAttributeProperty::setValue ( const char *  name,
IlUInt  value 
)

Sets the value of the attribute specified by its name.

Parameters
nameThe name of the attribute.
valueThe value to be set.
Returns
IlvMaps::AttributeTypeMismatchError() if an error occurred.
IlvMapsError IlvMapAttributeProperty::setValue ( const char *  name,
IlFloat  value 
)

Sets the value of the attribute specified by its name.

Parameters
nameThe name of the attribute.
valueThe value to be set.
Returns
IlvMaps::AttributeTypeMismatchError() if an error occurred.
IlvMapsError IlvMapAttributeProperty::setValue ( const char *  name,
IlDouble  value 
)

Sets the value of the attribute specified by its name.

Parameters
nameThe name of the attribute.
valueThe value to be set.
Returns
IlvMaps::AttributeTypeMismatchError() if an error occurred.
IlvMapsError IlvMapAttributeProperty::setValue ( const char *  name,
const char *  value 
)

Sets the value of the attribute specified by its name.

Parameters
nameThe name of the attribute.
valueThe value to be set.
Returns
IlvMaps::AttributeTypeMismatchError() if an error occurred.
IlvMapsError IlvMapAttributeProperty::setValue ( const char *  name,
IlBoolean  value 
)

Sets the value of the attribute specified by its name.

Parameters
nameThe name of the attribute.
valueThe value to be set.
Returns
IlvMaps::AttributeTypeMismatchError() if an error occurred.
IlvMapsError IlvMapAttributeProperty::setValue ( IlUInt  index,
IlInt  value 
)

Sets the value of the attribute specified by its index.

Parameters
indexThe index of the attribute.
valueThe value to be set.
Returns
IlvMaps::AttributeTypeMismatchError() if an error occurred.
IlvMapsError IlvMapAttributeProperty::setValue ( IlUInt  index,
IlUInt  value 
)

Sets the value of the attribute specified by its index.

Parameters
indexThe index of the attribute.
valueThe value to be set.
Returns
IlvMaps::AttributeTypeMismatchError() if an error occurred.
IlvMapsError IlvMapAttributeProperty::setValue ( IlUInt  index,
IlFloat  value 
)

Sets the value of the attribute specified by its index.

Parameters
indexThe index of the attribute.
valueThe value to be set.
Returns
IlvMaps::AttributeTypeMismatchError() if an error occurred.
IlvMapsError IlvMapAttributeProperty::setValue ( IlUInt  index,
IlDouble  value 
)

Sets the value of the attribute specified by its index.

Parameters
indexThe index of the attribute.
valueThe value to be set.
Returns
IlvMaps::AttributeTypeMismatchError() if an error occurred.
IlvMapsError IlvMapAttributeProperty::setValue ( IlUInt  index,
const char *  value 
)

Sets the value of the attribute specified by its index.

Parameters
indexThe index of the attribute.
valueThe value to be set.
Returns
IlvMaps::AttributeTypeMismatchError() if an error occurred.
IlvMapsError IlvMapAttributeProperty::setValue ( IlUInt  index,
IlBoolean  value 
)

Sets the value of the attribute specified by its index.

Parameters
indexThe index of the attribute.
valueThe value to be set.
Returns
IlvMaps::AttributeTypeMismatchError() if an error occurred.
static IlvMapsError IlvMapAttributeProperty::UnsetAttributeError ( )
static

The error code returned when a non nullable attribute has not been assigned a value.

Returns
An IlvMapsError indicating that a non nullable attribute has not been assigned a value.

© Copyright 2015, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.