rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions | Public Attributes
IlvNamedProperty Class Referenceabstract

Named property class. More...

#include <ilviews/util/proplist.h>

Inheritance diagram for IlvNamedProperty:
IlvAnimator IlvToolTip IlvBitmapAnimator IlvGraphicAnimator

Public Member Functions

 IlvNamedProperty (IlSymbol *)
 Constructor. More...
 
 IlvNamedProperty (const IlvNamedProperty &source)
 Constructor. More...
 
IlvNamedPropertycopy () const =0
 Copies the property. More...
 
const char * getName () const
 Gets the name of the property. More...
 
IlSymbolgetSymbol () const
 Gets the name of the property. More...
 
virtual IlBoolean isPersistent () const
 Specifies whether the property must save itself. More...
 
void write (IlvOutputFile &stream) const =0
 Saves the description of the property. More...
 

Public Attributes

IlvNamedProperty *IlvInputFilestream
 Reads an instance of the property class. More...
 

Detailed Description

Named property class.

Library: views

The class IlvNamedProperty is used to associate persistent properties with graphic objects. These properties are instances of subclasses of IlvNamedProperty, and they can save themselves and be read back from a data stream. They are deleted when the graphic object they are associated with is destroyed.
A named property is identified by a name, which is a symbol referred to as the property name. This class is an abstract class, so every named property is an instance of a subclass of IlvNamedProperty.
To implement the persistence of a new subclass of IlvNamedProperty, you must use one of the two macros DeclarePropertyInfo or DeclarePropertyInfoRO in the body of the class declaration, and register the new class using the macro IlvRegisterPropertyClass.

See Also
IlvGraphic ("Named Properties"), DeclarePropertyInfo, DeclarePropertyInfoRO, DeclarePropertyIOConstructors, IlvPredefinedPropertyIOMembers, IlvRegisterPropertyClass.

Constructor & Destructor Documentation

IlvNamedProperty::IlvNamedProperty ( IlSymbol )

Constructor.

Initializes a new instance of IlvNamedProperty, setting the property name to name.

IlvNamedProperty::IlvNamedProperty ( const IlvNamedProperty source)

Constructor.

Initializes a new instance of IlvNamedProperty with a copy of source.

Member Function Documentation

IlvNamedProperty* IlvNamedProperty::copy ( ) const
pure virtual

Copies the property.

Creates and returns a copy of the property.

Returns
A copy of the property.
const char* IlvNamedProperty::getName ( ) const

Gets the name of the property.

Gets the name of this property, as a char*. This string must not be deleted nor modified by the user.

Returns
The name of this property, as a char*.
IlSymbol* IlvNamedProperty::getSymbol ( ) const

Gets the name of the property.

Gets the name of this property as an IlSymbol. This symbol is the one provided in the constructors.

Returns
The name of this property as an IlSymbol*.
virtual IlBoolean IlvNamedProperty::isPersistent ( ) const
virtual

Specifies whether the property must save itself.

Specifies whether the property must save itself when the object is saved. The purpose of this function is to have smaller Rogue Wave Views data files when handling named properties that do not need to be persistent (such as temporary flags).
The default implementation returns IlTrue, so that all named properties are saved and can be loaded by default.

Returns
IlTrue if this property must save itself when the object is saved, and IlFalse otherwise.
void IlvNamedProperty::write ( IlvOutputFile stream) const
pure virtual

Saves the description of the property.

Saves a description of this property into the output stream stream.

Parameters
streamThe output stream.

Member Data Documentation

IlvNamedProperty* IlvInputFile& IlvNamedProperty::stream

Reads an instance of the property class.

Creates and returns a new instance of this property class, from the input stream stream, with the name name.

Parameters
streamThe input stream.
nameThe name of the new instance.
Returns
A new instance of the property class.

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