Boost logo

Boost Users :

Subject: [Boost-users] MSM: Separating templatized on_entry/on_exit into cpp/h
From: ev_mp (ev_mp_at_[hidden])
Date: 2012-04-16 08:17:24


Hello,

I'm trying to modify the Player example and to separate the on_exit/on_entry
template function definition from declaration so I can hide the actual
implementation details.

"My.h"
...
namespace myNamespace
{
       ...
       // Concrete FSM implementation
       struct player_state_machine : public msm::front::state_machine_def
       {
              ...
              struct Playing : msm::front::state<>
              {
                     template
                     void on_entry(event const &, player_state_machine & );
// { "My Secret Code }
              }
              ......
       }
}

"My.cpp"

namespace myNamespace
{
    ...
    template
    void myNamespace::player_state_machine::Playing::on_entry(Event const &,
player_state_machine & );
    {
     Here I want to put the actual implementation...
     }

Is this feasible ?
If not - what are the alternatives ? As I previously said - putting the
implementation into the header is not an option.

Any help will be appreciated.

Evgeni

--
View this message in context: http://boost.2283326.n4.nabble.com/MSM-Separating-templatized-on-entry-on-exit-into-cpp-h-tp4561329p4561329.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