rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvNamedProperty Class Reference

Named property class. More...

#include <ilviews/util/proplist.h>

Inheritance diagram for IlvNamedProperty:
IlvAnimator IlvToolTip IlvBitmapAnimator IlvGraphicAnimator

List of all members.

Public Member Functions

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

Public Attributes

IlvNamedProperty *IlvInputFilestream
 Reads an instance of the property class.

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:
stream The output stream.

Member Data Documentation

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:
stream The input stream.
name The name of the new instance.
Returns:
A new instance of the property class.
 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.