Re: [Cppcms-users] Plugins and templates
Brought to you by:
artyom-beilis
|
From: Artyom <art...@ya...> - 2010-08-20 08:30:49
|
> > 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?
Yes. view registration is done by global constructor placed in created
c++ file, when shared object is loaded it's constructors are called
automatically.
> > 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?
>
Yes. It unregistered in global destructor that are called automatically.
Actually this is the way you can put view's code into your
project and it would "just-work" without giving any specific notices to your
code.
Artyom
|