eepp/tigerbeetle — pull request #3 by simark (2014-06-05 03:06:26+00:00)
Title: C++ provider prototype

I'd like some comments about that. Specifically:
* I added the Event::getField method to access the value of an event. It does a linear search. Is there another way?
* I use a dynamic cast to transform an AbstractEventValue* to the good type (eg SintEventValue*). There is a small runtime cost, but if the field happens to be another type, you'll get weird results. Did you see it like that too?
* A series of if () else if () else if ()... to determine the event type would be super inefficient. Do you have an idea for that? If we know all the possible event types (I suppose BT exposes that), we could build an array or map of event_number => function pointer in onInit. This way, we could call the handler function for an event type in constant time.