HaxeBeluga/Beluga — pull request #96 by regnarock (2014-04-26 10:10:33+00:00)
Title: Added metadatas to catch triggers from code.

After a refactoring on how triggers are done (no more trigger class, now using a map instead of an array for faster access at runtime), I created macros to catch triggers from source files with metadatas instead of configuration files.
how to use :
- place the metadata "@trigger("trigger.name") before each static method you want to be called.
- use the balise with the argument class for all classes containing metadatas.
- inexisting catched triggers raise an exception at compiletime

issues:
- cannot be used internaly for Beluga's modules, they still need to use configuration files (see #94)
- classes containing metadatas still need to be specified in a configuration file. This is dependent on the way HaXe's compilation is done and thus, cannot be worked around.

upgrades :
- the way metadatas are read are completely linked into TriggerDispatcher for now. This need to be abstracted.