rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Prototypes Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvProtoInstance Class Reference

Clone of a prototype. More...

#include <ilviews/protos/proto.h>

Inheritance diagram for IlvProtoInstance:
IlvGroup IlvAccessorHolder IlvAccessible

List of all members.

Public Member Functions

 IlvProtoInstance (const IlvProtoInstance &source)
 Copies an existing instance.
IlUInt getModifiedValues (IlvValueArray &diffs, IlBoolean any=IlFalse) const
 Computes the values that have been modified for this instance with respect to its prototype.
IlvPrototypegetPrototype () const
 Returns the prototype of the instance.
IlBoolean update (const IlvGroup &)
 Updates the group (deep-inplace copy).

Friends

class IlvPrototype

Detailed Description

Clone of a prototype.

Library: ilvproto

IlvProtoInstance is a subclass of IlvGroup that represents instances of IlvPrototype. An IlvProtoInstance points to its prototype, and can automatically save (to a file) only the accessor values that have been changed with respect to its prototype.

See also:
IlvPrototype.

Constructor & Destructor Documentation

IlvProtoInstance::IlvProtoInstance ( const IlvProtoInstance source  ) 

Copies an existing instance.

The new instance is added to the prototype instance list. There is no other public constructor for IlvProtoInstance. Instances must be created by calling the IlvPrototype::clone method.


Member Function Documentation

IlUInt IlvProtoInstance::getModifiedValues ( IlvValueArray diffs,
IlBoolean  any = IlFalse 
) const

Computes the values that have been modified for this instance with respect to its prototype.

The list of these values is added to the end of the diffs table (if this table already contains elements, they will not be overwritten).

This method is used when saving prototype instances. Storing the modified values between a prototype and a prototype instance allows you to edit the prototype, and then propagate the improvements to all the instances of the prototype. This propagation is done with the update method. This has some restrictions: if the prototype evolves drastically, the modified values may no longer be relevant.

Parameters:
diffs Array of values that differ between the prototype and its instance.
any Set to IlTrue if the difference is to account for values of class IlvValueAnyType or other values whose type is unknown.
IlvPrototype* IlvProtoInstance::getPrototype (  )  const

Returns the prototype of the instance.

Returns:
The prototype of this instance.
IlBoolean IlvProtoInstance::update ( const IlvGroup source  )  [virtual]

Updates the group (deep-inplace copy).

Uses compareValues to store the differing values between this and source, replaces all the nodes and behaviors of this by those of source, and then reassigns the previously stored differing values to this (by calling changeValues. This method is mainly used to update IlvProtoInstances when a prototype is modified.

Parameters:
source Group to update from.
See also:
IlvPrototype, IlvProtoInstance.

Reimplemented from IlvGroup.

 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.