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

52 lines
892 B
C++

#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