rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Prototypes Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions | Friends
IlvSubGroupNode Class Reference

Group node handling a subgroup. More...

#include <ilviews/protos/group.h>

Inheritance diagram for IlvSubGroupNode:
IlvGroupNode IlvAccessible

Public Member Functions

 IlvSubGroupNode (IlvGroup *subGroup, const char *name=0, IlBoolean owner=IlTrue)
 Creates a new subgroup node containing the group subGroup. More...
 
virtual IlBoolean changeValue (const IlvValue &val)
 Changes the object's value. Both the name and the new value are contained in val. More...
 
virtual IlBoolean changeValues (const IlvValue *values, IlUShort count)
 Changes several values of an object in a single call. The default implementation calls changeValue for all values. More...
 
virtual IlUInt compareValues (const IlvAccessible *ref, IlvValue *values, IlUShort count, IlvValueArray &diffs) const
 Compares two objects and returns the differing attributes. More...
 
virtual IlvGroupNodecopy () const
 Returns a copy of the group node. More...
 
virtual void getAccessors (const IlSymbol *const **accessors, const IlvValueTypeClass *const **types, IlUInt &count) const
 Returns the names of all the accessors known by this object. More...
 
virtual const char * getName () const
 Returns the name of the group node. More...
 
virtual IlvGroupgetSubGroup () const
 Returns the subgroup associated with this node. More...
 
virtual IlBoolean isOutputValue (const IlSymbol *valueName) const
 Indicates whether value designates an accessor that can generate notifying values. More...
 
virtual IlvValuequeryValue (IlvValue &val) const
 Queries the value designated by value from the object. Both the value and the value type are stored in value. More...
 
virtual void queryValues (IlvValue *values, IlUShort count) const
 Queries several values in a single call. The default implementation calls queryValue for each value. More...
 
virtual void subscribe (IlvAccessible *subscriber, IlSymbol *sourceValue, IlSymbol *subscriberValue, IlvValueTypeClass *type, IlvValueSubscriptionMode mode=IlvValueSubscriptionChange)
 Subscribes the subscriber object to the value sourceValue of this object. More...
 
virtual void unSubscribe (IlvAccessible *subscriber, IlSymbol *sourceValue=0, IlSymbol *subscriberValue=0)
 Cancels subscriptions previously made. More...
 
virtual void write (IlvGroupOutputFile &) const
 Writes the group node to an IlvGroupOutputFile. More...
 
- Public Member Functions inherited from IlvGroupNode
 IlvGroupNode (const char *name=0)
 Creates a new group node with the provided name. More...
 
IlvGroupgetGroup () const
 Returns the group containing this group node, or 0 if the node has not yet been added to a group.
 
const char * getPath ()
 Returns the fully qualified path name of the node with respect to its top level group. More...
 
virtual void setName (const char *name)
 Sets the name of the node. More...
 
- Public Member Functions inherited from IlvAccessible
virtual IlUInt compareAllValues (const IlvAccessible *ref, IlvValueArray &diffs, IlBoolean any=IlFalse) const
 Compares two objects and returns the differing attributes. More...
 
virtual IlBoolean convertValues (IlvValue *v, IlUShort c, IlvDisplay *d) const
 Convert values to match the types defined by the object accessors. More...
 
IlUInt getSubscriptions (IlvAccessible *subscriber, IlSymbol **&sourceValue, IlSymbol **&subscriberValue, IlvValueTypeClass **&type, IlvValueSubscriptionMode *&mode, IlvAccessible ***subscribers=0) const
 Returns alls subscriptions made by subscriber. More...
 
virtual const IlvValueTypeClassgetValueType (const IlSymbol *s) const
 Returns the type of a given attribute. More...
 
virtual IlvValuepullValue (IlvValue &v) const
 See below.
 
virtual void pullValues (IlvValue *vals, IlUShort c) const
 Propagates value queries to the subscribers to this object. More...
 
virtual IlBoolean pushValue (const IlvValue &v) const
 See below.
 
virtual IlBoolean pushValues (const IlvValue *vals, IlUShort c) const
 Propagates value changes to the subscribers to this object. More...
 

Friends

class IlvGroup
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvGroupNode
static IlvGroupNoderead (IlvGroupInputFile &f, IlvDisplay *display)
 Reads a group node from an IlvGroupInputFile. More...
 

Detailed Description

Group node handling a subgroup.

Library: ilvproto

IlvSubGroupNode is a subclass of IlvGroupNode used to include subgroups in groups in order to create hierarchies of objects. A subgroup node will often contain an IlvProtoInstance object (to build a prototype containing an instance of another prototype, for example) but it can also contain an IlvGroup object that groups a set of objects in a prototype so that they can be modified simultaneously.

See Also
IlvGroup.

Constructor & Destructor Documentation

IlvSubGroupNode::IlvSubGroupNode ( IlvGroup subGroup,
const char *  name = 0,
IlBoolean  owner = IlTrue 
)

Creates a new subgroup node containing the group subGroup.

Parameters
subGroupThe subgroup that will be inserted in the group this group node belongs to.
nameIf non-null, the string is copied and stored as the node name. Otherwise, the name of the subgroup is used.
ownerIf set to IlTrue, the subgroup will be deleted when the node is deleted (or when the group containing the node is deleted).

Member Function Documentation

virtual IlBoolean IlvSubGroupNode::changeValue ( const IlvValue v)
virtual

Changes the object's value. Both the name and the new value are contained in val.

Parameters
vThe value to be set (both name and value).
Returns
Whether the object considered the operation successful or not.

Reimplemented from IlvAccessible.

virtual IlBoolean IlvSubGroupNode::changeValues ( const IlvValue v,
IlUShort  c 
)
virtual

Changes several values of an object in a single call. The default implementation calls changeValue for all values.

Parameters
vThe changed values (both name and values).
cThe number of values.
Returns
Whether the object considered the operation successful or not.

Reimplemented from IlvAccessible.

virtual IlUInt IlvSubGroupNode::compareValues ( const IlvAccessible ref,
IlvValue values,
IlUShort  count,
IlvValueArray diffs 
) const
virtual

Compares two objects and returns the differing attributes.

Compares the values of accessors known by this object with the corresponding values in the object ref. The values that differ are stored in diffs. The values stored are taken from the calling object (this), not from ref. The first method calls the getAccessors method to get the list of all known accessors, while the second only compares the provided values. Then, both methods call compareValues to actually compare the values.

Returns
The number of differing attributes.
Parameters
refThe object to compare to.
anySpecifies whether to compare values of unknown types and pointer types.
diffsThe differing attributes.
valuesThe attributes to compare in both objects.
countThe number of attributes to compare.

Reimplemented from IlvAccessible.

virtual IlvGroupNode* IlvSubGroupNode::copy ( ) const
virtual

Returns a copy of the group node.

Should be implemented by subclasses. Whether the data they hold is shared is left to the implementation.

Returns
A copy of the group node.

Implements IlvGroupNode.

virtual void IlvSubGroupNode::getAccessors ( const IlSymbol *const **  a,
const IlvValueTypeClass *const **  t,
IlUInt c 
) const
virtual

Returns the names of all the accessors known by this object.

Subclasses of IlvAccessible must override this method by calling the static method DeclareAccessor for each accessor handled by the subclass. The returned arrays are filled by the method and must not be freed.

Parameters
aPointer to an array filled on return with the names of the accessors defined for the object.
tPointer to an array filled on return with the type of each accessor.
cNumber of accessors, set by the method.

Implements IlvAccessible.

virtual const char* IlvSubGroupNode::getName ( ) const
virtual

Returns the name of the group node.

If a name was explicitly specified when the node was created, or if the setName method was called, this name is returned. Otherwise, a subclass-dependent method is used to find a default node name.

Returns
Name of the group node.

Reimplemented from IlvGroupNode.

virtual IlvGroup* IlvSubGroupNode::getSubGroup ( ) const
virtual

Returns the subgroup associated with this node.

Returns
The subgroup associated with this node or 0 if there is none.

Reimplemented from IlvGroupNode.

virtual IlBoolean IlvSubGroupNode::isOutputValue ( const IlSymbol value) const
virtual

Indicates whether value designates an accessor that can generate notifying values.

Returns
IlTrue if value designates an accessor that can generate notifying values, that is, a value for which pushValue calls may be issued. The default implementation returns IlFalse. Subclasses such as IlvAccessorHolder redefine this method.
Parameters
valueName of the accessor.
See Also
pushValue.

Reimplemented from IlvAccessible.

virtual IlvValue& IlvSubGroupNode::queryValue ( IlvValue value) const
virtual

Queries the value designated by value from the object. Both the value and the value type are stored in value.

Parameters
valueThe queried value name.
Returns
The value passed in argument, set to the object value.

Reimplemented from IlvAccessible.

virtual void IlvSubGroupNode::queryValues ( IlvValue v,
IlUShort  c 
) const
virtual

Queries several values in a single call. The default implementation calls queryValue for each value.

Parameters
vThe array of value names to be queried
cThe number of values to be queried.

Reimplemented from IlvAccessible.

virtual void IlvSubGroupNode::subscribe ( IlvAccessible subscriber,
IlSymbol sourceValue,
IlSymbol subscriberValue,
IlvValueTypeClass type,
IlvValueSubscriptionMode  mode = IlvValueSubscriptionChange 
)
virtual

Subscribes the subscriber object to the value sourceValue of this object.

After this subscription, every call to this object pushValue method with a value name of sourceValue will cause the subscriber changeValue method to be called with the value name subscriberValue, and with the value data passed to the initial pushValue call of the value source. The type parameter specifies the type of the sourceValue and subscriberValue values. An IlvAccessible object can subscribe several times to another IlvAccessible object for different source values and/or subscriber values, but it may not subscribe several times to the same object and subscriber values. The mode argument specifies whether the subscriber wants to be notified of value changes (this is the default mode IlvValueSubscriptionChange), or if it wants to be notified of value queries (mode IlvValueSubscriptionQuery). In this last case, the source object notifies its subscribers of calls to pullValue instead of pushValue by calling queryValue instead of changeValue.

Parameters
subscriberThe object to be notified of accesses to sourceValue.
sourceValueThe name of the attribute to be observed by the subscription.
subscriberValueThe name of the attribute to be notified in the subscriber.
typeThe expected value type to be pushed to the subscriber.
modeThe type of access to sourceValue to be reported to subscriber.
See Also
IlvValueSubscriptionMode

Reimplemented from IlvAccessible.

virtual void IlvSubGroupNode::unSubscribe ( IlvAccessible subscriber,
IlSymbol sourceValue = 0,
IlSymbol subscriberValue = 0 
)
virtual

Cancels subscriptions previously made.

Cancels the subscription of the subscriber object to the specified sourceValue and subscriberValue. If sourceValue is 0, the subscriptions of subscriber to all source values are cancelled. If subscriberValue is 0, the subscriptions of subscriber for all subscriber values are removed. If both are 0, all subscriptions of subscriber to this source object are cancelled.

Parameters
subscriberThe object that is to be notified of accesses to sourceValue.
sourceValueThe name of the attribute to be observed by the subscription.
subscriberValueThe name of the attribute to be notified in the subscriber.

Reimplemented from IlvAccessible.

virtual void IlvSubGroupNode::write ( IlvGroupOutputFile f) const
virtual

Writes the group node to an IlvGroupOutputFile.

Must be overridden by subclasses to save specific information.

Parameters
fGroup output file holding reference information on the group being read.

Reimplemented from IlvGroupNode.


© 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.