Initial
This commit is contained in:
51
music/scanner.hpp
Normal file
51
music/scanner.hpp
Normal file
@@ -0,0 +1,51 @@
|
||||
#ifndef _MUSIC_SCANNER_HPP_
|
||||
#define _MUSIC_SCANNER_HPP_
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
#ifndef _MUSIC_EMITTER_HPP_
|
||||
#include <music/emitter.hpp>
|
||||
#endif
|
||||
|
||||
namespace Music
|
||||
{
|
||||
|
||||
class Scanner : public Emitter
|
||||
{
|
||||
public:
|
||||
Scanner();
|
||||
virtual ~Scanner();
|
||||
bool scan(const String &chordSymbol);
|
||||
String toString(void)const;
|
||||
private:
|
||||
char peekChar(void);
|
||||
char nextChar(void);
|
||||
void pushBack(void);
|
||||
void init(const String &symbol);
|
||||
void scanAlpha(char symbol);
|
||||
void scanDegree(char symbol);
|
||||
void scanInflection(char symbol);
|
||||
void scanSlash(char symbol);
|
||||
void scanMnemonic(char sybmol);
|
||||
void scanSlash(void);
|
||||
bool isNote(char symbol);
|
||||
bool isInflection(char symbol);
|
||||
bool isHalfDiminished(char symbol);
|
||||
bool isDiminished(char symbol);
|
||||
|
||||
int mIndex;
|
||||
int mLength;
|
||||
String mSymbol;
|
||||
};
|
||||
|
||||
inline
|
||||
Scanner::Scanner()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
Scanner::~Scanner()
|
||||
{
|
||||
}
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user