casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Types | Private Attributes
casa::PlotMSRegions Class Reference

PlotMSRegions is a class that holds information about selected regions for a single PlotMSPlot. More...

#include <PlotMSRegions.h>

List of all members.

Public Member Functions

 PlotMSRegions ()
 Constructor, which creates an empty selection.
 ~PlotMSRegions ()
 Destructor.
Vector< pair< PMS::Axis,
PMS::Axis > > 
allAxisPairs () const
 Returns all axis pairs that have regions.
bool hasRegionsFor (PMS::Axis x, PMS::Axis y) const
 Returns whether or not there are regions for the given (x, y) axis pair.
Vector< PlotMSRegionregionsFor (PMS::Axis x, PMS::Axis y) const
 Returns a copy of the regions for the given (x, y) axis pair.
void addRegions (PMS::Axis x, PMS::Axis y, const vector< PlotMSRegion > &r)
 Adds the given regions for the given (x, y) axis pair.
void addRegions (PMS::Axis x, PMS::Axis y, const Vector< PlotMSRegion > &r)
void addRegions (PMS::Axis x, PMS::Axis y, PlotCanvasPtr canvas)
 Convenience method for adding all selected regions using the standard select tool on the given canvas for the given (x, y) axis pair.
void setRegions (PMS::Axis x, PMS::Axis y, const vector< PlotMSRegion > &r)
 Sets the regions for the given (x, y) axis pair to the given.
void setRegions (PMS::Axis x, PMS::Axis y, const Vector< PlotMSRegion > &r)
void setRegions (PMS::Axis x, PMS::Axis y, PlotCanvasPtr canvas)
 Convenience method for setting the regions for the given (x, y) axis pair using the standard select tool on the given canvas.
void clearRegions (PMS::Axis x, PMS::Axis y)
 Clears the regions for the given (x, y) axis pair.

Private Types

typedef map< pair< PMS::Axis,
PMS::Axis >, Vector
< PlotMSRegion > > 
PMSRMap
 Convenience macro for map type.

Private Attributes

PMSRMap itsRegions_
 Map from (x, y) to selected regions.

Detailed Description

PlotMSRegions is a class that holds information about selected regions for a single PlotMSPlot.

Because PlotMSPlot can have potentially many different plots across potentially many different canvases, it is important that PlotMSRegions be general enough to handle many different cases.

Definition at line 112 of file PlotMSRegions.h.


Member Typedef Documentation

typedef map<pair<PMS::Axis, PMS::Axis>, Vector<PlotMSRegion> > casa::PlotMSRegions::PMSRMap [private]

Convenience macro for map type.

Definition at line 159 of file PlotMSRegions.h.


Constructor & Destructor Documentation

Constructor, which creates an empty selection.

Destructor.


Member Function Documentation

void casa::PlotMSRegions::addRegions ( PMS::Axis  x,
PMS::Axis  y,
const vector< PlotMSRegion > &  r 
) [inline]

Adds the given regions for the given (x, y) axis pair.

Will not remove any existing regions for that pair. Only adds unique regions.

Definition at line 133 of file PlotMSRegions.h.

void casa::PlotMSRegions::addRegions ( PMS::Axis  x,
PMS::Axis  y,
const Vector< PlotMSRegion > &  r 
)
void casa::PlotMSRegions::addRegions ( PMS::Axis  x,
PMS::Axis  y,
PlotCanvasPtr  canvas 
)

Convenience method for adding all selected regions using the standard select tool on the given canvas for the given (x, y) axis pair.

Vector<pair<PMS::Axis, PMS::Axis> > casa::PlotMSRegions::allAxisPairs ( ) const

Returns all axis pairs that have regions.

void casa::PlotMSRegions::clearRegions ( PMS::Axis  x,
PMS::Axis  y 
)

Clears the regions for the given (x, y) axis pair.

bool casa::PlotMSRegions::hasRegionsFor ( PMS::Axis  x,
PMS::Axis  y 
) const

Returns whether or not there are regions for the given (x, y) axis pair.

Vector<PlotMSRegion> casa::PlotMSRegions::regionsFor ( PMS::Axis  x,
PMS::Axis  y 
) const

Returns a copy of the regions for the given (x, y) axis pair.

void casa::PlotMSRegions::setRegions ( PMS::Axis  x,
PMS::Axis  y,
const vector< PlotMSRegion > &  r 
) [inline]

Sets the regions for the given (x, y) axis pair to the given.

Removes any existing regions for that pair. Only adds unique regions.

Definition at line 145 of file PlotMSRegions.h.

void casa::PlotMSRegions::setRegions ( PMS::Axis  x,
PMS::Axis  y,
const Vector< PlotMSRegion > &  r 
)
void casa::PlotMSRegions::setRegions ( PMS::Axis  x,
PMS::Axis  y,
PlotCanvasPtr  canvas 
)

Convenience method for setting the regions for the given (x, y) axis pair using the standard select tool on the given canvas.


Member Data Documentation

Map from (x, y) to selected regions.

Definition at line 162 of file PlotMSRegions.h.


The documentation for this class was generated from the following file: