Rogue Wave Views |
Rogue Wave Views Documentation Home |
Associates additional attributes with graphic objects. More...
#include <ilviews/maps/attrinfo.h>
Public Member Functions | |
IlvMapAttributeProperty (IlvMapAttributeInfo *info, IlBoolean persistent=IlTrue) | |
Initializes an instance of IlvMapAttributeProperty . More... | |
IlvMapAttributeInfo * | getInfo () 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 IlvSymbol * | GetName () |
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... | |
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.
IlvMapAttributeProperty::IlvMapAttributeProperty | ( | IlvMapAttributeInfo * | info, |
IlBoolean | persistent = IlTrue |
||
) |
Initializes an instance of IlvMapAttributeProperty
.
IlvNamedProperty
to an IlvGraphic
or to an IlvManager
with the methods IlvGraphic::setNamedProperty()
or IlvManager::setNamedProperty()
. info | The object that specifies the attributes (names, types, nullable...). The same instance of IlvMapAttributeInfo can be shared among many IlvMapAttributeProperty instances. |
persistent | Specifies whether the attribute property must be saved when the object it is attached to is saved. |
|
static |
The error code returned when an attribute is assigned a value with an incorrect type.
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.
|
static |
Returns the property name of the instances of IlvMapAttributeProperty
.
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.
name | The name of the attribute. |
x | The returned attribute value. |
IlvMaps::UnsetAttributeError()
if an error occurred, IlvMaps::NoError()
otherwise. 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.
index | The index of the attribute. |
x | The returned attribute value. |
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.
IlTrue
if the attribute property is in an inconsistent state, IlFalse
otherwise.
|
virtual |
Checks if the attribute property is to be saved.
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.
name | The name of the attribute. |
IlTrue
if the value of the specified attribute has been set, IlFalse
otherwise. Checks if an attribute is set.
index | The index of the attribute to be checked. |
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.
value | If 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.
name | The name of the attribute. |
value | The value to be set. |
IlvMaps::AttributeTypeMismatchError()
if an error occurred. IlvMapsError IlvMapAttributeProperty::setValue | ( | const char * | name, |
IlUInt | value | ||
) |
Sets the value of the attribute specified by its name.
name | The name of the attribute. |
value | The value to be set. |
IlvMaps::AttributeTypeMismatchError()
if an error occurred. IlvMapsError IlvMapAttributeProperty::setValue | ( | const char * | name, |
IlFloat | value | ||
) |
Sets the value of the attribute specified by its name.
name | The name of the attribute. |
value | The value to be set. |
IlvMaps::AttributeTypeMismatchError()
if an error occurred. IlvMapsError IlvMapAttributeProperty::setValue | ( | const char * | name, |
IlDouble | value | ||
) |
Sets the value of the attribute specified by its name.
name | The name of the attribute. |
value | The value to be set. |
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.
name | The name of the attribute. |
value | The value to be set. |
IlvMaps::AttributeTypeMismatchError()
if an error occurred. IlvMapsError IlvMapAttributeProperty::setValue | ( | const char * | name, |
IlBoolean | value | ||
) |
Sets the value of the attribute specified by its name.
name | The name of the attribute. |
value | The value to be set. |
IlvMaps::AttributeTypeMismatchError()
if an error occurred. Sets the value of the attribute specified by its index.
index | The index of the attribute. |
value | The value to be set. |
IlvMaps::AttributeTypeMismatchError()
if an error occurred. Sets the value of the attribute specified by its index.
index | The index of the attribute. |
value | The value to be set. |
IlvMaps::AttributeTypeMismatchError()
if an error occurred. Sets the value of the attribute specified by its index.
index | The index of the attribute. |
value | The value to be set. |
IlvMaps::AttributeTypeMismatchError()
if an error occurred. Sets the value of the attribute specified by its index.
index | The index of the attribute. |
value | The value to be set. |
IlvMaps::AttributeTypeMismatchError()
if an error occurred. IlvMapsError IlvMapAttributeProperty::setValue | ( | IlUInt | index, |
const char * | value | ||
) |
Sets the value of the attribute specified by its index.
index | The index of the attribute. |
value | The value to be set. |
IlvMaps::AttributeTypeMismatchError()
if an error occurred. Sets the value of the attribute specified by its index.
index | The index of the attribute. |
value | The value to be set. |
IlvMaps::AttributeTypeMismatchError()
if an error occurred.
|
static |
The error code returned when a non nullable attribute has not been assigned a value.
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.