Boost logo

Boost :

Subject: Re: [boost] [log][phoenix] Questions on porting to phoenix
From: Thomas Heller (thom.heller_at_[hidden])
Date: 2012-01-23 08:07:11


On Mon, Jan 23, 2012 at 1:57 PM, Andrey Semashev
<andrey.semashev_at_[hidden]> wrote:
> On Mon, Jan 23, 2012 at 2:37 PM, TONGARI <tongari95_at_[hidden]> wrote:
>>
>> I wrote the sample code that conforms these requirements, full code
>> attached.
>
> Thanks a lot, this will greatly help me to get started.
>
> So, as I understand, the env argument to the actor contains arguments
> provided for evaluation. In case of filtering expression, this is fine
> as there is only one argument - the set of attributes. But in case of
> formatter there are two arguments - the stream and the log record.
> Does Phoenix pass both arguments to the actor in this case?

Yes, the environment is a fusion tuple.
It is layouted as follows:
+------------------------------+---------+
| Arguments: | Actions |
| +------+------+ ... +------+ | |
| | Arg0 | Arg1 | ... | ArgN | | |
| +------+------+ ... +------+ | |
+------------------------------+---------+

where Arguments can be accessed with env.args() or phoenix::context(env)
Actions are the proto external transforms which determine how the
expression will be evaluted.
I have to admit the docs are very unclear about that specifc part ...
needs some loving.


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