Re: [Cppcms-users] url dispatching
Brought to you by:
artyom-beilis
|
From: mawan s. <ma...@gm...> - 2016-06-27 10:59:01
|
sometimes we found 0 parameters ( message board example), what is it mean
(espescially for 0 parameters, not 1)?
On Jun 27, 2016 5:40 PM, "Vinicius Pavanelli" <ds...@ha...> wrote:
> It's regular expressions.
>
> When you say "/number/(\\d+)" you mean to check for strings starting with
> /number/ and capture all numbers following it "(\\d+)", the 1 after is to
> pass this parameter.
>
> When you say ".*" it means every strings, as "." match every char and *
> means any number of it, the 0 means it will not pass arguments as it don't
> capture nothing.
>
> If you are still lost, look for a tutorial on regexp or regular expression
> on the net.
>
> The pointer is the &hello::number part, a pointer to a function, and you
> must pass this as it's a function of a class.
>
> Hope this helps,
> Vinicius
>
> On 26-06-2016 06:57, mawan sugiyanto wrote:
>
> Dear All
>
> what is different between :
> some time we meet example :
>
> dispatcher().assign("/number/(\\d+)",&hello::number,this,1);
>
> and
>
> dispatcher().assign(".*",&dashboard::prepare,this,0);
>
> is 0 or 1 is pointer only or we have too fill with parameters start from 1?
>
> thankyou
>
>
> mawan
>
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.http://sdm.link/attshape <https://u3143608.ct.sendgrid.net/wf/click?upn=XKgXTBnynYc51QNK-2FVhLWGHEVgnlGmLptX1YaZ-2FDzWM-3D_QqpctyXzj3McV7nyWd3l9m7lCO1pRhWOf-2FT5RqYYs597RjT9wvGhEJXv4m7jZD-2BEYUwavzgRUkWhGzCT6bHX2aUYfDFcqGqm2Ube6mhSkTXYnfrP7bSWUz9kg-2F9Wc3NS6LXQ-2Bg-2FnU3OgAaWNnAPZOQtzRu6Qh6-2BI6mHLs3hF8-2FfLcUUbXQ0nwpRTe2zPUuTFLWtxJngNofzZJ-2FYufz6OAsmMHOTBYZ2Ji3-2B62MEMpTM-3D>
>
>
>
> _______________________________________________
> Cppcms-users mailing lis...@li...://lists.sourceforge.net/lists/listinfo/cppcms-users <https://u3143608.ct.sendgrid.net/wf/click?upn=-2F8o2SEPnO8o0gkz01Z4rS-2BVz-2BkzajgLQzAoqRKlFQZMZV23PrrGQX1Y-2FnO6KyV7Cg6qnA3jfnwVVC-2BvfFaL4kRlo5qTOuSuNLjAJ4aI-2BCTA-3D_QqpctyXzj3McV7nyWd3l9m7lCO1pRhWOf-2FT5RqYYs597RjT9wvGhEJXv4m7jZD-2BEYUwavzgRUkWhGzCT6bHX2d8AA67eJHjVzt2yeIO8pS1b0GQNMv-2FZnHWi1C42hwT9DyfI48AtiAUdI7EMIxEqGuvso2CoI32GvyIPnV3hEwgOtM8a2fV-2BdACJ-2FtMf4kkTM9RvYbBDMje22zuX2JxBhZlYBJ1b1TfFeyt1ZFxrYd4-3D>
>
>
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
>
|