source: trunk/src/objects/RpCurve.h @ 2305

Last change on this file since 2305 was 1568, checked in by dkearney, 15 years ago

adding dump/configure interface to curve object, plot object is broken

File size: 1.9 KB
RevLine 
[1386]1/*
2 * ======================================================================
3 *  AUTHOR:  Derrick Kearney, Purdue University
4 *  Copyright (c) 2005-2009  Purdue Research Foundation
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>
[1528]11#include "RpObject.h"
[1386]12#include "RpChain.h"
13#include "RpArray1D.h"
14
15#ifndef RAPPTURE_CURVE_H
16#define RAPPTURE_CURVE_H
17
18namespace Rappture {
19
[1528]20class Curve : public Object
[1386]21{
22    public:
23
[1528]24        Curve();
[1386]25
[1568]26        Curve(const char *name);
[1386]27
[1568]28        Curve(const char *name, const char *label, const char *desc,
[1528]29              const char *group);
[1386]30
[1528]31        Curve(const Curve& o);
[1386]32
[1528]33        virtual ~Curve();
[1386]34
[1528]35        Array1D *axis(const char *name, const char *label, const char *desc,
36                      const char *units, const char *scale, const double *val,
37                      size_t size);
[1386]38
[1528]39        Curve& delAxis(const char *name);
[1386]40
[1528]41        size_t data(const char *label, const double **arr) const;
[1386]42
[1528]43        Array1D *getAxis(const char *name) const;
44        Array1D *getNthAxis(size_t n) const;
[1386]45
[1528]46        // should be a list of groups to add this curve to?
[1386]47        Accessor <const char *> group;
48        size_t dims() const;
49
[1568]50        void configure(size_t as, ClientData p);
51        void dump(size_t as, ClientData p);
52
[1528]53        const int is() const;
54
55        static const char x[];
56        static const char y[];
57
[1386]58    private:
59
[1528]60        // hash or linked list of axis
[1386]61        Rp_Chain *_axisList;
62
[1528]63        Rp_ChainLink *__searchAxisList(const char * name) const;
[1568]64
65        void __configureFromXml(const char *p);
66        void __configureFromTree(Rp_ParserXml *p);
67        void __dumpToXml(ClientData c);
68        void __dumpToTree(ClientData c);
[1386]69};
70
[1528]71
[1386]72} // namespace Rappture
73
74/*--------------------------------------------------------------------------*/
75
76#endif // RAPPTURE_CURVE_H
Note: See TracBrowser for help on using the repository browser.