Views
Maps Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvStringAttribute Class Reference

This feature attribute stores strings. More...

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

Inheritance diagram for IlvStringAttribute:
IlvFeatureAttribute

Public Member Functions

 IlvStringAttribute ()
 Initializes a new empty string attribute.
 
 IlvStringAttribute (const char *value, IlBoolean copy=IlTrue)
 Initializes a new string attribute. More...
 
 IlvStringAttribute (const IlvStringAttribute &source)
 Creates a string attribute by copying an existing one. More...
 
virtual IlvFeatureAttributecopy () const
 Copies this object. More...
 
const char * getValue () const
 Returns the value of the attribute. More...
 
void setValue (const char *value, IlBoolean copy=IlTrue)
 Sets the new string. 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvFeatureAttribute
static IlvFeatureAttributeLoad (IlvInputFile &file)
 Loads an attribute from an IlvInputFile. More...
 
- Protected Member Functions inherited from IlvFeatureAttribute
 IlvFeatureAttribute ()
 Constructor. More...
 

Detailed Description

This feature attribute stores strings.

Library: ilvmaps

Constructor & Destructor Documentation

◆ IlvStringAttribute() [1/2]

IlvStringAttribute::IlvStringAttribute ( const char *  value,
IlBoolean  copy = IlTrue 
)

Initializes a new string attribute.

Parameters
valuethe string to be created.
copyif set to IlTrue, the value passed as argument is copied.

◆ IlvStringAttribute() [2/2]

IlvStringAttribute::IlvStringAttribute ( const IlvStringAttribute source)

Creates a string attribute by copying an existing one.

Parameters
sourceThe object to be copied.

Member Function Documentation

◆ copy()

virtual IlvFeatureAttribute* IlvStringAttribute::copy ( ) const
virtual

Copies this object.

Returns
A copy of the object.

Implements IlvFeatureAttribute.

◆ getValue()

const char* IlvStringAttribute::getValue ( ) const

Returns the value of the attribute.

Returns
The current value or 0 if no string is affected by the attribute.

◆ setValue()

void IlvStringAttribute::setValue ( const char *  value,
IlBoolean  copy = IlTrue 
)

Sets the new string.

The attribute becomes owner of the string.

Parameters
valueThe new value.
copyIf IlTrue, the value is copied.