GraphicGroup Class Reference

GraphicGroup is a graphic object which contains zero or more GraphicObjects. More...

#include <GraphicGroup.h>

Inheritance diagram for GraphicGroup:

Inheritance graph

List of all members.

Public Member Functions

virtual GraphicObjectaddObject (GraphicObjectType type, LocationType point=LocationType())=0
virtual const std::list
< GraphicObject * > & 
getObjects () const =0
virtual void insertObject (GraphicObject *pObject)=0
virtual bool removeObject (GraphicObject *pObject, bool bDelete)=0
virtual void removeAllObjects (bool bDelete)=0
virtual bool hasObject (GraphicObject *pObject)=0

Static Public Member Functions

static const std::string & signalObjectAdded ()
static const std::string & signalObjectRemoved ()
static const std::string & signalObjectChanged ()

Protected Member Functions

virtual ~GraphicGroup ()


Detailed Description

GraphicGroup is a graphic object which contains zero or more GraphicObjects.

This subclass of Subject will notify upon the following conditions:

Definition at line 24 of file GraphicGroup.h.


Constructor & Destructor Documentation

virtual GraphicGroup::~GraphicGroup (  )  [protected, virtual]

This should be destroyed by calling GraphicLayer::removeObject.

Definition at line 124 of file GraphicGroup.h.


Member Function Documentation

static const std::string& GraphicGroup::signalObjectAdded (  )  [static]

Emitted with any<GraphicObject*> when an object is added to the group.

Definition at line 30 of file GraphicGroup.h.

static const std::string& GraphicGroup::signalObjectRemoved (  )  [static]

Emitted with any<GraphicObject*> when an object is about to be removed from the group.

Definition at line 36 of file GraphicGroup.h.

static const std::string& GraphicGroup::signalObjectChanged (  )  [static]

Emitted with any<GraphicProperty*> when a property of an object is changed.

Definition at line 41 of file GraphicGroup.h.

virtual GraphicObject* GraphicGroup::addObject ( GraphicObjectType  type,
LocationType  point = LocationType() 
) [pure virtual]

Creates and inserts an object of the specified type.

Parameters:
type The type of object to add.
point The starting point of the object.
Returns:
The added object. The group owns this object.
Subject Notifications:
This method will notify signalObjectAdded() with any<GraphicObject*>.

virtual const std::list<GraphicObject*>& GraphicGroup::getObjects (  )  const [pure virtual]

Returns a list of all objects within the group.

Returns:
A list containing all objects that the group contains.

virtual void GraphicGroup::insertObject ( GraphicObject pObject  )  [pure virtual]

Inserts an already existing object into the group.

The group takes ownership over this object. It is the caller's responsibility to ensure that no other objects claim ownership of the object.

Parameters:
pObject The object to insert.
Subject Notifications:
This method will notify signalObjectAdded() with any<GraphicObject*>.

virtual bool GraphicGroup::removeObject ( GraphicObject pObject,
bool  bDelete 
) [pure virtual]

Removes an object from the group.

Parameters:
pObject The object to remove.
bDelete Whether or not to delete the object. If true, the object will be deleted. If false, ownership of the object is transfered to the caller.
Returns:
Returns true if the object was successfully removed from the group, otherwise returns false.
Subject Notifications:
This method will notify signalObjectRemoved() with any<GraphicObject*>.

virtual void GraphicGroup::removeAllObjects ( bool  bDelete  )  [pure virtual]

Remove all objects from the group.

Parameters:
bDelete Whether or not to delete the objects. If true, the objects will be deleted. If false, ownership of the object is transfered to the caller.

virtual bool GraphicGroup::hasObject ( GraphicObject pObject  )  [pure virtual]

Queries whether the object is contained by this group.

Parameters:
pObject The object to find.
Returns:
Returns true if the object is contained, otherwise returns false.


Software Development Kit - Opticks 4.9.0 Build 16218