Re: [Cppcms-users] Plugins and templates
Brought to you by:
artyom-beilis
|
From: Julian P. <ju...@wh...> - 2010-08-19 16:49:50
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJMbWClAAoJENidYKvYQHlQydIQAJb4slmqYNrrEYrbWGX3zeBi
+mODXwD2CeDaKO3dbDS8RFBO+Fm53iZfqDKe9dKB8Ao0cWQW3HM914iEIsu+fB7g
Q1qtSRziPByiX7aBBDxvVjpM0BmwlhkoYGirGNzH4mxzlyA9JekdszMOiRL3uDZL
U1KCxsvSWNUoAmpTRUZJwrOsRdM2d6MmDToW2oq2caoKpeqTkYYIWSSOSDGjLyjh
wm8d8othE7AafE9wpfwodDDXJyhxkGwB/fiUwOVJ9ezeUjPLXwT6ZfZkko0DYXT4
4nCPueq9/t73jpNvxT8mjsQ1j/XV9Qs1ina1ou6XPDtoGONuFToBJSiMW7XmqCy8
nD3bEHhsGlF2MHZjOP1pd+IDhy8uOIuOeaZJo9WEKm+U/uX9U8qfVAJttCIRONil
MoyQX1U8W5Ezxl6gxJ7vc+wAmk4aj04JDOZtduYz3pd3Kp1x06R3PmovlI75Fg6c
9MVz7dWHweTArFWQbMs/pm9WX8arKCaFLBH5aKT5YC6PQMUny5xoJTaXcjREHt7H
ifAbsTRyYr9yELNmiYIasxq+YJLNSyiaxYE+LZzdZmsrDuFb2RJolIQapRIMO4oG
joEszGfd/Njfmz5oACoB6VGdbimTJKhQvlC9VZAqlLIUG2DhwWScoDlHILEd51NL
KaqLRkg7weBreMEOda8K
=VFk6
-----END PGP SIGNATURE-----
|