Boost logo

Boost :

Subject: Re: [boost] Formal Review of Proposed Boost.Process library
From: Artyom (artyomtnk_at_[hidden])
Date: 2011-02-21 08:38:34


>
> Or maybe something like
>
> command_line_params ls_params;
>
> ls_params.add("--reverse");
> ls_params.add("-l");
>
> command_line_params grep_params;
> grep_params.add("^d");
>
> grep.stdin().connect(ls.stdout());
>
> ls.spawn(ls_params);
> grep.spawn(grep_params);
>
> +- - something like that.
>

Or even better:

pipe::connect(ls.stdout(),grep.stdin());

ls.spawn("--reverse","-l","/usr/bin");
grep.spawn("^d");

ls.wait();
grep.wait();

I think this would be much more readable
and what is important maintainable.

Artyom

      


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk