00001 #ifndef GUIDOFACTORYADAPTER_H 00002 #define GUIDOFACTORYADAPTER_H 00003 /* 00004 GUIDO Library 00005 Copyright (C) 2014 Grame 00006 00007 This Source Code Form is subject to the terms of the Mozilla Public 00008 License, v. 2.0. If a copy of the MPL was not distributed with this 00009 file, You can obtain one at http://mozilla.org/MPL/2.0/. 00010 00011 Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France 00012 research@grame.fr 00013 00014 */ 00015 00016 #include "GUIDOFactory.h" 00017 #include <string> 00018 00026 class GUIDOFactoryAdapter 00027 { 00028 public: 00033 GUIDOFactoryAdapter(); 00034 00038 virtual ~GUIDOFactoryAdapter(); 00039 00040 // ---------------------------------------------------------------------------- 00049 GuidoErrCode openMusic(); 00050 00051 // ---------------------------------------------------------------------------- 00068 ARHandler closeMusic(); 00069 00070 // ---------------------------------------------------------------------------- 00081 GuidoErrCode openVoice(); 00082 00083 // ---------------------------------------------------------------------------- 00094 GuidoErrCode closeVoice(); 00095 00096 // ---------------------------------------------------------------------------- 00106 GuidoErrCode openChord(); 00107 00108 // ---------------------------------------------------------------------------- 00117 GuidoErrCode closeChord(); 00118 00119 // ---------------------------------------------------------------------------- 00128 GuidoErrCode insertCommata(); 00129 00130 // ---------------------------------------------------------------------------- 00139 GuidoErrCode openEvent(const std::string &inEventName); 00140 00141 // ---------------------------------------------------------------------------- 00151 GuidoErrCode closeEvent(); 00152 00153 // ---------------------------------------------------------------------------- 00159 GuidoErrCode addSharp(); 00160 00161 // ---------------------------------------------------------------------------- 00167 GuidoErrCode addFlat(); 00168 00169 // ---------------------------------------------------------------------------- 00174 GuidoErrCode setEventDots(int dots); 00175 00176 // ---------------------------------------------------------------------------- 00182 GuidoErrCode setEventAccidentals(int accident); 00183 00184 // ---------------------------------------------------------------------------- 00195 GuidoErrCode setOctave(int octave); 00196 00197 // ---------------------------------------------------------------------------- 00208 GuidoErrCode setDuration(int numerator, int denominator); 00209 00210 // ---------------------------------------------------------------------------- 00217 GuidoErrCode openTag(const std::string &name, long tagID); 00218 00219 // ---------------------------------------------------------------------------- 00226 GuidoErrCode openRangeTag(const std::string &name, long tagID); 00227 00228 00229 // ---------------------------------------------------------------------------- 00237 GuidoErrCode endTag(); 00238 00239 // ---------------------------------------------------------------------------- 00250 GuidoErrCode closeTag(); 00251 00252 // ---------------------------------------------------------------------------- 00258 GuidoErrCode addTagParameterString(const std::string &val); 00259 00260 // ---------------------------------------------------------------------------- 00266 GuidoErrCode addTagParameterInt(int val); 00267 00268 // ---------------------------------------------------------------------------- 00274 GuidoErrCode addTagParameterFloat(double val); 00275 00276 // ---------------------------------------------------------------------------- 00282 GuidoErrCode setParameterName(const std::string &name); 00283 00284 // ---------------------------------------------------------------------------- 00298 GuidoErrCode setParameterUnit(const std::string &unit); 00299 00300 private: 00304 ARFactoryHandler factory; 00305 }; 00307 #endif // GUIDOFACTORYADAPTER_H