1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the Qwt License, Version 1.0
8
*****************************************************************************/
10
#ifndef QWT_INTERVAL_DATA_H
11
#define QWT_INTERVAL_DATA_H 1
13
#include "qwt_global.h"
15
#include "qwt_array.h"
16
#include "qwt_double_interval.h"
17
#include "qwt_double_rect.h"
19
#if defined(_MSC_VER) && (_MSC_VER > 1310)
23
#if defined(QWT_TEMPLATEDLL)
25
template class QWT_EXPORT QwtArray<QwtDoubleInterval>;
26
template class QWT_EXPORT QwtArray<double>;
31
\brief Interval data class.
34
class QWT_EXPORT QwtIntervalData
38
QwtIntervalData(const QwtArray<QwtDoubleInterval> &,
39
const QwtArray<double> &);
41
void setData(const QwtArray<QwtDoubleInterval> &,
42
const QwtArray<double> &);
45
const QwtDoubleInterval &interval(size_t i) const;
46
double value(size_t i) const;
48
QwtDoubleRect boundingRect() const;
51
QwtArray<QwtDoubleInterval> d_intervals;
52
QwtArray<double> d_values;
55
inline size_t QwtIntervalData::size() const
57
return qwtMin(d_intervals.size(), d_values.size());
60
inline const QwtDoubleInterval &QwtIntervalData::interval(size_t i) const
62
return d_intervals[int(i)];
65
inline double QwtIntervalData::value(size_t i) const
67
return d_values[int(i)];