Boost logo

Proto :

Subject: Re: [proto] Visitor Design Pattern
From: joel falcou (joel.falcou_at_[hidden])
Date: 2010-10-26 13:56:02


On 26/10/10 19:44, Eric Niebler wrote:
> struct my_actions_with_state
> {
> // specializations to look up transforms
> // using rules:
> template<typename Rule>
> struct when;
>
> // any ol' state can go here:
> int my_state;
> };
>
> Now, you can pass an instance of my_actions_with_state as a data
> parameter. Proto will use the nested "when" template to find transforms,
> and your transforms can use the my_state member at runtime to do whatever.
>
> Does that help
Oh snap ! Yes :D
Thansk for the head up


Proto list run by eric at boostpro.com