- Joined
- Jul 10, 2007
- Messages
- 6,306
Later, I might consider moving more towards a callback style, or rather a Trigger. This library isn't well written. For now, I don't have time to change it. I was only sharing it. It wasn't open to discussion for edits =P. I don't have time to edit it either way.
I do think careful consideration should be spent on vector vs list and that the underlying data structure should possibly be changed via a template, so long as it follows an interface =). The default data structure should probably be a vector, prioritizing execution performance over maintenance performance.
I have accepted your criticism, I'm just not going to do it. Changing it at this point would be major refactoring all over a massive project. I simply do not have time.
The style I would go for would be this
Trigger<argTypes, structure = std::vector> trigger
trigger.fire(args)
Will likely remove double references or something to give more freedom =)
Examples of use
Trigger<> trigger
trigger.register(callback, args)
trigger.fire()
Trigger<const int&> trigger
trigger.register(callback, args)
trigger.fire(int)
Will be for later of course, when and if I have time =)
edit
thank you
in the future, if I reuse this library, I'll be sure to edit it with your suggestions in mind =)
I do think careful consideration should be spent on vector vs list and that the underlying data structure should possibly be changed via a template, so long as it follows an interface =). The default data structure should probably be a vector, prioritizing execution performance over maintenance performance.
I have accepted your criticism, I'm just not going to do it. Changing it at this point would be major refactoring all over a massive project. I simply do not have time.
The style I would go for would be this
Trigger<argTypes, structure = std::vector> trigger
trigger.fire(args)
Will likely remove double references or something to give more freedom =)
Examples of use
Trigger<> trigger
trigger.register(callback, args)
trigger.fire()
Trigger<const int&> trigger
trigger.register(callback, args)
trigger.fire(int)
Will be for later of course, when and if I have time =)
edit
thank you
in the future, if I reuse this library, I'll be sure to edit it with your suggestions in mind =)