#ifndef _MUSIC_CHORDCOMPILER_HPP_ #define _MUSIC_CHORDCOMPILER_HPP_ #ifndef _MUSIC_SCANNER_HPP_ #include #endif #ifndef _MUSIC_PARSER_HPP_ #include #endif namespace Music { class ChordCompiler { public: ChordCompiler(); virtual ~ChordCompiler(); bool compile(const String &strChord,Music::Chord &chord); private: Scanner mScanner; Parser mParser; }; inline ChordCompiler::ChordCompiler() { } inline ChordCompiler::~ChordCompiler() { } inline bool ChordCompiler::compile(const String &strChord,Music::Chord &chord) { if(!mScanner.scan(strChord))return false; if(!mParser.parse(mScanner,chord))return false; return true; } }; #endif