parser


A parser is a class that Rogus can send incoming MIDI messages to. Once your parser has been made active, when Rogus receives MIDI input, it checks the parser's msg_hnd array based on the type of the message. If msg_hnd for that message type is NULL, Rogus ignores the message. Otherwise, it calls the message handler whose address is in msg_hnd.

class parser {
public:
  typedef void (*handlerp)( MIDI_msg* );
  handlerp msg_hnd[8]; // handlers for the basic message types
  parser();
  virtual ~parser();
};
handlerp msg_hnd[8]
The array of message handlers. This array is initialized to be all NULLs; your parser should set any elements it wants to be non-NULL in its constructor.
parser()
Constructor for parser. You should subclass parser for your own particular application, and instantiate that subclass, rather than actually instantiating a parser. Yes, parser should really be an abstract base class, but I haven't gotten around to doing that.
virtual ~parser()
The destructor. You should override this when you subclass parser to do whatever cleanup you want to do.