Re: [Cppcms-users] Plugins and templates
Brought to you by:
artyom-beilis
From: Julian P. <ju...@wh...> - 2010-08-20 08:05:26
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 20.08.2010 09:02, schrieb Artyom: > Hello, > > Also there is a solution you can do: > > 1. Compile the skin into the plugin: i.e. create cpp sources for skin > and link them into the plugin shared object. > 2. When shared object is loaded, it would be automatically loaded to static > instance > of views pool and unloaded when shared object goes. How does this work? Do I have to invoke the loader in the plugin's setup code or is it somehow invoked automatically if I dlopen the library? > 3. In the plugin itself you can use views_pool::static_instance().render(...) > to render the view. > 4. Note: you can't load and unload two plugins simultaneously as it would not be > thread safe, > 5. When plugin is unloaded, the skin would be automatically unregistered from > the static_instance > of views_pool. > Does a simple dlclose() cause that behaviour or do I have to call something in my plugin's destroy operations? Thanks, Julian -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJMbjc7AAoJENidYKvYQHlQOH8QAItTvNZdNfVgmcObyRwTxer7 xq4FrC6A3u6Qy0sVgifadWwjmBxi5FMWa1QsOPEn5WtNgBrX96WjAgq1iixDk92C FIOkLBhrNC0xflX1i9FpeRGRQYq44VQ4TElhzLFDAQJuyPyh8qgoJXj7NyK659sx wgWvzTvXl9zvYqjCPgRkTCkuHEgtAmwXYBQGcBezlw580h+wSiBpdKU+Sia1hT9N NFjRLWjPZcZ4qnr5OMzF4o0vR+oZEr1FQCoKfZrvA6MaoA4abJSHj99jfB4XGzlI pa3FxPCbxNIALIGDj/Ye220Rz/gUiPa9dAoQdBIdYBSbnxMn1SQZaiNO0HdR9TWc IU2m3gLUow99avXopxfQQjn2qS8AAEUE825v2y6V99eFlllFsgYnMePe4I19HPWS xY+xIhsvJBV3mCnOSMQo7y9mgLFQEbzq6bw98idKR0r7iZ8IWkbPhfSq4Fm9AxVN 42gun8of3T74WAKBq+tz98WhO9WKyzj7fEovS5yYmkXNcipdkCTfVeo8tkNjW4Y0 BIj1b5oCuZWMqpFDbQ/kIBiG31oh6FWw9Ml1gAYX/LLN/4PKNzuRc48fletbkWmJ aslAbFHYOURp8i+JH4cWWprZ7VWFQDFdCzHKX3qQDlcmoyB1bXu7SUKivYMfmpEz SpC44ivZess1QtSFBSgY =N8DI -----END PGP SIGNATURE----- |