rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvAttributeArray Class Reference

This feature attribute is itself an array of feature attributes. More...

#include <ilviews/maps/attribute/attrarray.h>

Inheritance diagram for IlvAttributeArray:
IlvFeatureAttribute

List of all members.

Public Member Functions

 IlvAttributeArray (const IlvAttributeArray &source)
 Copies this feature attribute and the attribute values.
 IlvAttributeArray (IlInt size)
 Creates an instance of IlvAttributeArray.
virtual IlvFeatureAttributecopy () const
 Returns a copy of the object.
IlvFeatureAttributegetAttribute (IlInt index) const
 Returns the attribute of the specified index.
const IlvMapClassInfo * getCommonClass () const
 Returns the common class of element stored in this array.
IlInt getSize () const
 Returns the number of elements of this array.
IlvFeatureAttributesetAttribute (IlInt index, IlvFeatureAttribute *attribute, IlvMapsError &status)
 Sets the attribute of the specified index.
IlvMapsError setCommonClass (const IlvMapClassInfo *commonClass)
 Sets the common class for the attributes of this attribute array.
void setSize (IlInt newSize)
 Sets the size of this array.
IlvFeatureAttributeunsafeSetAttribute (IlInt index, IlvFeatureAttribute *attribute)
 Sets the value of the attribute specified by the index index to attribute, without checking.

Static Public Member Functions

static IlvMapsError IndexError ()
 Returns the error code for index errors.

Detailed Description

This feature attribute is itself an array of feature attributes.

Library: ilvmaps


Constructor & Destructor Documentation

IlvAttributeArray::IlvAttributeArray ( IlInt  size  ) 

Creates an instance of IlvAttributeArray.

Parameters:
size The size of the array.
IlvAttributeArray::IlvAttributeArray ( const IlvAttributeArray source  ) 

Copies this feature attribute and the attribute values.

Parameters:
source The object to be copied.

Member Function Documentation

virtual IlvFeatureAttribute* IlvAttributeArray::copy (  )  const [virtual]

Returns a copy of the object.

Returns:
A copy of the object.

Implements IlvFeatureAttribute.

IlvFeatureAttribute* IlvAttributeArray::getAttribute ( IlInt  index  )  const

Returns the attribute of the specified index.

Parameters:
index The index.
Returns:
The attribute of the specified index or a null pointer if the index is out of range.
const IlvMapClassInfo* IlvAttributeArray::getCommonClass (  )  const

Returns the common class of element stored in this array.

Returns:
The class of this array.
IlInt IlvAttributeArray::getSize (  )  const

Returns the number of elements of this array.

Returns:
The number of elements of this array.
static IlvMapsError IlvAttributeArray::IndexError (  )  [static]

Returns the error code for index errors.

Returns:
The error code.
IlvFeatureAttribute* IlvAttributeArray::setAttribute ( IlInt  index,
IlvFeatureAttribute attribute,
IlvMapsError &  status 
)

Sets the attribute of the specified index.

The attribute is owned by the array.

Parameters:
index The index.
attribute The attribute to be set. A null value can be set.
status The function puts the status of the operation in this parameter. IlvMaps::NoError() if the operation succeeds, or an error code.
Returns:
The value of the previous attribute, which is then no more owned by the attribute.
See also:
IlvAttributeArray::setCommonClass.
IlvMapsError IlvAttributeArray::setCommonClass ( const IlvMapClassInfo *  commonClass  ) 

Sets the common class for the attributes of this attribute array.

By default, the common class is IlvFeatureAttribute, intended for any type of data. Providing that a precise common class determines for the application the type of the attribute array.

Parameters:
commonClass The common class.
Returns:
The status of the operation : IlvMaps::NoError() if the operation succeeds, or IlvMaps::ClassError() if the array contains attributes that are not assignable to the specified class.
void IlvAttributeArray::setSize ( IlInt  newSize  ) 

Sets the size of this array.

If the new size is greater than the current size, new null items are added to the end of the array. If the new size is less than the current size, all components at index newSize and greater are deleted.

Parameters:
newSize The new size of this array.
IlvFeatureAttribute* IlvAttributeArray::unsafeSetAttribute ( IlInt  index,
IlvFeatureAttribute attribute 
)

Sets the value of the attribute specified by the index index to attribute, without checking.

This method must be used with care. If the class of the attribute can not be assigned to the common class of this array, the class will be left in an inconsistent status.

Parameters:
index The index of the attribute to be set.
attribute The value to which the specified attribute will be set.
Returns:
The value of the previous attribute.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.