HaxeBeluga/Beluga — pull request #124 by jeremyletang (2014-06-05 14:33:38+00:00)
Title: integration of the new trigger system

This PR add to the Beluga Master the finished new trigger systems and implementation of this new system in the internals mods of Beluga.

See details:

### 1- Additional library in use : tinker bell
please run haxelib install tink_macro (version 0.3)
or install from github sources ( version 0.4)

### 2- Metadata's update

beluga.core.macro.MetadataReader must be implemented by all classes that wants to use metadatas.
if you want to add an engine to MetadataReader, just see on how it is done in the TriggerDispatcher.readTriggerMetadata.
in the specific case of TriggerDispatcher, use @bTrigger("trigger_name") just above the method name
It contains the following features :

Compile-time check of existing triggers listened (if not existing, the class and method using it are given in the error message.)TODO:give the line
Can be used on both static and non-static methods. Although, in the later the class instance MUST be reified before the call of its method. All instances will be automatically registered at construction and accordingly called)
Support of mutiple triggers registration, simple given as different arguments of the metadata. e.g : @bTrigger("trigger1", "trigger2", "trigger3", ...)
Type-checked metadata. If anything else than a Const(String()) is give to the metadata, a corresponding exception is raised.