Re: [Cppcms-users] Document regarding input content filtering
Brought to you by:
artyom-beilis
From: CN <cn...@fa...> - 2016-04-13 03:32:55
|
On Wed, Apr 13, 2016, at 03:37 AM, Artyom Beilis wrote: > Currently there is private member function application::get_pool() I > can create a public version of one or make it public. > I don't recall right now why I have made it private. > > The question is what are you trying to do, when do you need your own > pool? > i.e. I want to know the scenario you are trying to implement so I can > adjust the API accordingly. Oops! I wanted to include this URL in my original message but forgot to do so: http://cppcms.com/wikipp/en/page/cppcms_1_2_filtering Please refer to the tutorial illustrated in "Resubmitting Context". > > Of course you can create some pool_proxy object that you pass to the > constructor of your own application > that keeps the reference to the pool. > > Something like that > > myfilter(cppcms::service &srv, booster::shared_ptr<weak_pool_ptr> ptr)... > > And than use it this way: > > booster::shared_ptr<weak_pool_ptr> proxy(new weak_pool_ptr()); > shared_pool_ptr tmp = cppcms::create_pool<myfilter>(proxy), > (*proxy) = tmp; > srv.applications_pool().mount(tmp,...) > > Also it is quite ugly. It is difficult to read, indeed. I am trying very hard now to understand this example... Before we have a public application::get_pool(), maybe the last statement is supposed to look like this? srv.applications_pool().mount(tmp,proxy...) Thanks a lot! Best regards, CN -- http://www.fastmail.com - Faster than the air-speed velocity of an unladen european swallow |