Abstract base class for containers and managerscode
/code>s.
More...
#include <ilviews/protos/groupholder.h>
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
.
◆ addGroup()
Adds an IlvGroup
to the container or manager attached to the group holder.
- Parameters
-
group | IlvGroup 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. |
unique | If 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
-
name | Name 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()
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
-
name | Name 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()
Returns all the groups contained in the holder.
- Parameters
-
count | On 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()
Removes an IlvGroup
from the container or manager attached to the group holder.
- Parameters
-
group | IlvGroup to be removed. |
destroy | If set to IlTrue , the group is destroyed. |