Ticket #409 (closed task: fixed)
Simplify C++ QueryInterface syntax
|Reported by:||Philip||Owned by:||Philip|
|Priority:||Nice to Have||Milestone:|
|Component:||UI & Simulation||Keywords:|
Currently C++ components have to say:
ICmpPosition* cmpPosition = static_cast<ICmpPosition*> (context.GetComponentManager().QueryInterface(GetEntityId(), IID_Position));
which is horrid.
JS just says
var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
which is nicer. C++ has got to have more type declarations, and there's tradeoffs with other desirable features of the code, but it should be possible to do better than the current syntax.
- review_request set to 0
- Milestone changed from Unclassified to Simulation stage 1