Boost logo

Boost :

Subject: Re: [boost] [statechart] Undefined type
From: s_a_white_at_[hidden]
Date: 2010-03-16 06:10:00


Hi Andreas,

Thankyou for your help. The code example previously sent was providing an overview of the code layout (transitions removed). Adding transitions shows the problem under vc2003 e.g:

#ifndef M_HPP_INCLUDED
 M_HPP_INCLUDED
#define M_HPP_INCLUDED
 
 M_HPP_INCLUDED
 
#include <boost/statechart/state_machine.hpp>
 <boost/statechart/state_machine.hpp>
#include <boost/statechart/simple_state.hpp>
 <boost/statechart/simple_state.hpp>
#include <boost/statechart/custom_reaction.hpp>
 <boost/statechart/custom_reaction.hpp>
#include <boost/statechart/event.hpp>
 <boost/statechart/event.hpp>
#include <boost/statechart/transition.hpp>
 <boost/statechart/transition.hpp>

namespace sc = boost::statechart;
 sc = boost::statechart;
namespace mpl = boost::mpl;
 mpl = boost::mpl;

struct A1;
 A1;
struct A2;
 A2;
struct A3;
 A3;
struct B0;
 B0;
struct C0;
 C0;

struct EvA1ToA2 : sc::event< EvA1ToA2 > {};
 EvA1ToA2 : sc::event< EvA1ToA2 > {};
struct EvA2ToA3 : sc::event< EvA2ToA3 > {};
 EvA2ToA3 : sc::event< EvA2ToA3 > {};
struct EvA3ToA1 : sc::event< EvA3ToA1 > {};
 
 EvA3ToA1 : sc::event< EvA3ToA1 > {};
 
struct M: sc::state_machine< M, A1 >
{
M () {}
~M () {}
void start ();
};

 M: sc::state_machine< M, A1 >
{
M () {}
~M () {}
void start ();
};

void start ();
};

struct A1 : sc::simple_state< A1, M >
{
typedef sc::transition< EvA1ToA2, A2 > reactions;
A1() {}
~A1() {}
};

 A1 : sc::simple_state< A1, M >
{
typedef sc::transition< EvA1ToA2, A2 > reactions;
A1() {}
~A1() {}
};

typedef sc::transition< EvA1ToA2, A2 > reactions;
A1() {}
~A1() {}
};

struct A2 : sc::simple_state< A2, M >
{
typedef sc::transition< EvA2ToA3, A3 > reactions;
A2() {}
~A2() {}
};

 A2 : sc::simple_state< A2, M >
{
typedef sc::transition< EvA2ToA3, A3 > reactions;
A2() {}
~A2() {}
};

typedef sc::transition< EvA2ToA3, A3 > reactions;
A2() {}
~A2() {}
};

struct A3 : sc::simple_state< A3, M, mpl::list<B0, C0> >
{
typedef sc::transition< EvA3ToA1, A1 > reactions;
A3() {}
~A3() {}
};

 A3 : sc::simple_state< A3, M, mpl::list<B0, C0> >
{
typedef sc::transition< EvA3ToA1, A1 > reactions;
A3() {}
~A3() {}
};

typedef sc::transition< EvA3ToA1, A1 > reactions;
A3() {}
~A3() {}
};

#endif

Regards,
Simon

-----Original Message-----
From: Andreas Huber <ahd6974-spamboostorgtrap_at_[hidden]>
To: boost_at_[hidden]
Sent: Mon, Mar 15, 2010 8:43 pm
Subject: Re: [boost] [statechart] Undefined type

Hi Simon
 
Unfortunately, I cannot reproduce your errors with Visual Studio 2008. See attached zip for the exact code I tested. The code is pretty much equivalent to yours, the only deviation is that in my project did not add A.cpp (because it contains the same code as M.cpp). Could you please test the attached code with your version of Visual Studio and see whether you still get those errors?
 
Regards,
 
-- Andreas Huber
 
When replying by private email, please remove the words spam and trap
from the address shown in the header.

_______________________________________________
nsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk