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

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1