svcore  1.9
DenseTimeValueModel.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 
3 /*
4  Sonic Visualiser
5  An audio file viewer and annotation editor.
6  Centre for Digital Music, Queen Mary, University of London.
7  This file copyright 2006 Chris Cannam.
8 
9  This program is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 2 of the
12  License, or (at your option) any later version. See the file
13  COPYING included with this distribution for more information.
14 */
15 
16 #ifndef _DENSE_TIME_VALUE_MODEL_H_
17 #define _DENSE_TIME_VALUE_MODEL_H_
18 
19 #include <QObject>
20 
21 #include "Model.h"
22 
30 class DenseTimeValueModel : public Model
31 {
32  Q_OBJECT
33 
34 public:
36 
37  virtual ~DenseTimeValueModel();
38 
44  virtual float getValueMinimum() const = 0;
45 
51  virtual float getValueMaximum() const = 0;
52 
56  virtual int getChannelCount() const = 0;
57 
65  virtual int getData(int channel, int start, int count,
66  float *buffer) const = 0;
67 
75  virtual int getData(int channel, int start, int count,
76  double *buffer) const = 0;
77 
83  virtual int getData(int fromchannel, int tochannel,
84  int start, int count,
85  float **buffers) const = 0;
86 
87  virtual bool canPlay() const { return true; }
88  virtual QString getDefaultPlayClipId() const { return ""; }
89 
90  virtual QString toDelimitedDataStringSubset(QString delimiter, int f0, int f1) const;
91 
92  QString getTypeName() const { return tr("Dense Time-Value"); }
93 };
94 
95 #endif
virtual int getChannelCount() const =0
Return the number of distinct channels for this model.
virtual float getValueMinimum() const =0
Return the minimum possible value found in this model type.
virtual int getData(int channel, int start, int count, float *buffer) const =0
Get the specified set of samples from the given channel of the model in single-precision floating-poi...
virtual QString getDefaultPlayClipId() const
virtual bool canPlay() const
virtual QString toDelimitedDataStringSubset(QString delimiter, int f0, int f1) const
Model is the base class for all data models that represent any sort of data on a time scale based on ...
Definition: Model.h:35
virtual float getValueMaximum() const =0
Return the minimum possible value found in this model type.
Base class for models containing dense two-dimensional data (value against time).
QString getTypeName() const
Return the type of the model.