Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::statechart "custom::reaction"
From: rahul baruah (rahul03baruah_at_[hidden])
Date: 2013-11-05 05:41:28


*.cpp file

template< class MostDerived >
sc::result NotReady::react( const PairingBaseEvents< MostDerived > &
PAEvent){
if (typeid(EntryEvent).name() == typeid(PAEvent).name())
{
outermost_context().maxPairedDevices++;
return discard_event();
}
}

i Have a mpl:list defined in another header file.

On Mon, Nov 4, 2013 at 7:00 PM, Igor R <boost.lists_at_[hidden]> wrote:

> > I am using boost::statechart. Instead of simple_state , using
> boost::statechart::state.
> > Now i am able to access the state_machine member variable. but when i am
> using custom::reaction or mpl::list it throught error.
> > Code Snippet:
> >
> > struct NotReady : StateBase< NotReady, TopState >
> > {
> > //typedef NotReadyStateList reactions;
> > NotReady (my_context ctx) : my_base( ctx ){
> > outermost_context().maxPairedDevices = 3;
> > cout << outermost_context().maxPairedDevices << endl;
> > }
> >
> > template< class MostDerived >
> > sc::result react( const PairingBaseEvents< MostDerived > & );
> > public:
> > typedef sc::custom_reaction< StartEvent > reactions;
> > };
> >
> > Error:
> > ndefined reference to `boost::statechart::detail::safe_reaction_result
> NotReady::react<StartEvent>(PairingBaseEvents<StartEvent> const&)'
>
>
>
> Where do you define the above "react" member function template?
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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