Boost logo

Boost Users :

Subject: Re: [Boost-users] [StateChart] Accessing machine and state members from within state constructor
From: Andre Puschmann (andre.puschmann_at_[hidden])
Date: 2012-07-11 14:48:38


On 07/11/2012 01:19 PM, Igor R wrote:
>> StateBase( my_context ctx ) : base_type( ctx )
>> {
>> std::cout << "StateBase cst" << std::endl;
>> // critical section
>> outermost_context().fsmValue++; // access member of FSM
>> (outermost context)
>> ctx().stateValue++; // access member in direct context
>
>
> The above line sould be:
>
> context<Active>().stateValue++;
>

Hi Igor,
what you suggested works from within the constructor of State1 but
Active is not known to the constructor of the base class. And that's
exactly the problem with outermost_context() too.

Thanks again,
-Andre


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net