![]() |
Rogue Wave Views Maps Package API Reference Guide |
Rogue Wave Views Documentation Home |
Store the names and types of map attributes. More...
#include <ilviews/maps/attrinfo.h>
Public Member Functions | |
| IlvMapAttributeInfo (IlUInt count, const char **names, const IlvValueTypeClass **types, const IlBoolean *nullables=0, IlBoolean owned=IlFalse) | |
Initializes an instance of IlvMapAttributeInfo with the specified attributes. More... | |
| IlUInt | getAttributeCount () const |
| Returns the number of attributes. More... | |
| IlInt | getAttributeIndex (const char *name, IlvMapsError *error=0) const |
| Returns the index of a given attribute. More... | |
| void | getAttributeInfos (IlUInt index, const char *&name, const IlvValueTypeClass *&type, IlBoolean &nullable) const |
| Returns the information about an attribute. More... | |
| const char * | getAttributeName (IlUInt index) const |
| Returns the name of the attribute of index index. More... | |
| const IlvValueTypeClass * | getAttributeType (IlUInt index) const |
| Returns the type of the attribute of index index. More... | |
| IlBoolean | isLocked () const |
| Tests if this instance is locked by at least one other object. More... | |
| IlBoolean | isNullable (IlUInt index) const |
| Tests if an attribute is nullable. More... | |
| void | lock () |
| Locks this instance. More... | |
| void | unLock () |
| Unlocks this instance. More... | |
Friends | |
| class | IlvMapAttributeProperty |
Store the names and types of map attributes.
Library: ilvmaps
This class is used in conjunction with the IlvMapAttributeProperty 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.
Instances of the IlvMapAttributeInfo class can be shared by several instances of IlvMapAttributeProperty.
| IlvMapAttributeInfo::IlvMapAttributeInfo | ( | IlUInt | count, |
| const char ** | names, | ||
| const IlvValueTypeClass ** | types, | ||
| const IlBoolean * | nullables = 0, |
||
| IlBoolean | owned = IlFalse |
||
| ) |
Initializes an instance of IlvMapAttributeInfo with the specified attributes.
IlvMapAttributeInfo, use the lock() and unLock() member functions. | count | is the number of attributes that will be attached to the graphic objects. |
| names | is an array containing the names of the attributes. This array is copied. |
| types | is an array containing the types of the attributes (see IlvProjectionInterface for a description of IlvValueTypeClass). This array is copied. |
| nullables | can be set to an array of Boolean value taking the value IlTrue for nullable attributes, that is to say, attributes that do not have a value for all the graphic objects sharing this attribute information. This array is copied. |
| owned | If set to IlTrue, this object is not maintained by the lock()/unLock() mechanism: you are responsible for managing its life cycle. |
| IlUInt IlvMapAttributeInfo::getAttributeCount | ( | ) | const |
Returns the number of attributes.
| IlInt IlvMapAttributeInfo::getAttributeIndex | ( | const char * | name, |
| IlvMapsError * | error = 0 |
||
| ) | const |
Returns the index of a given attribute.
| name | The name of the attribute to be retrieved. |
| error | An error code set to IlvMapAttributeInfo::AttributeNotFoundError() if there is no attribute at index index. |
-1 if an error occurs (if there is no attribute with such a name). | void IlvMapAttributeInfo::getAttributeInfos | ( | IlUInt | index, |
| const char *& | name, | ||
| const IlvValueTypeClass *& | type, | ||
| IlBoolean & | nullable | ||
| ) | const |
Returns the information about an attribute.
| index | The index of the attribute. |
| name | The returned name. |
| type | The returned type. |
| nullable | The returned nullable property. |
| const char* IlvMapAttributeInfo::getAttributeName | ( | IlUInt | index | ) | const |
Returns the name of the attribute of index index.
| index | The index of the attribute to be retrieved. |
| const IlvValueTypeClass* IlvMapAttributeInfo::getAttributeType | ( | IlUInt | index | ) | const |
Returns the type of the attribute of index index.
| IlBoolean IlvMapAttributeInfo::isLocked | ( | ) | const |
Tests if this instance is locked by at least one other object.
IlTrue if the instance is locked, IlFalse otherwise, Tests if an attribute is nullable.
| index | The index of attribute to be checked. |
IlTrue if the attribute is nullable, IlFalse otherwise. | void IlvMapAttributeInfo::lock | ( | ) |
Locks this instance.
Calling this function ensures that the instance will not be deleted before you call its unLock() method.
| void IlvMapAttributeInfo::unLock | ( | ) |
Unlocks this instance.
If no lock remains set to the instance, then it is deleted.
© Copyright 2016, 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.