Re: [Cppcms-users] Plugins and templates
Brought to you by:
artyom-beilis
From: Julian P. <ju...@wh...> - 2010-08-19 16:58:10
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 19.08.2010 18:49, schrieb Julian Pietron: > Would it be possible to register a view at runtime? As I see in the code > generated of cppcms_tmpl_cc, the template loader registers the skin > alongside with a mapping_type that contains the name of view and the > appropriate handler class / the result of passing it together with the > required content object to view_builder. > So could you add a call like > cppcms::views_pool::static_instance::extend_view("skin","view > name",&cppcms::views_pool::view_builder<skin::view_class,content::master>); > that I could call in the constructor of my plugin? > I would then compile the output of cppcms_tmpl_cc excluding the loader > to my shared object and could add the required views at runtime to > cppcms view_pool. > It would be good if there also was a call like reduce_view("skin","view > name"); just to remove a view when plugin is unloaded. > > Thanks, > Julian Additionally, it would be nice if cppcms_tmpl_cc could be modified to generate a header file alongside the cpp, so that I can easily include it into my plugin and use all classes that have been created by cppcms_tmpl_cc. Many Thanks, Julian -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJMbWKZAAoJENidYKvYQHlQ0dgQAKRYADJ5xE43bh3WV88vHE0S UlBqSfP/jug0EqnYHrLtM8xyYDwXVeWmG/uumvJUH2WreHxpPHwFv3ihLXiT68mT R4KCzOr+H60KNFzEfVRx3+Ue0JZIJMp8ZBqsZnMmdEWgaYjah8GaLYziVXKepTn9 iZErFpeLYqMe0FYjPEZH4e39GB2BSEHDow+20QYiTMsNiI8roiQ7MQnfKNn40KxX +6LNa0AfGSZ9tNsU5jiAL3QUi4v6RhYUK3+KWK3IigGf4y9dEHAjZTS85Xc7M2ch Qmt41JmBKLZMkmSTasW6zD0FKzDhIqFehuMxx05oafyzTAYkQaE7j59QobbTkxDQ zcope+Z7K05LAwCvv6iVAOyK0fItIqoQNGGCH37sr/Ekxj2LRPWBDcz7BzxKHuQV zuEnYy4UpEklI+Iu9bBvxv0mH6PR7LdHDEQsl5jfVhGgCgrUFf9ryY/vMweknJxO 6l9S/udeVB4s8SriEfsP/yikiCTJJXUnF1ArqV00HrgC1CqhhO2JaAik0aavedXB zSychX8kBvDL5GJGTK+8T1tgE1uGPhdr5n8ZaS8MTqS7tgpBjmCCXbpQHhi5YGLB HVFr42n67ZQr2Epu58ehHwYEIh68Sg7Xb9i3rw0JDtAbhRnT4jhEjhnZaND/EV88 ZBixLDfl0f1umwcrwPS0 =u/8a -----END PGP SIGNATURE----- |