casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
PlotFactory.h
Go to the documentation of this file.
00001 //# PlotFactory.h: Class to produce implementation-specific plotting objects.
00002 //# Copyright (C) 2008
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: $
00027 #ifndef PLOTFACTORY_H_
00028 #define PLOTFACTORY_H_
00029 
00030 #include <graphics/GenericPlotter/Plot.h>
00031 #include <graphics/GenericPlotter/PlotAnnotation.h>
00032 #include <graphics/GenericPlotter/PlotCanvas.h>
00033 #include <graphics/GenericPlotter/PlotCanvasLayout.h>
00034 #include <graphics/GenericPlotter/PlotData.h>
00035 #include <graphics/GenericPlotter/PlotOperation.h>
00036 #include <graphics/GenericPlotter/PlotOptions.h>
00037 #include <graphics/GenericPlotter/PlotShape.h>
00038 #include <graphics/GenericPlotter/Plotter.h>
00039 #include <graphics/GenericPlotter/PlotTool.h>
00040 
00041 #include <utility>
00042 
00043 #include <casa/namespace.h>
00044 
00045 namespace casa {
00046 
00047 // The idea behind a plot factory is to produce classes that are useful to
00048 // the underlying implementation without having to know what the implementation
00049 // is.  A PlotFactory provides for creation of plot items with the given
00050 // parameters in the given implementation.  Methods that have a "smartDelete"
00051 // parameter pass that flag into the smart pointer constructor, to indicate
00052 // whether the underlying object is deleted upon destruction of all smart
00053 // pointers or not.
00054 class PlotFactory {
00055 public:
00056     // Constructor.
00057     PlotFactory();
00058     
00059     // Destructor.
00060     virtual ~PlotFactory();
00061     
00062     
00063     // Support Methods //
00064 
00065     // Returns true if this implementation's PlotCanvas subclass supports
00066     // threaded drawing, false otherwise.  Threaded drawing is done using a
00067     // threading library appropriate to the implementation, and keeps progress
00068     // information synchronized across threads by using PlotOperation objects
00069     // unique to each canvas (see PlotCanvas::operationDraw()).
00070     virtual bool canvasHasThreadedDrawing() const = 0;
00071     
00072     // Returns true if this implementation's PlotCanvas subclass supports
00073     // cached layer drawing, false otherwise.  Cached layer drawing means that
00074     // items that are changed in one layer will ONLY cause a redraw of that
00075     // layer, and the others are cached and thus do not need to be redrawn.
00076     virtual bool canvasHasCachedLayerDrawing() const = 0;
00077     
00078     // Returns true if this implementation's PlotCanvas subclass has a cached
00079     // axes stack, false otherwise.  Cached axes stack means that the part of
00080     // the canvas for a given axes range is cached after the first time it is
00081     // drawn, so that if the ranges are set to a cached value in the future it
00082     // will not have to be redrawn.  This is useful for, for example, caching
00083     // the zoom/pan stack to move quickly along axes ranges already seen.  Note
00084     // that the cached axes stack will need to be invalidated as needed when
00085     // plot items on the canvas change and thus require a redraw.
00086     virtual bool canvasHasCachedAxesStack() const = 0;
00087     
00088     
00089     // Execution Methods //
00090     
00091     // Enters the GUI execution loop, if necessary, and returns the result.
00092     virtual int execLoop() = 0;
00093     
00094     // Return which implementation this factory is producing.
00095     virtual Plotter::Implementation implementation() const = 0;
00096     
00097     
00098     // GUI Objects //
00099     
00100     // Return a new instance of a Plotter for this implementation with the
00101     // given parameters.  The plotter's window title is set to the given.  If
00102     // showSingleCanvas is true, then the plotter is created with a single
00103     // canvas; otherwise it has no canvases.  If showGUI is true then the
00104     // plotter GUI will be shown after creation.  If log event flags are given
00105     // (bitwise or of PlotLogger::Event) they are passed to the plotter.
00106     virtual PlotterPtr plotter(const String& windowTitle = "Plotter",
00107             bool showSingleCanvas = true, bool showGUI = true,
00108             int logEventFlags = PlotLogger::NO_EVENTS,
00109             bool smartDelete = true) const = 0;
00110     
00111     // Return a new instance of a Plotter for this implementation, with the
00112     // given rows and columns of canvases and parameters.  The plotter's window
00113     // title is set to the given.  If showGUI is true then the plotter GUI will
00114     // be shown after creation.  If log event flags are given (bitwise or of
00115     // PlotLogger::Event) they are passed to the plotter.
00116     virtual PlotterPtr plotter(unsigned int nrows, unsigned int ncols,
00117             const String& windowTitle = "Plotter", bool showGUI = true,
00118             int logEventFlags = PlotLogger::NO_EVENTS,
00119             bool smartDelete = true) const = 0;
00120     
00121     // Convenience method for creating a plotter with a single, given canvas.
00122     // The plotter's window title is set to the given.  If showGUI is true then
00123     // the plotter GUI will be shown after creation.  If log event flags are
00124     // given (bitwise or of PlotLogger::Event) they are passed to the plotter.
00125     // DEFAULT IMPLEMENTATION.
00126     virtual PlotterPtr plotter(PlotCanvasPtr canvas,
00127             const String& windowTitle = "Plotter", bool showGUI = true,
00128             int logEventFlags = PlotLogger::NO_EVENTS,
00129             bool smartDelete = true);
00130     
00131     // Return a new instance of a PlotCanvas for this implementation.
00132     virtual PlotCanvasPtr canvas(bool smartDelete = true) const = 0;
00133     
00134     // Return a new instance of a PlotPanel for this implementation.
00135     virtual PlotPanelPtr panel(bool smartDelete = true) const = 0;
00136     
00137     // Return a new instance of a PlotButton with the given text for this
00138     // implementation.  If isText is true, the given string should be
00139     // displayed on the button as text; otherwise it is a path to an image
00140     // file.  If toggleable is true, then a toggleable button is returned.
00141     virtual PlotButtonPtr button(const String& str, bool isText = true,
00142             bool toggleable = false, bool smartDelete = true) const = 0;
00143     
00144     // Return a new instance of a PlotCheckbox with the given text for this
00145     // implementation.
00146     virtual PlotCheckboxPtr checkbox(const String& str,
00147             bool smartDelete = true) const = 0;
00148     
00149     
00150     // PlotItem Objects //
00151     
00152     // Returns a new instance of a ScatterPlot for this implementation with
00153     // the given PlotPointData.  IMPORTANT: the returned ScatterPlot should be
00154     // of the correct type to handle the given data.  For example, if the data
00155     // is of type PlotMaskedPointData, the returned scatter plot should be able
00156     // to be cast to a MaskedScatterPlot, and similarly for PlotErrorData and
00157     // ErrorPlot.  If the given data is both masked and error, the returned
00158     // plot should be able to handle both as well.
00159     virtual ScatterPlotPtr scatterPlot(PlotPointDataPtr data,
00160             const String& title = "Scatter Plot",
00161             bool smartDelete = true) const = 0;
00162     
00163     // Convenience methods for specialized scatter plot and data classes.
00164     // Since the scatterPlot method should be able to handle the different
00165     // subclasses of data and return something of the proper type, this should
00166     // be fine.
00167     // DEFAULT IMPLEMENTATION.
00168     // <group>
00169     virtual MaskedScatterPlotPtr maskedPlot(PlotMaskedPointDataPtr data,
00170             const String& title = "Masked Plot", bool smartDelete= true) const;
00171     virtual ErrorPlotPtr errorPlot(PlotErrorDataPtr data,
00172             const String& title = "Error Plot", bool smartDelete= true) const;
00173     virtual ColoredPlotPtr coloredPlot(PlotBinnedDataPtr data,
00174             const String& title = "Colored Plot", bool smartDelete=true) const;
00175     // </group>
00176     
00177     // Returns a new instance of a BarPlot for this implementation with the
00178     // given PlotPointData and optional title.
00179     virtual BarPlotPtr barPlot(PlotPointDataPtr data,
00180             const String& title = "Bar Plot", bool smartDelete= true) const= 0;
00181     
00182     // Returns a new instance of a BarPlot set to use histogram data for this
00183     // implementation with the given PlotSinglePointData and number of bins.
00184     // DEFAULT IMPLEMENTATION.
00185     virtual BarPlotPtr histogramPlot(PlotSingleDataPtr data,
00186             unsigned int numBins, const String& title = "Histogram Plot",
00187             bool smartDelete = true) const;
00188     
00189     // Returns a new instance of a RasterPlot for this implementation with the
00190     // given data and optional title and format.
00191     virtual RasterPlotPtr rasterPlot(PlotRasterDataPtr data,
00192             const String& title = "Raster Plot",
00193             PlotRasterData::Format format = PlotRasterData::RGB32,
00194             bool smartDelete = true) const = 0;
00195     
00196     // Returns a new instance of a RasterPlot for this implementation with the
00197     // given data and contour levels and optional title and format.
00198     // DEFAULT IMPLEMENTATION.
00199     virtual RasterPlotPtr contourPlot(PlotRasterDataPtr data,
00200             const vector<double>& contours,
00201             const String& title = "Contour Plot",
00202             PlotRasterData::Format format = PlotRasterData::RGB32,
00203             bool smartDelete = true) const;
00204     
00205     // Returns a new instance of a RasterPlot for this implementation
00206     // interpreted as a spectrogram with the given data and optional title.
00207     // DEFAULT IMPLEMENTATION.
00208     virtual RasterPlotPtr spectrogramPlot(PlotRasterDataPtr data,
00209             const String& title = "Spectrogram", bool smartDelete= true) const;
00210     
00211     // Returns a new instance of a RasterPlot for this implementation
00212     // interpreted as a spectrogram with the given data and contour levels and
00213     // optional title.
00214     // DEFAULT IMPLEMENTATION.
00215     virtual RasterPlotPtr contouredSpectrogramPlot(PlotRasterDataPtr data,
00216             const vector<double>& cont,
00217             const String& title = "Spectrogram Contours",
00218             bool smartDelete = true) const;
00219     
00220     // Return a new instance of a PlotAnnotation for this implementation with
00221     // the given text and coordinates.
00222     virtual PlotAnnotationPtr annotation(const String& text,
00223             const PlotCoordinate& coord, bool smartDelete = true) const = 0;
00224     
00225     // Convenience method for return an annotation with the given world
00226     // coordinates.
00227     // DEFAULT IMPLEMENTATION.
00228     virtual PlotAnnotationPtr annotation(const String& text, double x,
00229             double y, bool smartDelete = true) const;
00230     
00231     // Return a new instance of a PlotShapeRectangle for this implementation
00232     // with the given coordinates.
00233     virtual PlotShapeRectanglePtr shapeRectangle(const PlotCoordinate& upperLeft,
00234             const PlotCoordinate& lowerRight, bool smartDelete= true) const= 0;
00235     
00236     // Convenience method for returning a rectangle with the given world
00237     // coordinates.
00238     // DEFAULT IMPLEMENTATION.
00239     virtual PlotShapeRectanglePtr shapeRectangle(double left, double top,
00240             double right, double bottom, bool smartDelete = true) const;
00241     
00242     // Return a new instance of a PlotShapeEllipse for this implementation
00243     // with the given coordinates and radii.
00244     virtual PlotShapeEllipsePtr shapeEllipse(const PlotCoordinate& center,
00245             const PlotCoordinate& radii, bool smartDelete = true) const = 0;
00246     
00247     // Convenience method for returning an ellipse with the given world
00248     // coordinates.
00249     virtual PlotShapeEllipsePtr shapeEllipse(double x, double y,
00250             double xRadius, double yRadius, bool smartDelete = true) const;
00251     
00252     // Return a new instance of a PlotShapePolygon for this implementation
00253     // with the given coordinates.
00254     virtual PlotShapePolygonPtr shapePolygon(
00255             const vector<PlotCoordinate>& coords,
00256             bool smartDelete = true) const = 0;
00257     
00258     // Convenience method for returning a polygon with the given world
00259     // coordinates.
00260     // DEFAULT IMPLEMENTATION.
00261     virtual PlotShapePolygonPtr shapePolygon(const vector<double>& x,
00262             const vector<double>& y, bool smartDelete = true) const;
00263     
00264     // Returns a new instance of a PlotShapeLine for this implementation
00265     // at the given location.
00266     virtual PlotShapeLinePtr shapeLine(double location, PlotAxis axis,
00267             bool smartDelete = true) const = 0;
00268     
00269     // Returns a new instance of a PlotShapeArrow for this implementation
00270     // at the given coordinates with the given arrow style.
00271     virtual PlotShapeArrowPtr shapeArrow(const PlotCoordinate& from,
00272             const PlotCoordinate& to, PlotShapeArrow::Style fromArrow =
00273             PlotShapeArrow::NOARROW, PlotShapeArrow::Style toArrow =
00274             PlotShapeArrow::V_ARROW, bool smartDelete = true) const = 0;
00275     
00276     // Convenience methods for returning arrows with the given world
00277     // coordinates.
00278     // DEFAULT IMPLEMENTATION.
00279     // <group>
00280     virtual PlotShapeArrowPtr shapeArrow(double fromX, double fromY,
00281             double toX, double toY, PlotShapeArrow::Style fromArrow =
00282             PlotShapeArrow::NOARROW, PlotShapeArrow::Style toArrow =
00283             PlotShapeArrow::V_ARROW, bool smartDelete = true) const;
00284     virtual PlotShapeArrowPtr shapeLineSegment(const PlotCoordinate& from,
00285             const PlotCoordinate& to, bool smartDelete = true) const;
00286     virtual PlotShapeArrowPtr shapeLineSegment(double fromX, double fromY,
00287             double toX, double toY, bool smartDelete = true) const;
00288     // </group>
00289     
00290     // Returns a new instance of a PlotShapePath for this implementation
00291     // with the given coordinates.
00292     virtual PlotShapePathPtr shapePath(
00293             const vector<PlotCoordinate>& coords,
00294             bool smartDelete = true) const = 0;
00295     
00296     // Convenience method for returning a path with the given world
00297     // coordinates.
00298     // DEFAULT IMPLEMENTATION.
00299     virtual PlotShapePathPtr shapePath(const vector<double>& x,
00300             const vector<double>& y, bool smartDelete = true) const;
00301     
00302     // Returns a new instance of a PlotShapeArc for this implementation
00303     // with the given start position, width and height, start angle, and span
00304     // angle.
00305     virtual PlotShapeArcPtr shapeArc(const PlotCoordinate& start,
00306             const PlotCoordinate& widthHeight, int startAngle,
00307             int spanAngle, bool smartDelete = true) const = 0;    
00308     
00309     // Returns a new instance of a PlotPoint for this implementation at the
00310     // given coordinates.
00311     virtual PlotPointPtr point(const PlotCoordinate& coord,
00312             bool smartDelete = true) const = 0;
00313     
00314     // Convenience methods for returning a point with the given world
00315     // coordinates.
00316     // DEFAULT IMPLEMENTATION.
00317     // <group>
00318     virtual PlotPointPtr point(double x, double y, bool smartDelete=true)const;
00319     virtual PlotPointPtr point(float x, float y, bool smartDelete= true) const;
00320     virtual PlotPointPtr point(int x, int y, bool smartDelete = true) const;
00321     virtual PlotPointPtr point(unsigned int x, unsigned int y,
00322             bool smartDelete = true) const;
00323     // </group>
00324     
00325     
00326     // Customization Objects //
00327     
00328     // Color could be a name (i.e. "black") or a hex value (i.e. "000000").
00329     virtual PlotColorPtr color(const String& color,
00330             bool smartDelete = true) const = 0;
00331     
00332     // Make a copy of the given color for this implementation.
00333     virtual PlotColorPtr color(const PlotColor& copy,
00334             bool smartDelete = true) const = 0;
00335     
00336     // Convenience method for returning a copy of the given color.
00337     // DEFAULT IMPLEMENTATION.
00338     virtual PlotColorPtr color(const PlotColorPtr copy,
00339             bool smartDelete = true) const;
00340     
00341     // Returns a list of all the named colors that the implementation supports.
00342     virtual vector<String> allNamedColors() const = 0;
00343     
00344     // Return a new font with the given characteristics.  Color can either be
00345     // in hexadecimal form or name form.
00346     virtual PlotFontPtr font(const String& family = "Arial",
00347             double pointSize = 12, const String& color = "000000",
00348             bool bold = false, bool italics = false,
00349             bool underline = false, bool smartDelete = true) const = 0;
00350     
00351     // Make a copy of the given font for this implementation.
00352     virtual PlotFontPtr font(const PlotFont& copy,
00353             bool smartDelete = true) const = 0;
00354     
00355     // Convenience method for returning a copy of the given font.
00356     // DEFAULT IMPLEMENTATION.
00357     virtual PlotFontPtr font(const PlotFontPtr copy,
00358             bool smartDelete = true) const;
00359     
00360     // Returns a new area fill with the given color and pattern.  Color can
00361     // either be in hexadecimal form or name form.
00362     virtual PlotAreaFillPtr areaFill(const String& color,
00363             PlotAreaFill::Pattern pattern = PlotAreaFill::FILL,
00364             bool smartDelete = true) const = 0;
00365     
00366     // Returns a copy of the given area fill for this implementation.
00367     virtual PlotAreaFillPtr areaFill(const PlotAreaFill& copy,
00368             bool smartDelete = true) const = 0;
00369     
00370     // Convenience method for returning a copy of the given area fill.
00371     // DEFAULT IMPLEMENTATION.
00372     virtual PlotAreaFillPtr areaFill(const PlotAreaFillPtr copy,
00373             bool smartDelete = true) const;
00374     
00375     // Returns a new line with the given color, style, and width.  Color can
00376     // either be in hexadecimal form or name form.
00377     virtual PlotLinePtr line(const String& color,
00378             PlotLine::Style style = PlotLine::SOLID, double width = 1.0,
00379             bool smartDelete = true) const = 0;
00380     
00381     // Make a copy of the given line for this implementation.
00382     virtual PlotLinePtr line(const PlotLine& copy,
00383             bool smartDelete = true) const = 0;
00384     
00385     // Convenience method for returning a copy of the given line.
00386     // DEFAULT IMPLEMENTATION.
00387     virtual PlotLinePtr line(const PlotLinePtr copy,
00388             bool smartDelete = true) const;
00389     
00390     // Returns a new symbol with the given style.
00391     virtual PlotSymbolPtr symbol(PlotSymbol::Symbol style,
00392             bool smartDelete = true) const = 0;
00393     
00394     // Returns a new symbol with the given character.
00395     // DEFAULT IMPLEMENTATION.
00396     virtual PlotSymbolPtr symbol(char sym, bool smartDelete = true) const;
00397     
00398     // Return a new symbol with the given unicode #.
00399     // DEFAULT IMPLEMENTATION.
00400     virtual PlotSymbolPtr uSymbol(unsigned short unicode,
00401             bool smartDelete = true) const;
00402     
00403     // Make a copy of the given symbol for this implementation.
00404     virtual PlotSymbolPtr symbol(const PlotSymbol& copy,
00405             bool smartDelete = true) const = 0;
00406     
00407     // Convenience method for returning a copy of the given symbol.
00408     // DEFAULT IMPLEMENTATION.
00409     virtual PlotSymbolPtr symbol(const PlotSymbolPtr copy,
00410             bool smartDelete = true) const;
00411     
00412     
00413     // Tool Objects //
00414     
00415     // Returns a standard mouse tool group for this implementation.
00416     // DEFAULT IMPLEMENTATION.
00417     virtual PlotStandardMouseToolGroupPtr standardMouseTools(
00418             ToolCode activeTool = NONE_TOOL,  
00419             bool smartDelete = true)    const;
00420     
00421     // Returns a standard mouse tool group for this implementation on the given
00422     // axes.
00423     // DEFAULT IMPLEMENTATION.
00424     virtual PlotStandardMouseToolGroupPtr standardMouseTools(PlotAxis xAxis,
00425             PlotAxis yAxis, PlotCoordinate::System sys,
00426             ToolCode activeTool = NONE_TOOL,  
00427             bool smartDelete = true)   const;
00428     
00429     // Returns tools for this implementation.  Implementations that provide
00430     // their own PlotTool subclasses should override these methods.
00431     // DEFAULT IMPLEMENTATION.
00432     // <group>
00433     virtual PlotSelectToolPtr selectTool(bool smartDelete = true) const;
00434     virtual PlotZoomToolPtr zoomTool(bool smartDelete = true) const;
00435     virtual PlotPanToolPtr panTool(bool smartDelete = true) const;
00436     virtual PlotTrackerToolPtr trackerTool(bool smartDelete = true) const;
00437     virtual PlotSelectToolPtr selectTool(PlotAxis xAxis, PlotAxis yAxis,
00438             PlotCoordinate::System system, bool smartDelete = true) const;
00439     virtual PlotZoomToolPtr zoomTool(PlotAxis xAxis, PlotAxis yAxis,
00440             PlotCoordinate::System system, bool smartDelete = true) const;
00441     virtual PlotPanToolPtr panTool(PlotAxis xAxis, PlotAxis yAxis,
00442             PlotCoordinate::System system, bool smartDelete = true) const;
00443     virtual PlotTrackerToolPtr trackerTool(PlotAxis xAxis, PlotAxis yAxis,
00444             PlotCoordinate::System system, bool smartDelete = true) const;
00445     // </group>
00446     
00447     
00448     // Operations //
00449     
00450     // Returns a new PlotMutex for this implementation.
00451     virtual PlotMutexPtr mutex(bool smartDelete = true) const = 0;
00452     
00453     
00454     // Data Objects //
00455     
00456 // Macro for method declarations for different permutations of the default data
00457 // objects for different types.
00458 #define PF_DATA_DEC(TYPE)                                                     \
00459     virtual PlotPointDataPtr data(TYPE *& y, unsigned int n,                  \
00460             bool shouldDelete = true) const;                                  \
00461     virtual PlotPointDataPtr data(Vector< TYPE >& y,                          \
00462             bool shouldDelete = false) const;                                 \
00463     virtual PlotPointDataPtr data(vector< TYPE >& y,                          \
00464             bool shouldDelete = false) const;                                 \
00465     virtual PlotPointDataPtr data(TYPE *& x, TYPE *& y, unsigned int n,       \
00466             bool shouldDelete = true) const;                                  \
00467     virtual PlotPointDataPtr data(Vector< TYPE >& x, Vector< TYPE >& y,       \
00468             bool shouldDelete = false) const;                                 \
00469     virtual PlotPointDataPtr data(vector< TYPE >& x, vector< TYPE >& y,       \
00470             bool shouldDelete = false) const;                                 \
00471     virtual PlotSingleDataPtr singleData(TYPE *& data, unsigned int n,        \
00472             bool shouldDelete = true) const;                                  \
00473     virtual PlotSingleDataPtr singleData(Vector< TYPE >& data,                \
00474             bool shouldDelete = false) const;                                 \
00475     virtual PlotSingleDataPtr singleData(vector< TYPE >& data,                \
00476             bool shouldDelete = false) const;                                 \
00477     virtual PlotPointDataPtr histogramData(TYPE *& data, unsigned int n,      \
00478             unsigned int numBins, bool shouldDel = true) const;               \
00479     virtual PlotPointDataPtr histogramData(vector< TYPE >& data,              \
00480             unsigned int numBins, bool shouldDel = false) const;              \
00481     virtual PlotPointDataPtr histogramData(Vector< TYPE >& data,              \
00482             unsigned int numBins, bool shouldDel = false) const;              \
00483     virtual PlotMaskedPointDataPtr data(TYPE *& x, TYPE*& y, bool*& mask,     \
00484             unsigned int n, bool shouldDelete = true) const;                  \
00485     virtual PlotMaskedPointDataPtr data(Vector< TYPE >& x, Vector< TYPE >& y, \
00486             Vector<bool>& mask, bool shouldDelete = true) const;              \
00487     virtual PlotMaskedPointDataPtr data(vector< TYPE >& x, vector< TYPE >& y, \
00488             vector<bool>& mask, bool shouldDelete = true) const;              \
00489     virtual PlotErrorDataPtr data(TYPE *& x, TYPE *& y, unsigned int n,       \
00490             TYPE xLeftError, TYPE xRightError, TYPE yBottomError,             \
00491             TYPE yTopError, bool shouldDelete = true) const;                  \
00492     virtual PlotErrorDataPtr data(Vector< TYPE >& x, Vector< TYPE >& y,       \
00493             TYPE xLeftError, TYPE xRightError, TYPE yBottomError,             \
00494             TYPE yTopError, bool shouldDelete = true) const;                  \
00495     virtual PlotErrorDataPtr data(vector< TYPE >& x, vector< TYPE >& y,       \
00496             TYPE xLeftError, TYPE xRightError, TYPE yBottomError,             \
00497             TYPE yTopError, bool shouldDelete = true) const;                  \
00498     virtual PlotErrorDataPtr data(TYPE *& x, TYPE *& y, TYPE *& xLeftError,   \
00499             TYPE *& xRightError, TYPE *& yBottomError, TYPE *& yTopError,     \
00500             unsigned int n, bool shouldDelete = true) const;                  \
00501     virtual PlotErrorDataPtr data(Vector< TYPE >& x, Vector< TYPE >& y,       \
00502             Vector< TYPE >& xLeftError, Vector< TYPE >& xRightError,          \
00503             Vector< TYPE >& yBottomError, Vector< TYPE >& yTopError,          \
00504             bool shouldDelete = false) const;                                 \
00505     virtual PlotErrorDataPtr data(vector< TYPE >& x, vector< TYPE >& y,       \
00506             vector< TYPE >& xLeftError, vector< TYPE >& xRightError,          \
00507             vector< TYPE >& yBottomError, vector< TYPE >& yTopError,          \
00508             bool shouldDelete = false) const;                                 \
00509     virtual PlotRasterDataPtr data(Matrix< TYPE >& data,                      \
00510             bool shouldDelete = false) const;                                 \
00511     virtual PlotRasterDataPtr data(Matrix< TYPE >& data, double fromX,        \
00512             double toX, double fromY, double toY,                             \
00513             bool shouldDelete = false) const;
00514     
00515     // Returns data objects for doubles.
00516     // DEFAULT IMPLEMENTATION.
00517     // <group>
00518     PF_DATA_DEC(double)
00519     // </group>
00520     
00521     // Returns data objects for floats.
00522     // DEFAULT IMPLEMENTATION.
00523     // <group>
00524     PF_DATA_DEC(float)
00525     // </group>
00526     
00527     // Returns data objects for ints.
00528     // DEFAULT IMPLEMENTATION.
00529     // <group>
00530     PF_DATA_DEC(int)
00531     // </group>
00532 
00533     // Returns data objects for unsigned ints.
00534     // DEFAULT IMPLEMENTATION.
00535     // <group>
00536     PF_DATA_DEC(unsigned int)
00537     // </group>
00538     
00539     // Returns a histogram data object for the given PlotSingleData and number
00540     // of bins.
00541     // DEFAULT IMPLEMENTATION.
00542     virtual PlotPointDataPtr histogramData(PlotSingleDataPtr data,
00543             unsigned int numBins) const;
00544 };
00545 typedef CountedPtr<PlotFactory> PlotFactoryPtr;
00546 
00547 }
00548 
00549 #endif /*PLOTFACTORY_H_*/