JiphuTzu / pococapsule

Automatically exported from code.google.com/p/pococapsule
0 stars 0 forks source link

enhance static type safety for getBean() #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
support a new method:

template <class T> T getBean(......) to AppContext. So, instead of doing:

  A* bean = (A*)ctxt->getBean("myBean", "A");

one can do:

  A*  bean = ctxt->getBean<A*>("myBean");

---
minor engine change (tested already)
minor code generation change (tested already).
document change needed.

Original issue reported on code.google.com by kjin...@gmail.com on 31 Mar 2010 at 5:11

GoogleCodeExporter commented 9 years ago
target for 1.2

Original comment by kjin...@gmail.com on 31 Mar 2010 at 5:28

GoogleCodeExporter commented 9 years ago

Original comment by kjin...@gmail.com on 3 Apr 2010 at 6:01