You could use a global variable. Or create the shared instance in your
main and pass it to your applications like this:
WApplication *createApplication(MyClass *instance, Wt::WEnvironment &env)
{
return new MyApp(instance, env);
}
int main(...)
{
MyClass *instance = new MyClass;
return WRun(argc, argv, boost::bind(createApplication, instance, _1));
}
2011/5/24 Stéphane Letz <[email protected]>:
> Hi,
>
> I see in the documentation "Each user session of your application has a
> corresponding WApplication instance. "
>
> Is there a way to "share" a unique instance between several users?
>
> Thanks.
>
> Stéphane Letz
> ------------------------------------------------------------------------------
> vRanger cuts backup time in half-while increasing security.
> With the market-leading solution for virtual backup and recovery,
> you get blazing-fast, flexible, and affordable data protection.
> Download your free trial now.
> http://p.sf.net/sfu/quest-d2dcopy1
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest