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

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

updating the objects code and adding some more examples describing how i want developers to use the objects. some of the objects don't work yet, like the tree, anything with an example should work

File size: 1.7 KB
Line 
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>
11#include "RpObject.h"
12#include "RpChain.h"
13#include "RpArray1D.h"
14
15#ifndef RAPPTURE_CURVE_H
16#define RAPPTURE_CURVE_H
17
18namespace Rappture {
19
20class Curve : public Object
21{
22    public:
23
24        Curve();
25
26        Curve(const char *path);
27
28        Curve(const char *path, const char *label, const char *desc,
29              const char *group);
30
31        Curve(const Curve& o);
32
33        virtual ~Curve();
34
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);
38
39        Curve& delAxis(const char *name);
40
41        size_t data(const char *label, const double **arr) const;
42
43        Array1D *getAxis(const char *name) const;
44        Array1D *getNthAxis(size_t n) const;
45
46        // should be a list of groups to add this curve to?
47        Accessor <const char *> group;
48        size_t dims() const;
49
50        const char *xml();
51        const int is() const;
52
53        static const char x[];
54        static const char y[];
55
56    private:
57
58        // hash or linked list of axis
59        Rp_Chain *_axisList;
60
61        Rp_ChainLink *__searchAxisList(const char * name) const;
62};
63
64
65} // namespace Rappture
66
67/*--------------------------------------------------------------------------*/
68
69#endif // RAPPTURE_CURVE_H
Note: See TracBrowser for help on using the repository browser.