00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __conversions__
00026 #define __conversions__
00027
00028 #include "exports.h"
00029 #include "TRational.h"
00030 #include "bimap.h"
00031 #include <string>
00032
00033 using namespace std;
00034
00035 namespace MusicXML
00036 {
00037
00041 class EXP FullCue {
00042 public:
00043 enum type { undefined, full, cue, last=cue };
00044
00046 static const string xml (type d);
00048 static type xml (const string str);
00049
00050 private:
00051 static bimap<string, type> fFC2String;
00052 static type fFCTbl[];
00053 static string fFCStrings[];
00054 };
00055
00059 class EXP YesNo {
00060 public:
00061 enum type { undefined, yes, no, last=no };
00062
00064 static const string xml (type d);
00066 static type xml (const string str);
00067
00068 private:
00069 static bimap<string, type> fYN2String;
00070 static type fYNTbl[];
00071 static string fYNStrings[];
00072 };
00073
00077 class EXP StartStop {
00078 public:
00079 enum type { undefined, start, stop, cont, last=cont };
00080
00082 static const string xml (type d);
00084 static type xml (const string str);
00085
00086 private:
00087 static bimap<string, type> fStartStop2String;
00088 static type fStartStopTbl[];
00089 static string fStartStopStrings[];
00090 };
00091
00095 class EXP LineType {
00096 public:
00097 enum type { undefined, solid, dashed, dotted, wavy, last=wavy };
00098
00100 static const string xml (type d);
00102 static type xml (const string str);
00103
00104 private:
00105 static bimap<string, type> fLineType2String;
00106 static type fLineTypeTbl[];
00107 static string fLineTypeStrings[];
00108 };
00109
00117 class EXP NoteType {
00118 public:
00119 enum type { undefined,
00120 t256th=1, t128th=1<<1, t64th=1<<2, t32nd=1<<3,
00121 t16th=1<<4, eighth=1<<5, quarter=1<<6,
00122 half=1<<7, whole=1<<8, breve=1<<9, tlong=1<<10,
00123 count=11 };
00124
00126 static TRational& rational(type d, TRational& r);
00128 static const string xml (type d);
00130 static type xml (const string str);
00131
00132 private:
00133 static bimap<string, type> fType2String;
00134 static type fTypeTbl[];
00135 static string fTypeStrings[];
00136 };
00137
00138 }
00139
00140 #endif