Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2006-08-11 18:37:47


Andreas Pokorny wrote:

>> I guess I'm still not clear about "attributes". What are those, really?
>> And why will attributes not work with segmented sequences? or not
>> required?
>
> An attribute is a compile time or compile time and runtime information
> stored for an expression tree, and identified by a key type.
>
[snip example]
>
> This information is stored inside a container and wrapped inside key-value pairs, to
> be able to write generic rules. Rules not coupled to the attribues they process.
> So rule can simply take all attributes of either operands and combine them where possible,
> or update their values/types if required and store the results inside the expression
> encoding data structure returned by the rule.
>
> To define an attribute one needs a key type, and some meta functions which get called by
> the rule, e.g. if an attribute occurs on both operands of a node, a combine meta function
> is called.
>
> My statement about attributes and segmented sequences is probably wrong. Attributes just
> need a fusion::map and rules that invoke the automated attribute processing.

Ah! Pretty cool!

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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