Boost logo

Boost Users :

Subject: [Boost-users] boost.MSM: No member function 'process_any_event' declared
From: RaRi (degoah_at_[hidden])
Date: 2013-03-05 14:02:06


Hi Christophe,

In case a class is derived from the msm::back::state_machine class and used
with the favor_compile_time policy I get the following error:

*No member function 'process_any_event' declared*

Please consider the following code snippets to get more details:

*// MasterStateMachine.hpp*

struct Master_: mgp_state_machine_def<Master_> {
// ...
}

*class MasterStateMachine : public msm::back::state_machine<Master_,
msm::back::favor_compile_time>{

public:
MasterStateMachine () { // some stufff };

}

*// MasterStateMachine.cpp*
#include "MasterStateMachine.hpp"
BOOST_MSM_BACK_GENERATE_PROCESS_EVENT(MasterStateMachine)

Why does the compiler complains although the class MasterStateMachine
inherits the "process_any_event" method from the
*msm::back::state_machine<Master_, msm::back::favor_compile_time>* back-end?

The point of matter is the
*BOOST_MSM_BACK_GENERATE_PROCESS_EVENT(MasterStateMachine)* macro. In case
it is uncomment, everythin works fine, but unfortunately without the support
of the favor_compile_time policy.

Background: I need to derive the class *MasterStateMachine * from the the
mentioned back-end as singleton semantic has to be added to the
*MasterStateMachine * class. *Not using* the favor_compile_policy is not a
option!

I have already tried to overload the *process_any_event* method in the
derived "MasterStateMachine" class to comply with the compilers needs:

class MasterStateMachine : public msm::back::state_machine<Master_,
msm::back::favor_compile_time>{

        private:
                static MasterStateMachine *m_Instance;
                // Constructor to avoid instantiation from the outside
                MasterStateMachine() {};
                // Constructor to avoid copy-constructing
                MasterStateMachine(const MasterStateMachine&) {}
                // Constructor to avoid assignation
                MasterStateMachine& operator = (const MasterStateMachine&) { return *this;
}
           ~MasterStateMachine() {};
public:
         static MasterStateMachine* getInstance();
         static void release();
                  msm::back::HandledEnum process_any_event(const boost::any & evt) {
                         return this->process_any_event(evt);
                 }
};*

Unfortunately the error remains!

Does anybody ;) have a clue?

Thanks in advanced!

Regards,

Rafael

--
View this message in context: http://boost.2283326.n4.nabble.com/boost-MSM-No-member-function-process-any-event-declared-tp4643820.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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