LibMusicXML 3.18
bsrKeys_MUT_DEP.h
1/*
2 This file is to be included only by bsrMutualDependencies.h,
3 to satisfy declarations mutual dependencies.
4*/
5
6//______________________________________________________________________________
7class bsrKey;
8typedef SMARTP<bsrKey> S_bsrKey;
9
10class bsrKey : public bsrLineElement
11{
12 public:
13
14 // data types
15 // ------------------------------------------------------
16
17 enum bsrKeyKind {
18 kKeyKindNone,
19 kKeyKindFlats, kKeyKindNaturals, kKeyKindSharps };
20
21 static string keyKindAsString (
22 bsrKeyKind keyKind);
23
24 // creation
25 // ------------------------------------------------------
26
27 static SMARTP<bsrKey> create (
28 int inputLineNumber,
29 bsrKeyKind keyKind,
30 int numberOfAlterations);
31
32 protected:
33
34 // constructors/destructor
35 // ------------------------------------------------------
36
37 bsrKey (
38 int inputLineNumber,
39 bsrKeyKind keyKind,
40 int numberOfAlterations);
41
42 virtual ~bsrKey ();
43
44 public:
45
46 // set and get
47 // ------------------------------------------------------
48
49 bsrKeyKind getKeyKind () const
50 { return fKeyKind; }
51
52 int getNumberOfAlterations () const
53 { return fNumberOfAlterations; }
54
55 public:
56
57 // public services
58 // ------------------------------------------------------
59
60 S_bsrCellsList fetchCellsList () const
61 { return fKeyCellsList; }
62
63 int fetchCellsNumber () const;
64
65 private:
66
67 // private services
68 // ------------------------------------------------------
69
70 S_bsrCellsList keyKindAsCellsList () const;
71
72 S_bsrCellsList buildCellsList () const;
73
74 public:
75
76 // visitors
77 // ------------------------------------------------------
78
79 virtual void acceptIn (basevisitor* v);
80 virtual void acceptOut (basevisitor* v);
81
82 virtual void browseData (basevisitor* v);
83
84 public:
85
86 // print
87 // ------------------------------------------------------
88
89 string asString () const;
90
91 virtual void print (ostream& os) const;
92
93 private:
94
95 // fields
96 // ------------------------------------------------------
97
98 bsrKeyKind fKeyKind;
99 int fNumberOfAlterations;
100
101 S_bsrCellsList fKeyCellsList;
102};
103typedef SMARTP<bsrKey> S_bsrKey;
104EXP ostream& operator<< (ostream& os, const S_bsrKey& elt);
105
Definition: bsrKeys_MUT_DEP.h:11
Definition: bsrLineElements_MUT_DEP.h:8