Gaia
point.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_STL_POINT_H
21 #define GAIA_STL_POINT_H
22 
23 #include <vector>
24 #include "origtypes.h"
25 
26 namespace gaia2std {
27 
28 class Point {
29  DECLARE_PROXY(Point);
30  friend class DataSet;
31  friend class Collection;
32  friend class Transformation;
33  friend class DistanceFunction;
34  friend class View;
35 
36  public:
37  Point();
38 
39  std::string name() const;
40  void setName(const std::string& name);
41 
42  void load(const std::string& name);
43 
44  std::vector<float> value(const std::string& name) const;
45  std::vector<std::string> label(const std::string& name) const;
46 
47  std::vector<float> value(int nsegment, const std::string& name) const;
48  std::vector<std::string> label(int nsegment, const std::string& name) const;
49 
50  void setValue(const std::string& name, float value);
51  void setValue(const std::string& name, const std::vector<float>& value);
52  void setLabel(const std::string& name, const std::string& label);
53  void setLabel(const std::string& name, const std::vector<std::string>& label);
54 
55  void setValue(int nsegment, const std::string& name, float value);
56  void setValue(int nsegment, const std::string& name, const std::vector<float>& value);
57  void setLabel(int nsegment, const std::string& name, const std::string& label);
58  void setLabel(int nsegment, const std::string& name, const std::vector<std::string>& label);
59 
60  private:
61  // @todo should these go into DECLARE_PROXY?
62  Point(const Point&);
63  Point& operator=(const Point&);
64 
65 };
66 
67 } // namespace gaia2std
68 
69 
70 #endif // GAIA_STL_POINT_H
Definition: distancefunction.h:28
Definition: baseexception.h:26
Definition: transformation.h:27
Definition: view.h:32
Definition: dataset.h:31
Definition: point.h:28