source: branches/nanovis2/src/objects/RpPlot.h @ 3305

Last change on this file since 3305 was 3305, checked in by ldelgass, 12 years ago

sync with trunk

File size: 1.7 KB
Line 
1/*
2 * ======================================================================
3 *  AUTHOR:  Derrick Kearney, Purdue University
4 *  Copyright (c) 2004-2012  HUBzero Foundation, LLC
5 *
6 *  See the file "license.terms" for information on usage and
7 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8 * ======================================================================
9 */
10#include <errno.h>
11#include "RpObject.h"
12#include "RpChainHelper.h"
13#include "RpCurve.h"
14
15#ifndef RAPPTURE_PLOT_H
16#define RAPPTURE_PLOT_H
17
18namespace Rappture {
19
20class Plot : public Object
21{
22    public:
23
24        Plot ();
25
26        Plot ( const Plot& o );
27        virtual ~Plot ();
28
29        Plot& add ( size_t nPts,
30                    double *x,
31                    double *y,
32                    const char *fmt,
33                    const char *name);
34
35        Plot& add (Curve *c, const char *name);
36
37        // count the number of curves in the object
38        size_t count() const;
39
40        // retrieve a curve from the object
41        Curve *curve (const char* name) const;
42        Curve *getNthCurve(size_t n) const;
43
44        const int is() const;
45
46    private:
47
48        // hash or linked list of curves
49        Rp_Chain *_curveList;
50
51        static const char format[];
52        static const char id[];
53        static const char xaxis[];
54        static const char yaxis[];
55        static const char creator[];
56
57        // static const char *creator[];
58
59        Rp_ChainLink *__searchCurveList(const char *name) const;
60        static int __curveCopyFxn(void **to, void *from);
61
62        void __configureFromTree(ClientData c);
63        void __dumpToTree(ClientData c);
64};
65
66} // namespace Rappture
67
68#endif // RAPPTURE_PLOT_H
Note: See TracBrowser for help on using the repository browser.