Rogue Wave Views
Maps Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Static Public Member Functions
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

Public Member Functions

 IlvAttributeArray (IlInt size)
 Creates an instance of IlvAttributeArray. More...
 
 IlvAttributeArray (const IlvAttributeArray &source)
 Copies this feature attribute and the attribute values. More...
 
virtual IlvFeatureAttributecopy () const
 Returns a copy of the object. More...
 
IlvFeatureAttributegetAttribute (IlInt index) const
 Returns the attribute of the specified index. More...
 
const IlvMapClassInfo * getCommonClass () const
 Returns the common class of element stored in this array. More...
 
IlInt getSize () const
 Returns the number of elements of this array. More...
 
IlvFeatureAttributesetAttribute (IlInt index, IlvFeatureAttribute *attribute, IlvMapsError &status)
 Sets the attribute of the specified index. More...
 
IlvMapsError setCommonClass (const IlvMapClassInfo *commonClass)
 Sets the common class for the attributes of this attribute array. More...
 
void setSize (IlInt newSize)
 Sets the size of this array. More...
 
IlvFeatureAttributeunsafeSetAttribute (IlInt index, IlvFeatureAttribute *attribute)
 Sets the value of the attribute specified by the index index to attribute, without checking. More...
 
- Public Member Functions inherited from IlvFeatureAttribute
void save (IlvOutputFile &file) const
 Saves the object to an IlvOutputFile. More...
 
virtual void write (IlvOutputFile &output) const =0
 Writes the object to an IlvOutputFile object. More...
 

Static Public Member Functions

static IlvMapsError IndexError ()
 Returns the error code for index errors. More...
 
- Static Public Member Functions inherited from IlvFeatureAttribute
static IlvFeatureAttributeLoad (IlvInputFile &file)
 Loads an attribute from an IlvInputFile. More...
 

Additional Inherited Members

- Protected Member Functions inherited from IlvFeatureAttribute
 IlvFeatureAttribute ()
 Constructor. More...
 

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
sizeThe size of the array.
IlvAttributeArray::IlvAttributeArray ( const IlvAttributeArray source)

Copies this feature attribute and the attribute values.

Parameters
sourceThe 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
indexThe index.
Returns
The attribute of the specified index or 0 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
indexThe index.
attributeThe attribute to be set. A null value can be set.
statusThe 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
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
commonClassThe 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
newSizeThe 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
indexThe index of the attribute to be set.
attributeThe value to which the specified attribute will be set.
Returns
The value of the previous attribute.

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