Re: [Cppcms-users] How to set default response().out() stream precision?
Brought to you by:
artyom-beilis
|
From: <ele...@ex...> - 2012-06-21 10:17:43
|
> <% gt "{1,precision =10}" using my_high_precision_value %>
That's just not feasible. If I had to do it for every number on the page,
id have to spend like a whole day changing it all.
> If you need to change it globally create a small function in you topmost
> application
> class that all your classes are derived from:
>
> void render(std::string const &template_name,cppcms::basi_context &c)
> {
> response().out() << std::setprecision(10);
> cppcms::application::render(template_name,c);
> }
Yes yes, I'm aware of this. However because the render functions are not
virtual, so they are not intended for overloading. At least that's the way
i've been taught so I did not want to do this either.
Anyway, is there are a reason they are not virtual? There's other
functions cppcms::application that are virtual.
Petr
|