CurveCollection Class Reference

Curve plot objects grouped into a single plot object. More...

#include <CurveCollection.h>

Inheritance diagram for CurveCollection:

Inheritance graph

List of all members.

Public Member Functions

virtual CurveaddCurve ()=0
virtual const std::vector
< Curve * > & 
getCurves () const =0
virtual unsigned int getNumCurves () const =0
virtual bool deleteCurve (Curve *pCurve)=0
virtual void clear ()=0
virtual void setColor (const ColorType &collectionColor)=0
virtual ColorType getColor () const =0
virtual void setLineWidth (int iWidth)=0
virtual int getLineWidth () const =0
virtual void setLineStyle (const LineStyle &lineStyle)=0
virtual LineStyle getLineStyle () const =0

Static Public Member Functions

static const std::string & signalCurveAdded ()
static const std::string & signalCurveDeleted ()

Protected Member Functions

virtual ~CurveCollection ()


Detailed Description

Curve plot objects grouped into a single plot object.

This subclass of Subject will notify upon the following conditions:

See also:
Curve

PlotObject

Definition at line 34 of file CurveCollection.h.


Constructor & Destructor Documentation

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

This should be destroyed by calling PlotView::deleteObject.

Definition at line 168 of file CurveCollection.h.


Member Function Documentation

static const std::string& CurveCollection::signalCurveAdded (  )  [static]

Emitted with any<Curve*> when a Curve is added.

Definition at line 40 of file CurveCollection.h.

static const std::string& CurveCollection::signalCurveDeleted (  )  [static]

Emitted with any<Curve*> when a Curve is removed.

Definition at line 44 of file CurveCollection.h.

virtual Curve* CurveCollection::addCurve (  )  [pure virtual]

Adds a curve to the collection.

Returns:
A pointer to the newly created Curve.
Subject Notifications:
signalCurveAdded with any<Curve*>

virtual const std::vector<Curve*>& CurveCollection::getCurves (  )  const [pure virtual]

Retrieves all curves in the collection.

Returns:
A reference to a vector containing pointers to the curves in the collection.

virtual unsigned int CurveCollection::getNumCurves (  )  const [pure virtual]

Returns the number of curves in the collection.

Returns:
A number of curves currently in the collection.

virtual bool CurveCollection::deleteCurve ( Curve pCurve  )  [pure virtual]

Removes a curve from the collection and deletes it.

Parameters:
pCurve The curve to delete. Cannot be NULL.
Returns:
TRUE if the curve was successfully removed from the collection and deleted. FALSE is returned if the curve is not found in the collection.
Subject Notifications:
signalCurveDeleted with any<Curve*>

virtual void CurveCollection::clear (  )  [pure virtual]

Removes all curves from the collection and deletes them.

Subject Notifications:
signalCurveDeleted with any<Curve*> for each curve

virtual void CurveCollection::setColor ( const ColorType collectionColor  )  [pure virtual]

Sets the color of all curves in the collection.

This method applies a single color to all curves in the collection. The color of a single curve can also be changed directly on the Curve.

Parameters:
collectionColor The new curve color.
See also:
Curve::setColor()

virtual ColorType CurveCollection::getColor (  )  const [pure virtual]

Returns the color of the curves in the collection.

Returns:
The color of all curves in the collection. If the curves have different colors, an invalid color is returned.
See also:
ColorType::isValid()

virtual void CurveCollection::setLineWidth ( int  iWidth  )  [pure virtual]

Sets the line width of all curves in the collection.

This method applies a single line width to all curves in the collection. The line width of a single curve can also be changed directly on the Curve.

Parameters:
iWidth The new curve line width.
Subject Notifications:
Subject::signalModified
See also:
Curve::setLineWidth()

virtual int CurveCollection::getLineWidth (  )  const [pure virtual]

Returns the line width of the curves in the collection.

Returns:
The line width of all curves in the collection. If the curves have different line widths, a value of -1 is returned.

virtual void CurveCollection::setLineStyle ( const LineStyle lineStyle  )  [pure virtual]

Sets the line style of all curves in the collection.

This method applies a single line style to all curves in the collection. The line style of a single curve can also be changed directly on the Curve.

Parameters:
lineStyle The new curve line style.
Subject Notifications:
Subject::signalModified
See also:
LineStyle

Curve::setLineStyle()

virtual LineStyle CurveCollection::getLineStyle (  )  const [pure virtual]

Returns the line style of the curves in the collection.

Returns:
The line style of all curves in the collection. If the curves have different line widths, the value is undefined.


Software Development Kit - Opticks 4.9.0 Build 16218