Gaia
addfieldapplier.h
1 /*
2  * Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra
3  *
4  * This file is part of Gaia
5  *
6  * Gaia is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License as published by the Free
8  * Software Foundation (FSF), either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the Affero GNU General Public License
17  * version 3 along with this program. If not, see http://www.gnu.org/licenses/
18  */
19 
20 #ifndef GAIA_ADDFIELDAPPLIER_H
21 #define GAIA_ADDFIELDAPPLIER_H
22 
23 #include "applier.h"
24 #include "utils.h"
25 
26 namespace gaia2 {
27 
33 class AddFieldApplier : public Applier {
34  protected:
35  QStringList _real, _string;
36  PointLayout _newLayout;
37  Point _addedPoint;
38  QList<Point> _addedPoints;
39  IndexMap _realMap1, _stringMap1, _enumMap1, _realMap2, _stringMap2, _enumMap2;
40 
41  public:
42  AddFieldApplier(const Transformation& transfo);
43  virtual ~AddFieldApplier();
44 
48  virtual Point* mapPoint(const Point* p) const;
49 
54  DataSet* mapDataSet(const DataSet* dataset) const;
55 
56 
57  protected:
58  PointLayout mapLayout(const PointLayout& layout) const;
59 
60 };
61 
62 } // namespace gaia2
63 
64 #endif // GAIA_ADDFIELDAPPLIER_H
Class containing all info pertaining to a specific transformation, ie: the name of the analyzer class...
Definition: transformation.h:41
DataSet * mapDataSet(const DataSet *dataset) const
Optimized version so that we don&#39;t have to recompute the index mappings for each point.
Definition: addfieldapplier.cpp:115
This class represents a dataset and all related information.
Definition: dataset.h:91
This class describes the layout of a point.
Definition: pointlayout.h:60
Main Gaia namespace, which contains all the library functions.
Definition: addfield.cpp:22
The Applier abstract base class.
Definition: applier.h:44
AddFieldApplier applier class.
Definition: addfieldapplier.h:33
virtual Point * mapPoint(const Point *p) const
Ownership of resulting point is handed to caller of this function.
Definition: addfieldapplier.cpp:104
Definition: point.h:106