Initial
This commit is contained in:
41
music/ChordCompiler.hpp
Normal file
41
music/ChordCompiler.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user