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
IlvFeatureAttributeProperty Class Reference

This class is used to store the values of map attributes. More...

#include <ilviews/maps/attrprop.h>

Inheritance diagram for IlvFeatureAttributeProperty:
IlvNamedProperty IlvValueInterface

Public Member Functions

 IlvFeatureAttributeProperty (IlvFeatureAttributeInfo *info, IlvFeatureAttribute **values, IlvMapsError &status)
 Creates an instance of the class IlvFeatureAttributeProperty. More...
 
 IlvFeatureAttributeProperty (const IlvFeatureAttributeProperty &source)
 Creates a new IlvFeatureAttributeProperty object by copying an existing one. More...
 
 IlvFeatureAttributeProperty (IlvInputFile &input, IlvSymbol *symbol)
 Creates a new IlvFeatureAttributeProperty object from an IlvInputStream object. More...
 
virtual IlvNamedPropertycopy () const
 Copies the property. More...
 
const IlvFeatureAttributegetAttribute (int i) const
 Returns the attribute of the specified index. More...
 
const IlvFeatureAttributegetAttribute (const char *name) const
 Returns the attribute specified by its name. More...
 
const IlvFeatureAttributeInfogetInfo () const
 Returns the attribute info. More...
 
IlvFeatureAttributesetAttribute (IlUInt i, IlvFeatureAttribute *attribute, IlvMapsError &status)
 Sets the value of the attribute specified by the index i to value. More...
 
IlvFeatureAttributesetAttribute (const char *name, IlvFeatureAttribute *value, IlvMapsError &status)
 Sets the value of the attribute specified by its name to value. More...
 
IlvFeatureAttributeunsafeSetAttribute (int i, IlvFeatureAttribute *attribute)
 Sets the value of the attribute specified by the index i to value, without checking any conditions. More...
 
void write (IlvOutputFile &output) const
 Writes the object to an IlvOutputFile. More...
 

Static Public Member Functions

static const IlvSymbolGetName ()
 Returns the name of the property. More...
 
static IlvMapsError NullableError ()
 Returns the error code for nullable objects error.
 

Detailed Description

This class is used to store the values of map attributes.

Library: ilvmaps

Since it is an IlvNamedProperty object, it can be attached to graphic object layers or managers, and, possibly, saved to ilv files.

Constructor & Destructor Documentation

§ IlvFeatureAttributeProperty() [1/3]

IlvFeatureAttributeProperty::IlvFeatureAttributeProperty ( IlvFeatureAttributeInfo info,
IlvFeatureAttribute **  values,
IlvMapsError &  status 
)

Creates an instance of the class IlvFeatureAttributeProperty.

Parameters
infoThe description of the attributes (names, classes etc.).
valuesThe array of feature attributes.
statusAn IlvMapsError in case of failure.

§ IlvFeatureAttributeProperty() [2/3]

IlvFeatureAttributeProperty::IlvFeatureAttributeProperty ( const IlvFeatureAttributeProperty source)

Creates a new IlvFeatureAttributeProperty object by copying an existing one.

The IlvFeatureAttributeInfo is not copied, which means that the source and the copy will share the same instance of IlvFeatureAttributeInfo.

The attribute array and the attributes themselves are copied.

Parameters
sourceThe feature attribute property to be copied.

§ IlvFeatureAttributeProperty() [3/3]

IlvFeatureAttributeProperty::IlvFeatureAttributeProperty ( IlvInputFile input,
IlvSymbol symbol 
)

Creates a new IlvFeatureAttributeProperty object from an IlvInputStream object.

Parameters
inputThe input file.
symbolThe name of the property.

Member Function Documentation

§ copy()

virtual IlvNamedProperty* IlvFeatureAttributeProperty::copy ( ) const
virtual

Copies the property.

The IlvFeatureAttributeInfo is not copied, that is the source and the copy will share the same instance of IlvFeatureAttributeInfo.

The attribute array and the attributes themselves are copied.

Returns
A copy of this feature attribute property.

Implements IlvNamedProperty.

§ getAttribute() [1/2]

const IlvFeatureAttribute* IlvFeatureAttributeProperty::getAttribute ( int  i) const

Returns the attribute of the specified index.

Parameters
iThe index of the attribute.
Returns
The attribute at index i.

§ getAttribute() [2/2]

const IlvFeatureAttribute* IlvFeatureAttributeProperty::getAttribute ( const char *  name) const

Returns the attribute specified by its name.

Parameters
nameThe name of the attribute.
Returns
The attribute.

§ getInfo()

const IlvFeatureAttributeInfo* IlvFeatureAttributeProperty::getInfo ( ) const

Returns the attribute info.

Returns
The attribute info.

§ GetName()

static const IlvSymbol* IlvFeatureAttributeProperty::GetName ( )
static

Returns the name of the property.

Returns
The property name.

§ setAttribute() [1/2]

IlvFeatureAttribute* IlvFeatureAttributeProperty::setAttribute ( IlUInt  i,
IlvFeatureAttribute attribute,
IlvMapsError &  status 
)

Sets the value of the attribute specified by the index i to value.

The attribute is then owned by the IlvFeatureAttributeProperty The attribute values you set must be checked against the following conditions:

  • When the attribute value to be set is not nullable, the new value must not be null.
  • The class associated with the attribute must be assignable from the class of the new value.
Parameters
iThe index of the attribute to be set.
attributeThe value to which the specified attribute will be set.
statusAn error code indicating the status of the operation.
Returns
The previous attribute of the specified index, which is no longer owned by the IlvFeatureAttributeProperty.

§ setAttribute() [2/2]

IlvFeatureAttribute* IlvFeatureAttributeProperty::setAttribute ( const char *  name,
IlvFeatureAttribute value,
IlvMapsError &  status 
)

Sets the value of the attribute specified by its name to value.

Parameters
nameThe name of the attribute to be set.
valueThe value to which the specified attribute will be set.
statusIt can be one of the following:

§ unsafeSetAttribute()

IlvFeatureAttribute* IlvFeatureAttributeProperty::unsafeSetAttribute ( int  i,
IlvFeatureAttribute attribute 
)

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

This method must be used with caution. If the conditions checked by the setAttribute() method are not met, the object will be in an inconsistent state.

Parameters
iThe index of the attribute to be set.
attributeThe value to which the specified attribute will be set.
Returns
The previous attribute that was at position i.

§ write()

void IlvFeatureAttributeProperty::write ( IlvOutputFile output) const
virtual

Writes the object to an IlvOutputFile.

Parameters
outputThe output file.

Implements IlvNamedProperty.


© Copyright 2018, 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.