GUIDOLib  1.7.7
Guido Engine Internal Documentation
TempoVisitor.h
1 #ifndef __TempoVisitor__
2 #define __TempoVisitor__
3 
4 /*
5  GUIDO Library
6  Copyright (C) 2019 Grame
7 
8 
9  This Source Code Form is subject to the terms of the Mozilla Public
10  License, v. 2.0. If a copy of the MPL was not distributed with this
11  file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 
13  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
14  research@grame.fr
15 
16 */
17 
18 #include <string>
19 #include <vector>
20 
21 #include "ARVisitor.h"
22 #include "GUIDOEngine.h"
23 
24 class ARTempo;
25 //------------------------------------------------------------------------------
26 class TempoVisitor : public ARVisitor
27 {
28  std::vector<GuidoTempo> fTempi;
29  int fCurrentVoice = -1;
30 
31  public:
33  virtual ~TempoVisitor() {}
34 
35  void reset() { fTempi.clear(); }
36  void voice(int n) { fCurrentVoice = n; }
37  size_t size() const { return fTempi.size(); }
38  GuidoTempoList getTempi() const;
39 
40  virtual void visitIn (ARMusicalTag* object);
41 
42  private:
43  int toValue (const std::string& s) const;
44  void getText (char* dst, const ARTempo* ar) const;
45 
46 };
47 
48 
49 #endif
ARVisitor
Definition: ARVisitor.h:22
TempoVisitor::TempoVisitor
TempoVisitor()
Definition: TempoVisitor.h:32
GuidoTempo
Representation of tempo information at a given date.
Definition: GUIDOEngine.h:129
TempoVisitor::getTempi
GuidoTempoList getTempi() const
TempoVisitor::visitIn
virtual void visitIn(ARMusicalTag *object)
TempoVisitor
Definition: TempoVisitor.h:26
TempoVisitor::reset
void reset()
Definition: TempoVisitor.h:35
TempoVisitor::~TempoVisitor
virtual ~TempoVisitor()
Definition: TempoVisitor.h:33
TempoVisitor::voice
void voice(int n)
Definition: TempoVisitor.h:36
ARMusicalTag
The base class for all musical tag classes.
Definition: ARMusicalTag.h:34
ARTempo
The tempo tag parameter.
Definition: ARTempo.h:72
TempoVisitor::size
size_t size() const
Definition: TempoVisitor.h:37

Guido Project Copyright © 2019 Grame-CNCM