Rogue Wave Views 5.5.1 |
Rogue Wave Views |
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 count of attributes, names, and types. | |
IlUInt | getAttributeCount () const |
Returns the number of attributes. | |
IlInt | getAttributeIndex (const char *name, IlvMapsError *error=0) const |
Returns the index of the attribute name. | |
void | getAttributeInfos (IlUInt index, const char *&name, const IlvValueTypeClass *&type, IlBoolean &nullable) const |
Returns the information about the attribute of index index. | |
const char * | getAttributeName (IlUInt index) const |
Returns the name of the attribute of index index. | |
const IlvValueTypeClass * | getAttributeType (IlUInt index) const |
Returns the type of the attribute of index index. | |
IlBoolean | isLocked () const |
Returns IlTrue if the instance is locked by at least one other object. | |
IlBoolean | isNullable (IlUInt index) const |
Returns IlTrue if the attribute of index index is nullable. | |
void | lock () |
Locks the instance of IlvMapAttributeInfo . | |
void | unLock () |
Unlocks the instance of IlvMapAttributeInfo . | |
Friends | |
class | IlvMapAttributeProperty |
Store the names and types of map attributes.
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
. Library: ilvmaps
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 count of attributes, names, and types.
The arrays: names
, types
, and nullables
, are copied by the constructor.
count
is the number of attributes that will be attached to the graphic objects. names
is an array containing the names of the attributes. types
is an array containing the types of the attributes (see IlvProjectionInterface
for a description of IlvValueTypeClass
). nullable
is an optional argument. If it is passed, it should be an array of Boolean value taking the IlTrue
value for nullable attributes, that is to say, attributes that do not have a value for all the graphic objects sharing this attribute information. IlvMapAttributeInfo
, use the lock and unLock member functions. IlUInt IlvMapAttributeInfo::getAttributeCount | ( | ) | const |
Returns the number of attributes.
IlInt IlvMapAttributeInfo::getAttributeIndex | ( | const char * | name, | |
IlvMapsError * | error = 0 | |||
) | const |
Returns the index of the attribute name.
If there is no attribute of the specified name, the function returns -1
.
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. void IlvMapAttributeInfo::getAttributeInfos | ( | IlUInt | index, | |
const char *& | name, | |||
const IlvValueTypeClass *& | type, | |||
IlBoolean & | nullable | |||
) | const |
Returns the information about the attribute of index index.
Namely, its name, type, and whether it can have a null value.
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.
The function returns a null pointer if index is not the index of an attribute.
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 |
Returns IlTrue
if the instance is locked by at least one other object.
IlTrue
if the instance is locked, IlFalse
otherwise, Returns IlTrue
if the attribute of index index is nullable.
index | The index of attribute to be checked. |
IlTrue
if the attribute is nullable, IlFalse
otherwise. void IlvMapAttributeInfo::lock | ( | ) |
Locks the instance of IlvMapAttributeInfo
.
Calling this function ensures that the instance will not be deleted before you call its unLock
method.
void IlvMapAttributeInfo::unLock | ( | ) |
Unlocks the instance of IlvMapAttributeInfo
.
If no lock remains set to the instance, then it is deleted.
© 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.