#ifndef _GUITAR_REGISTRY_HPP_ #define _GUITAR_REGISTRY_HPP_ #ifndef _COMMON_REGKEY_HPP_ #include #endif #ifndef _COMMON_BLOCK_HPP_ #include #endif #ifndef _COMMON_STRING_HPP_ #include #endif #ifndef _GUITAR_INSTRUMENT_HPP_ #include #endif #ifndef _GUITAR_GUITAR_HPP_ #include #endif class Registry { public: Registry(void); Registry(const Registry ®istry); virtual ~Registry(); Registry &operator=(const Registry ®istry); bool getHistory(Block &nameList); bool setHistory(Block &nameList); bool insertHistory(const String &strName); bool removeHistory(const String &strName); bool getShowNotes(void); void setShowNotes(bool showNoteLetters); bool getShowAction(void)const; void setShowAction(bool showAction); int getMicrosecondsPerQuarterNote(void)const; void setMicrosecondsPerQuarterNote(int microsecondsPerQuarterNote); long getMillisecondsPerQuarterNote(void)const; Instrument getInstrument(void)const; void setInstrument(Instrument instrument); String getMIDIOutputDevice(void)const; void setMIDIOutputDevice(const String &midiOutputDevice); bool isOkay(void)const; private: enum {MaxCachedNames=7}; void guarantee(void); void getCacheNames(void); bool removeHistory(void); Block mCachedNames; String mHistoryKeyName; String mHistoryKeyShortName; String mRegistryKeyName; String mSettingsKeyName; String mSettingsAction; String mSettingsNoteLetters; String mSettingsMicrosecondsPerQuarterNote; String mSettingsInstrument; String mSettingsMIDIOutput; RegKey mRegKeyHistory; RegKey mRegKeySettings; }; inline long Registry::getMillisecondsPerQuarterNote(void)const { return getMicrosecondsPerQuarterNote()/1000; } #endif