comparison plugin/transform/TransformDescription.h @ 329:3179d8b29336

* Another incremental Transform update
author Chris Cannam
date Tue, 06 Nov 2007 17:08:11 +0000
parents
children d7c41483af8f 94fc0591ea43
comparison
equal deleted inserted replaced
328:21bd032ae791 329:3179d8b29336
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-2007 Chris Cannam and QMUL.
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 _TRANSFORM_DESCRIPTION_H_
17 #define _TRANSFORM_DESCRIPTION_H_
18
19 #include "Transform.h"
20
21 #include <QString>
22
23 #include <vector>
24
25 /**
26 * Metadata associated with a transform.
27 *
28 * The transform ID is the same as that used in the Transform class.
29 * It is intended to be computer-referenceable and unique within the
30 * application.
31 *
32 * The name is intended to be human readable. In principle it doesn't
33 * have to be unique, but the factory that creates these objects
34 * should add suffixes to ensure that it is, all the same (just to
35 * avoid user confusion).
36 *
37 * The friendly name is a shorter version of the name.
38 *
39 * The type is also intended to be user-readable, for use in menus.
40 */
41
42 struct TransformDescription
43 {
44 TransformDescription() { }
45 TransformDescription(QString _type, QString _category,
46 TransformId _identifier, QString _name,
47 QString _friendlyName, QString _description,
48 QString _maker, QString _units, bool _configurable) :
49 type(_type), category(_category),
50 identifier(_identifier), name(_name),
51 friendlyName(_friendlyName), description(_description),
52 maker(_maker), units(_units), configurable(_configurable) { }
53
54 QString type; // e.g. feature extraction plugin
55 QString category; // e.g. time > onsets
56 TransformId identifier; // e.g. vamp:vamp-aubio:aubioonset
57 QString name; // plugin's name if 1 output, else "name: output"
58 QString friendlyName; // short text for layer name
59 QString description; // sentence describing transform
60 QString maker;
61 QString units;
62 bool configurable;
63
64 bool operator<(const TransformDescription &od) const {
65 return (name < od.name);
66 };
67 };
68
69 typedef std::vector<TransformDescription> TransformList;
70
71 #endif