Gaia
mergeregionapplier.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_MERGEREGIONAPPLIER_H
21 #define GAIA_MERGEREGIONAPPLIER_H
22 
23 #include "applier.h"
24 
25 namespace gaia2 {
26 
31 class MergeRegionApplier : public Applier {
32  protected:
33  QString _resultName;
34  QStringList _select;
35  PointLayout _layout;
36 
37  public:
38  MergeRegionApplier(const Transformation& transfo);
39  virtual ~MergeRegionApplier();
40 
44  virtual Point* mapPoint(const Point* p) const;
45 
46  protected:
47  Point* mergePoint(const Point* p, const Region& region) const;
48 
49  // WARNING: this makes it non-thread safe
50  mutable PointLayout _layoutCache;
51  mutable Region _regionCache;
52 
53 };
54 
55 } // namespace gaia2
56 
57 #endif // GAIA_MERGEREGIONAPPLIER_H
A region is a physical location in the point layout which consists in a list of segments.
Definition: region.h:125
Class containing all info pertaining to a specific transformation, ie: the name of the analyzer class...
Definition: transformation.h:41
Point * mergePoint(const Point *p, const Region &region) const
Definition: mergeregionapplier.cpp:43
MergeRegion applier class.
Definition: mergeregionapplier.h:31
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
virtual Point * mapPoint(const Point *p) const
Ownership of resulting point is handed to caller of this function.
Definition: mergeregionapplier.cpp:35
The Applier abstract base class.
Definition: applier.h:44
Definition: point.h:106