Rogue Wave Views
Prototypes Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Static Public Member Functions
IlvGroupHolder Class Reference

Abstract base class for containers and managerscode/code>s. More...

#include <ilviews/protos/groupholder.h>

Inheritance diagram for IlvGroupHolder:
IlvNamedProperty IlvValueInterface

Public Member Functions

virtual void addGroup (IlvGroup *group, IlBoolean unique=IlTrue)
 Adds an IlvGroup to the container or manager attached to the group holder. More...
 
virtual IlUInt checkUniqueName (const char *name) const
 Checks that a given name is unique within an IlvGraphicHolder and returns the value used to provide the unique name if needed. More...
 
virtual IlvGroupgetGroup (const char *name) const
 Returns the group with the name name. More...
 
virtual IlvGroup ** getGroups (IlUInt &count) const
 Returns all the groups contained in the holder. More...
 
virtual void removeGroup (IlvGroup *group, IlBoolean destroy=IlFalse)
 Removes an IlvGroup from the container or manager attached to the group holder. More...
 

Static Public Member Functions

static IlvGroupHolderGet (IlvContainer *ctn)
 See below.
 
static IlvGroupHolderGet (IlvManager *mgr)
 See below.
 
static IlvGroupHolderGet (IlvGraphicHolder *holder)
 Returns the group holder associated with the IlvGraphicHolder. More...
 

Detailed Description

Abstract base class for containers and managerscode/code>s.

Library: ilvproto
This class lets you handle setscode/code> objects in a container or manager. Classes of name IlvProto*[Container|Manager|Grapher] implement the same interface through specialized subclasses of IlvProtoHolderInterface.

See also
IlvAccessorHolder, IlvGroup, IlvProtoGraphic, IlvContainer, IlvManager, IlvGrapher.

Member Function Documentation

§ addGroup()

virtual void IlvGroupHolder::addGroup ( IlvGroup group,
IlBoolean  unique = IlTrue 
)
virtual

Adds an IlvGroup to the container or manager attached to the group holder.

Parameters
groupIlvGroup to be added. If the manager or container does not handle group objects directly, the group will be encapsulated in an IlvProtoGraphic object. If the name of the group already exists, it will assign the group a unique name.
uniqueIf set to IlTrue, the name of the group may be modified to ensure that the object name is unique.
See also
IlvProtoGraphic, checkUniqueName.

§ checkUniqueName()

virtual IlUInt IlvGroupHolder::checkUniqueName ( const char *  name) const
virtual

Checks that a given name is unique within an IlvGraphicHolder and returns the value used to provide the unique name if needed.

Parameters
nameName to be checked for uniqueness.
Returns
0 if the name is unique. Otherwise, it returns an integer that, concatenated to the given name, will ensure the name is unique. For instance, if on input name is "IlvGroup" and there are already objects of name "IlvGroup" and "IlvGroup_1" in the holder, the method will return 2, indicating that the name "IlvGroup_2" is available to be assigned as a unique name.

§ Get()

static IlvGroupHolder* IlvGroupHolder::Get ( IlvGraphicHolder holder)
static

Returns the group holder associated with the IlvGraphicHolder.

Returns
A group holder that is created and that lets you access all group objects associated with the IlvGraphicHolder. This holder will be deleted along with its associated container or manager if these are deleted.
See also
IlvManager, IlvContainer.

§ getGroup()

virtual IlvGroup* IlvGroupHolder::getGroup ( const char *  name) const
virtual

Returns the group with the name name.

Parameters
nameName of the group to be retrieved. IlvGroup objects should have a unique name allowing them to be identified within a manager or container.
Returns
The first group found with the name name, or 0 if none is found.

§ getGroups()

virtual IlvGroup** IlvGroupHolder::getGroups ( IlUInt count) const
virtual

Returns all the groups contained in the holder.

Parameters
countOn return, this integer is set to the size of the returned array.
Returns
An array of pointers to IlvGroup objects of size count. This array should be deleted with delete[] when it is no longer needed.

§ removeGroup()

virtual void IlvGroupHolder::removeGroup ( IlvGroup group,
IlBoolean  destroy = IlFalse 
)
virtual

Removes an IlvGroup from the container or manager attached to the group holder.

Parameters
groupIlvGroup to be removed.
destroyIf set to IlTrue, the group is destroyed.

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