source: trunk/src/objects/RpArray1D.h

Last change on this file was 5673, checked in by ldelgass, 9 years ago

Fix line endings, set eol-style to native on all C/C++ sources.

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1/*
2 * ======================================================================
3 *  AUTHOR:  Derrick S. 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
11#ifndef RAPPTURE_ARRAY1D_H
12#define RAPPTURE_ARRAY1D_H
13
14#include "RpAccessor.h"
15#include "RpSimpleBuffer.h"
16#include "RpObject.h"
17
18namespace Rappture {
19
20class Array1D : public Object
21{
22public:
23
24    Array1D();
25    Array1D (const double *val, size_t size);
26    Array1D (const Array1D &o);
27    virtual ~Array1D();
28
29    Accessor<const char *> name;
30    Accessor<const char *> units;
31    Accessor<const char *> scale;
32
33    virtual Array1D& append(const double *val, size_t nmemb);
34    virtual Array1D& clear();
35    virtual size_t read(double *val, size_t nmemb);
36    virtual size_t nmemb() const;
37    virtual double min() const;
38    virtual double max() const;
39    virtual const double *data() const;
40
41    static const char type[];
42
43    const char *xml(size_t indent, size_t tabstop);
44    const int is(void) const;
45
46protected:
47
48    SimpleDoubleBuffer _val;
49    double _min;
50    double _max;
51};
52
53} // namespace Rappture
54
55#endif // RAPPTURE_ARRAY1D_H
Note: See TracBrowser for help on using the repository browser.