Rogue Wave Views 5.5.1 |
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 . | |
IlvMapAttributeInfo * | getInfo () const |
Returns the object that specifies the names and types of the attributes. | |
IlvMapsError | getValue (IlUInt index, IlvValue &x) const |
Puts the value of the attribute index into x. | |
IlvMapsError | getValue (const char *name, IlvValue &x) const |
Puts the value of the attribute name into x. | |
IlBoolean | isBad () const |
Checks the state of the attribute property. | |
virtual IlBoolean | isPersistent () const |
Checks if the attribute property is to be saved. | |
IlBoolean | isSet (IlUInt index) const |
Checks if an attribute is set. | |
IlBoolean | isSet (const char *name) const |
Checks if an attribute is set. | |
void | setPersistent (IlBoolean value) |
Specifies whether the attribute property must be saved when the object it is attached to is saved. | |
IlvMapsError | setValue (IlUInt index, IlBoolean value) |
Sets the value of the attribute specified by its index. | |
IlvMapsError | setValue (IlUInt index, const char *value) |
Sets the value of the attribute specified by its index. | |
IlvMapsError | setValue (IlUInt index, IlDouble value) |
Sets the value of the attribute specified by its index. | |
IlvMapsError | setValue (IlUInt index, IlFloat value) |
Sets the value of the attribute specified by its index. | |
IlvMapsError | setValue (IlUInt index, IlUInt value) |
Sets the value of the attribute specified by its index. | |
IlvMapsError | setValue (IlUInt index, IlInt value) |
Sets the value of the attribute specified by its index. | |
IlvMapsError | setValue (const char *name, IlBoolean value) |
Sets the value of the attribute specified by its name. | |
IlvMapsError | setValue (const char *name, const char *value) |
Sets the value of the attribute specified by its name. | |
IlvMapsError | setValue (const char *name, IlDouble value) |
Sets the value of the attribute specified by its name. | |
IlvMapsError | setValue (const char *name, IlFloat value) |
Sets the value of the attribute specified by its name. | |
IlvMapsError | setValue (const char *name, IlUInt value) |
Sets the value of the attribute specified by its name. | |
IlvMapsError | setValue (const char *name, IlInt value) |
Sets the value of the attribute specified by its name. | |
Static Public Member Functions | |
static IlvMapsError | AttributeTypeMismatchError () |
The error code returned when an attribute is assigned a value with an incorrect type. | |
static const IlvSymbol * | GetName () |
Returns the property name of the instances of IlvMapAttributeProperty . | |
static IlvMapsError | UnsetAttributeError () |
The error code returned when a non nullable attribute has not been assigned a value. |
Associates additional attributes with graphic objects.
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.
IlvNamedProperty
class is defined and documented in the Rogue Wave Views product. Library: ilvmapsIlvMapAttributeProperty::IlvMapAttributeProperty | ( | IlvMapAttributeInfo * | info, | |
IlBoolean | persistent = IlTrue | |||
) |
Initializes an instance of IlvMapAttributeProperty
.
info
is 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. IlvNamedProperty
to an IlvGraphic
or to an IlvManager
with the methods IlvGraphic::setNamedProperty
or IlvManager::setNamedProperty
. static IlvMapsError IlvMapAttributeProperty::AttributeTypeMismatchError | ( | ) | [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 const IlvSymbol* IlvMapAttributeProperty::GetName | ( | ) | [static] |
Returns the property name of the instances of IlvMapAttributeProperty
.
IlvMapAttributeProperty
. 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. 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. IlBoolean IlvMapAttributeProperty::isBad | ( | ) | const |
Checks the state of the attribute property.
Returns IlTrue
if the attribute property is in an inconsistent state. This may happen, 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 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.
IlTrue
if the attribute property must be saved, IlFalse
otherwise. Reimplemented from IlvNamedProperty.
Checks if an attribute is set.
Returns IlTrue
if the value of the specified attribute present at index index has been set.
index | The index of the attribute to be checked. |
IlTrue
if the value of the specified attribute has been set, IlFalse
otherwise. IlBoolean IlvMapAttributeProperty::isSet | ( | const char * | name | ) | const |
Checks if an attribute is set.
Returns IlTrue
if the value of the specified attribute of name name has been set.
name | The name of the attribute. |
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. |
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. 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 | ( | 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. 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, | |
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, | |
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, | |
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, | |
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. static IlvMapsError IlvMapAttributeProperty::UnsetAttributeError | ( | ) | [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 2012, 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.