pw:: Group

Group type

Derives From

pw::Entity

Summary
Group type
This action creates a new group object.
This action gets a list of all of the current groups.
This action gets a group with a given name.
This action sets the entity type of the group.
This action deletes this group.
This action adds one or more entities to a group.
This action removes one or more entities from a group.
This action returns true if the group contains an entity.
This action returns the number of entities in a group.
This action gets an entity from the group.
This action returns all the entities in a group as a list.
This action removes all entities from the group.

Static Actions

create

pw::Group create

This action creates a new group object.

Parameters

None

Returns

This action returns a new pw::Group object.

getAll

pw::Group getAll

This action gets a list of all of the current groups.

Parameters

-type groupTypeThis optional parameter is used to filter the result groups to a specific type. groupType must be one of pw::Connector, pw::Domain, pw::Block or pw::DatabaseEntity.

Returns

This action returns a list of pw::Group objects.

getByName

pw::Group getByName name

This action gets a group with a given name.

Parameters

nameThis parameter is the name of the group.

Returns

This action returns a pw::Group object.

Instance Attributes

EntityType

$group set/getEntityType type

This action sets the entity type of the group.

Type

This attribute is a glyph class name, one of pw::Connector, pw::Domain, pw::Block or pw::DatabaseEntity.

Default

The default value for this attribute is undefined.

Information

The entity type must be set before any entities can be added to the group.  If the entity type has not been set, getEntityType will result in an error.

Instance Actions

delete

$group delete

This action deletes this group.

Parameters

None

Returns

This action returns nothing.

addEntity

$group addEntity entity_list

This action adds one or more entities to a group.

Parameters

entity_listThis parameter is a glyph entity or list of entities to add to the group and must be of the type specified by <setEntityType>

Returns

This action returns a boolean, which is true if at least one entity was added to the group.

removeEntity

$group removeEntity entity_list

This action removes one or more entities from a group.

Parameters

entity_listThis parameter is a glyph entity or list of entities to remove from the group.

Returns

This action returns a boolean, which is true if the entities were removed from the group.

contains

$group contains entity ?entity ...?

This action returns true if the group contains an entity.

Parameters

entityThis parameter is a glyph entity.

Returns

This action returns a boolean, which is true if the group contains the entity.

getEntityCount

$group getEntityCount

This action returns the number of entities in a group.

Parameters

None

Returns

This action returns an <int>, which is the number of entities in the group.

getEntity

$group getEntity index

This action gets an entity from the group.

Parameters

indexThis parameter is the index of the entity to get with the range [1, number of entities].

Returns

This action returns a pw::Connector, pw::Domain, pw::Block or pw::DatabaseEntity depending on the type of group.

getEntityList

$group getEntityList

This action returns all the entities in a group as a list.

Parameters

None

Returns

This action returns a Tcl list of pw::Connector, pw::Domain, pw::Block or pw::DatabaseEntity depending on the type of group.

removeAll

$group removeAll

This action removes all entities from the group.

Parameters

None

Returns

This action returns nothing.

pw::Group create
This action creates a new group object.
pw::Group getAll
This action gets a list of all of the current groups.
pw::Group getByName name
This action gets a group with a given name.
$group set/getEntityType type
This action sets the entity type of the group.
$group delete
This action deletes this group.
$group addEntity entity_list
This action adds one or more entities to a group.
$group removeEntity entity_list
This action removes one or more entities from a group.
$group contains entity ?entity ...?
This action returns true if the group contains an entity.
$group getEntityCount
This action returns the number of entities in a group.
$group getEntity index
This action gets an entity from the group.
$group getEntityList
This action returns all the entities in a group as a list.
$group removeAll
This action removes all entities from the group.
Entity type
Group type
Connector type
Domain type
Block type
Base type for all database entities
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.