13 #ifndef PARESER_H__B6901FE6_6B09_486c_87AB_E584C1DBE30F__
14 #define PARESER_H__B6901FE6_6B09_486c_87AB_E584C1DBE30F__
22 #ifndef ENABLE_TRACING
23 #if defined(DEBUG) || defined (_DEBUG)
24 #define ENABLE_TRACING 1
25 #endif // if defined(DEBUG)
26 #endif // ifndef ENABLE_TRACING
28 #include "Common/EventHandler.h"
29 #include "Common/_TChar.h"
34 class ChannelPressure;
35 class ControllerEvent;
40 class PolyphonicPressure;
45 class CParserListener;
84 inline virtual ~
CParser(
void) { }
94 void SetUserData(
void* pData) { m_pUserData = pData; }
96 const void* GetUserData()
const {
return m_pUserData; }
196 inline virtual bool Error(
ErrorCode argErrCode,
const TCHAR* szTraceMsg,
const TCHAR* szToken)
228 inline virtual void Trace(
const TCHAR* szTraceMsg)
237 #endif // #if ENABLE_TRACING
244 #endif // PARESER_H__B6901FE6_6B09_486c_87AB_E584C1DBE30F__
MACRO_END missing while parsing a Voice Macro.
MACRO_END missing while parsing a Velocity Macro.
Failure while converting/retrieving a Controller Value number.
Computed Note Value is going beyond the permitted range [0, 127].
Failure while converting/retrieving a PitchBend number.
OIL::CEventT< const CParser, const Voice > evVoice
Event Raised when Parser encounters a Voice command.
Failure while converting/retrieving a numeric note number.
Failure while conveting/retrieving the Numerator of Tuplet fraction.
void AddListener(CParserListener *pListener)
Subscribes a Listener object for all events
OIL::CEventT< const CParser, const PitchBend > evPitchBend
Event Raised when Parser encounters a PitchBend command.
void RemoveListener(CParserListener *pListener)
UnSubscribes the Listener Object from the events
Failure while conveting/retrieving a Duration number.
MACRO_END missing while parsing a Speed Macro.
Memory allocation failed.
Failure while converting/retrieving a Instrument number.
OIL::CEventT< const CParser, const Tempo > evTempo
Event Raised when Parser encounters a Tempo command.
MACRO_END missing while parsing a Key Signature Macro.
No Assignment symbol found.
Specified a KeySignature beyond permitted range [0, 14] , [64, 78], [129, 200].
Failure while converting/retrieving a Speed number.
Specified a Talam beyond permitted range [0, 35].
Failure while conveting/retrieving the Denominator of Tuplet fraction.
OIL::CEventT< const CParser, const ControllerEvent > evController
Event Raised when Parser encounters a MIDI Controller Event.
MACRO_END missing while parsing a Controller Index Macro.
Failure while conveting/retrieving an Octave macro number.
Invalid Alphabet encountering while trying to read a Note Symbol.
MACRO_END missing while parsing an Duration Macro.
Specified a voice that is beyond the permitted range [0, 15].
OIL::CEventT< const CParser > evMeasure
Event Raised when Parser encounters a Measure bar.
OIL::CEventT< const CParser, const KeySignature > evKeySignature
Event Raised when Parser encounters a Key Signature command.
OIL::CEventT< const CParser, TraceEventHandlerArgs > evTrace
Raised by Parser during the Parsing.
Specified a Speed beyond permitted range [1, 6].
MACRO_END missing while parsing a Polyphonic Pressure Macro.
OIL::CEventT< const CParser, ErrorEventHandlerArgs > evError
Raised when a parse error happens.
MACRO_END missing while parsing a numeric note.
OIL::CEventT< const CParser, const Note > evNote
Event Raised when Parser encounters a Note.
MACRO_END missing while parsing a PitchBend Macro.
const TCHAR * szToken
Token the error is applicable for.
MACRO_END missing while parsing an Octave Macro.
Failure while converting/retrieving a Polyphonic Pressure number.
MACRO_END missing while parsing a Tempo Macro.
ErrorCode
Error code values used by ErrorEventHandlerArgs
OIL::CEventT< const CParser, const ChannelPressure > evChannelPressure
Event Raised when Parser encounters a Channel Pressure command.
const ErrorCode errCode
Error Code.
const TCHAR * szTraceMsg
The Error message sent by Parser.
Specified an inversion root note that is not with in acceptable range of values.
Failure while converting/retrieving a Time number.
MACRO_END missing while parsing a Layer Macro.
OIL::CEventT< const CParser, const PolyphonicPressure > evPolyphonicPressure
Event Raised when Parser encounters a Key Pressure command.
OIL::CEventT< const CParser, const Time > evTime
Event Raised when Parser encounters a Time command.
Base class that represents a Parser Object.
Failure while converting/retrieving a Controller Value number.
OIL::CEventT< const CParser > evParalleNote
Encountered a Parallel note after a first note.
Failure while conveting/retrieving a Velocity number.
Failure while converting/retrieving a Voice number.
Failure while converting/retrieving a Chord Inversion Root Note number.
OIL::CEventT< const CParser > evSequentialNote
Encountered a Sequential note after a first note.
Specified an octave that is beyond the permitted range [0, 10].
MACRO_END missing while parsing a Chord Inversion.
OIL::CEventT< const CParser, const Instrument > evInstrument
Event Raised when Parser encounters an Instrument command.
const TCHAR * szErrMsg
The Error message sent by Parser.
Failure while converting/retrieving a Layer number.
OIL::CEventT< const CParser, const Layer > evLayer
Event Raised when Parser encounters a Layer command.
Failure while converting/retrieving a Key Signature number.
Failure while converting/retrieving a Talam number.
MACRO_END missing while parsing a Talam Macro.
bool bShouldStopParsing
Should Parser continue to parse or should stop now? (only for PARSE_ERRORS)
void RaiseEvent(CEventT< TEventSource, TEventHandlerArgs > *pEvent, TEventHandlerArgs *pArgs)
MACRO_END missing while parsing a Time Macro.
virtual bool Error(ErrorCode argErrCode, const TCHAR *szTraceMsg, const TCHAR *szToken)
MACRO_END missing while parsing a Controller Index Macro.
MACRO_END missing while parsing a Instrument Macro.
Failure while converting/retrieving a Tempo number.