Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Clone of a prototype. More...
#include <ilviews/protos/proto.h>
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. | |
IlvPrototype * | getPrototype () const |
Returns the prototype of the instance. | |
IlBoolean | update (const IlvGroup &) |
Updates the group (deep-inplace copy). | |
Friends | |
class | IlvPrototype |
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.
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.
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.
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.
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 IlvProtoInstance
s when a prototype is modified.
source | Group to update from. |
Reimplemented from IlvGroup.
© 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.