LibMusicXML  3.18
timesignvisitor.h
1 /*
2  MusicXML Library
3  Copyright (C) Grame 2006-2013
4 
5  This Source Code Form is subject to the terms of the Mozilla Public
6  License, v. 2.0. If a copy of the MPL was not distributed with this
7  file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
10  research@grame.fr
11 */
12 
13 #ifndef __timesignVisitor__
14 #define __timesignVisitor__
15 
16 #include <vector>
17 #include <utility>
18 #include "typedefs.h"
19 #include "rational.h"
20 #include "visitor.h"
21 
22 namespace MusicXML2
23 {
24 
33 class EXP timesignvisitor :
34  public visitor<S_time>,
35  public visitor<S_beats>,
36  public visitor<S_beat_type>,
37  public visitor<S_senza_misura>
38 {
39  protected:
40  std::string fCurrentBeat;
41 
42  void reset();
43  virtual void visitStart( S_time& elt );
44  virtual void visitStart( S_beats& elt );
45  virtual void visitStart( S_beat_type& elt );
46  virtual void visitStart( S_senza_misura& elt );
47 
48  public:
49  enum { kNoStaffNumber = -1 };
50 
51  timesignvisitor() { reset(); }
52  virtual ~timesignvisitor() {}
53 
58  rational timesign(unsigned int index);
59 
60  std::vector<std::pair<std::string,std::string> > fTimeSign;
61  std::string fSymbol;
62  int fStaffNumber;
63  bool fSenzaMisura;
64 };
65 
66 
69 }
70 
71 #endif
MusicXML2::timesignvisitor::timesign
rational timesign(unsigned int index)
MusicXML2::timesignvisitor
key element data
Definition: timesignvisitor.h:38
MusicXML2::SMARTP< musicxml< k_time > >
MusicXML2::visitor
Definition: visitor.h:27
rational
Rational number representation.
Definition: rational.h:25