Files
Work/music/ChordCompiler.hpp
2024-08-07 09:16:27 -04:00

42 lines
686 B
C++

#ifndef _MUSIC_CHORDCOMPILER_HPP_
#define _MUSIC_CHORDCOMPILER_HPP_
#ifndef _MUSIC_SCANNER_HPP_
#include <music/scanner.hpp>
#endif
#ifndef _MUSIC_PARSER_HPP_
#include <music/parser.hpp>
#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