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

ABSTRACT CLASSES //. More...

#include <PlotMSAction.h>

List of all members.

Public Types

enum  Type {
  SEL_FLAG,
  SEL_UNFLAG,
  SEL_LOCATE,
  SEL_INFO,
  SEL_CLEAR_REGIONS,
  ITER_FIRST,
  ITER_PREV,
  ITER_NEXT,
  ITER_LAST,
  TOOL_MARK_REGIONS,
  TOOL_SUBTRACT_REGIONS,
  TOOL_ZOOM,
  TOOL_PAN,
  TOOL_ANNOTATE_TEXT,
  TOOL_ANNOTATE_RECTANGLE,
  TRACKER_ENABLE_HOVER,
  TRACKER_ENABLE_DISPLAY,
  STACK_BACK,
  STACK_BASE,
  STACK_FORWARD,
  CACHE_LOAD,
  CACHE_RELEASE,
  MS_SUMMARY,
  PLOT,
  PLOT_EXPORT,
  HOLD_RELEASE_DRAWING,
  CLEAR_PLOTTER,
  QUIT
}
 Static //. More...

Public Member Functions

 PlotMSAction (Type type)
 Non-Static //.
 ~PlotMSAction ()
 Destructor.
Type type () const
 Returns the action type.
bool isValid () const
 Returns true if the action is valid or not.
void setParameter (const String &parameter, PlotMSPlot *value)
 Sets the given parameter to the given value.
void setParameter (const String &parameter, bool value)
void setParameter (const String &parameter, const String &value)
void setParameter (const String &parameter, int value)
void setParameter (const String &parameter, const vector< PMS::Axis > &value)
bool doAction (PlotMSApp *plotms)
 Performs the action, using the given PlotMSApp, and returns true for success or false or failure.
bool doActionWithResponse (PlotMSApp *plotms, Record &retval)
const StringdoActionResult () const
 Returns the result of doAction(), if applicable.

Static Public Member Functions

static bool requires (Type type, const String &parameter)
 Returns true if the given type requires the given parameter, false otherwise.

Static Public Attributes

static const String P_PLOT
 Parameter names.
static const String P_ON_OFF
static const String P_AXES
static const String P_FILE
static const String P_FORMAT
static const String P_HIGHRES
static const String P_DPI
static const String P_WIDTH
static const String P_HEIGHT
static const String P_INTERACTIVE

Private Member Functions

bool isDefinedPlot (const String &parameter) const
 Returns true if the given parameter is defined for the given type, false otherwise.
bool isDefinedBool (const String &parameter) const
bool isDefinedString (const String &parameter) const
bool isDefinedInt (const String &parameter) const
bool isDefinedAxes (const String &parameter) const
PlotMSPlotvaluePlot (const String &parameter)
 Returns the value for the given parameter.
const PlotMSPlotvaluePlot (const String &parameter) const
bool valueBool (const String &parameter) const
const StringvalueString (const String &parameter) const
int valueInt (const String &parameter) const
const vector< PMS::Axis > & valueAxes (const String &parameter) const

Private Attributes

Type itsType_
 Action type.
map< String, PlotMSPlot * > itsPlotValues_
 Action parameters.
map< String, bool > itsBoolValues_
map< String, StringitsStringValues_
map< String, int > itsIntValues_
map< String, vector< PMS::Axis > > itsAxesValues_
String itsDoActionResult_
 Result of doAction, if applicable.

Detailed Description

ABSTRACT CLASSES //.

Class that implements actions that operate on PlotMS. Actions get their type from the Type enum and their parameters (if needed) from mappings from Strings to values. Current parameter value types are: PlotMSPlot*, bool, String, int, and vector<PMS::Axis>.

Definition at line 50 of file PlotMSAction.h.


Member Enumeration Documentation

Static //.

Enum for implemented actions.

Enumerator:
SEL_FLAG 

Selection actions //.

Flag the selected regions. Operates on all visible canvases AT THE TIME of the call to doAction(). No required parameters.

SEL_UNFLAG 

Unflag the selected regions.

Operates on all visible canvases AT THE TIME of the call to doAction(). No required parameters.

SEL_LOCATE 

Locate on the selected regions.

Operates on all visible canvases AT THE TIME of the call to doAction(). No required parameters.

SEL_INFO 

Get metadata of points in the selected regions.

Operates on all visible canvases AT THE TIME of the call to doAction(). No required parameters.

SEL_CLEAR_REGIONS 

Clear the selected regions.

Operates on all visible canvases AT THE TIME of the call to doAction(). No required parameters.

ITER_FIRST 

Iteration actions //.

Go to the first page of iteration. No required parameters. NOT IMPLEMENTED.

ITER_PREV 

Go to the previous page of iteration.

No required parameters. NOT IMPLEMENTED.

ITER_NEXT 

Go to the next page of iteration.

No required parameters. NOT IMPLEMENTED.

ITER_LAST 

Go to the last page of iteration.

No required parameters. NOT IMPLEMENTED.

TOOL_MARK_REGIONS 

Tool actions //.

Turns on/off the mark regions tool. Operates on all canvases of all plots AT THE TIME of the call to doAction(). Only one of the mark regions, zoom, pan, and annotate tools can be turned on at one time. Required parameters: P_ON_OFF.

TOOL_SUBTRACT_REGIONS 

Turns on/off the subtract regions tool.

works like MARK REGIONS, but where user drags, all regions within are deleted. (note: CAS-1971 DSW)

TOOL_ZOOM 

Turns on/off the zoom tool.

Operates on all canvases of all plots AT THE TIME of the call to doAction(). Only one of the mark regions, zoom, pan, and annotate tools can be turned on at one time. Required parameters: P_ON_OFF.

TOOL_PAN 

Turns on/off the pan tool.

Operates on all canvases of all plots AT THE TIME of the call to doAction(). Only one of the mark regions, zoom, pan, and annotate tools can be turned on at one time. Required parameters: P_ON_OFF.

TOOL_ANNOTATE_TEXT 

Turns on/off the annotator tool's different modes.

Operates on all canvases of all plots AT THE TIME of the call to doAction(). Only one of the mark regions, zoom, pan, and annotate tools can be turned on at one time. Required parameters: P_ON_OFF.

TOOL_ANNOTATE_RECTANGLE 
TRACKER_ENABLE_HOVER 

Turns on/off the tracker tool hover function.

Operates on all canvases of all plots AT THE TIME of the call to doAction(). Required parameters: P_ON_OFF.

TRACKER_ENABLE_DISPLAY 

Turns on/off the tracker tool display function.

Operates on all canvases of all plots AT THE TIME of the call to doAction(). Required parameters: P_ON_OFF.

STACK_BACK 

Stack actions //.

Goes back in the zoom/pan stack. Operates on all visible canvases AT THE TIME of the call to doAction(). No required parameters.

STACK_BASE 

Goes to the base of the zoom/pan stack.

Operates on all visible canvases AT THE TIME of the call to doAction(). No required parameters.

STACK_FORWARD 

Goes forward in the zoom/pan stack.

Operates on all visible canvases AT THE TIME of the call to doAction(). No required parameters.

CACHE_LOAD 

Cache actions //.

Loads axes into the cache. Operates on a single PlotMSPlot. Required parameters: P_PLOT, P_AXES.

CACHE_RELEASE 

Releases axes from the cache.

Operates on a single PlotMSPlot. Required parameters: P_PLOT, P_AXES. NOT IMPLEMENTED.

MS_SUMMARY 

Plot actions //.

Display MS summary info for the current plot. Required parameters: P_PLOT.

PLOT 

Updates any set parameters, which updates the plots.

No required parameters.

PLOT_EXPORT 

Exports a single PlotMSPlot to a file.

If format isn't given, it is set using the file name. If DPI, width, or height aren't set or are < 0, the default is used. Required parameters: P_PLOT, P_FILE. Optional parameters: P_FORMAT, P_HIGHRES, P_DPI, P_WIDTH, P_HEIGHT.

HOLD_RELEASE_DRAWING 

Plotter actions //.

Holds/releases drawing for all canvases in the PlotMSPlotter. Required parameters: P_ON_OFF.

CLEAR_PLOTTER 

Clears all plots and canvases from the PlotMSPlotter.

No required parameters.

QUIT 

Quits PlotMS.

No required parameters.

Definition at line 55 of file PlotMSAction.h.


Constructor & Destructor Documentation

Non-Static //.

Constructor.

Destructor.


Member Function Documentation

Performs the action, using the given PlotMSApp, and returns true for success or false or failure.

Returns the result of doAction(), if applicable.

Usually this is used to return the error/reason why the action failed.

bool casa::PlotMSAction::doActionWithResponse ( PlotMSApp plotms,
Record retval 
)
bool casa::PlotMSAction::isDefinedAxes ( const String parameter) const [private]
bool casa::PlotMSAction::isDefinedBool ( const String parameter) const [private]
bool casa::PlotMSAction::isDefinedInt ( const String parameter) const [private]
bool casa::PlotMSAction::isDefinedPlot ( const String parameter) const [private]

Returns true if the given parameter is defined for the given type, false otherwise.

bool casa::PlotMSAction::isDefinedString ( const String parameter) const [private]

Returns true if the action is valid or not.

Invalid actions should not be executed.

static bool casa::PlotMSAction::requires ( Type  type,
const String parameter 
) [static]

Returns true if the given type requires the given parameter, false otherwise.

void casa::PlotMSAction::setParameter ( const String parameter,
PlotMSPlot value 
)

Sets the given parameter to the given value.

void casa::PlotMSAction::setParameter ( const String parameter,
bool  value 
)
void casa::PlotMSAction::setParameter ( const String parameter,
const String value 
)
void casa::PlotMSAction::setParameter ( const String parameter,
int  value 
)
void casa::PlotMSAction::setParameter ( const String parameter,
const vector< PMS::Axis > &  value 
)

Returns the action type.

const vector<PMS::Axis>& casa::PlotMSAction::valueAxes ( const String parameter) const [private]
bool casa::PlotMSAction::valueBool ( const String parameter) const [private]
int casa::PlotMSAction::valueInt ( const String parameter) const [private]
PlotMSPlot* casa::PlotMSAction::valuePlot ( const String parameter) [private]

Returns the value for the given parameter.

Not valid if the proper isDefined method returns false.

const PlotMSPlot* casa::PlotMSAction::valuePlot ( const String parameter) const [private]
const String& casa::PlotMSAction::valueString ( const String parameter) const [private]

Member Data Documentation

map<String, vector<PMS::Axis> > casa::PlotMSAction::itsAxesValues_ [private]

Definition at line 281 of file PlotMSAction.h.

Definition at line 278 of file PlotMSAction.h.

Result of doAction, if applicable.

Definition at line 285 of file PlotMSAction.h.

Definition at line 280 of file PlotMSAction.h.

Action parameters.

Definition at line 277 of file PlotMSAction.h.

Definition at line 279 of file PlotMSAction.h.

Action type.

Definition at line 273 of file PlotMSAction.h.

Definition at line 220 of file PlotMSAction.h.

Definition at line 224 of file PlotMSAction.h.

Definition at line 221 of file PlotMSAction.h.

Definition at line 222 of file PlotMSAction.h.

Definition at line 226 of file PlotMSAction.h.

Definition at line 223 of file PlotMSAction.h.

Definition at line 227 of file PlotMSAction.h.

Definition at line 219 of file PlotMSAction.h.

Parameter names.

Definition at line 218 of file PlotMSAction.h.

Definition at line 225 of file PlotMSAction.h.


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