Re: [Cppcms-users] Document regarding input content filtering
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@gm...> - 2016-04-12 19:37:26
|
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.
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.
Artyom
On Tue, Apr 12, 2016 at 7:13 PM, CN <cn...@fa...> wrote:
> Greetings,
>
> I can imagine we might be able to put something like this
>
> my_cppcms_service.applications_pool().mount(cppcms::create_pool<myfilter>(),cppcms::mount_point("(.*)",1),cppcms::app::asynchronous
> | cppcms::app::content_filter);
>
> in
>
> int main(int,char**){ //here }
>
> , but I have trouble figuring out how to pass
> booster::weak_ptr<cppcms::application_specific_pool>
> or
> booster::shared_ptr<cppcms::application_specific_pool>
> as the argument to the constructor of myfilter:
>
> myfilter(cppcms::service &srv, weak_pool_ptr ptr):
> cppcms::application(srv),
> wpool_(ptr)
> {
> ..
> }
>
> I will much appreciate if some kind soul will provide me an example in
> int main(int,char**){ //here }
>
> Best regards,
> CN
>
> --
> http://www.fastmail.com - Accessible with your email software
> or over the web
>
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
|