|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63060 - in branches/release/libs/msm: . doc doc/HTML doc/HTML/examples doc/HTML/examples/distributed_table doc/HTML/examples/iPod_distributed doc/PDF doc/PDF/examples doc/PDF/examples/distributed_table doc/PDF/examples/iPod_distributed doc/images doc/src test
From: christophe.j.henry_at_[hidden]
Date: 2010-06-17 15:48:04
Author: chenry
Date: 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
New Revision: 63060
URL: http://svn.boost.org/trac/boost/changeset/63060
Log:
added msm
Added:
branches/release/libs/msm/
- copied from r62129, /trunk/libs/msm/
branches/release/libs/msm/doc/
- copied from r62129, /trunk/libs/msm/doc/
branches/release/libs/msm/doc/HTML/
- copied from r62129, /trunk/libs/msm/doc/HTML/
branches/release/libs/msm/doc/HTML/boost.css
- copied unchanged from r62129, /trunk/libs/msm/doc/HTML/boost.css
branches/release/libs/msm/doc/HTML/boostbook.css
- copied unchanged from r62129, /trunk/libs/msm/doc/HTML/boostbook.css
branches/release/libs/msm/doc/HTML/ch01.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch01.html
branches/release/libs/msm/doc/HTML/ch02.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch02.html
branches/release/libs/msm/doc/HTML/ch02s02.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch02s02.html
branches/release/libs/msm/doc/HTML/ch02s03.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch02s03.html
branches/release/libs/msm/doc/HTML/ch03.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch03.html
branches/release/libs/msm/doc/HTML/ch03s02.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch03s02.html
branches/release/libs/msm/doc/HTML/ch03s03.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch03s03.html
branches/release/libs/msm/doc/HTML/ch03s04.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch03s04.html
branches/release/libs/msm/doc/HTML/ch03s05.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch03s05.html
branches/release/libs/msm/doc/HTML/ch04.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch04.html
branches/release/libs/msm/doc/HTML/ch04s02.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch04s02.html
branches/release/libs/msm/doc/HTML/ch04s03.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch04s03.html
branches/release/libs/msm/doc/HTML/ch04s04.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch04s04.html
branches/release/libs/msm/doc/HTML/ch04s05.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch04s05.html
branches/release/libs/msm/doc/HTML/ch05.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch05.html
branches/release/libs/msm/doc/HTML/ch06.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch06.html
branches/release/libs/msm/doc/HTML/ch06s02.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch06s02.html
branches/release/libs/msm/doc/HTML/ch06s03.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch06s03.html
branches/release/libs/msm/doc/HTML/ch06s04.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch06s04.html
branches/release/libs/msm/doc/HTML/ch07.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch07.html
branches/release/libs/msm/doc/HTML/ch07s02.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch07s02.html
branches/release/libs/msm/doc/HTML/ch08.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch08.html
branches/release/libs/msm/doc/HTML/ch09.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch09.html
branches/release/libs/msm/doc/HTML/ch10.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/ch10.html
branches/release/libs/msm/doc/HTML/docutils.css
- copied unchanged from r62129, /trunk/libs/msm/doc/HTML/docutils.css
branches/release/libs/msm/doc/HTML/examples/
- copied from r62129, /trunk/libs/msm/doc/HTML/examples/
branches/release/libs/msm/doc/HTML/examples/AnonymousTutorial.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/AnonymousTutorial.cpp
branches/release/libs/msm/doc/HTML/examples/AnonymousTutorialEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/AnonymousTutorialEuml.cpp
branches/release/libs/msm/doc/HTML/examples/AnonymousTutorialWithFunctors.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/AnonymousTutorialWithFunctors.cpp
branches/release/libs/msm/doc/HTML/examples/BoostCon09Full.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/BoostCon09Full.cpp
branches/release/libs/msm/doc/HTML/examples/CompilerStressTestEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/CompilerStressTestEuml.cpp
branches/release/libs/msm/doc/HTML/examples/CompositeTutorial.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/CompositeTutorial.cpp
branches/release/libs/msm/doc/HTML/examples/CompositeTutorialEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/CompositeTutorialEuml.cpp
branches/release/libs/msm/doc/HTML/examples/DirectEntryEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/DirectEntryEuml.cpp
branches/release/libs/msm/doc/HTML/examples/DirectEntryTutorial.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/DirectEntryTutorial.cpp
branches/release/libs/msm/doc/HTML/examples/EumlInternal.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/EumlInternal.cpp
branches/release/libs/msm/doc/HTML/examples/EumlInternalDistributed.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/EumlInternalDistributed.cpp
branches/release/libs/msm/doc/HTML/examples/EumlSimple.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/EumlSimple.cpp
branches/release/libs/msm/doc/HTML/examples/Flags.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/Flags.cpp
branches/release/libs/msm/doc/HTML/examples/History.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/History.cpp
branches/release/libs/msm/doc/HTML/examples/HistoryEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/HistoryEuml.cpp
branches/release/libs/msm/doc/HTML/examples/MsmComposite.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/MsmComposite.cpp
branches/release/libs/msm/doc/HTML/examples/MsmSimple.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/MsmSimple.cpp
branches/release/libs/msm/doc/HTML/examples/MsmSimpleFunctors.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/MsmSimpleFunctors.cpp
branches/release/libs/msm/doc/HTML/examples/Orthogonal-deferred.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/Orthogonal-deferred.cpp
branches/release/libs/msm/doc/HTML/examples/Orthogonal-deferred2.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/Orthogonal-deferred2.cpp
branches/release/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml.cpp
branches/release/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml2.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml2.cpp
branches/release/libs/msm/doc/HTML/examples/ParsingDigits.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/ParsingDigits.cpp
branches/release/libs/msm/doc/HTML/examples/SC Composite.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SC Composite.cpp
branches/release/libs/msm/doc/HTML/examples/SC Simple.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SC Simple.cpp
branches/release/libs/msm/doc/HTML/examples/SM-2Arg.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SM-2Arg.cpp
branches/release/libs/msm/doc/HTML/examples/SimpleTimer.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTimer.cpp
branches/release/libs/msm/doc/HTML/examples/SimpleTutorial.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorial.cpp
branches/release/libs/msm/doc/HTML/examples/SimpleTutorial2.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorial2.cpp
branches/release/libs/msm/doc/HTML/examples/SimpleTutorialEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorialEuml.cpp
branches/release/libs/msm/doc/HTML/examples/SimpleTutorialEuml2.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorialEuml2.cpp
branches/release/libs/msm/doc/HTML/examples/SimpleTutorialInternal.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorialInternal.cpp
branches/release/libs/msm/doc/HTML/examples/SimpleTutorialInternal2.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorialInternal2.cpp
branches/release/libs/msm/doc/HTML/examples/SimpleTutorialInternalFunctors.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorialInternalFunctors.cpp
branches/release/libs/msm/doc/HTML/examples/SimpleWithFunctors.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleWithFunctors.cpp
branches/release/libs/msm/doc/HTML/examples/SimpleWithFunctors2.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleWithFunctors2.cpp
branches/release/libs/msm/doc/HTML/examples/SimpleWithFunctors3.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleWithFunctors3.cpp
branches/release/libs/msm/doc/HTML/examples/TestInternal.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/TestInternal.cpp
branches/release/libs/msm/doc/HTML/examples/char_event_dispatcher.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/char_event_dispatcher.hpp
branches/release/libs/msm/doc/HTML/examples/distributed_table/
- copied from r62129, /trunk/libs/msm/doc/HTML/examples/distributed_table/
branches/release/libs/msm/doc/HTML/examples/distributed_table/DistributedTable.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/distributed_table/DistributedTable.cpp
branches/release/libs/msm/doc/HTML/examples/distributed_table/Empty.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/distributed_table/Empty.cpp
branches/release/libs/msm/doc/HTML/examples/distributed_table/Empty.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/distributed_table/Empty.hpp
branches/release/libs/msm/doc/HTML/examples/distributed_table/Events.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/distributed_table/Events.hpp
branches/release/libs/msm/doc/HTML/examples/distributed_table/Open.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/distributed_table/Open.cpp
branches/release/libs/msm/doc/HTML/examples/distributed_table/Open.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/distributed_table/Open.hpp
branches/release/libs/msm/doc/HTML/examples/iPodEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/iPodEuml.cpp
branches/release/libs/msm/doc/HTML/examples/iPodSearch.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/iPodSearch.cpp
branches/release/libs/msm/doc/HTML/examples/iPodSearchEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/iPodSearchEuml.cpp
branches/release/libs/msm/doc/HTML/examples/iPod_distributed/
- copied from r62129, /trunk/libs/msm/doc/HTML/examples/iPod_distributed/
branches/release/libs/msm/doc/HTML/examples/iPod_distributed/Events.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/iPod_distributed/Events.hpp
branches/release/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.cpp
branches/release/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.hpp
branches/release/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.cpp
branches/release/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.hpp
branches/release/libs/msm/doc/HTML/examples/iPod_distributed/iPod.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/iPod_distributed/iPod.cpp
branches/release/libs/msm/doc/HTML/examples/ipod_functors.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/ipod_functors.hpp
branches/release/libs/msm/doc/HTML/examples/logging_functors.h
- copied, changed from r62129, /trunk/libs/msm/doc/HTML/examples/logging_functors.h
branches/release/libs/msm/doc/HTML/index.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/index.html
branches/release/libs/msm/doc/HTML/minimal.css
- copied unchanged from r62129, /trunk/libs/msm/doc/HTML/minimal.css
branches/release/libs/msm/doc/HTML/pr01.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/pr01.html
branches/release/libs/msm/doc/HTML/pt01.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/pt01.html
branches/release/libs/msm/doc/HTML/pt02.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/pt02.html
branches/release/libs/msm/doc/HTML/re01.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/re01.html
branches/release/libs/msm/doc/HTML/re02.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/re02.html
branches/release/libs/msm/doc/HTML/re03.html
- copied unchanged from r62918, /trunk/libs/msm/doc/HTML/re03.html
branches/release/libs/msm/doc/HTML/reference.css
- copied unchanged from r62129, /trunk/libs/msm/doc/HTML/reference.css
branches/release/libs/msm/doc/PDF/
- copied from r62129, /trunk/libs/msm/doc/PDF/
branches/release/libs/msm/doc/PDF/examples/
- copied from r62129, /trunk/libs/msm/doc/PDF/examples/
branches/release/libs/msm/doc/PDF/examples/AnonymousTutorial.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/AnonymousTutorial.cpp
branches/release/libs/msm/doc/PDF/examples/AnonymousTutorialEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/AnonymousTutorialEuml.cpp
branches/release/libs/msm/doc/PDF/examples/AnonymousTutorialWithFunctors.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/AnonymousTutorialWithFunctors.cpp
branches/release/libs/msm/doc/PDF/examples/BoostCon09Full.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/BoostCon09Full.cpp
branches/release/libs/msm/doc/PDF/examples/CompilerStressTestEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/CompilerStressTestEuml.cpp
branches/release/libs/msm/doc/PDF/examples/CompositeTutorial.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/CompositeTutorial.cpp
branches/release/libs/msm/doc/PDF/examples/CompositeTutorialEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/CompositeTutorialEuml.cpp
branches/release/libs/msm/doc/PDF/examples/DirectEntryEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/DirectEntryEuml.cpp
branches/release/libs/msm/doc/PDF/examples/DirectEntryTutorial.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/DirectEntryTutorial.cpp
branches/release/libs/msm/doc/PDF/examples/EumlInternal.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/EumlInternal.cpp
branches/release/libs/msm/doc/PDF/examples/EumlInternalDistributed.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/EumlInternalDistributed.cpp
branches/release/libs/msm/doc/PDF/examples/EumlSimple.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/EumlSimple.cpp
branches/release/libs/msm/doc/PDF/examples/Flags.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/Flags.cpp
branches/release/libs/msm/doc/PDF/examples/History.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/History.cpp
branches/release/libs/msm/doc/PDF/examples/HistoryEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/HistoryEuml.cpp
branches/release/libs/msm/doc/PDF/examples/MsmComposite.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/MsmComposite.cpp
branches/release/libs/msm/doc/PDF/examples/MsmSimple.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/MsmSimple.cpp
branches/release/libs/msm/doc/PDF/examples/MsmSimpleFunctors.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/MsmSimpleFunctors.cpp
branches/release/libs/msm/doc/PDF/examples/Orthogonal-deferred.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/Orthogonal-deferred.cpp
branches/release/libs/msm/doc/PDF/examples/Orthogonal-deferred2.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/Orthogonal-deferred2.cpp
branches/release/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml.cpp
branches/release/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml2.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml2.cpp
branches/release/libs/msm/doc/PDF/examples/ParsingDigits.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/ParsingDigits.cpp
branches/release/libs/msm/doc/PDF/examples/SC Composite.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SC Composite.cpp
branches/release/libs/msm/doc/PDF/examples/SC Simple.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SC Simple.cpp
branches/release/libs/msm/doc/PDF/examples/SM-2Arg.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SM-2Arg.cpp
branches/release/libs/msm/doc/PDF/examples/SimpleTimer.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTimer.cpp
branches/release/libs/msm/doc/PDF/examples/SimpleTutorial.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorial.cpp
branches/release/libs/msm/doc/PDF/examples/SimpleTutorial2.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorial2.cpp
branches/release/libs/msm/doc/PDF/examples/SimpleTutorialEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorialEuml.cpp
branches/release/libs/msm/doc/PDF/examples/SimpleTutorialEuml2.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorialEuml2.cpp
branches/release/libs/msm/doc/PDF/examples/SimpleTutorialInternal.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorialInternal.cpp
branches/release/libs/msm/doc/PDF/examples/SimpleTutorialInternal2.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorialInternal2.cpp
branches/release/libs/msm/doc/PDF/examples/SimpleTutorialInternalFunctors.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorialInternalFunctors.cpp
branches/release/libs/msm/doc/PDF/examples/SimpleWithFunctors.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleWithFunctors.cpp
branches/release/libs/msm/doc/PDF/examples/SimpleWithFunctors2.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleWithFunctors2.cpp
branches/release/libs/msm/doc/PDF/examples/SimpleWithFunctors3.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleWithFunctors3.cpp
branches/release/libs/msm/doc/PDF/examples/TestInternal.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/TestInternal.cpp
branches/release/libs/msm/doc/PDF/examples/char_event_dispatcher.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/char_event_dispatcher.hpp
branches/release/libs/msm/doc/PDF/examples/distributed_table/
- copied from r62129, /trunk/libs/msm/doc/PDF/examples/distributed_table/
branches/release/libs/msm/doc/PDF/examples/distributed_table/DistributedTable.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/distributed_table/DistributedTable.cpp
branches/release/libs/msm/doc/PDF/examples/distributed_table/Empty.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/distributed_table/Empty.cpp
branches/release/libs/msm/doc/PDF/examples/distributed_table/Empty.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/distributed_table/Empty.hpp
branches/release/libs/msm/doc/PDF/examples/distributed_table/Events.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/distributed_table/Events.hpp
branches/release/libs/msm/doc/PDF/examples/distributed_table/Open.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/distributed_table/Open.cpp
branches/release/libs/msm/doc/PDF/examples/distributed_table/Open.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/distributed_table/Open.hpp
branches/release/libs/msm/doc/PDF/examples/iPodEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/iPodEuml.cpp
branches/release/libs/msm/doc/PDF/examples/iPodSearch.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/iPodSearch.cpp
branches/release/libs/msm/doc/PDF/examples/iPodSearchEuml.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/iPodSearchEuml.cpp
branches/release/libs/msm/doc/PDF/examples/iPod_distributed/
- copied from r62129, /trunk/libs/msm/doc/PDF/examples/iPod_distributed/
branches/release/libs/msm/doc/PDF/examples/iPod_distributed/Events.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/iPod_distributed/Events.hpp
branches/release/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.cpp
branches/release/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.hpp
branches/release/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.cpp
branches/release/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.hpp
branches/release/libs/msm/doc/PDF/examples/iPod_distributed/iPod.cpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/iPod_distributed/iPod.cpp
branches/release/libs/msm/doc/PDF/examples/ipod_functors.hpp
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/ipod_functors.hpp
branches/release/libs/msm/doc/PDF/examples/logging_functors.h
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/examples/logging_functors.h
branches/release/libs/msm/doc/PDF/msm.pdf
- copied, changed from r62129, /trunk/libs/msm/doc/PDF/msm.pdf
branches/release/libs/msm/doc/images/
- copied from r62129, /trunk/libs/msm/doc/images/
branches/release/libs/msm/doc/images/AnnexA.jpg
- copied unchanged from r62129, /trunk/libs/msm/doc/images/AnnexA.jpg
branches/release/libs/msm/doc/images/Anonymous.jpg
- copied unchanged from r62129, /trunk/libs/msm/doc/images/Anonymous.jpg
branches/release/libs/msm/doc/images/CompositeTutorial.jpg
- copied unchanged from r62129, /trunk/libs/msm/doc/images/CompositeTutorial.jpg
branches/release/libs/msm/doc/images/FlagsTutorial.jpg
- copied unchanged from r62129, /trunk/libs/msm/doc/images/FlagsTutorial.jpg
branches/release/libs/msm/doc/images/HistoryTutorial.jpg
- copied unchanged from r62129, /trunk/libs/msm/doc/images/HistoryTutorial.jpg
branches/release/libs/msm/doc/images/Orthogonal-deferred.jpg
- copied unchanged from r62129, /trunk/libs/msm/doc/images/Orthogonal-deferred.jpg
branches/release/libs/msm/doc/images/ParsingDigits.jpg
- copied unchanged from r62129, /trunk/libs/msm/doc/images/ParsingDigits.jpg
branches/release/libs/msm/doc/images/SimpleTutorial.jpg
- copied unchanged from r62129, /trunk/libs/msm/doc/images/SimpleTutorial.jpg
branches/release/libs/msm/doc/images/completion.gif
- copied unchanged from r62129, /trunk/libs/msm/doc/images/completion.gif
branches/release/libs/msm/doc/images/conflict1.gif
- copied unchanged from r62129, /trunk/libs/msm/doc/images/conflict1.gif
branches/release/libs/msm/doc/images/conflict2.gif
- copied unchanged from r62129, /trunk/libs/msm/doc/images/conflict2.gif
branches/release/libs/msm/doc/images/entry tutorial.jpg
- copied unchanged from r62129, /trunk/libs/msm/doc/images/entry tutorial.jpg
branches/release/libs/msm/doc/images/entry_point.gif
- copied unchanged from r62129, /trunk/libs/msm/doc/images/entry_point.gif
branches/release/libs/msm/doc/images/error_no_regions.jpg
- copied unchanged from r62129, /trunk/libs/msm/doc/images/error_no_regions.jpg
branches/release/libs/msm/doc/images/exit.gif
- copied unchanged from r62129, /trunk/libs/msm/doc/images/exit.gif
branches/release/libs/msm/doc/images/explicit.gif
- copied unchanged from r62129, /trunk/libs/msm/doc/images/explicit.gif
branches/release/libs/msm/doc/images/fork.gif
- copied unchanged from r62129, /trunk/libs/msm/doc/images/fork.gif
branches/release/libs/msm/doc/images/history.gif
- copied unchanged from r62129, /trunk/libs/msm/doc/images/history.gif
branches/release/libs/msm/doc/images/init_state.gif
- copied unchanged from r62129, /trunk/libs/msm/doc/images/init_state.gif
branches/release/libs/msm/doc/images/regions.gif
- copied unchanged from r62129, /trunk/libs/msm/doc/images/regions.gif
branches/release/libs/msm/doc/images/sm.gif
- copied unchanged from r62129, /trunk/libs/msm/doc/images/sm.gif
branches/release/libs/msm/doc/images/state.gif
- copied unchanged from r62129, /trunk/libs/msm/doc/images/state.gif
branches/release/libs/msm/doc/images/terminate.gif
- copied unchanged from r62129, /trunk/libs/msm/doc/images/terminate.gif
branches/release/libs/msm/doc/images/transition.jpg
- copied unchanged from r62129, /trunk/libs/msm/doc/images/transition.jpg
branches/release/libs/msm/doc/src/
- copied from r62129, /trunk/libs/msm/doc/src/
branches/release/libs/msm/doc/src/msm.xml
- copied, changed from r62129, /trunk/libs/msm/doc/src/msm.xml
branches/release/libs/msm/index.html
- copied unchanged from r62475, /trunk/libs/msm/index.html
branches/release/libs/msm/test/
- copied from r62473, /trunk/libs/msm/test/
branches/release/libs/msm/test/Anonymous.cpp
- copied, changed from r62473, /trunk/libs/msm/test/Anonymous.cpp
branches/release/libs/msm/test/AnonymousEuml.cpp
- copied, changed from r62473, /trunk/libs/msm/test/AnonymousEuml.cpp
branches/release/libs/msm/test/CompositeEuml.cpp
- copied, changed from r62473, /trunk/libs/msm/test/CompositeEuml.cpp
branches/release/libs/msm/test/CompositeMachine.cpp
- copied, changed from r62473, /trunk/libs/msm/test/CompositeMachine.cpp
branches/release/libs/msm/test/Constructor.cpp
- copied, changed from r62473, /trunk/libs/msm/test/Constructor.cpp
branches/release/libs/msm/test/History.cpp
- copied, changed from r62473, /trunk/libs/msm/test/History.cpp
branches/release/libs/msm/test/Jamfile.v2
- copied, changed from r62474, /trunk/libs/msm/test/Jamfile.v2
branches/release/libs/msm/test/OrthogonalDeferred.cpp
- copied, changed from r62473, /trunk/libs/msm/test/OrthogonalDeferred.cpp
branches/release/libs/msm/test/OrthogonalDeferred2.cpp
- copied, changed from r62473, /trunk/libs/msm/test/OrthogonalDeferred2.cpp
branches/release/libs/msm/test/OrthogonalDeferredEuml.cpp
- copied, changed from r62473, /trunk/libs/msm/test/OrthogonalDeferredEuml.cpp
branches/release/libs/msm/test/SimpleEuml.cpp
- copied, changed from r62473, /trunk/libs/msm/test/SimpleEuml.cpp
branches/release/libs/msm/test/SimpleEuml2.cpp
- copied, changed from r62473, /trunk/libs/msm/test/SimpleEuml2.cpp
branches/release/libs/msm/test/SimpleInternal.cpp
- copied, changed from r62473, /trunk/libs/msm/test/SimpleInternal.cpp
branches/release/libs/msm/test/SimpleInternalEuml.cpp
- copied, changed from r62473, /trunk/libs/msm/test/SimpleInternalEuml.cpp
branches/release/libs/msm/test/SimpleInternalFunctors.cpp
- copied, changed from r62473, /trunk/libs/msm/test/SimpleInternalFunctors.cpp
branches/release/libs/msm/test/SimpleMachine.cpp
- copied, changed from r62473, /trunk/libs/msm/test/SimpleMachine.cpp
branches/release/libs/msm/test/SimpleWithFunctors.cpp
- copied, changed from r62473, /trunk/libs/msm/test/SimpleWithFunctors.cpp
Text files modified:
branches/release/libs/msm/doc/HTML/examples/AnonymousTutorial.cpp | 18 +
branches/release/libs/msm/doc/HTML/examples/AnonymousTutorialEuml.cpp | 12 +
branches/release/libs/msm/doc/HTML/examples/AnonymousTutorialWithFunctors.cpp | 18 +
branches/release/libs/msm/doc/HTML/examples/BoostCon09Full.cpp | 38 ++-
branches/release/libs/msm/doc/HTML/examples/CompilerStressTestEuml.cpp | 10
branches/release/libs/msm/doc/HTML/examples/CompositeTutorial.cpp | 26 +
branches/release/libs/msm/doc/HTML/examples/CompositeTutorialEuml.cpp | 10
branches/release/libs/msm/doc/HTML/examples/DirectEntryEuml.cpp | 402 ++++++++++++++++++++-------------------
branches/release/libs/msm/doc/HTML/examples/DirectEntryTutorial.cpp | 12 +
branches/release/libs/msm/doc/HTML/examples/EumlInternal.cpp | 14 +
branches/release/libs/msm/doc/HTML/examples/EumlInternalDistributed.cpp | 14 +
branches/release/libs/msm/doc/HTML/examples/EumlSimple.cpp | 11
branches/release/libs/msm/doc/HTML/examples/Flags.cpp | 34 ++-
branches/release/libs/msm/doc/HTML/examples/History.cpp | 24 +
branches/release/libs/msm/doc/HTML/examples/HistoryEuml.cpp | 14 +
branches/release/libs/msm/doc/HTML/examples/MsmComposite.cpp | 21 +
branches/release/libs/msm/doc/HTML/examples/MsmSimple.cpp | 19 +
branches/release/libs/msm/doc/HTML/examples/MsmSimpleFunctors.cpp | 16 +
branches/release/libs/msm/doc/HTML/examples/Orthogonal-deferred.cpp | 34 ++-
branches/release/libs/msm/doc/HTML/examples/Orthogonal-deferred2.cpp | 34 ++-
branches/release/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml.cpp | 14 +
branches/release/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml2.cpp | 14 +
branches/release/libs/msm/doc/HTML/examples/ParsingDigits.cpp | 14 +
branches/release/libs/msm/doc/HTML/examples/SC | 12 +
branches/release/libs/msm/doc/HTML/examples/SC | 12 +
branches/release/libs/msm/doc/HTML/examples/SM-2Arg.cpp | 46 ++-
branches/release/libs/msm/doc/HTML/examples/SimpleTimer.cpp | 12 +
branches/release/libs/msm/doc/HTML/examples/SimpleTutorial.cpp | 24 +
branches/release/libs/msm/doc/HTML/examples/SimpleTutorial2.cpp | 22 +
branches/release/libs/msm/doc/HTML/examples/SimpleTutorialEuml.cpp | 14 +
branches/release/libs/msm/doc/HTML/examples/SimpleTutorialEuml2.cpp | 14 +
branches/release/libs/msm/doc/HTML/examples/SimpleTutorialInternal.cpp | 24 +
branches/release/libs/msm/doc/HTML/examples/SimpleTutorialInternal2.cpp | 26 +
branches/release/libs/msm/doc/HTML/examples/SimpleTutorialInternalFunctors.cpp | 22 +
branches/release/libs/msm/doc/HTML/examples/SimpleWithFunctors.cpp | 24 +
branches/release/libs/msm/doc/HTML/examples/SimpleWithFunctors2.cpp | 20 +
branches/release/libs/msm/doc/HTML/examples/SimpleWithFunctors3.cpp | 20 +
branches/release/libs/msm/doc/HTML/examples/TestInternal.cpp | 36 ++-
branches/release/libs/msm/doc/HTML/examples/char_event_dispatcher.hpp | 12 +
branches/release/libs/msm/doc/HTML/examples/distributed_table/DistributedTable.cpp | 12 +
branches/release/libs/msm/doc/HTML/examples/distributed_table/Empty.cpp | 10
branches/release/libs/msm/doc/HTML/examples/distributed_table/Empty.hpp | 14 +
branches/release/libs/msm/doc/HTML/examples/distributed_table/Events.hpp | 12 +
branches/release/libs/msm/doc/HTML/examples/distributed_table/Open.cpp | 10
branches/release/libs/msm/doc/HTML/examples/distributed_table/Open.hpp | 16 +
branches/release/libs/msm/doc/HTML/examples/iPodEuml.cpp | 10
branches/release/libs/msm/doc/HTML/examples/iPodSearch.cpp | 12 +
branches/release/libs/msm/doc/HTML/examples/iPodSearchEuml.cpp | 10
branches/release/libs/msm/doc/HTML/examples/iPod_distributed/Events.hpp | 18 +
branches/release/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.cpp | 10
branches/release/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.hpp | 74 ++++---
branches/release/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.cpp | 10
branches/release/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.hpp | 158 ++++++++-------
branches/release/libs/msm/doc/HTML/examples/iPod_distributed/iPod.cpp | 14 +
branches/release/libs/msm/doc/HTML/examples/ipod_functors.hpp | 12 +
branches/release/libs/msm/doc/HTML/examples/logging_functors.h | 10
branches/release/libs/msm/doc/PDF/examples/AnonymousTutorial.cpp | 18 +
branches/release/libs/msm/doc/PDF/examples/AnonymousTutorialEuml.cpp | 12 +
branches/release/libs/msm/doc/PDF/examples/AnonymousTutorialWithFunctors.cpp | 18 +
branches/release/libs/msm/doc/PDF/examples/BoostCon09Full.cpp | 38 ++-
branches/release/libs/msm/doc/PDF/examples/CompilerStressTestEuml.cpp | 10
branches/release/libs/msm/doc/PDF/examples/CompositeTutorial.cpp | 26 +
branches/release/libs/msm/doc/PDF/examples/CompositeTutorialEuml.cpp | 10
branches/release/libs/msm/doc/PDF/examples/DirectEntryEuml.cpp | 402 ++++++++++++++++++++-------------------
branches/release/libs/msm/doc/PDF/examples/DirectEntryTutorial.cpp | 12 +
branches/release/libs/msm/doc/PDF/examples/EumlInternal.cpp | 14 +
branches/release/libs/msm/doc/PDF/examples/EumlInternalDistributed.cpp | 14 +
branches/release/libs/msm/doc/PDF/examples/EumlSimple.cpp | 11
branches/release/libs/msm/doc/PDF/examples/Flags.cpp | 34 ++-
branches/release/libs/msm/doc/PDF/examples/History.cpp | 24 +
branches/release/libs/msm/doc/PDF/examples/HistoryEuml.cpp | 14 +
branches/release/libs/msm/doc/PDF/examples/MsmComposite.cpp | 21 +
branches/release/libs/msm/doc/PDF/examples/MsmSimple.cpp | 19 +
branches/release/libs/msm/doc/PDF/examples/MsmSimpleFunctors.cpp | 16 +
branches/release/libs/msm/doc/PDF/examples/Orthogonal-deferred.cpp | 34 ++-
branches/release/libs/msm/doc/PDF/examples/Orthogonal-deferred2.cpp | 34 ++-
branches/release/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml.cpp | 14 +
branches/release/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml2.cpp | 14 +
branches/release/libs/msm/doc/PDF/examples/ParsingDigits.cpp | 14 +
branches/release/libs/msm/doc/PDF/examples/SC | 12 +
branches/release/libs/msm/doc/PDF/examples/SC | 12 +
branches/release/libs/msm/doc/PDF/examples/SM-2Arg.cpp | 46 ++-
branches/release/libs/msm/doc/PDF/examples/SimpleTimer.cpp | 12 +
branches/release/libs/msm/doc/PDF/examples/SimpleTutorial.cpp | 24 +
branches/release/libs/msm/doc/PDF/examples/SimpleTutorial2.cpp | 22 +
branches/release/libs/msm/doc/PDF/examples/SimpleTutorialEuml.cpp | 14 +
branches/release/libs/msm/doc/PDF/examples/SimpleTutorialEuml2.cpp | 14 +
branches/release/libs/msm/doc/PDF/examples/SimpleTutorialInternal.cpp | 24 +
branches/release/libs/msm/doc/PDF/examples/SimpleTutorialInternal2.cpp | 26 +
branches/release/libs/msm/doc/PDF/examples/SimpleTutorialInternalFunctors.cpp | 22 +
branches/release/libs/msm/doc/PDF/examples/SimpleWithFunctors.cpp | 24 +
branches/release/libs/msm/doc/PDF/examples/SimpleWithFunctors2.cpp | 20 +
branches/release/libs/msm/doc/PDF/examples/SimpleWithFunctors3.cpp | 20 +
branches/release/libs/msm/doc/PDF/examples/TestInternal.cpp | 36 ++-
branches/release/libs/msm/doc/PDF/examples/char_event_dispatcher.hpp | 12 +
branches/release/libs/msm/doc/PDF/examples/distributed_table/DistributedTable.cpp | 12 +
branches/release/libs/msm/doc/PDF/examples/distributed_table/Empty.cpp | 10
branches/release/libs/msm/doc/PDF/examples/distributed_table/Empty.hpp | 14 +
branches/release/libs/msm/doc/PDF/examples/distributed_table/Events.hpp | 12 +
branches/release/libs/msm/doc/PDF/examples/distributed_table/Open.cpp | 10
branches/release/libs/msm/doc/PDF/examples/distributed_table/Open.hpp | 16 +
branches/release/libs/msm/doc/PDF/examples/iPodEuml.cpp | 10
branches/release/libs/msm/doc/PDF/examples/iPodSearch.cpp | 12 +
branches/release/libs/msm/doc/PDF/examples/iPodSearchEuml.cpp | 10
branches/release/libs/msm/doc/PDF/examples/iPod_distributed/Events.hpp | 18 +
branches/release/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.cpp | 10
branches/release/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.hpp | 74 ++++---
branches/release/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.cpp | 10
branches/release/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.hpp | 158 ++++++++-------
branches/release/libs/msm/doc/PDF/examples/iPod_distributed/iPod.cpp | 14 +
branches/release/libs/msm/doc/PDF/examples/ipod_functors.hpp | 12 +
branches/release/libs/msm/doc/PDF/examples/logging_functors.h | 10
branches/release/libs/msm/doc/src/msm.xml | 34 ++
branches/release/libs/msm/test/Anonymous.cpp | 34 ++-
branches/release/libs/msm/test/AnonymousEuml.cpp | 12 +
branches/release/libs/msm/test/CompositeEuml.cpp | 32 ++-
branches/release/libs/msm/test/CompositeMachine.cpp | 62 +++--
branches/release/libs/msm/test/Constructor.cpp | 40 ++-
branches/release/libs/msm/test/History.cpp | 66 +++--
branches/release/libs/msm/test/Jamfile.v2 | 3
branches/release/libs/msm/test/OrthogonalDeferred.cpp | 80 ++++---
branches/release/libs/msm/test/OrthogonalDeferred2.cpp | 84 ++++---
branches/release/libs/msm/test/OrthogonalDeferredEuml.cpp | 24 +
branches/release/libs/msm/test/SimpleEuml.cpp | 14 +
branches/release/libs/msm/test/SimpleEuml2.cpp | 14 +
branches/release/libs/msm/test/SimpleInternal.cpp | 44 ++-
branches/release/libs/msm/test/SimpleInternalEuml.cpp | 19 +
branches/release/libs/msm/test/SimpleInternalFunctors.cpp | 50 ++-
branches/release/libs/msm/test/SimpleMachine.cpp | 44 ++-
branches/release/libs/msm/test/SimpleWithFunctors.cpp | 54 +++--
130 files changed, 2572 insertions(+), 1288 deletions(-)
Copied: branches/release/libs/msm/doc/HTML/examples/AnonymousTutorial.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/AnonymousTutorial.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/AnonymousTutorial.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/AnonymousTutorial.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -27,7 +37,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: State1" << std::endl;}
};
struct State2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: State2" << std::endl;}
template <class Event,class FSM>
@@ -35,7 +45,7 @@
};
struct State3 : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: State3" << std::endl;}
@@ -73,7 +83,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
_row < State1 , none , State2 >,
a_row < State2 , none , State3 , &p::State2ToState3 >,
@@ -105,7 +115,7 @@
void test()
{
- my_machine p;
+ my_machine p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
// in this case it will also immediately trigger all anonymous transitions
Copied: branches/release/libs/msm/doc/HTML/examples/AnonymousTutorialEuml.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/AnonymousTutorialEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/AnonymousTutorialEuml.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/AnonymousTutorialEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -148,7 +158,7 @@
void test()
{
- my_machine p;
+ my_machine p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
// in this case it will also immediately trigger all anonymous transitions
Copied: branches/release/libs/msm/doc/HTML/examples/AnonymousTutorialWithFunctors.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/AnonymousTutorialWithFunctors.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/AnonymousTutorialWithFunctors.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/AnonymousTutorialWithFunctors.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -30,7 +40,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: State1" << std::endl;}
};
struct State2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: State2" << std::endl;}
template <class Event,class FSM>
@@ -38,7 +48,7 @@
};
struct State3 : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: State3" << std::endl;}
@@ -98,7 +108,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
Row < State1 , none , State2 >,
Row < State2 , none , State3 , State2ToState3 >,
@@ -130,7 +140,7 @@
void test()
{
- my_machine p;
+ my_machine p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
// in this case it will also immediately trigger all anonymous transitions
Copied: branches/release/libs/msm/doc/HTML/examples/BoostCon09Full.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/BoostCon09Full.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/BoostCon09Full.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/BoostCon09Full.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
#include <boost/mpl/vector/vector50.hpp>
@@ -57,9 +67,9 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
- typedef mpl::vector<play> deferred_events;
+ {
+ typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector<play> deferred_events;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -69,9 +79,9 @@
// and using for this the non-default policy
// if policy used, set_sm_ptr is needed
struct Stopped : public msm::front::state<default_base_state,msm::front::sm_ptr>
- {
+ {
// when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -87,7 +97,7 @@
struct Playing_ : public msm::front::state_machine_def<Playing_>
{
// when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector<CDLoaded> flag_list;
+ typedef mpl::vector<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
template <class Event,class FSM>
@@ -96,21 +106,21 @@
// The list of FSM states
struct Song1 : public msm::front::state<>
{
- typedef mpl::vector1<FirstSongPlaying> flag_list;
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;}
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -134,7 +144,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+---------------+------------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -156,7 +166,7 @@
// the player state machine contains a state which is himself a state machine (2 of them, Playing and Paused)
struct Paused : public msm::front::state<>
{
- typedef mpl::vector<CDLoaded> flag_list;
+ typedef mpl::vector<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Paused" << std::endl;}
template <class Event,class FSM>
@@ -197,7 +207,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
void report_error(error_found const&) {std::cout << "player::report_error\n";}
void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
// guard conditions
@@ -216,7 +226,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +-------------+---------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -259,7 +269,7 @@
void pstate(player const& p)
{
- typedef player::stt Stt;
+ typedef player::stt Stt;
typedef msm::back::generate_state_set<Stt>::type all_states;
static char const* state_names[mpl::size<all_states>::value];
// fill the names of the states defined in the state machine
Copied: branches/release/libs/msm/doc/HTML/examples/CompilerStressTestEuml.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/CompilerStressTestEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/CompilerStressTestEuml.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/CompilerStressTestEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <list>
#include <set>
Copied: branches/release/libs/msm/doc/HTML/examples/CompositeTutorial.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/CompositeTutorial.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/CompositeTutorial.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/CompositeTutorial.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -41,7 +51,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -49,7 +59,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
@@ -78,14 +88,14 @@
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -101,7 +111,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -118,7 +128,7 @@
}
};
// back-end
- typedef msm::back::state_machine<Playing_> Playing;
+ typedef msm::back::state_machine<Playing_> Playing;
// state not defining any entry or exit
@@ -138,14 +148,14 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
// guard conditions
typedef player_ p; // makes transition table cleaner
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/HTML/examples/CompositeTutorialEuml.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/CompositeTutorialEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/CompositeTutorialEuml.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/CompositeTutorialEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
Copied: branches/release/libs/msm/doc/HTML/examples/DirectEntryEuml.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/DirectEntryEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/DirectEntryEuml.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/DirectEntryEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -28,212 +38,212 @@
event6_impl const event6;
//Sub fsm state definition
- BOOST_MSM_EUML_ACTION(SubState1_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState1" << std::endl;
- }
- };
+ BOOST_MSM_EUML_ACTION(SubState1_Entry)
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState1_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( SubState1_Entry,SubState1_Exit ),SubState1)
BOOST_MSM_EUML_ACTION(SubState1b_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState1b" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState1b" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState1b_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState1b" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState1b" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( SubState1b_Entry,SubState1b_Exit ),SubState1b)
BOOST_MSM_EUML_ACTION(SubState1c_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState1c" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState1c" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState1c_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState1c" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState1c" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( SubState1c_Entry,SubState1c_Exit ),SubState1c)
BOOST_MSM_EUML_ACTION(SubState2_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState2" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState2" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState2_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState2" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState2" << std::endl;
+ }
+ };
BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE(0,( SubState2_Entry,SubState2_Exit ),SubState2)
BOOST_MSM_EUML_ACTION(SubState2b_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState2b" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState2b" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState2b_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState2b" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState2b" << std::endl;
+ }
+ };
BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE(1,( SubState2b_Entry,SubState2b_Exit ),SubState2b)
BOOST_MSM_EUML_ACTION(SubState2c_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState2c" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState2c" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState2c_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState2c" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState2c" << std::endl;
+ }
+ };
BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE(2,( SubState2c_Entry,SubState2c_Exit ),SubState2c)
BOOST_MSM_EUML_ACTION(PseudoEntry1_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::PseudoEntry1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::PseudoEntry1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(PseudoEntry1_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::PseudoEntry1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::PseudoEntry1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ENTRY_STATE(0,( PseudoEntry1_Entry,PseudoEntry1_Exit ),PseudoEntry1)
BOOST_MSM_EUML_ACTION(SubState3_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState3" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState3" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState3_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState3" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState3" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( SubState3_Entry,SubState3_Exit ),SubState3)
BOOST_MSM_EUML_ACTION(SubState3b_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState3b" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState3b" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState3b_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState3b" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState3b" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( SubState3b_Entry,SubState3b_Exit ),SubState3b)
BOOST_MSM_EUML_ACTION(PseudoExit1_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::PseudoExit1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::PseudoExit1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(PseudoExit1_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::PseudoExit1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::PseudoExit1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_EXIT_STATE(( event6,PseudoExit1_Entry,PseudoExit1_Exit ),PseudoExit1)
// actions
BOOST_MSM_EUML_ACTION(entry_action)
- {
- template <class FSM,class EVT,class SourceState,class TargetState>
- void operator()(FSM& ,EVT const& ,SourceState& ,TargetState& )
- {
- cout << "calling entry_action" << endl;
- }
- };
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(FSM& ,EVT const& ,SourceState& ,TargetState& )
+ {
+ cout << "calling entry_action" << endl;
+ }
+ };
// SubFsm definition
BOOST_MSM_EUML_ACTION(SubFsm2_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubFsm2_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2" << std::endl;
+ }
+ };
BOOST_MSM_EUML_TRANSITION_TABLE((
// +------------------------------------------------------------------------------+
SubState3 == PseudoEntry1 + event4 / entry_action ,
@@ -262,39 +272,39 @@
// Fsm state definitions
BOOST_MSM_EUML_ACTION(State1_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: State1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: State1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(State1_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: State1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: State1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( State1_Entry,State1_Exit ),State1)
BOOST_MSM_EUML_ACTION(State2_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: State2" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: State2" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(State2_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: State2" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: State2" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( State2_Entry,State2_Exit ),State2)
// Fsm definition
@@ -314,14 +324,14 @@
BOOST_MSM_EUML_ACTION(Log_No_Transition)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const& e,FSM&,STATE& )
- {
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& e,FSM&,STATE& )
+ {
std::cout << "no transition in Fsm"
<< " on event " << typeid(e).name() << std::endl;
- }
- };
+ }
+ };
BOOST_MSM_EUML_DECLARE_STATE_MACHINE(( transition_table, //STT
init_ << State1, // Init State
no_action, // Entry
Copied: branches/release/libs/msm/doc/HTML/examples/DirectEntryTutorial.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/DirectEntryTutorial.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/DirectEntryTutorial.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/DirectEntryTutorial.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
// back-end
@@ -120,7 +130,7 @@
// Transition table for SubFsm2
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +--------------+-------------+------------+------------------------+----------------------+
a_row < PseudoEntry1 , event4 , SubState3 ,&SubFsm2_::entry_action >,
_row < SubState2 , event6 , SubState1 >,
Copied: branches/release/libs/msm/doc/HTML/examples/EumlInternal.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/EumlInternal.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/EumlInternal.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/EumlInternal.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -106,7 +116,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -121,7 +131,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play() as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// at this point, Play is active
p.process_event(pause); pstate(p);
Copied: branches/release/libs/msm/doc/HTML/examples/EumlInternalDistributed.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/EumlInternalDistributed.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/EumlInternalDistributed.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/EumlInternalDistributed.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -163,7 +173,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -178,7 +188,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// at this point, Play is active
// make transition happen inside it. Player has no idea about this event but it's ok.
p.process_event(next_song);pstate(p); //2nd song active
Copied: branches/release/libs/msm/doc/HTML/examples/EumlSimple.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/EumlSimple.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/EumlSimple.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/EumlSimple.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,5 +1,12 @@
-// MsmSimple.cpp : Defines the entry point for the console application.
-//
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
#include "stdafx.h"
Copied: branches/release/libs/msm/doc/HTML/examples/Flags.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/Flags.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/Flags.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/Flags.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -46,8 +56,8 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
+ {
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -55,9 +65,9 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -70,7 +80,7 @@
struct Playing_ : public msm::front::state_machine_def<Playing_>
{
// when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
@@ -80,7 +90,7 @@
// The list of FSM states
struct Song1 : public msm::front::state<>
{
- typedef mpl::vector1<FirstSongPlaying> flag_list;
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
template <class Event,class FSM>
@@ -88,14 +98,14 @@
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -111,7 +121,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -133,7 +143,7 @@
// state not defining any entry or exit
struct Paused : public msm::front::state<>
{
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
};
// the initial state of the player SM. Must be defined
@@ -148,14 +158,14 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
// guard conditions
typedef player_ p; // makes transition table cleaner
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/HTML/examples/History.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/History.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/History.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/History.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -41,7 +51,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -49,7 +59,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
@@ -74,14 +84,14 @@
void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;}
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -97,7 +107,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -142,14 +152,14 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
// guard conditions
typedef player_ p; // makes transition table cleaner
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/HTML/examples/HistoryEuml.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/HistoryEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/HistoryEuml.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/HistoryEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include <boost/msm/back/state_machine.hpp>
@@ -129,7 +139,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -141,7 +151,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// make transition happen inside it. Player has no idea about this event but it's ok.
p.process_event(next_song);pstate(p); //2nd song active
Copied: branches/release/libs/msm/doc/HTML/examples/MsmComposite.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/MsmComposite.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/MsmComposite.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/MsmComposite.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,5 +1,12 @@
-// MsmSimple.cpp : Defines the entry point for the console application.
-//
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/msm/back/state_machine.hpp>
#include <boost/msm/front/state_machine_def.hpp>
@@ -44,7 +51,7 @@
void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/}
template <class Event,class FSM>
@@ -52,7 +59,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/}
@@ -80,7 +87,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -119,14 +126,14 @@
void pause_playback(pause const&) { }
void resume_playback(end_pause const&) { }
void stop_and_open(open_close const&) { }
- void stopped_again(stop const&) {}
+ void stopped_again(stop const&){}
// guard conditions
typedef player_ p; // makes transition table cleaner
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/HTML/examples/MsmSimple.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/MsmSimple.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/MsmSimple.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/MsmSimple.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,5 +1,12 @@
-// MsmSimple.cpp : Defines the entry point for the console application.
-//
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/msm/back/state_machine.hpp>
#include <boost/msm/front/state_machine_def.hpp>
@@ -41,7 +48,7 @@
void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/}
template <class Event,class FSM>
@@ -49,7 +56,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/}
template <class Event,class FSM>
@@ -83,14 +90,14 @@
void pause_playback(pause const&) { }
void resume_playback(end_pause const&) { }
void stop_and_open(open_close const&) { }
- void stopped_again(stop const&) {}
+ void stopped_again(stop const&){}
// guard conditions
typedef player_ p; // makes transition table cleaner
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
_row < Stopped , play , Playing >,
_row < Stopped , open_close , Open >,
Copied: branches/release/libs/msm/doc/HTML/examples/MsmSimpleFunctors.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/MsmSimpleFunctors.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/MsmSimpleFunctors.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/MsmSimpleFunctors.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/msm/back/state_machine.hpp>
#include <boost/msm/front/state_machine_def.hpp>
#include <boost/msm/front/functor_row.hpp>
@@ -40,7 +50,7 @@
void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/}
template <class Event,class FSM>
@@ -48,7 +58,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/}
@@ -143,7 +153,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
Row < Stopped , play , Playing , start_playback >,
Row < Stopped , open_close , Open , open_drawer >,
Copied: branches/release/libs/msm/doc/HTML/examples/Orthogonal-deferred.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/Orthogonal-deferred.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/Orthogonal-deferred.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/Orthogonal-deferred.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -51,11 +61,11 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
+ {
// if the play event arrives in this state, defer it until a state handles it or
// rejects it
typedef mpl::vector<play> deferred_events;
- typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -63,9 +73,9 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -78,7 +88,7 @@
struct Playing_ : public msm::front::state_machine_def<Playing_>
{
// when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
@@ -87,21 +97,21 @@
// The list of FSM states
struct Song1 : public msm::front::state<>
{
- typedef mpl::vector1<FirstSongPlaying> flag_list;
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;}
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -117,7 +127,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -139,7 +149,7 @@
// state not defining any entry or exit
struct Paused : public msm::front::state<>
{
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
};
struct AllOk : public msm::front::state<>
{
@@ -170,7 +180,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
void report_error(error_found const&) {std::cout << "player::report_error\n";}
void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
@@ -180,7 +190,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/HTML/examples/Orthogonal-deferred2.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/Orthogonal-deferred2.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/Orthogonal-deferred2.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/Orthogonal-deferred2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -53,8 +63,8 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
+ {
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -62,9 +72,9 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -77,7 +87,7 @@
struct Playing_ : public msm::front::state_machine_def<Playing_>
{
// when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
@@ -86,21 +96,21 @@
// The list of FSM states
struct Song1 : public msm::front::state<>
{
- typedef mpl::vector1<FirstSongPlaying> flag_list;
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;}
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -116,7 +126,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -138,7 +148,7 @@
// state not defining any entry or exit
struct Paused : public msm::front::state<>
{
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
};
struct AllOk : public msm::front::state<>
{
@@ -169,7 +179,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
void report_error(error_found const&) {std::cout << "player::report_error\n";}
void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
@@ -179,7 +189,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -178,7 +188,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
@@ -194,7 +204,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// at this point, Play is active
std::cout << "PlayingPaused active:" << std::boolalpha
Copied: branches/release/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml2.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml2.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml2.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/OrthogonalDeferredEuml2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -182,7 +192,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
@@ -198,7 +208,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// at this point, Play is active
p.process_event(pause); pstate(p);
Copied: branches/release/libs/msm/doc/HTML/examples/ParsingDigits.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/ParsingDigits.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/ParsingDigits.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/ParsingDigits.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,5 +1,13 @@
-// MsmSimple.cpp : Defines the entry point for the console application.
-//
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#define FUSION_MAX_VECTOR_SIZE 20
#include <boost/msm/back/state_machine.hpp>
@@ -208,7 +216,7 @@
// Transition table for parsing_
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +-------------+-------------------+---------+---------------------+----------------------+
Row < Waiting , digit , Digit1 >,
Row < Digit1 , digit , Digit2 >,
Copied: branches/release/libs/msm/doc/HTML/examples/SC Composite.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SC Composite.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SC Composite.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SC Composite.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/statechart/event.hpp>
#include <boost/statechart/state_machine.hpp>
#include <boost/statechart/simple_state.hpp>
@@ -41,7 +51,7 @@
void store_cd_info(cd_detected const& cd) {/*std::cout << "player::store_cd_info\n";*/ }
void close_drawer(open_close const&) { /*std::cout << "player::close_drawer\n";*/ }
void start_playback(play const&) { /*std::cout << "player::start_playback\n";*/ }
- void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/}
+ void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/}
void stop_playback(stop const&) { /*std::cout << "player::stop_playback\n";*/ }
void pause_playback(pause const&) { /*std::cout << "player::pause_playback\n"; */}
void stop_and_open(open_close const&) { /*std::cout << "player::stop_and_open\n";*/ }
Copied: branches/release/libs/msm/doc/HTML/examples/SC Simple.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SC Simple.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SC Simple.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SC Simple.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/statechart/event.hpp>
#include <boost/statechart/state_machine.hpp>
#include <boost/statechart/simple_state.hpp>
@@ -40,7 +50,7 @@
void store_cd_info(cd_detected const& cd) {/*std::cout << "player::store_cd_info\n";*/ }
void close_drawer(open_close const&) { /*std::cout << "player::close_drawer\n";*/ }
void start_playback(play const&) { /*std::cout << "player::start_playback\n";*/ }
- void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/}
+ void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/}
void stop_playback(stop const&) { /*std::cout << "player::stop_playback\n";*/ }
void pause_playback(pause const&) { /*std::cout << "player::pause_playback\n"; */}
void stop_and_open(open_close const&) { /*std::cout << "player::stop_and_open\n";*/ }
Copied: branches/release/libs/msm/doc/HTML/examples/SM-2Arg.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SM-2Arg.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SM-2Arg.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SM-2Arg.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include <string>
#include "boost/mpl/vector/vector30.hpp"
@@ -81,8 +91,8 @@
}
};
struct Open : public msm::front::state<my_visitable_state>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
+ {
+ typedef mpl::vector1<CDLoaded> flag_list;
typedef mpl::vector<play> deferred_events;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
@@ -97,9 +107,9 @@
// and using for this the non-default policy
// if policy used, set_sm_ptr is needed
struct Stopped : public msm::front::state<my_visitable_state>
- {
+ {
// when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -113,7 +123,7 @@
struct Playing_ : public msm::front::state_machine_def<Playing_,my_visitable_state >
{
// when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
template <class Event,class FSM>
@@ -128,7 +138,7 @@
// so we have a SM containing a SM containing a SM
struct Song1_ : public msm::front::state_machine_def<Song1_,my_visitable_state>
{
- typedef mpl::vector1<FirstSongPlaying> flag_list;
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
template <class Event,class FSM>
@@ -138,14 +148,14 @@
vis.visit_state(this,i);
}
struct LightOn : public msm::front::state<my_visitable_state>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: LightOn" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: LightOn" << std::endl;}
};
struct LightOff : public msm::front::state<my_visitable_state>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: LightOff" << std::endl;}
template <class Event,class FSM>
@@ -160,7 +170,7 @@
typedef Song1_ s; // makes transition table cleaner
// Transition table for Song1
struct transition_table : mpl::vector1<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < LightOn , ThreeSec , LightOff, &s::turn_light_off >
// +---------+-------------+---------+---------------------+----------------------+
@@ -176,14 +186,14 @@
typedef msm::back::state_machine<Song1_> Song1;
struct Song2 : public msm::front::state<my_visitable_state>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<my_visitable_state>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -199,7 +209,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -220,7 +230,7 @@
// the player state machine contains a state which is himself a state machine (2 of them, Playing and Paused)
struct Paused_ : public msm::front::state_machine_def<Paused_,my_visitable_state>
{
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Paused" << std::endl;}
template <class Event,class FSM>
@@ -228,14 +238,14 @@
// The list of FSM states
struct StartBlinking : public msm::front::state<my_visitable_state>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: StartBlinking" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: StartBlinking" << std::endl;}
};
struct StopBlinking : public msm::front::state<my_visitable_state>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: StopBlinking" << std::endl;}
template <class Event,class FSM>
@@ -251,7 +261,7 @@
typedef Paused_ pa; // makes transition table cleaner
// Transition table
struct transition_table : mpl::vector2<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------------+-------------+--------------+---------------------+----------------------+
a_row < StartBlinking , TenSec , StopBlinking , &pa::stop_blinking >,
a_row < StopBlinking , TenSec , StartBlinking , &pa::start_blinking >
@@ -305,7 +315,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
void start_sleep(go_sleep const&) { }
void report_error(error_found const&) {std::cout << "player::report_error\n";}
void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
@@ -316,7 +326,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/HTML/examples/SimpleTimer.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTimer.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SimpleTimer.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SimpleTimer.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -125,7 +135,7 @@
void test()
{
- SimpleTimer p;
+ SimpleTimer p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
Copied: branches/release/libs/msm/doc/HTML/examples/SimpleTutorial.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorial.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SimpleTutorial.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SimpleTutorial.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -17,7 +27,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -46,7 +56,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -55,7 +65,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<msm::front::default_base_state,msm::front::sm_ptr>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -92,7 +102,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
// guard conditions
bool good_disk_format(cd_detected const& evt)
{
@@ -115,7 +125,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -158,7 +168,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -169,7 +179,7 @@
cd_detected("louie, louie",DISK_DVD)); pstate(p);
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
- p.process_event(play());
+ p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/HTML/examples/SimpleTutorial2.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorial2.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SimpleTutorial2.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SimpleTutorial2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -19,7 +29,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -56,7 +66,7 @@
}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -67,7 +77,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<msm::front::default_base_state,msm::front::sm_ptr>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -122,7 +132,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action/Guard
+ // Start Event Next Action/Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row2 < Stopped , play , Playing , Stopped , &Stopped::start_playback >,
a_row2 < Stopped , open_close , Open , Empty , &Empty::open_drawer >,
@@ -171,7 +181,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -182,7 +192,7 @@
cd_detected("louie, louie",DISK_DVD)); pstate(p);
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
- p.process_event(play());
+ p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/HTML/examples/SimpleTutorialEuml.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorialEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SimpleTutorialEuml.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SimpleTutorialEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -131,7 +141,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// note that we write open_close and not open_close(), like usual. Both are possible with eUML, but
@@ -145,7 +155,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// at this point, Play is active
p.process_event(pause); pstate(p);
Copied: branches/release/libs/msm/doc/HTML/examples/SimpleTutorialEuml2.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorialEuml2.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SimpleTutorialEuml2.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SimpleTutorialEuml2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -103,7 +113,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -115,7 +125,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// at this point, Play is active
p.process_event(pause); pstate(p);
Copied: branches/release/libs/msm/doc/HTML/examples/SimpleTutorialInternal.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorialInternal.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SimpleTutorialInternal.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SimpleTutorialInternal.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -20,7 +30,7 @@
struct to_ignore {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -49,7 +59,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -58,7 +68,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<msm::front::default_base_state,msm::front::sm_ptr>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -95,7 +105,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
// guard conditions
bool good_disk_format(cd_detected const& evt)
{
@@ -136,7 +146,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -182,7 +192,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// this event will be ignored and not call no_transition
@@ -195,7 +205,7 @@
cd_detected("louie, louie",DISK_DVD)); pstate(p);
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
- p.process_event(play());
+ p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/HTML/examples/SimpleTutorialInternal2.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorialInternal2.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SimpleTutorialInternal2.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SimpleTutorialInternal2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -18,7 +28,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -73,13 +83,13 @@
// Transition table for Empty
struct internal_transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
Internal < cd_detected , internal_action_fct ,internal_guard_fct >
// +---------+-------------+---------+---------------------+----------------------+
> {};
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -88,7 +98,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<msm::front::default_base_state,msm::front::sm_ptr>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -125,7 +135,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
// guard conditions
bool good_disk_format(cd_detected const& evt)
{
@@ -142,7 +152,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -189,7 +199,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -200,7 +210,7 @@
cd_detected("louie, louie",DISK_DVD)); pstate(p);
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
- p.process_event(play());
+ p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/HTML/examples/SimpleTutorialInternalFunctors.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleTutorialInternalFunctors.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SimpleTutorialInternalFunctors.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SimpleTutorialInternalFunctors.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -25,7 +35,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -71,13 +81,13 @@
};
// Transition table for Empty
struct internal_transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
Internal < cd_detected , internal_action_fct ,internal_guard_fct >
// +---------+-------------+---------+---------------------+----------------------+
> {};
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -85,7 +95,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -234,7 +244,7 @@
};
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------------+----------------------+
Row < Stopped , play , Playing , ActionSequence_
<mpl::vector<
@@ -282,7 +292,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
Copied: branches/release/libs/msm/doc/HTML/examples/SimpleWithFunctors.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleWithFunctors.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SimpleWithFunctors.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SimpleWithFunctors.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
// back-end
@@ -27,7 +37,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -56,7 +66,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -64,7 +74,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
@@ -213,7 +223,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------------+----------------------+
Row < Stopped , play , Playing , ActionSequence_
<mpl::vector<
@@ -248,7 +258,7 @@
}
};
// Pick a back-end
- typedef msm::back::state_machine<player_> player;
+ typedef msm::back::state_machine<player_> player;
//
// Testing utilities.
@@ -261,7 +271,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -273,7 +283,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play() as the previous event does it in its action method
- //p.process_event(play());
+ //p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/HTML/examples/SimpleWithFunctors2.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleWithFunctors2.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SimpleWithFunctors2.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SimpleWithFunctors2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
// back-end
@@ -29,7 +39,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -229,7 +239,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------------+----------------------+
Row < Stopped , play , Playing , ActionSequence_
<mpl::vector<
@@ -264,7 +274,7 @@
}
};
// Pick a back-end
- typedef msm::back::state_machine<player_> player;
+ typedef msm::back::state_machine<player_> player;
//
// Testing utilities.
@@ -277,7 +287,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -289,7 +299,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play() as the previous event does it in its action method
- //p.process_event(play());
+ //p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/HTML/examples/SimpleWithFunctors3.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/SimpleWithFunctors3.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/SimpleWithFunctors3.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/SimpleWithFunctors3.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
// back-end
@@ -29,7 +39,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -219,7 +229,7 @@
// Transition table for player
struct player_transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------------+----------------------+
Row < Stopped , play , Playing , ActionSequence_
<mpl::vector<
@@ -251,7 +261,7 @@
//Initial state
Empty> player_;
// Pick a back-end
- typedef msm::back::state_machine<player_> player;
+ typedef msm::back::state_machine<player_> player;
//
// Testing utilities.
@@ -264,7 +274,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -276,7 +286,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play() as the previous event does it in its action method
- //p.process_event(play());
+ //p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/HTML/examples/TestInternal.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/TestInternal.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/TestInternal.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/TestInternal.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include "boost/mpl/vector/vector30.hpp"
@@ -26,7 +36,7 @@
struct to_ignore {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -54,7 +64,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
// guard conditions
bool good_disk_format(cd_detected const& evt)
{
@@ -109,7 +119,7 @@
void internal_action(to_ignore const&) { std::cout << "Empty::(almost)ignoring event\n"; }
// Transition table for Empty
struct internal_transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
Row < Empty , cd_detected , none , internal_action_fct ,internal_guard_fct >,
Internal < cd_detected , internal_action_fct ,internal_guard_fct >,
a_internal< to_ignore , Empty,&Empty::internal_action >
@@ -117,7 +127,7 @@
> {};
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -125,7 +135,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -150,14 +160,14 @@
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -198,7 +208,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+---------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong , Song1 , &pl::start_prev_song >,
@@ -210,7 +220,7 @@
// +---------+----------------+---------+---------------------+-----------------------+
struct internal_transition_table : mpl::vector<
// normal internal transition
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
Internal < internal_event , playing_internal_fct,playing_internal_guard >,
// conflict between internal and the external defined above
Internal < PreviousSong , playing_internal_fct,playing_false_guard >,
@@ -242,7 +252,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -288,7 +298,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// this event will be ignored and not call no_transition
@@ -301,10 +311,10 @@
cd_detected("louie, louie",DISK_DVD)); pstate(p);
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
- p.process_event(play());
+ p.process_event(play());
p.process_event(NextSong());
std::cout << "sending an internal event" << std::endl;
- p.process_event(internal_event());
+ p.process_event(internal_event());
std::cout << "conflict between the internal and normal transition. Internal is tried last" << std::endl;
p.process_event(PreviousSong());
Copied: branches/release/libs/msm/doc/HTML/examples/char_event_dispatcher.hpp (from r62129, /trunk/libs/msm/doc/HTML/examples/char_event_dispatcher.hpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/char_event_dispatcher.hpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/char_event_dispatcher.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef BOOST_MSM_CHAR_EVENT_DISPATCHER_HPP
#define BOOST_MSM_CHAR_EVENT_DISPATCHER_HPP
@@ -79,4 +89,4 @@
};
}}} // boost::msm::back
-#endif //BOOST_MSM_CHAR_EVENT_DISPATCHER_HPP
\ No newline at end of file
+#endif //BOOST_MSM_CHAR_EVENT_DISPATCHER_HPP
Copied: branches/release/libs/msm/doc/HTML/examples/distributed_table/DistributedTable.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/distributed_table/DistributedTable.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/distributed_table/DistributedTable.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/distributed_table/DistributedTable.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
// back-end
@@ -48,7 +58,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
Copied: branches/release/libs/msm/doc/HTML/examples/distributed_table/Empty.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/distributed_table/Empty.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/distributed_table/Empty.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/distributed_table/Empty.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include "Empty.hpp"
Copied: branches/release/libs/msm/doc/HTML/examples/distributed_table/Empty.hpp (from r62129, /trunk/libs/msm/doc/HTML/examples/distributed_table/Empty.hpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/distributed_table/Empty.hpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/distributed_table/Empty.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef EMPTY_HPP
#define EMPTY_HPP
@@ -23,11 +33,11 @@
void open_drawer(open_close const&);
struct internal_transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
//+-------------+---------+-------------+---------+---------------------------+----------------------+
msm::front::a_row2 < Empty , open_close , Open , Empty,&Empty::open_drawer >
//+-------------+---------+-------------+---------+---------------------------+----------------------+
> {};
};
-#endif
\ No newline at end of file
+#endif
Copied: branches/release/libs/msm/doc/HTML/examples/distributed_table/Events.hpp (from r62129, /trunk/libs/msm/doc/HTML/examples/distributed_table/Events.hpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/distributed_table/Events.hpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/distributed_table/Events.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef EVENTS_HPP
#define EVENTS_HPP
@@ -26,4 +36,4 @@
};
-#endif
\ No newline at end of file
+#endif
Copied: branches/release/libs/msm/doc/HTML/examples/distributed_table/Open.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/distributed_table/Open.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/distributed_table/Open.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/distributed_table/Open.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include "Open.hpp"
Copied: branches/release/libs/msm/doc/HTML/examples/distributed_table/Open.hpp (from r62129, /trunk/libs/msm/doc/HTML/examples/distributed_table/Open.hpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/distributed_table/Open.hpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/distributed_table/Open.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef OPEN_HPP
#define OPEN_HPP
@@ -16,7 +26,7 @@
using namespace msm::front;
struct Open : public msm::front::state<>
-{
+{
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -24,11 +34,11 @@
void close_drawer(open_close const&);
struct internal_transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
//+-------------+---------+-------------+---------+---------------------------+----------------------+
msm::front::a_row2 < Open , open_close , Empty , Open,&Open::close_drawer >
//+-------------+---------+-------------+---------+---------------------------+----------------------+
> {};
};
-#endif
\ No newline at end of file
+#endif
Copied: branches/release/libs/msm/doc/HTML/examples/iPodEuml.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/iPodEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/iPodEuml.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/iPodEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <set>
#include <string>
Copied: branches/release/libs/msm/doc/HTML/examples/iPodSearch.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/iPodSearch.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/iPodSearch.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/iPodSearch.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <set>
#include <string>
#include <iostream>
@@ -123,7 +133,7 @@
// Transition table for player
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +-----------+------------------+------------+---------------------+----------------------+
_row < MyForeach , OneSong , MyFind >,
_row < MyFind , NotFound<string> , MyForeach >,
Copied: branches/release/libs/msm/doc/HTML/examples/iPodSearchEuml.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/iPodSearchEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/iPodSearchEuml.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/iPodSearchEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
// same as iPodSearch.cpp but using eUML
// requires boost >= v1.40 because using mpl::string
Copied: branches/release/libs/msm/doc/HTML/examples/iPod_distributed/Events.hpp (from r62129, /trunk/libs/msm/doc/HTML/examples/iPod_distributed/Events.hpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/iPod_distributed/Events.hpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/iPod_distributed/Events.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef EVENTS_HPP
#define EVENTS_HPP
@@ -19,8 +29,8 @@
struct EndPlay {};
struct CloseMenu
{
- template<class EVENT>
- CloseMenu(EVENT const &) {}
+ template<class EVENT>
+ CloseMenu(EVENT const &) {}
};
struct OnOffTimer {};
struct MenuMiddleButton {};
@@ -28,8 +38,8 @@
struct SongFinished {};
struct StartSong
{
- StartSong (int song_index):m_Selected(song_index){}
- int m_Selected;
+ StartSong (int song_index):m_Selected(song_index){}
+ int m_Selected;
};
struct PreviousSong{};
struct NextSong{};
Copied: branches/release/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,2 +1,12 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include "MenuMode.hpp"
BOOST_MSM_BACK_GENERATE_PROCESS_EVENT(MenuMode)
Copied: branches/release/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.hpp (from r62129, /trunk/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.hpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.hpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/iPod_distributed/MenuMode.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef MENU_MODE_HPP
#define MENU_MODE_HPP
@@ -14,38 +24,38 @@
struct MenuMode_ : public msm::front::state_machine_def<MenuMode_>
{
- typedef mpl::vector1<MenuActive> flag_list;
- struct WaitingForSongChoice : public msm::front::state<>
- {
- template <class Event,class FSM>
- void on_entry(Event const&,FSM& ) {std::cout << "starting: MenuMode::WaitingForSongChoice" << std::endl;}
- template <class Event,class FSM>
- void on_exit(Event const&,FSM& ) {std::cout << "finishing: MenuMode::WaitingForSongChoice" << std::endl;}
- };
- struct StartCurrentSong : public msm::front::state<>
- {
- template <class Event,class FSM>
- void on_entry(Event const&,FSM& ) {std::cout << "starting: MenuMode::StartCurrentSong" << std::endl;}
- template <class Event,class FSM>
- void on_exit(Event const&,FSM& ) {std::cout << "finishing: MenuMode::StartCurrentSong" << std::endl;}
- };
- struct MenuExit : public msm::front::exit_pseudo_state<CloseMenu>
- {
- template <class Event,class FSM>
- void on_entry(Event const&,FSM& ) {std::cout << "starting: MenuMode::WaitingForSongChoice" << std::endl;}
- template <class Event,class FSM>
- void on_exit(Event const&,FSM& ) {std::cout << "finishing: MenuMode::WaitingForSongChoice" << std::endl;}
- };
- typedef WaitingForSongChoice initial_state;
- typedef MenuMode_ fsm; // makes transition table cleaner
- // Transition table for player
- struct transition_table : mpl::vector2<
- // Start Event Next Action Guard
- // +---------------------+------------------+-------------------+---------------------+----------------------+
- _row < WaitingForSongChoice , MenuMiddleButton , StartCurrentSong >,
- _row < StartCurrentSong , SelectSong , MenuExit >
- // +---------------------+------------------+-------------------+---------------------+----------------------+
- > {};
+ typedef mpl::vector1<MenuActive> flag_list;
+ struct WaitingForSongChoice : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: MenuMode::WaitingForSongChoice" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: MenuMode::WaitingForSongChoice" << std::endl;}
+ };
+ struct StartCurrentSong : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: MenuMode::StartCurrentSong" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: MenuMode::StartCurrentSong" << std::endl;}
+ };
+ struct MenuExit : public msm::front::exit_pseudo_state<CloseMenu>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: MenuMode::WaitingForSongChoice" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: MenuMode::WaitingForSongChoice" << std::endl;}
+ };
+ typedef WaitingForSongChoice initial_state;
+ typedef MenuMode_ fsm; // makes transition table cleaner
+ // Transition table for player
+ struct transition_table : mpl::vector2<
+ // Start Event Next Action Guard
+ // +---------------------+------------------+-------------------+---------------------+----------------------+
+ _row < WaitingForSongChoice , MenuMiddleButton , StartCurrentSong >,
+ _row < StartCurrentSong , SelectSong , MenuExit >
+ // +---------------------+------------------+-------------------+---------------------+----------------------+
+ > {};
};
typedef msm::back::state_machine<MenuMode_> MenuMode;
Copied: branches/release/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,2 +1,12 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include "PlayingMode.hpp"
BOOST_MSM_BACK_GENERATE_PROCESS_EVENT(PlayingMode)
Copied: branches/release/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.hpp (from r62129, /trunk/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.hpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.hpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/iPod_distributed/PlayingMode.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef PLAYING_MODE_HPP
#define PLAYING_MODE_HPP
@@ -100,7 +110,7 @@
};
struct SetPosition : public msm::front::state<>
{
- typedef mpl::vector1<NoFastFwd> flag_list;
+ typedef mpl::vector1<NoFastFwd> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: PlayingMode::SetPosition" << std::endl;}
template <class Event,class FSM>
@@ -121,23 +131,23 @@
void on_exit(Event const&,FSM& ) {std::cout << "finishing: PlayingMode::PlayingExit" << std::endl;}
};
// transition action methods
- struct inc_song_counter : euml::euml_action<inc_song_counter>
- {
- template <class FSM,class EVT,class SourceState,class TargetState>
- void operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
- {
- if (++fsm.m_SongIndex <= fsm.m_NumberOfSongs )
- {
- std::cout << "playing song:" << fsm.m_SongIndex << std::endl;
- }
- else
- {
- // last song => end playing, next play will start at the beginning
- fsm.m_SongIndex = 1;
- fsm.process_event(EndPlay());
- }
- }
- };
+ struct inc_song_counter : euml::euml_action<inc_song_counter>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
+ {
+ if (++fsm.m_SongIndex <= fsm.m_NumberOfSongs )
+ {
+ std::cout << "playing song:" << fsm.m_SongIndex << std::endl;
+ }
+ else
+ {
+ // last song => end playing, next play will start at the beginning
+ fsm.m_SongIndex = 1;
+ fsm.process_event(EndPlay());
+ }
+ }
+ };
void select_song(StartSong const& evt)
{
@@ -152,31 +162,31 @@
std::cout << "selecting song:" << m_SongIndex << std::endl;
}
}
- struct dec_song_counter : euml::euml_action<dec_song_counter>
- {
- template <class FSM,class EVT,class SourceState,class TargetState>
- void operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
- {
- if (--fsm.m_SongIndex >0 )
- {
- std::cout << "playing song:" << fsm.m_SongIndex << std::endl;
- }
- else
- {
- // before first song => end playing
- fsm.m_SongIndex = 1;
- fsm.process_event(EndPlay());
- }
- }
- };
- struct send_NextSong : euml::euml_action<send_NextSong>
- {
- template <class FSM,class EVT,class SourceState,class TargetState>
- void operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
- {
- fsm.process_event(NextSong());
- }
- };
+ struct dec_song_counter : euml::euml_action<dec_song_counter>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
+ {
+ if (--fsm.m_SongIndex >0 )
+ {
+ std::cout << "playing song:" << fsm.m_SongIndex << std::endl;
+ }
+ else
+ {
+ // before first song => end playing
+ fsm.m_SongIndex = 1;
+ fsm.process_event(EndPlay());
+ }
+ }
+ };
+ struct send_NextSong : euml::euml_action<send_NextSong>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
+ {
+ fsm.process_event(NextSong());
+ }
+ };
void do_fast_forward(ForwardTimer const&)
{
@@ -184,47 +194,47 @@
}
// transition guard methods
- struct fast_fwd_ok : euml::euml_action<fast_fwd_ok>
- {
- template <class FSM,class EVT,class SourceState,class TargetState>
- bool operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
- {
- // guard accepts only if fast forward is possible (No SetPosition mode)
- return !fsm.is_flag_active<NoFastFwd>();
- }
- };
+ struct fast_fwd_ok : euml::euml_action<fast_fwd_ok>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ bool operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
+ {
+ // guard accepts only if fast forward is possible (No SetPosition mode)
+ return !fsm.is_flag_active<NoFastFwd>();
+ }
+ };
// initial states / orthogonal zones
typedef mpl::vector5<Playing,WaitingForNextPrev,WaitingForEnd,NoForward,StdDisplay>
initial_state;
typedef PlayingMode_ fsm; // makes transition table cleaner
// Transition table for player
struct transition_table : mpl::vector19<
- // Start Event Next Action Guard
- // +--------------------+---------------------+--------------------+--------------------------+----------------------+
- _row < Playing , PlayPause , Paused >,
- _row < Playing , Off , Paused >,
- a_row < Playing , StartSong , Playing , &fsm::select_song >,
- _row < Paused , PlayPause , Playing >,
+ // Start Event Next Action Guard
+ // +--------------------+---------------------+--------------------+--------------------------+----------------------+
+ _row < Playing , PlayPause , Paused >,
+ _row < Playing , Off , Paused >,
+ a_row < Playing , StartSong , Playing , &fsm::select_song >,
+ _row < Paused , PlayPause , Playing >,
msm::front::Row < Playing , SongFinished , Playing , inc_song_counter , msm::front::none >,
- a_row < Paused , StartSong , Playing , &fsm::select_song >,
- // +--------------------+---------------------+--------------------+--------------------------+----------------------+
+ a_row < Paused , StartSong , Playing , &fsm::select_song >,
+ // +--------------------+---------------------+--------------------+--------------------------+----------------------+
msm::front::Row < WaitingForNextPrev , PreviousSong , WaitingForNextPrev , dec_song_counter , msm::front::none >,
msm::front::Row < WaitingForNextPrev , NextSong , WaitingForNextPrev , inc_song_counter , msm::front::none >,
- // +--------------------+---------------------+--------------------+--------------------------+----------------------+
- _row < WaitingForEnd , EndPlay , PlayingExit >,
- // +--------------------+---------------------+--------------------+--------------------------+----------------------+
- msm::front::Row < NoForward , EastPressed , ForwardPressed , msm::front::none , fast_fwd_ok >,
+ // +--------------------+---------------------+--------------------+--------------------------+----------------------+
+ _row < WaitingForEnd , EndPlay , PlayingExit >,
+ // +--------------------+---------------------+--------------------+--------------------------+----------------------+
+ msm::front::Row < NoForward , EastPressed , ForwardPressed , msm::front::none , fast_fwd_ok >,
msm::front::Row < ForwardPressed , EastReleased , NoForward , send_NextSong , msm::front::none >,
- a_row < ForwardPressed , ForwardTimer , FastForward , &fsm::do_fast_forward >,
- a_row < FastForward , ForwardTimer , FastForward , &fsm::do_fast_forward >,
- _row < FastForward , EastReleased , NoForward >,
- // +--------------------+---------------------+---------------------+--------------------------+----------------------+
- _row < StdDisplay , PlayingMiddleButton , SetPosition >,
- _row < SetPosition , StartSong , StdDisplay >,
- _row < SetPosition , PlayingMiddleButton , SetMark >,
- _row < SetMark , PlayingMiddleButton , StdDisplay >,
- _row < SetMark , StartSong , StdDisplay >
- // +--------------------+---------------------+---------------------+--------------------------+----------------------+
+ a_row < ForwardPressed , ForwardTimer , FastForward , &fsm::do_fast_forward >,
+ a_row < FastForward , ForwardTimer , FastForward , &fsm::do_fast_forward >,
+ _row < FastForward , EastReleased , NoForward >,
+ // +--------------------+---------------------+---------------------+--------------------------+----------------------+
+ _row < StdDisplay , PlayingMiddleButton , SetPosition >,
+ _row < SetPosition , StartSong , StdDisplay >,
+ _row < SetPosition , PlayingMiddleButton , SetMark >,
+ _row < SetMark , PlayingMiddleButton , StdDisplay >,
+ _row < SetMark , StartSong , StdDisplay >
+ // +--------------------+---------------------+---------------------+--------------------------+----------------------+
> {};
PlayingMode_():
m_SongIndex(1),
Copied: branches/release/libs/msm/doc/HTML/examples/iPod_distributed/iPod.cpp (from r62129, /trunk/libs/msm/doc/HTML/examples/iPod_distributed/iPod.cpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/iPod_distributed/iPod.cpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/iPod_distributed/iPod.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <set>
#include <string>
@@ -89,7 +99,7 @@
// transition actions
void send_ActivateMenu(EndPlay const&)
{
- std::cout << "leaving Playing" << std::endl;
+ std::cout << "leaving Playing" << std::endl;
// we need to activate the menu and simulate its button
(static_cast<iPod*>(this))->process_event(MenuButton());
}
@@ -134,7 +144,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +-------------------+---------------+-------------------+--------------------------------+----------------------+
_row < NotHolding , Hold , Holding >,
_row < Holding , NoHold , NotHolding >,
Copied: branches/release/libs/msm/doc/HTML/examples/ipod_functors.hpp (from r62129, /trunk/libs/msm/doc/HTML/examples/ipod_functors.hpp)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/ipod_functors.hpp (original)
+++ branches/release/libs/msm/doc/HTML/examples/ipod_functors.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef IPOD_FUNCTORS_HPP
#define IPOD_FUNCTORS_HPP
#include <boost/msm/front/euml/euml.hpp>
@@ -235,4 +245,4 @@
std::cout << "turning player on" << std::endl;
}
};
-#endif
\ No newline at end of file
+#endif
Copied: branches/release/libs/msm/doc/HTML/examples/logging_functors.h (from r62129, /trunk/libs/msm/doc/HTML/examples/logging_functors.h)
==============================================================================
--- /trunk/libs/msm/doc/HTML/examples/logging_functors.h (original)
+++ branches/release/libs/msm/doc/HTML/examples/logging_functors.h 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef LOGGING_FUNCTORS
#define LOGGING_FUNCTORS
Copied: branches/release/libs/msm/doc/PDF/examples/AnonymousTutorial.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/AnonymousTutorial.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/AnonymousTutorial.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/AnonymousTutorial.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -27,7 +37,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: State1" << std::endl;}
};
struct State2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: State2" << std::endl;}
template <class Event,class FSM>
@@ -35,7 +45,7 @@
};
struct State3 : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: State3" << std::endl;}
@@ -73,7 +83,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
_row < State1 , none , State2 >,
a_row < State2 , none , State3 , &p::State2ToState3 >,
@@ -105,7 +115,7 @@
void test()
{
- my_machine p;
+ my_machine p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
// in this case it will also immediately trigger all anonymous transitions
Copied: branches/release/libs/msm/doc/PDF/examples/AnonymousTutorialEuml.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/AnonymousTutorialEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/AnonymousTutorialEuml.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/AnonymousTutorialEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -148,7 +158,7 @@
void test()
{
- my_machine p;
+ my_machine p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
// in this case it will also immediately trigger all anonymous transitions
Copied: branches/release/libs/msm/doc/PDF/examples/AnonymousTutorialWithFunctors.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/AnonymousTutorialWithFunctors.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/AnonymousTutorialWithFunctors.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/AnonymousTutorialWithFunctors.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -30,7 +40,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: State1" << std::endl;}
};
struct State2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: State2" << std::endl;}
template <class Event,class FSM>
@@ -38,7 +48,7 @@
};
struct State3 : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: State3" << std::endl;}
@@ -98,7 +108,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
Row < State1 , none , State2 >,
Row < State2 , none , State3 , State2ToState3 >,
@@ -130,7 +140,7 @@
void test()
{
- my_machine p;
+ my_machine p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
// in this case it will also immediately trigger all anonymous transitions
Copied: branches/release/libs/msm/doc/PDF/examples/BoostCon09Full.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/BoostCon09Full.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/BoostCon09Full.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/BoostCon09Full.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
#include <boost/mpl/vector/vector50.hpp>
@@ -57,9 +67,9 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
- typedef mpl::vector<play> deferred_events;
+ {
+ typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector<play> deferred_events;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -69,9 +79,9 @@
// and using for this the non-default policy
// if policy used, set_sm_ptr is needed
struct Stopped : public msm::front::state<default_base_state,msm::front::sm_ptr>
- {
+ {
// when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -87,7 +97,7 @@
struct Playing_ : public msm::front::state_machine_def<Playing_>
{
// when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector<CDLoaded> flag_list;
+ typedef mpl::vector<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
template <class Event,class FSM>
@@ -96,21 +106,21 @@
// The list of FSM states
struct Song1 : public msm::front::state<>
{
- typedef mpl::vector1<FirstSongPlaying> flag_list;
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;}
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -134,7 +144,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+---------------+------------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -156,7 +166,7 @@
// the player state machine contains a state which is himself a state machine (2 of them, Playing and Paused)
struct Paused : public msm::front::state<>
{
- typedef mpl::vector<CDLoaded> flag_list;
+ typedef mpl::vector<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Paused" << std::endl;}
template <class Event,class FSM>
@@ -197,7 +207,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
void report_error(error_found const&) {std::cout << "player::report_error\n";}
void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
// guard conditions
@@ -216,7 +226,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +-------------+---------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -259,7 +269,7 @@
void pstate(player const& p)
{
- typedef player::stt Stt;
+ typedef player::stt Stt;
typedef msm::back::generate_state_set<Stt>::type all_states;
static char const* state_names[mpl::size<all_states>::value];
// fill the names of the states defined in the state machine
Copied: branches/release/libs/msm/doc/PDF/examples/CompilerStressTestEuml.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/CompilerStressTestEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/CompilerStressTestEuml.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/CompilerStressTestEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <list>
#include <set>
Copied: branches/release/libs/msm/doc/PDF/examples/CompositeTutorial.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/CompositeTutorial.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/CompositeTutorial.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/CompositeTutorial.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -41,7 +51,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -49,7 +59,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
@@ -78,14 +88,14 @@
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -101,7 +111,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -118,7 +128,7 @@
}
};
// back-end
- typedef msm::back::state_machine<Playing_> Playing;
+ typedef msm::back::state_machine<Playing_> Playing;
// state not defining any entry or exit
@@ -138,14 +148,14 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
// guard conditions
typedef player_ p; // makes transition table cleaner
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/PDF/examples/CompositeTutorialEuml.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/CompositeTutorialEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/CompositeTutorialEuml.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/CompositeTutorialEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
Copied: branches/release/libs/msm/doc/PDF/examples/DirectEntryEuml.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/DirectEntryEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/DirectEntryEuml.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/DirectEntryEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -28,212 +38,212 @@
event6_impl const event6;
//Sub fsm state definition
- BOOST_MSM_EUML_ACTION(SubState1_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState1" << std::endl;
- }
- };
+ BOOST_MSM_EUML_ACTION(SubState1_Entry)
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState1_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( SubState1_Entry,SubState1_Exit ),SubState1)
BOOST_MSM_EUML_ACTION(SubState1b_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState1b" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState1b" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState1b_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState1b" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState1b" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( SubState1b_Entry,SubState1b_Exit ),SubState1b)
BOOST_MSM_EUML_ACTION(SubState1c_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState1c" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState1c" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState1c_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState1c" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState1c" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( SubState1c_Entry,SubState1c_Exit ),SubState1c)
BOOST_MSM_EUML_ACTION(SubState2_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState2" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState2" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState2_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState2" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState2" << std::endl;
+ }
+ };
BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE(0,( SubState2_Entry,SubState2_Exit ),SubState2)
BOOST_MSM_EUML_ACTION(SubState2b_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState2b" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState2b" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState2b_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState2b" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState2b" << std::endl;
+ }
+ };
BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE(1,( SubState2b_Entry,SubState2b_Exit ),SubState2b)
BOOST_MSM_EUML_ACTION(SubState2c_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState2c" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState2c" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState2c_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState2c" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState2c" << std::endl;
+ }
+ };
BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE(2,( SubState2c_Entry,SubState2c_Exit ),SubState2c)
BOOST_MSM_EUML_ACTION(PseudoEntry1_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::PseudoEntry1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::PseudoEntry1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(PseudoEntry1_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::PseudoEntry1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::PseudoEntry1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ENTRY_STATE(0,( PseudoEntry1_Entry,PseudoEntry1_Exit ),PseudoEntry1)
BOOST_MSM_EUML_ACTION(SubState3_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState3" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState3" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState3_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState3" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState3" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( SubState3_Entry,SubState3_Exit ),SubState3)
BOOST_MSM_EUML_ACTION(SubState3b_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::SubState3b" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::SubState3b" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubState3b_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::SubState3b" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::SubState3b" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( SubState3b_Entry,SubState3b_Exit ),SubState3b)
BOOST_MSM_EUML_ACTION(PseudoExit1_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2::PseudoExit1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2::PseudoExit1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(PseudoExit1_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2::PseudoExit1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2::PseudoExit1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_EXIT_STATE(( event6,PseudoExit1_Entry,PseudoExit1_Exit ),PseudoExit1)
// actions
BOOST_MSM_EUML_ACTION(entry_action)
- {
- template <class FSM,class EVT,class SourceState,class TargetState>
- void operator()(FSM& ,EVT const& ,SourceState& ,TargetState& )
- {
- cout << "calling entry_action" << endl;
- }
- };
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(FSM& ,EVT const& ,SourceState& ,TargetState& )
+ {
+ cout << "calling entry_action" << endl;
+ }
+ };
// SubFsm definition
BOOST_MSM_EUML_ACTION(SubFsm2_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: SubFsm2" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: SubFsm2" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(SubFsm2_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: SubFsm2" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: SubFsm2" << std::endl;
+ }
+ };
BOOST_MSM_EUML_TRANSITION_TABLE((
// +------------------------------------------------------------------------------+
SubState3 == PseudoEntry1 + event4 / entry_action ,
@@ -262,39 +272,39 @@
// Fsm state definitions
BOOST_MSM_EUML_ACTION(State1_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: State1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: State1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(State1_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: State1" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: State1" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( State1_Entry,State1_Exit ),State1)
BOOST_MSM_EUML_ACTION(State2_Entry)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "entering: State2" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "entering: State2" << std::endl;
+ }
+ };
BOOST_MSM_EUML_ACTION(State2_Exit)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const&,FSM&,STATE& )
- {
- std::cout << "leaving: State2" << std::endl;
- }
- };
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const&,FSM&,STATE& )
+ {
+ std::cout << "leaving: State2" << std::endl;
+ }
+ };
BOOST_MSM_EUML_STATE(( State2_Entry,State2_Exit ),State2)
// Fsm definition
@@ -314,14 +324,14 @@
BOOST_MSM_EUML_ACTION(Log_No_Transition)
- {
- template <class Event,class FSM,class STATE>
- void operator()(Event const& e,FSM&,STATE& )
- {
+ {
+ template <class Event,class FSM,class STATE>
+ void operator()(Event const& e,FSM&,STATE& )
+ {
std::cout << "no transition in Fsm"
<< " on event " << typeid(e).name() << std::endl;
- }
- };
+ }
+ };
BOOST_MSM_EUML_DECLARE_STATE_MACHINE(( transition_table, //STT
init_ << State1, // Init State
no_action, // Entry
Copied: branches/release/libs/msm/doc/PDF/examples/DirectEntryTutorial.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/DirectEntryTutorial.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/DirectEntryTutorial.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/DirectEntryTutorial.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
// back-end
@@ -120,7 +130,7 @@
// Transition table for SubFsm2
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +--------------+-------------+------------+------------------------+----------------------+
a_row < PseudoEntry1 , event4 , SubState3 ,&SubFsm2_::entry_action >,
_row < SubState2 , event6 , SubState1 >,
Copied: branches/release/libs/msm/doc/PDF/examples/EumlInternal.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/EumlInternal.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/EumlInternal.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/EumlInternal.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -106,7 +116,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -121,7 +131,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play() as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// at this point, Play is active
p.process_event(pause); pstate(p);
Copied: branches/release/libs/msm/doc/PDF/examples/EumlInternalDistributed.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/EumlInternalDistributed.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/EumlInternalDistributed.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/EumlInternalDistributed.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -163,7 +173,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -178,7 +188,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// at this point, Play is active
// make transition happen inside it. Player has no idea about this event but it's ok.
p.process_event(next_song);pstate(p); //2nd song active
Copied: branches/release/libs/msm/doc/PDF/examples/EumlSimple.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/EumlSimple.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/EumlSimple.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/EumlSimple.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,5 +1,12 @@
-// MsmSimple.cpp : Defines the entry point for the console application.
-//
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
#include "stdafx.h"
Copied: branches/release/libs/msm/doc/PDF/examples/Flags.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/Flags.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/Flags.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/Flags.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -46,8 +56,8 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
+ {
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -55,9 +65,9 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -70,7 +80,7 @@
struct Playing_ : public msm::front::state_machine_def<Playing_>
{
// when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
@@ -80,7 +90,7 @@
// The list of FSM states
struct Song1 : public msm::front::state<>
{
- typedef mpl::vector1<FirstSongPlaying> flag_list;
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
template <class Event,class FSM>
@@ -88,14 +98,14 @@
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -111,7 +121,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -133,7 +143,7 @@
// state not defining any entry or exit
struct Paused : public msm::front::state<>
{
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
};
// the initial state of the player SM. Must be defined
@@ -148,14 +158,14 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
// guard conditions
typedef player_ p; // makes transition table cleaner
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/PDF/examples/History.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/History.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/History.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/History.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -41,7 +51,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -49,7 +59,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
@@ -74,14 +84,14 @@
void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;}
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -97,7 +107,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -142,14 +152,14 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
// guard conditions
typedef player_ p; // makes transition table cleaner
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/PDF/examples/HistoryEuml.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/HistoryEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/HistoryEuml.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/HistoryEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include <boost/msm/back/state_machine.hpp>
@@ -129,7 +139,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -141,7 +151,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// make transition happen inside it. Player has no idea about this event but it's ok.
p.process_event(next_song);pstate(p); //2nd song active
Copied: branches/release/libs/msm/doc/PDF/examples/MsmComposite.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/MsmComposite.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/MsmComposite.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/MsmComposite.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,5 +1,12 @@
-// MsmSimple.cpp : Defines the entry point for the console application.
-//
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/msm/back/state_machine.hpp>
#include <boost/msm/front/state_machine_def.hpp>
@@ -44,7 +51,7 @@
void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/}
template <class Event,class FSM>
@@ -52,7 +59,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/}
@@ -80,7 +87,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -119,14 +126,14 @@
void pause_playback(pause const&) { }
void resume_playback(end_pause const&) { }
void stop_and_open(open_close const&) { }
- void stopped_again(stop const&) {}
+ void stopped_again(stop const&){}
// guard conditions
typedef player_ p; // makes transition table cleaner
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/PDF/examples/MsmSimple.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/MsmSimple.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/MsmSimple.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/MsmSimple.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,5 +1,12 @@
-// MsmSimple.cpp : Defines the entry point for the console application.
-//
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/msm/back/state_machine.hpp>
#include <boost/msm/front/state_machine_def.hpp>
@@ -41,7 +48,7 @@
void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/}
template <class Event,class FSM>
@@ -49,7 +56,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/}
template <class Event,class FSM>
@@ -83,14 +90,14 @@
void pause_playback(pause const&) { }
void resume_playback(end_pause const&) { }
void stop_and_open(open_close const&) { }
- void stopped_again(stop const&) {}
+ void stopped_again(stop const&){}
// guard conditions
typedef player_ p; // makes transition table cleaner
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
_row < Stopped , play , Playing >,
_row < Stopped , open_close , Open >,
Copied: branches/release/libs/msm/doc/PDF/examples/MsmSimpleFunctors.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/MsmSimpleFunctors.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/MsmSimpleFunctors.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/MsmSimpleFunctors.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/msm/back/state_machine.hpp>
#include <boost/msm/front/state_machine_def.hpp>
#include <boost/msm/front/functor_row.hpp>
@@ -40,7 +50,7 @@
void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/}
template <class Event,class FSM>
@@ -48,7 +58,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/}
@@ -143,7 +153,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
Row < Stopped , play , Playing , start_playback >,
Row < Stopped , open_close , Open , open_drawer >,
Copied: branches/release/libs/msm/doc/PDF/examples/Orthogonal-deferred.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/Orthogonal-deferred.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/Orthogonal-deferred.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/Orthogonal-deferred.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -51,11 +61,11 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
+ {
// if the play event arrives in this state, defer it until a state handles it or
// rejects it
typedef mpl::vector<play> deferred_events;
- typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -63,9 +73,9 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -78,7 +88,7 @@
struct Playing_ : public msm::front::state_machine_def<Playing_>
{
// when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
@@ -87,21 +97,21 @@
// The list of FSM states
struct Song1 : public msm::front::state<>
{
- typedef mpl::vector1<FirstSongPlaying> flag_list;
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;}
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -117,7 +127,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -139,7 +149,7 @@
// state not defining any entry or exit
struct Paused : public msm::front::state<>
{
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
};
struct AllOk : public msm::front::state<>
{
@@ -170,7 +180,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
void report_error(error_found const&) {std::cout << "player::report_error\n";}
void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
@@ -180,7 +190,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/PDF/examples/Orthogonal-deferred2.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/Orthogonal-deferred2.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/Orthogonal-deferred2.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/Orthogonal-deferred2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -53,8 +63,8 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
+ {
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -62,9 +72,9 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -77,7 +87,7 @@
struct Playing_ : public msm::front::state_machine_def<Playing_>
{
// when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
@@ -86,21 +96,21 @@
// The list of FSM states
struct Song1 : public msm::front::state<>
{
- typedef mpl::vector1<FirstSongPlaying> flag_list;
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;}
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -116,7 +126,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -138,7 +148,7 @@
// state not defining any entry or exit
struct Paused : public msm::front::state<>
{
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
};
struct AllOk : public msm::front::state<>
{
@@ -169,7 +179,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
void report_error(error_found const&) {std::cout << "player::report_error\n";}
void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
@@ -179,7 +189,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -178,7 +188,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
@@ -194,7 +204,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// at this point, Play is active
std::cout << "PlayingPaused active:" << std::boolalpha
Copied: branches/release/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml2.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml2.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml2.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/OrthogonalDeferredEuml2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -182,7 +192,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
@@ -198,7 +208,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// at this point, Play is active
p.process_event(pause); pstate(p);
Copied: branches/release/libs/msm/doc/PDF/examples/ParsingDigits.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/ParsingDigits.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/ParsingDigits.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/ParsingDigits.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,5 +1,13 @@
-// MsmSimple.cpp : Defines the entry point for the console application.
-//
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#define FUSION_MAX_VECTOR_SIZE 20
#include <boost/msm/back/state_machine.hpp>
@@ -208,7 +216,7 @@
// Transition table for parsing_
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +-------------+-------------------+---------+---------------------+----------------------+
Row < Waiting , digit , Digit1 >,
Row < Digit1 , digit , Digit2 >,
Copied: branches/release/libs/msm/doc/PDF/examples/SC Composite.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SC Composite.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SC Composite.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SC Composite.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/statechart/event.hpp>
#include <boost/statechart/state_machine.hpp>
#include <boost/statechart/simple_state.hpp>
@@ -41,7 +51,7 @@
void store_cd_info(cd_detected const& cd) {/*std::cout << "player::store_cd_info\n";*/ }
void close_drawer(open_close const&) { /*std::cout << "player::close_drawer\n";*/ }
void start_playback(play const&) { /*std::cout << "player::start_playback\n";*/ }
- void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/}
+ void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/}
void stop_playback(stop const&) { /*std::cout << "player::stop_playback\n";*/ }
void pause_playback(pause const&) { /*std::cout << "player::pause_playback\n"; */}
void stop_and_open(open_close const&) { /*std::cout << "player::stop_and_open\n";*/ }
Copied: branches/release/libs/msm/doc/PDF/examples/SC Simple.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SC Simple.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SC Simple.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SC Simple.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/statechart/event.hpp>
#include <boost/statechart/state_machine.hpp>
#include <boost/statechart/simple_state.hpp>
@@ -40,7 +50,7 @@
void store_cd_info(cd_detected const& cd) {/*std::cout << "player::store_cd_info\n";*/ }
void close_drawer(open_close const&) { /*std::cout << "player::close_drawer\n";*/ }
void start_playback(play const&) { /*std::cout << "player::start_playback\n";*/ }
- void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/}
+ void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/}
void stop_playback(stop const&) { /*std::cout << "player::stop_playback\n";*/ }
void pause_playback(pause const&) { /*std::cout << "player::pause_playback\n"; */}
void stop_and_open(open_close const&) { /*std::cout << "player::stop_and_open\n";*/ }
Copied: branches/release/libs/msm/doc/PDF/examples/SM-2Arg.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SM-2Arg.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SM-2Arg.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SM-2Arg.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include <string>
#include "boost/mpl/vector/vector30.hpp"
@@ -81,8 +91,8 @@
}
};
struct Open : public msm::front::state<my_visitable_state>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
+ {
+ typedef mpl::vector1<CDLoaded> flag_list;
typedef mpl::vector<play> deferred_events;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;}
@@ -97,9 +107,9 @@
// and using for this the non-default policy
// if policy used, set_sm_ptr is needed
struct Stopped : public msm::front::state<my_visitable_state>
- {
+ {
// when stopped, the CD is loaded
- typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -113,7 +123,7 @@
struct Playing_ : public msm::front::state_machine_def<Playing_,my_visitable_state >
{
// when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;}
template <class Event,class FSM>
@@ -128,7 +138,7 @@
// so we have a SM containing a SM containing a SM
struct Song1_ : public msm::front::state_machine_def<Song1_,my_visitable_state>
{
- typedef mpl::vector1<FirstSongPlaying> flag_list;
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;}
template <class Event,class FSM>
@@ -138,14 +148,14 @@
vis.visit_state(this,i);
}
struct LightOn : public msm::front::state<my_visitable_state>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: LightOn" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: LightOn" << std::endl;}
};
struct LightOff : public msm::front::state<my_visitable_state>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: LightOff" << std::endl;}
template <class Event,class FSM>
@@ -160,7 +170,7 @@
typedef Song1_ s; // makes transition table cleaner
// Transition table for Song1
struct transition_table : mpl::vector1<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < LightOn , ThreeSec , LightOff, &s::turn_light_off >
// +---------+-------------+---------+---------------------+----------------------+
@@ -176,14 +186,14 @@
typedef msm::back::state_machine<Song1_> Song1;
struct Song2 : public msm::front::state<my_visitable_state>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<my_visitable_state>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -199,7 +209,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >,
@@ -220,7 +230,7 @@
// the player state machine contains a state which is himself a state machine (2 of them, Playing and Paused)
struct Paused_ : public msm::front::state_machine_def<Paused_,my_visitable_state>
{
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "entering: Paused" << std::endl;}
template <class Event,class FSM>
@@ -228,14 +238,14 @@
// The list of FSM states
struct StartBlinking : public msm::front::state<my_visitable_state>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: StartBlinking" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: StartBlinking" << std::endl;}
};
struct StopBlinking : public msm::front::state<my_visitable_state>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: StopBlinking" << std::endl;}
template <class Event,class FSM>
@@ -251,7 +261,7 @@
typedef Paused_ pa; // makes transition table cleaner
// Transition table
struct transition_table : mpl::vector2<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------------+-------------+--------------+---------------------+----------------------+
a_row < StartBlinking , TenSec , StopBlinking , &pa::stop_blinking >,
a_row < StopBlinking , TenSec , StartBlinking , &pa::start_blinking >
@@ -305,7 +315,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
void start_sleep(go_sleep const&) { }
void report_error(error_found const&) {std::cout << "player::report_error\n";}
void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";}
@@ -316,7 +326,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
Copied: branches/release/libs/msm/doc/PDF/examples/SimpleTimer.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTimer.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SimpleTimer.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SimpleTimer.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -125,7 +135,7 @@
void test()
{
- SimpleTimer p;
+ SimpleTimer p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
Copied: branches/release/libs/msm/doc/PDF/examples/SimpleTutorial.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorial.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SimpleTutorial.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SimpleTutorial.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -17,7 +27,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -46,7 +56,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -55,7 +65,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<msm::front::default_base_state,msm::front::sm_ptr>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -92,7 +102,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&){std::cout << "player::stopped_again\n";}
// guard conditions
bool good_disk_format(cd_detected const& evt)
{
@@ -115,7 +125,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -158,7 +168,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -169,7 +179,7 @@
cd_detected("louie, louie",DISK_DVD)); pstate(p);
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
- p.process_event(play());
+ p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/PDF/examples/SimpleTutorial2.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorial2.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SimpleTutorial2.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SimpleTutorial2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -19,7 +29,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -56,7 +66,7 @@
}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -67,7 +77,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<msm::front::default_base_state,msm::front::sm_ptr>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -122,7 +132,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action/Guard
+ // Start Event Next Action/Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row2 < Stopped , play , Playing , Stopped , &Stopped::start_playback >,
a_row2 < Stopped , open_close , Open , Empty , &Empty::open_drawer >,
@@ -171,7 +181,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -182,7 +192,7 @@
cd_detected("louie, louie",DISK_DVD)); pstate(p);
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
- p.process_event(play());
+ p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/PDF/examples/SimpleTutorialEuml.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorialEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SimpleTutorialEuml.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SimpleTutorialEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -131,7 +141,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// note that we write open_close and not open_close(), like usual. Both are possible with eUML, but
@@ -145,7 +155,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// at this point, Play is active
p.process_event(pause); pstate(p);
Copied: branches/release/libs/msm/doc/PDF/examples/SimpleTutorialEuml2.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorialEuml2.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SimpleTutorialEuml2.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SimpleTutorialEuml2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
@@ -103,7 +113,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -115,7 +125,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play as the previous event does it in its action method
- //p.process_event(play);
+ //p.process_event(play);
// at this point, Play is active
p.process_event(pause); pstate(p);
Copied: branches/release/libs/msm/doc/PDF/examples/SimpleTutorialInternal.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorialInternal.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SimpleTutorialInternal.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SimpleTutorialInternal.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -20,7 +30,7 @@
struct to_ignore {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -49,7 +59,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -58,7 +68,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<msm::front::default_base_state,msm::front::sm_ptr>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -95,7 +105,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
// guard conditions
bool good_disk_format(cd_detected const& evt)
{
@@ -136,7 +146,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -182,7 +192,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// this event will be ignored and not call no_transition
@@ -195,7 +205,7 @@
cd_detected("louie, louie",DISK_DVD)); pstate(p);
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
- p.process_event(play());
+ p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/PDF/examples/SimpleTutorialInternal2.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorialInternal2.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SimpleTutorialInternal2.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SimpleTutorialInternal2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -18,7 +28,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -73,13 +83,13 @@
// Transition table for Empty
struct internal_transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
Internal < cd_detected , internal_action_fct ,internal_guard_fct >
// +---------+-------------+---------+---------------------+----------------------+
> {};
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -88,7 +98,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<msm::front::default_base_state,msm::front::sm_ptr>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -125,7 +135,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
// guard conditions
bool good_disk_format(cd_detected const& evt)
{
@@ -142,7 +152,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -189,7 +199,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -200,7 +210,7 @@
cd_detected("louie, louie",DISK_DVD)); pstate(p);
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
- p.process_event(play());
+ p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/PDF/examples/SimpleTutorialInternalFunctors.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleTutorialInternalFunctors.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SimpleTutorialInternalFunctors.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SimpleTutorialInternalFunctors.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -25,7 +35,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -71,13 +81,13 @@
};
// Transition table for Empty
struct internal_transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
Internal < cd_detected , internal_action_fct ,internal_guard_fct >
// +---------+-------------+---------+---------------------+----------------------+
> {};
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -85,7 +95,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -234,7 +244,7 @@
};
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------------+----------------------+
Row < Stopped , play , Playing , ActionSequence_
<mpl::vector<
@@ -282,7 +292,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
Copied: branches/release/libs/msm/doc/PDF/examples/SimpleWithFunctors.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleWithFunctors.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SimpleWithFunctors.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SimpleWithFunctors.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
// back-end
@@ -27,7 +37,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -56,7 +66,7 @@
void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;}
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -64,7 +74,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
// when stopped, the CD is loaded
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
@@ -213,7 +223,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------------+----------------------+
Row < Stopped , play , Playing , ActionSequence_
<mpl::vector<
@@ -248,7 +258,7 @@
}
};
// Pick a back-end
- typedef msm::back::state_machine<player_> player;
+ typedef msm::back::state_machine<player_> player;
//
// Testing utilities.
@@ -261,7 +271,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -273,7 +283,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play() as the previous event does it in its action method
- //p.process_event(play());
+ //p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/PDF/examples/SimpleWithFunctors2.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleWithFunctors2.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SimpleWithFunctors2.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SimpleWithFunctors2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
// back-end
@@ -29,7 +39,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -229,7 +239,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------------+----------------------+
Row < Stopped , play , Playing , ActionSequence_
<mpl::vector<
@@ -264,7 +274,7 @@
}
};
// Pick a back-end
- typedef msm::back::state_machine<player_> player;
+ typedef msm::back::state_machine<player_> player;
//
// Testing utilities.
@@ -277,7 +287,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -289,7 +299,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play() as the previous event does it in its action method
- //p.process_event(play());
+ //p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/PDF/examples/SimpleWithFunctors3.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/SimpleWithFunctors3.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/SimpleWithFunctors3.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/SimpleWithFunctors3.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
// back-end
@@ -29,7 +39,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -219,7 +229,7 @@
// Transition table for player
struct player_transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------------+----------------------+
Row < Stopped , play , Playing , ActionSequence_
<mpl::vector<
@@ -251,7 +261,7 @@
//Initial state
Empty> player_;
// Pick a back-end
- typedef msm::back::state_machine<player_> player;
+ typedef msm::back::state_machine<player_> player;
//
// Testing utilities.
@@ -264,7 +274,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
@@ -276,7 +286,7 @@
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
// no need to call play() as the previous event does it in its action method
- //p.process_event(play());
+ //p.process_event(play());
// at this point, Play is active
p.process_event(pause()); pstate(p);
Copied: branches/release/libs/msm/doc/PDF/examples/TestInternal.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/TestInternal.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/TestInternal.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/TestInternal.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include "boost/mpl/vector/vector30.hpp"
@@ -26,7 +36,7 @@
struct to_ignore {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -54,7 +64,7 @@
void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; }
void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; }
void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; }
- void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
+ void stopped_again(stop const&) {std::cout << "player::stopped_again\n";}
// guard conditions
bool good_disk_format(cd_detected const& evt)
{
@@ -109,7 +119,7 @@
void internal_action(to_ignore const&) { std::cout << "Empty::(almost)ignoring event\n"; }
// Transition table for Empty
struct internal_transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
Row < Empty , cd_detected , none , internal_action_fct ,internal_guard_fct >,
Internal < cd_detected , internal_action_fct ,internal_guard_fct >,
a_internal< to_ignore , Empty,&Empty::internal_action >
@@ -117,7 +127,7 @@
> {};
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -125,7 +135,7 @@
};
struct Stopped : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;}
template <class Event,class FSM>
@@ -150,14 +160,14 @@
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;}
template <class Event,class FSM>
void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;}
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;}
template <class Event,class FSM>
@@ -198,7 +208,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+---------------+---------+---------------------+----------------------+
a_row < Song1 , NextSong , Song2 , &pl::start_next_song >,
a_row < Song2 , PreviousSong , Song1 , &pl::start_prev_song >,
@@ -210,7 +220,7 @@
// +---------+----------------+---------+---------------------+-----------------------+
struct internal_transition_table : mpl::vector<
// normal internal transition
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
Internal < internal_event , playing_internal_fct,playing_internal_guard >,
// conflict between internal and the external defined above
Internal < PreviousSong , playing_internal_fct,playing_false_guard >,
@@ -242,7 +252,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -288,7 +298,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// this event will be ignored and not call no_transition
@@ -301,10 +311,10 @@
cd_detected("louie, louie",DISK_DVD)); pstate(p);
p.process_event(
cd_detected("louie, louie",DISK_CD)); pstate(p);
- p.process_event(play());
+ p.process_event(play());
p.process_event(NextSong());
std::cout << "sending an internal event" << std::endl;
- p.process_event(internal_event());
+ p.process_event(internal_event());
std::cout << "conflict between the internal and normal transition. Internal is tried last" << std::endl;
p.process_event(PreviousSong());
Copied: branches/release/libs/msm/doc/PDF/examples/char_event_dispatcher.hpp (from r62129, /trunk/libs/msm/doc/PDF/examples/char_event_dispatcher.hpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/char_event_dispatcher.hpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/char_event_dispatcher.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef BOOST_MSM_CHAR_EVENT_DISPATCHER_HPP
#define BOOST_MSM_CHAR_EVENT_DISPATCHER_HPP
@@ -79,4 +89,4 @@
};
}}} // boost::msm::back
-#endif //BOOST_MSM_CHAR_EVENT_DISPATCHER_HPP
\ No newline at end of file
+#endif //BOOST_MSM_CHAR_EVENT_DISPATCHER_HPP
Copied: branches/release/libs/msm/doc/PDF/examples/distributed_table/DistributedTable.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/distributed_table/DistributedTable.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/distributed_table/DistributedTable.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/distributed_table/DistributedTable.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <iostream>
// back-end
@@ -48,7 +58,7 @@
void test()
{
- player p;
+ player p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
p.start();
// go to Open, call on_exit on Empty, then action, then on_entry on Open
Copied: branches/release/libs/msm/doc/PDF/examples/distributed_table/Empty.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/distributed_table/Empty.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/distributed_table/Empty.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/distributed_table/Empty.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include "Empty.hpp"
Copied: branches/release/libs/msm/doc/PDF/examples/distributed_table/Empty.hpp (from r62129, /trunk/libs/msm/doc/PDF/examples/distributed_table/Empty.hpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/distributed_table/Empty.hpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/distributed_table/Empty.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef EMPTY_HPP
#define EMPTY_HPP
@@ -23,11 +33,11 @@
void open_drawer(open_close const&);
struct internal_transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
//+-------------+---------+-------------+---------+---------------------------+----------------------+
msm::front::a_row2 < Empty , open_close , Open , Empty,&Empty::open_drawer >
//+-------------+---------+-------------+---------+---------------------------+----------------------+
> {};
};
-#endif
\ No newline at end of file
+#endif
Copied: branches/release/libs/msm/doc/PDF/examples/distributed_table/Events.hpp (from r62129, /trunk/libs/msm/doc/PDF/examples/distributed_table/Events.hpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/distributed_table/Events.hpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/distributed_table/Events.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef EVENTS_HPP
#define EVENTS_HPP
@@ -26,4 +36,4 @@
};
-#endif
\ No newline at end of file
+#endif
Copied: branches/release/libs/msm/doc/PDF/examples/distributed_table/Open.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/distributed_table/Open.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/distributed_table/Open.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/distributed_table/Open.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include "Open.hpp"
Copied: branches/release/libs/msm/doc/PDF/examples/distributed_table/Open.hpp (from r62129, /trunk/libs/msm/doc/PDF/examples/distributed_table/Open.hpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/distributed_table/Open.hpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/distributed_table/Open.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef OPEN_HPP
#define OPEN_HPP
@@ -16,7 +26,7 @@
using namespace msm::front;
struct Open : public msm::front::state<>
-{
+{
template <class Event,class FSM>
void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;}
template <class Event,class FSM>
@@ -24,11 +34,11 @@
void close_drawer(open_close const&);
struct internal_transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
//+-------------+---------+-------------+---------+---------------------------+----------------------+
msm::front::a_row2 < Open , open_close , Empty , Open,&Open::close_drawer >
//+-------------+---------+-------------+---------+---------------------------+----------------------+
> {};
};
-#endif
\ No newline at end of file
+#endif
Copied: branches/release/libs/msm/doc/PDF/examples/iPodEuml.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/iPodEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/iPodEuml.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/iPodEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <set>
#include <string>
Copied: branches/release/libs/msm/doc/PDF/examples/iPodSearch.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/iPodSearch.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/iPodSearch.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/iPodSearch.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <set>
#include <string>
#include <iostream>
@@ -123,7 +133,7 @@
// Transition table for player
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +-----------+------------------+------------+---------------------+----------------------+
_row < MyForeach , OneSong , MyFind >,
_row < MyFind , NotFound<string> , MyForeach >,
Copied: branches/release/libs/msm/doc/PDF/examples/iPodSearchEuml.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/iPodSearchEuml.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/iPodSearchEuml.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/iPodSearchEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
// same as iPodSearch.cpp but using eUML
// requires boost >= v1.40 because using mpl::string
Copied: branches/release/libs/msm/doc/PDF/examples/iPod_distributed/Events.hpp (from r62129, /trunk/libs/msm/doc/PDF/examples/iPod_distributed/Events.hpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/iPod_distributed/Events.hpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/iPod_distributed/Events.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef EVENTS_HPP
#define EVENTS_HPP
@@ -19,8 +29,8 @@
struct EndPlay {};
struct CloseMenu
{
- template<class EVENT>
- CloseMenu(EVENT const &) {}
+ template<class EVENT>
+ CloseMenu(EVENT const &) {}
};
struct OnOffTimer {};
struct MenuMiddleButton {};
@@ -28,8 +38,8 @@
struct SongFinished {};
struct StartSong
{
- StartSong (int song_index):m_Selected(song_index){}
- int m_Selected;
+ StartSong (int song_index):m_Selected(song_index){}
+ int m_Selected;
};
struct PreviousSong{};
struct NextSong{};
Copied: branches/release/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,2 +1,12 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include "MenuMode.hpp"
BOOST_MSM_BACK_GENERATE_PROCESS_EVENT(MenuMode)
Copied: branches/release/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.hpp (from r62129, /trunk/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.hpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.hpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/iPod_distributed/MenuMode.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef MENU_MODE_HPP
#define MENU_MODE_HPP
@@ -14,38 +24,38 @@
struct MenuMode_ : public msm::front::state_machine_def<MenuMode_>
{
- typedef mpl::vector1<MenuActive> flag_list;
- struct WaitingForSongChoice : public msm::front::state<>
- {
- template <class Event,class FSM>
- void on_entry(Event const&,FSM& ) {std::cout << "starting: MenuMode::WaitingForSongChoice" << std::endl;}
- template <class Event,class FSM>
- void on_exit(Event const&,FSM& ) {std::cout << "finishing: MenuMode::WaitingForSongChoice" << std::endl;}
- };
- struct StartCurrentSong : public msm::front::state<>
- {
- template <class Event,class FSM>
- void on_entry(Event const&,FSM& ) {std::cout << "starting: MenuMode::StartCurrentSong" << std::endl;}
- template <class Event,class FSM>
- void on_exit(Event const&,FSM& ) {std::cout << "finishing: MenuMode::StartCurrentSong" << std::endl;}
- };
- struct MenuExit : public msm::front::exit_pseudo_state<CloseMenu>
- {
- template <class Event,class FSM>
- void on_entry(Event const&,FSM& ) {std::cout << "starting: MenuMode::WaitingForSongChoice" << std::endl;}
- template <class Event,class FSM>
- void on_exit(Event const&,FSM& ) {std::cout << "finishing: MenuMode::WaitingForSongChoice" << std::endl;}
- };
- typedef WaitingForSongChoice initial_state;
- typedef MenuMode_ fsm; // makes transition table cleaner
- // Transition table for player
- struct transition_table : mpl::vector2<
- // Start Event Next Action Guard
- // +---------------------+------------------+-------------------+---------------------+----------------------+
- _row < WaitingForSongChoice , MenuMiddleButton , StartCurrentSong >,
- _row < StartCurrentSong , SelectSong , MenuExit >
- // +---------------------+------------------+-------------------+---------------------+----------------------+
- > {};
+ typedef mpl::vector1<MenuActive> flag_list;
+ struct WaitingForSongChoice : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: MenuMode::WaitingForSongChoice" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: MenuMode::WaitingForSongChoice" << std::endl;}
+ };
+ struct StartCurrentSong : public msm::front::state<>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: MenuMode::StartCurrentSong" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: MenuMode::StartCurrentSong" << std::endl;}
+ };
+ struct MenuExit : public msm::front::exit_pseudo_state<CloseMenu>
+ {
+ template <class Event,class FSM>
+ void on_entry(Event const&,FSM& ) {std::cout << "starting: MenuMode::WaitingForSongChoice" << std::endl;}
+ template <class Event,class FSM>
+ void on_exit(Event const&,FSM& ) {std::cout << "finishing: MenuMode::WaitingForSongChoice" << std::endl;}
+ };
+ typedef WaitingForSongChoice initial_state;
+ typedef MenuMode_ fsm; // makes transition table cleaner
+ // Transition table for player
+ struct transition_table : mpl::vector2<
+ // Start Event Next Action Guard
+ // +---------------------+------------------+-------------------+---------------------+----------------------+
+ _row < WaitingForSongChoice , MenuMiddleButton , StartCurrentSong >,
+ _row < StartCurrentSong , SelectSong , MenuExit >
+ // +---------------------+------------------+-------------------+---------------------+----------------------+
+ > {};
};
typedef msm::back::state_machine<MenuMode_> MenuMode;
Copied: branches/release/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,2 +1,12 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include "PlayingMode.hpp"
BOOST_MSM_BACK_GENERATE_PROCESS_EVENT(PlayingMode)
Copied: branches/release/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.hpp (from r62129, /trunk/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.hpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.hpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/iPod_distributed/PlayingMode.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef PLAYING_MODE_HPP
#define PLAYING_MODE_HPP
@@ -100,7 +110,7 @@
};
struct SetPosition : public msm::front::state<>
{
- typedef mpl::vector1<NoFastFwd> flag_list;
+ typedef mpl::vector1<NoFastFwd> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {std::cout << "starting: PlayingMode::SetPosition" << std::endl;}
template <class Event,class FSM>
@@ -121,23 +131,23 @@
void on_exit(Event const&,FSM& ) {std::cout << "finishing: PlayingMode::PlayingExit" << std::endl;}
};
// transition action methods
- struct inc_song_counter : euml::euml_action<inc_song_counter>
- {
- template <class FSM,class EVT,class SourceState,class TargetState>
- void operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
- {
- if (++fsm.m_SongIndex <= fsm.m_NumberOfSongs )
- {
- std::cout << "playing song:" << fsm.m_SongIndex << std::endl;
- }
- else
- {
- // last song => end playing, next play will start at the beginning
- fsm.m_SongIndex = 1;
- fsm.process_event(EndPlay());
- }
- }
- };
+ struct inc_song_counter : euml::euml_action<inc_song_counter>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
+ {
+ if (++fsm.m_SongIndex <= fsm.m_NumberOfSongs )
+ {
+ std::cout << "playing song:" << fsm.m_SongIndex << std::endl;
+ }
+ else
+ {
+ // last song => end playing, next play will start at the beginning
+ fsm.m_SongIndex = 1;
+ fsm.process_event(EndPlay());
+ }
+ }
+ };
void select_song(StartSong const& evt)
{
@@ -152,31 +162,31 @@
std::cout << "selecting song:" << m_SongIndex << std::endl;
}
}
- struct dec_song_counter : euml::euml_action<dec_song_counter>
- {
- template <class FSM,class EVT,class SourceState,class TargetState>
- void operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
- {
- if (--fsm.m_SongIndex >0 )
- {
- std::cout << "playing song:" << fsm.m_SongIndex << std::endl;
- }
- else
- {
- // before first song => end playing
- fsm.m_SongIndex = 1;
- fsm.process_event(EndPlay());
- }
- }
- };
- struct send_NextSong : euml::euml_action<send_NextSong>
- {
- template <class FSM,class EVT,class SourceState,class TargetState>
- void operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
- {
- fsm.process_event(NextSong());
- }
- };
+ struct dec_song_counter : euml::euml_action<dec_song_counter>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
+ {
+ if (--fsm.m_SongIndex >0 )
+ {
+ std::cout << "playing song:" << fsm.m_SongIndex << std::endl;
+ }
+ else
+ {
+ // before first song => end playing
+ fsm.m_SongIndex = 1;
+ fsm.process_event(EndPlay());
+ }
+ }
+ };
+ struct send_NextSong : euml::euml_action<send_NextSong>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ void operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
+ {
+ fsm.process_event(NextSong());
+ }
+ };
void do_fast_forward(ForwardTimer const&)
{
@@ -184,47 +194,47 @@
}
// transition guard methods
- struct fast_fwd_ok : euml::euml_action<fast_fwd_ok>
- {
- template <class FSM,class EVT,class SourceState,class TargetState>
- bool operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
- {
- // guard accepts only if fast forward is possible (No SetPosition mode)
- return !fsm.is_flag_active<NoFastFwd>();
- }
- };
+ struct fast_fwd_ok : euml::euml_action<fast_fwd_ok>
+ {
+ template <class FSM,class EVT,class SourceState,class TargetState>
+ bool operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
+ {
+ // guard accepts only if fast forward is possible (No SetPosition mode)
+ return !fsm.is_flag_active<NoFastFwd>();
+ }
+ };
// initial states / orthogonal zones
typedef mpl::vector5<Playing,WaitingForNextPrev,WaitingForEnd,NoForward,StdDisplay>
initial_state;
typedef PlayingMode_ fsm; // makes transition table cleaner
// Transition table for player
struct transition_table : mpl::vector19<
- // Start Event Next Action Guard
- // +--------------------+---------------------+--------------------+--------------------------+----------------------+
- _row < Playing , PlayPause , Paused >,
- _row < Playing , Off , Paused >,
- a_row < Playing , StartSong , Playing , &fsm::select_song >,
- _row < Paused , PlayPause , Playing >,
+ // Start Event Next Action Guard
+ // +--------------------+---------------------+--------------------+--------------------------+----------------------+
+ _row < Playing , PlayPause , Paused >,
+ _row < Playing , Off , Paused >,
+ a_row < Playing , StartSong , Playing , &fsm::select_song >,
+ _row < Paused , PlayPause , Playing >,
msm::front::Row < Playing , SongFinished , Playing , inc_song_counter , msm::front::none >,
- a_row < Paused , StartSong , Playing , &fsm::select_song >,
- // +--------------------+---------------------+--------------------+--------------------------+----------------------+
+ a_row < Paused , StartSong , Playing , &fsm::select_song >,
+ // +--------------------+---------------------+--------------------+--------------------------+----------------------+
msm::front::Row < WaitingForNextPrev , PreviousSong , WaitingForNextPrev , dec_song_counter , msm::front::none >,
msm::front::Row < WaitingForNextPrev , NextSong , WaitingForNextPrev , inc_song_counter , msm::front::none >,
- // +--------------------+---------------------+--------------------+--------------------------+----------------------+
- _row < WaitingForEnd , EndPlay , PlayingExit >,
- // +--------------------+---------------------+--------------------+--------------------------+----------------------+
- msm::front::Row < NoForward , EastPressed , ForwardPressed , msm::front::none , fast_fwd_ok >,
+ // +--------------------+---------------------+--------------------+--------------------------+----------------------+
+ _row < WaitingForEnd , EndPlay , PlayingExit >,
+ // +--------------------+---------------------+--------------------+--------------------------+----------------------+
+ msm::front::Row < NoForward , EastPressed , ForwardPressed , msm::front::none , fast_fwd_ok >,
msm::front::Row < ForwardPressed , EastReleased , NoForward , send_NextSong , msm::front::none >,
- a_row < ForwardPressed , ForwardTimer , FastForward , &fsm::do_fast_forward >,
- a_row < FastForward , ForwardTimer , FastForward , &fsm::do_fast_forward >,
- _row < FastForward , EastReleased , NoForward >,
- // +--------------------+---------------------+---------------------+--------------------------+----------------------+
- _row < StdDisplay , PlayingMiddleButton , SetPosition >,
- _row < SetPosition , StartSong , StdDisplay >,
- _row < SetPosition , PlayingMiddleButton , SetMark >,
- _row < SetMark , PlayingMiddleButton , StdDisplay >,
- _row < SetMark , StartSong , StdDisplay >
- // +--------------------+---------------------+---------------------+--------------------------+----------------------+
+ a_row < ForwardPressed , ForwardTimer , FastForward , &fsm::do_fast_forward >,
+ a_row < FastForward , ForwardTimer , FastForward , &fsm::do_fast_forward >,
+ _row < FastForward , EastReleased , NoForward >,
+ // +--------------------+---------------------+---------------------+--------------------------+----------------------+
+ _row < StdDisplay , PlayingMiddleButton , SetPosition >,
+ _row < SetPosition , StartSong , StdDisplay >,
+ _row < SetPosition , PlayingMiddleButton , SetMark >,
+ _row < SetMark , PlayingMiddleButton , StdDisplay >,
+ _row < SetMark , StartSong , StdDisplay >
+ // +--------------------+---------------------+---------------------+--------------------------+----------------------+
> {};
PlayingMode_():
m_SongIndex(1),
Copied: branches/release/libs/msm/doc/PDF/examples/iPod_distributed/iPod.cpp (from r62129, /trunk/libs/msm/doc/PDF/examples/iPod_distributed/iPod.cpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/iPod_distributed/iPod.cpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/iPod_distributed/iPod.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <vector>
#include <set>
#include <string>
@@ -89,7 +99,7 @@
// transition actions
void send_ActivateMenu(EndPlay const&)
{
- std::cout << "leaving Playing" << std::endl;
+ std::cout << "leaving Playing" << std::endl;
// we need to activate the menu and simulate its button
(static_cast<iPod*>(this))->process_event(MenuButton());
}
@@ -134,7 +144,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +-------------------+---------------+-------------------+--------------------------------+----------------------+
_row < NotHolding , Hold , Holding >,
_row < Holding , NoHold , NotHolding >,
Copied: branches/release/libs/msm/doc/PDF/examples/ipod_functors.hpp (from r62129, /trunk/libs/msm/doc/PDF/examples/ipod_functors.hpp)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/ipod_functors.hpp (original)
+++ branches/release/libs/msm/doc/PDF/examples/ipod_functors.hpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef IPOD_FUNCTORS_HPP
#define IPOD_FUNCTORS_HPP
#include <boost/msm/front/euml/euml.hpp>
@@ -235,4 +245,4 @@
std::cout << "turning player on" << std::endl;
}
};
-#endif
\ No newline at end of file
+#endif
Copied: branches/release/libs/msm/doc/PDF/examples/logging_functors.h (from r62129, /trunk/libs/msm/doc/PDF/examples/logging_functors.h)
==============================================================================
--- /trunk/libs/msm/doc/PDF/examples/logging_functors.h (original)
+++ branches/release/libs/msm/doc/PDF/examples/logging_functors.h 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef LOGGING_FUNCTORS
#define LOGGING_FUNCTORS
Copied: branches/release/libs/msm/doc/PDF/msm.pdf (from r62129, /trunk/libs/msm/doc/PDF/msm.pdf)
==============================================================================
Binary files. No diff available.
Copied: branches/release/libs/msm/doc/src/msm.xml (from r62129, /trunk/libs/msm/doc/src/msm.xml)
==============================================================================
--- /trunk/libs/msm/doc/src/msm.xml (original)
+++ branches/release/libs/msm/doc/src/msm.xml 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1396,8 +1396,13 @@
region id (the region id starts with 0 and corresponds to the first
initial state of the initial_state type sequence).</para>
<para>
- <programlisting>struct SubState2 : public msm::front::state<> ,
- public msm::front::explicit_entry<0></programlisting>
+ <programlisting>struct SubFsm2_ : public msm::front::state_machine_def<SubFsm2_>
+{
+ struct SubState2 : public msm::front::state<> ,
+ public msm::front::explicit_entry<0>
+ {...};
+...
+};</programlisting>
</para>
<para>And define the submachine as:</para>
<para>
@@ -1406,7 +1411,7 @@
<para>You can then use it as target in a transition with State1 as
source:</para>
<para>
- <programlisting>_row < State1, Event2, SubFsm2::direct< SubFsm2_::SubState2> ></programlisting>
+ <programlisting>_row < State1, Event2, SubFsm2::direct< SubFsm2_::SubState2> > //SubFsm2_::SubState2: complete name of SubState2 (defined within SubFsm2_)</programlisting>
</para>
<para>The syntax deserves some explanation. SubFsm2_ is a front end.
SubState2 is a nested state, therefore the SubFsm2_::SubState2 syntax.
@@ -1424,6 +1429,10 @@
<para>
<programlisting>typedef mpl::vector<SubState2,SubState2b> explicit_creation;</programlisting>
</para>
+ <para><emphasis role="underline">Note (also valid for forks)</emphasis>: At
+ the moment, it is not possible to use a submachine as the target of an
+ explicit entry. Please use entry pseudo states for an almost identical
+ effect.</para>
</sect3>
<sect3>
<title>Fork</title>
@@ -1643,7 +1652,11 @@
// also manually enable deferred events
typedef int activate_deferred_events
...// rest of implementation
-};</programlisting>
+ };</programlisting>
+ <para><emphasis role="underline">Important note</emphasis>: As exit pseudo
+ states are using the message queue to forward events out of a submachine,
+ the <code>no_message_queue</code> option cannot be used with state machines
+ containing an exit pseudo state.</para>
</sect2>
<sect2>
<title>Choosing the initial event</title>
@@ -2661,6 +2674,10 @@
needed greatly improves the event dispatching speed of your state machine.
Our <link xlink:href="examples/EumlSimple.cpp">speed testing</link> example
with eUML does this for the best performance.</para>
+ <para><emphasis role="underline">Important note</emphasis>: As exit pseudo
+ states are using the message queue to forward events out of a submachine,
+ the <code>no_message_queue</code> option cannot be used with state machines
+ containing an exit pseudo state.</para>
</sect2>
<sect2>
<title>Completion / Anonymous transitions</title>
@@ -3156,8 +3173,13 @@
creation.</para>
<para>You can pass arguments up to the value of the
BOOST_MSM_CONSTRUCTOR_ARG_SIZE macro (currently 5) arguments. Change this
- value before including any header if you need to overwrite the default.
- </para>
+ value before including any header if you need to overwrite the default. </para>
+ <para>You can also pass arguments by reference (or const-reference) using
+ boost::ref (or boost::cref):</para>
+ <para>struct player_ : public msm::front::state_machine_def<player_> {
+ player_(SomeType& t, int some_value){â¦} }; </para>
+ <para>typedef msm::back::state_machine<player_ > player; SomeType data;
+ player p(boost::ref(data),3);</para>
</sect2>
<sect2>
<title><command xml:id="backend-tradeof-rt-ct"/>Trading run-time speed for
Copied: branches/release/libs/msm/test/Anonymous.cpp (from r62473, /trunk/libs/msm/test/Anonymous.cpp)
==============================================================================
--- /trunk/libs/msm/test/Anonymous.cpp (original)
+++ branches/release/libs/msm/test/Anonymous.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -43,7 +53,7 @@
int exit_counter;
};
struct State2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -53,7 +63,7 @@
};
struct State3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -94,7 +104,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
_row < State1 , none , State2 >,
a_row < State2 , none , State3 , &p::State2ToState3 >,
@@ -114,14 +124,14 @@
template <class Event,class FSM>
void on_entry(Event const&,FSM& fsm)
{
- fsm.get_state<my_machine_::State1&>().entry_counter=0;
- fsm.get_state<my_machine_::State1&>().exit_counter=0;
- fsm.get_state<my_machine_::State2&>().entry_counter=0;
- fsm.get_state<my_machine_::State2&>().exit_counter=0;
- fsm.get_state<my_machine_::State3&>().entry_counter=0;
- fsm.get_state<my_machine_::State3&>().exit_counter=0;
- fsm.get_state<my_machine_::State4&>().entry_counter=0;
- fsm.get_state<my_machine_::State4&>().exit_counter=0;
+ fsm.template get_state<my_machine_::State1&>().entry_counter=0;
+ fsm.template get_state<my_machine_::State1&>().exit_counter=0;
+ fsm.template get_state<my_machine_::State2&>().entry_counter=0;
+ fsm.template get_state<my_machine_::State2&>().exit_counter=0;
+ fsm.template get_state<my_machine_::State3&>().entry_counter=0;
+ fsm.template get_state<my_machine_::State3&>().exit_counter=0;
+ fsm.template get_state<my_machine_::State4&>().entry_counter=0;
+ fsm.template get_state<my_machine_::State4&>().exit_counter=0;
}
};
// Pick a back-end
@@ -132,7 +142,7 @@
BOOST_AUTO_TEST_CASE( my_test )
{
- my_machine p;
+ my_machine p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
// in this case it will also immediately trigger all anonymous transitions
Copied: branches/release/libs/msm/test/AnonymousEuml.cpp (from r62473, /trunk/libs/msm/test/AnonymousEuml.cpp)
==============================================================================
--- /trunk/libs/msm/test/AnonymousEuml.cpp (original)
+++ branches/release/libs/msm/test/AnonymousEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -102,7 +112,7 @@
BOOST_AUTO_TEST_CASE( my_test )
{
- my_machine p;
+ my_machine p;
// needed to start the highest-level SM. This will call on_entry and mark the start of the SM
// in this case it will also immediately trigger all anonymous transitions
Copied: branches/release/libs/msm/test/CompositeEuml.cpp (from r62473, /trunk/libs/msm/test/CompositeEuml.cpp)
==============================================================================
--- /trunk/libs/msm/test/CompositeEuml.cpp (original)
+++ branches/release/libs/msm/test/CompositeEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include <boost/msm/back/state_machine.hpp>
#include <boost/msm/front/euml/euml.hpp>
@@ -12,7 +22,7 @@
namespace
{
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -41,23 +51,23 @@
BOOST_MSM_EUML_STATE(( ++state_(entry_counter),++state_(exit_counter),attributes_ << entry_counter << exit_counter),Stopped)
BOOST_MSM_EUML_STATE(( ++state_(entry_counter),++state_(exit_counter),attributes_ << entry_counter << exit_counter),Paused)
- // Playing is now a state machine itself.
+ // Playing is now a state machine itself.
BOOST_MSM_EUML_DECLARE_ATTRIBUTE(unsigned int,start_next_song_counter)
BOOST_MSM_EUML_DECLARE_ATTRIBUTE(unsigned int,start_prev_song_guard_counter)
// It has 5 substates
BOOST_MSM_EUML_STATE(( ++state_(entry_counter),++state_(exit_counter),attributes_ << entry_counter << exit_counter),Song1)
BOOST_MSM_EUML_STATE(( ++state_(entry_counter),++state_(exit_counter),attributes_ << entry_counter << exit_counter),Song2)
BOOST_MSM_EUML_STATE(( ++state_(entry_counter),++state_(exit_counter),attributes_ << entry_counter << exit_counter),Song3)
- BOOST_MSM_EUML_STATE(( ++state_(entry_counter),++state_(exit_counter),attributes_ << entry_counter << exit_counter),Region2State1)
+ BOOST_MSM_EUML_STATE(( ++state_(entry_counter),++state_(exit_counter),attributes_ << entry_counter << exit_counter),Region2State1)
BOOST_MSM_EUML_STATE(( ++state_(entry_counter),++state_(exit_counter),attributes_ << entry_counter << exit_counter),Region2State2)
// Playing has a transition table
BOOST_MSM_EUML_TRANSITION_TABLE((
// +------------------------------------------------------------------------------+
- Song2 == Song1 + next_song ,
- Song1 == Song2 + previous_song [True_()] / ++fsm_(start_prev_song_guard_counter) ,
- Song3 == Song2 + next_song / ++fsm_(start_next_song_counter) ,
- Song2 == Song3 + previous_song [True_()] / ++fsm_(start_prev_song_guard_counter) ,
+ Song2 == Song1 + next_song ,
+ Song1 == Song2 + previous_song [True_()] / ++fsm_(start_prev_song_guard_counter) ,
+ Song3 == Song2 + next_song / ++fsm_(start_next_song_counter) ,
+ Song2 == Song3 + previous_song [True_()] / ++fsm_(start_prev_song_guard_counter) ,
Region2State2 == Region2State1 + region2_evt
// +------------------------------------------------------------------------------+
),playing_transition_table )
@@ -67,8 +77,8 @@
++state_(entry_counter), // Entry
++state_(exit_counter), // Exit
attributes_ << entry_counter << exit_counter
- << start_next_song_counter
- << start_prev_song_guard_counter // Attributes
+ << start_next_song_counter
+ << start_prev_song_guard_counter // Attributes
),Playing_)
// choice of back-end
typedef msm::back::state_machine<Playing_> Playing_type;
@@ -138,7 +148,7 @@
BOOST_AUTO_TEST_CASE( my_test )
{
- player p;
+ player p;
p.start();
BOOST_CHECK_MESSAGE(p.get_state<BOOST_MSM_EUML_STATE_NAME(Empty)&>().get_attribute(entry_counter) == 1,
@@ -188,7 +198,7 @@
BOOST_CHECK_MESSAGE(
p.get_state<Playing_type&>().get_state<BOOST_MSM_EUML_STATE_NAME(Region2State1)&>().get_attribute(entry_counter) == 1,
"Region2State1 entry not called correctly");
- BOOST_CHECK_MESSAGE(
+ BOOST_CHECK_MESSAGE(
p.get_state<Playing_type&>().get_state<BOOST_MSM_EUML_STATE_NAME(Song2)&>().get_attribute(entry_counter) == 1,
"Song2 entry not called correctly");
BOOST_CHECK_MESSAGE(
Copied: branches/release/libs/msm/test/CompositeMachine.cpp (from r62473, /trunk/libs/msm/test/CompositeMachine.cpp)
==============================================================================
--- /trunk/libs/msm/test/CompositeMachine.cpp (original)
+++ branches/release/libs/msm/test/CompositeMachine.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -48,7 +58,7 @@
int exit_counter;
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -59,7 +69,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -95,7 +105,7 @@
int exit_counter;
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -104,7 +114,7 @@
int exit_counter;
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -123,7 +133,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
_row < Song1 , NextSong , Song2 >,
row < Song2 , PreviousSong, Song1 , &pl::start_prev_song,&pl::start_prev_song_guard>,
@@ -139,7 +149,7 @@
}
};
// back-end
- typedef msm::back::state_machine<Playing_> Playing;
+ typedef msm::back::state_machine<Playing_> Playing;
// state not defining any entry or exit
struct Paused : public msm::front::state<>
@@ -163,7 +173,7 @@
void pause_playback(pause const&) { }
void resume_playback(end_pause const&) { }
void stop_and_open(open_close const&) { }
- void stopped_again(stop const&) {}
+ void stopped_again(stop const&){}
//guards
bool can_close_drawer(open_close const&)
{
@@ -176,7 +186,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -206,22 +216,22 @@
template <class Event,class FSM>
void on_entry(Event const&,FSM& fsm)
{
- fsm.get_state<player_::Stopped&>().entry_counter=0;
- fsm.get_state<player_::Stopped&>().exit_counter=0;
- fsm.get_state<player_::Open&>().entry_counter=0;
- fsm.get_state<player_::Open&>().exit_counter=0;
- fsm.get_state<player_::Empty&>().entry_counter=0;
- fsm.get_state<player_::Empty&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song1&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song1&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song2&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song2&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song3&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song3&>().exit_counter=0;
- fsm.get_state<player_::Paused&>().entry_counter=0;
- fsm.get_state<player_::Paused&>().exit_counter=0;
+ fsm.template get_state<player_::Stopped&>().entry_counter=0;
+ fsm.template get_state<player_::Stopped&>().exit_counter=0;
+ fsm.template get_state<player_::Open&>().entry_counter=0;
+ fsm.template get_state<player_::Open&>().exit_counter=0;
+ fsm.template get_state<player_::Empty&>().entry_counter=0;
+ fsm.template get_state<player_::Empty&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song1&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song1&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song2&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song2&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song3&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song3&>().exit_counter=0;
+ fsm.template get_state<player_::Paused&>().entry_counter=0;
+ fsm.template get_state<player_::Paused&>().exit_counter=0;
}
};
@@ -233,7 +243,7 @@
BOOST_AUTO_TEST_CASE( my_test )
{
- player p;
+ player p;
p.start();
BOOST_CHECK_MESSAGE(p.get_state<player_::Empty&>().entry_counter == 1,"Empty entry not called correctly");
@@ -254,7 +264,7 @@
BOOST_CHECK_MESSAGE(p.get_state<player_::Empty&>().exit_counter == 2,"Empty exit not called correctly");
BOOST_CHECK_MESSAGE(p.get_state<player_::Stopped&>().entry_counter == 1,"Stopped entry not called correctly");
- p.process_event(play());
+ p.process_event(play());
BOOST_CHECK_MESSAGE(p.current_state()[0] == 3,"Playing should be active"); //Playing
BOOST_CHECK_MESSAGE(p.get_state<player_::Stopped&>().exit_counter == 1,"Stopped exit not called correctly");
BOOST_CHECK_MESSAGE(p.get_state<player_::Playing&>().entry_counter == 1,"Playing entry not called correctly");
Copied: branches/release/libs/msm/test/Constructor.cpp (from r62473, /trunk/libs/msm/test/Constructor.cpp)
==============================================================================
--- /trunk/libs/msm/test/Constructor.cpp (original)
+++ branches/release/libs/msm/test/Constructor.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -19,7 +29,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -61,7 +71,7 @@
int exit_counter;
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -72,7 +82,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -113,7 +123,7 @@
void pause_playback(pause const&) { }
void resume_playback(end_pause const&) { }
void stop_and_open(open_close const&) { }
- void stopped_again(stop const&) {}
+ void stopped_again(stop const&){}
// guard conditions
bool good_disk_format(cd_detected const& evt)
{
@@ -133,7 +143,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -163,16 +173,16 @@
template <class Event,class FSM>
void on_entry(Event const&,FSM& fsm)
{
- fsm.get_state<player_::Stopped&>().entry_counter=0;
- fsm.get_state<player_::Stopped&>().exit_counter=0;
- fsm.get_state<player_::Open&>().entry_counter=0;
- fsm.get_state<player_::Open&>().exit_counter=0;
- fsm.get_state<player_::Empty&>().entry_counter=0;
- fsm.get_state<player_::Empty&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().exit_counter=0;
- fsm.get_state<player_::Paused&>().entry_counter=0;
- fsm.get_state<player_::Paused&>().exit_counter=0;
+ fsm.template get_state<player_::Stopped&>().entry_counter=0;
+ fsm.template get_state<player_::Stopped&>().exit_counter=0;
+ fsm.template get_state<player_::Open&>().entry_counter=0;
+ fsm.template get_state<player_::Open&>().exit_counter=0;
+ fsm.template get_state<player_::Empty&>().entry_counter=0;
+ fsm.template get_state<player_::Empty&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().exit_counter=0;
+ fsm.template get_state<player_::Paused&>().entry_counter=0;
+ fsm.template get_state<player_::Paused&>().exit_counter=0;
fsm.context_ = 20;
}
Copied: branches/release/libs/msm/test/History.cpp (from r62473, /trunk/libs/msm/test/History.cpp)
==============================================================================
--- /trunk/libs/msm/test/History.cpp (original)
+++ branches/release/libs/msm/test/History.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -48,7 +58,7 @@
int exit_counter;
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -59,7 +69,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -95,7 +105,7 @@
int exit_counter;
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -104,7 +114,7 @@
int exit_counter;
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -123,7 +133,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
_row < Song1 , NextSong , Song2 >,
row < Song2 , PreviousSong, Song1 , &pl::start_prev_song,&pl::start_prev_song_guard>,
@@ -139,7 +149,7 @@
}
};
// back-end
- typedef msm::back::state_machine<Playing_,msm::back::ShallowHistory<mpl::vector<end_pause> > > Playing;
+ typedef msm::back::state_machine<Playing_,msm::back::ShallowHistory<mpl::vector<end_pause> > > Playing;
// state not defining any entry or exit
struct Paused : public msm::front::state<>
@@ -163,7 +173,7 @@
void pause_playback(pause const&) { }
void resume_playback(end_pause const&) { }
void stop_and_open(open_close const&) { }
- void stopped_again(stop const&) {}
+ void stopped_again(stop const&){}
//guards
bool can_close_drawer(open_close const&)
{
@@ -176,7 +186,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -206,22 +216,22 @@
template <class Event,class FSM>
void on_entry(Event const&,FSM& fsm)
{
- fsm.get_state<player_::Stopped&>().entry_counter=0;
- fsm.get_state<player_::Stopped&>().exit_counter=0;
- fsm.get_state<player_::Open&>().entry_counter=0;
- fsm.get_state<player_::Open&>().exit_counter=0;
- fsm.get_state<player_::Empty&>().entry_counter=0;
- fsm.get_state<player_::Empty&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song1&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song1&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song2&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song2&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song3&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song3&>().exit_counter=0;
- fsm.get_state<player_::Paused&>().entry_counter=0;
- fsm.get_state<player_::Paused&>().exit_counter=0;
+ fsm.template get_state<player_::Stopped&>().entry_counter=0;
+ fsm.template get_state<player_::Stopped&>().exit_counter=0;
+ fsm.template get_state<player_::Open&>().entry_counter=0;
+ fsm.template get_state<player_::Open&>().exit_counter=0;
+ fsm.template get_state<player_::Empty&>().entry_counter=0;
+ fsm.template get_state<player_::Empty&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song1&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song1&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song2&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song2&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song3&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song3&>().exit_counter=0;
+ fsm.template get_state<player_::Paused&>().entry_counter=0;
+ fsm.template get_state<player_::Paused&>().exit_counter=0;
}
};
@@ -233,7 +243,7 @@
BOOST_AUTO_TEST_CASE( my_test )
{
- player p;
+ player p;
p.start();
BOOST_CHECK_MESSAGE(p.get_state<player_::Empty&>().entry_counter == 1,"Empty entry not called correctly");
@@ -254,7 +264,7 @@
BOOST_CHECK_MESSAGE(p.get_state<player_::Empty&>().exit_counter == 2,"Empty exit not called correctly");
BOOST_CHECK_MESSAGE(p.get_state<player_::Stopped&>().entry_counter == 1,"Stopped entry not called correctly");
- p.process_event(play());
+ p.process_event(play());
BOOST_CHECK_MESSAGE(p.current_state()[0] == 3,"Playing should be active"); //Playing
BOOST_CHECK_MESSAGE(p.get_state<player_::Stopped&>().exit_counter == 1,"Stopped exit not called correctly");
BOOST_CHECK_MESSAGE(p.get_state<player_::Playing&>().entry_counter == 1,"Playing entry not called correctly");
@@ -313,7 +323,7 @@
BOOST_CHECK_MESSAGE(p.current_state()[0] == 3,"Playing should be active"); //Playing
BOOST_CHECK_MESSAGE(p.get_state<player_::Paused&>().exit_counter == 1,"Paused exit not called correctly");
BOOST_CHECK_MESSAGE(p.get_state<player_::Playing&>().entry_counter == 2,"Playing entry not called correctly");
- BOOST_CHECK_MESSAGE(p.get_state<player_::Playing&>().current_state()[0] == 1,"Song2 should be active");
+ BOOST_CHECK_MESSAGE(p.get_state<player_::Playing&>().current_state()[0] == 1,"Song2 should be active");
BOOST_CHECK_MESSAGE(
p.get_state<player_::Playing&>().get_state<player_::Playing::Song2&>().entry_counter == 3,
"Song2 entry not called correctly");
@@ -334,7 +344,7 @@
BOOST_CHECK_MESSAGE(p.get_state<player_::Stopped&>().entry_counter == 3,"Stopped entry not called correctly");
p.process_event(play());
- BOOST_CHECK_MESSAGE(p.get_state<player_::Playing&>().current_state()[0] == 0,"Song1 should be active");
+ BOOST_CHECK_MESSAGE(p.get_state<player_::Playing&>().current_state()[0] == 0,"Song1 should be active");
BOOST_CHECK_MESSAGE(
p.get_state<player_::Playing&>().get_state<player_::Playing::Song1&>().entry_counter == 2,
"Song1 entry not called correctly");
Copied: branches/release/libs/msm/test/Jamfile.v2 (from r62474, /trunk/libs/msm/test/Jamfile.v2)
==============================================================================
--- /trunk/libs/msm/test/Jamfile.v2 (original)
+++ branches/release/libs/msm/test/Jamfile.v2 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -12,6 +12,9 @@
:
requirements
<include>.
+ <toolset>gcc:<cxxflags>-ftemplate-depth-300
+ <toolset>darwin:<cxxflags>-ftemplate-depth-300
+ <library>/boost/test//boost_unit_test_framework/<link>static
;
test-suite msm-unit-tests
Copied: branches/release/libs/msm/test/OrthogonalDeferred.cpp (from r62473, /trunk/libs/msm/test/OrthogonalDeferred.cpp)
==============================================================================
--- /trunk/libs/msm/test/OrthogonalDeferred.cpp (original)
+++ branches/release/libs/msm/test/OrthogonalDeferred.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -64,9 +74,9 @@
int exit_counter;
};
struct Open : public msm::front::state<>
- {
+ {
typedef mpl::vector<play> deferred_events;
- typedef mpl::vector1<CDLoaded> flag_list;
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
@@ -77,8 +87,8 @@
};
struct Stopped : public msm::front::state<>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
+ {
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
@@ -94,7 +104,7 @@
struct Playing_ : public msm::front::state_machine_def<Playing_>
{
// when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
@@ -113,7 +123,7 @@
// The list of FSM states
struct Song1 : public msm::front::state<>
{
- typedef mpl::vector1<FirstSongPlaying> flag_list;
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
@@ -123,7 +133,7 @@
int exit_counter;
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -132,7 +142,7 @@
int exit_counter;
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -151,7 +161,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
_row < Song1 , NextSong , Song2 >,
row < Song2 , PreviousSong, Song1 , &pl::start_prev_song,&pl::start_prev_song_guard>,
@@ -172,7 +182,7 @@
// state not defining any entry or exit
struct Paused : public msm::front::state<>
{
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
@@ -222,9 +232,9 @@
void pause_playback(pause const&) { }
void resume_playback(end_pause const&) { }
void stop_and_open(open_close const&) { }
- void stopped_again(stop const&) {}
+ void stopped_again(stop const&){}
void report_error(error_found const&) {++report_error_counter;}
- void report_end_error(end_error const&) {report_end_error_counter;}
+ void report_end_error(end_error const&) {++report_end_error_counter;}
//guards
bool can_close_drawer(open_close const&)
@@ -236,7 +246,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -271,28 +281,28 @@
template <class Event,class FSM>
void on_entry(Event const&,FSM& fsm)
{
- fsm.get_state<player_::Stopped&>().entry_counter=0;
- fsm.get_state<player_::Stopped&>().exit_counter=0;
- fsm.get_state<player_::Open&>().entry_counter=0;
- fsm.get_state<player_::Open&>().exit_counter=0;
- fsm.get_state<player_::Empty&>().entry_counter=0;
- fsm.get_state<player_::Empty&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song1&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song1&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song2&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song2&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song3&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song3&>().exit_counter=0;
- fsm.get_state<player_::Paused&>().entry_counter=0;
- fsm.get_state<player_::Paused&>().exit_counter=0;
- fsm.get_state<player_::AllOk&>().entry_counter=0;
- fsm.get_state<player_::AllOk&>().exit_counter=0;
- fsm.get_state<player_::ErrorMode&>().entry_counter=0;
- fsm.get_state<player_::ErrorMode&>().exit_counter=0;
- fsm.get_state<player_::ErrorTerminate&>().entry_counter=0;
- fsm.get_state<player_::ErrorTerminate&>().exit_counter=0;
+ fsm.template get_state<player_::Stopped&>().entry_counter=0;
+ fsm.template get_state<player_::Stopped&>().exit_counter=0;
+ fsm.template get_state<player_::Open&>().entry_counter=0;
+ fsm.template get_state<player_::Open&>().exit_counter=0;
+ fsm.template get_state<player_::Empty&>().entry_counter=0;
+ fsm.template get_state<player_::Empty&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song1&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song1&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song2&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song2&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song3&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song3&>().exit_counter=0;
+ fsm.template get_state<player_::Paused&>().entry_counter=0;
+ fsm.template get_state<player_::Paused&>().exit_counter=0;
+ fsm.template get_state<player_::AllOk&>().entry_counter=0;
+ fsm.template get_state<player_::AllOk&>().exit_counter=0;
+ fsm.template get_state<player_::ErrorMode&>().entry_counter=0;
+ fsm.template get_state<player_::ErrorMode&>().exit_counter=0;
+ fsm.template get_state<player_::ErrorTerminate&>().entry_counter=0;
+ fsm.template get_state<player_::ErrorTerminate&>().exit_counter=0;
}
};
// Pick a back-end
Copied: branches/release/libs/msm/test/OrthogonalDeferred2.cpp (from r62473, /trunk/libs/msm/test/OrthogonalDeferred2.cpp)
==============================================================================
--- /trunk/libs/msm/test/OrthogonalDeferred2.cpp (original)
+++ branches/release/libs/msm/test/OrthogonalDeferred2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -70,8 +80,8 @@
int exit_counter;
};
struct Open : public msm::front::state<>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
+ {
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
@@ -82,8 +92,8 @@
};
struct Stopped : public msm::front::state<>
- {
- typedef mpl::vector1<CDLoaded> flag_list;
+ {
+ typedef mpl::vector1<CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
@@ -99,7 +109,7 @@
struct Playing_ : public msm::front::state_machine_def<Playing_>
{
// when playing, the CD is loaded and we are in either pause or playing (duh)
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
@@ -118,7 +128,7 @@
// The list of FSM states
struct Song1 : public msm::front::state<>
{
- typedef mpl::vector1<FirstSongPlaying> flag_list;
+ typedef mpl::vector1<FirstSongPlaying> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
@@ -128,7 +138,7 @@
int exit_counter;
};
struct Song2 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -137,7 +147,7 @@
int exit_counter;
};
struct Song3 : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -156,7 +166,7 @@
typedef Playing_ pl; // makes transition table cleaner
// Transition table for Playing
struct transition_table : mpl::vector4<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
_row < Song1 , NextSong , Song2 >,
row < Song2 , PreviousSong, Song1 , &pl::start_prev_song,&pl::start_prev_song_guard>,
@@ -177,7 +187,7 @@
// state not defining any entry or exit
struct Paused : public msm::front::state<>
{
- typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
+ typedef mpl::vector2<PlayingPaused,CDLoaded> flag_list;
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
@@ -227,9 +237,9 @@
void pause_playback(pause const&) { }
void resume_playback(end_pause const&) { }
void stop_and_open(open_close const&) { }
- void stopped_again(stop const&) {}
+ void stopped_again(stop const&){}
void report_error(error_found const&) {++report_error_counter;}
- void report_end_error(end_error const&) {report_end_error_counter;}
+ void report_end_error(end_error const&) {++report_end_error_counter;}
//guards
bool can_close_drawer(open_close const&)
@@ -241,18 +251,18 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
_row < Stopped , stop , Stopped >,
// +---------+-------------+---------+---------------------+----------------------+
g_row < Open , open_close , Empty , &p::can_close_drawer >,
- Row < Open , play , none , Defer , none >,
+ Row < Open , play , none , Defer , none >,
// +---------+-------------+---------+---------------------+----------------------+
a_row < Empty , open_close , Open , &p::open_drawer >,
a_row < Empty , cd_detected , Stopped , &p::store_cd_info >,
- Row < Empty , play , none , Defer , none >,
+ Row < Empty , play , none , Defer , none >,
// +---------+-------------+---------+---------------------+----------------------+
a_row < Playing , stop , Stopped , &p::stop_playback >,
a_row < Playing , pause , Paused , &p::pause_playback >,
@@ -278,28 +288,28 @@
template <class Event,class FSM>
void on_entry(Event const&,FSM& fsm)
{
- fsm.get_state<player_::Stopped&>().entry_counter=0;
- fsm.get_state<player_::Stopped&>().exit_counter=0;
- fsm.get_state<player_::Open&>().entry_counter=0;
- fsm.get_state<player_::Open&>().exit_counter=0;
- fsm.get_state<player_::Empty&>().entry_counter=0;
- fsm.get_state<player_::Empty&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song1&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song1&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song2&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song2&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song3&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().get_state<player_::Playing::Song3&>().exit_counter=0;
- fsm.get_state<player_::Paused&>().entry_counter=0;
- fsm.get_state<player_::Paused&>().exit_counter=0;
- fsm.get_state<player_::AllOk&>().entry_counter=0;
- fsm.get_state<player_::AllOk&>().exit_counter=0;
- fsm.get_state<player_::ErrorMode&>().entry_counter=0;
- fsm.get_state<player_::ErrorMode&>().exit_counter=0;
- fsm.get_state<player_::ErrorTerminate&>().entry_counter=0;
- fsm.get_state<player_::ErrorTerminate&>().exit_counter=0;
+ fsm.template get_state<player_::Stopped&>().entry_counter=0;
+ fsm.template get_state<player_::Stopped&>().exit_counter=0;
+ fsm.template get_state<player_::Open&>().entry_counter=0;
+ fsm.template get_state<player_::Open&>().exit_counter=0;
+ fsm.template get_state<player_::Empty&>().entry_counter=0;
+ fsm.template get_state<player_::Empty&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song1&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song1&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song2&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song2&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song3&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().template get_state<player_::Playing::Song3&>().exit_counter=0;
+ fsm.template get_state<player_::Paused&>().entry_counter=0;
+ fsm.template get_state<player_::Paused&>().exit_counter=0;
+ fsm.template get_state<player_::AllOk&>().entry_counter=0;
+ fsm.template get_state<player_::AllOk&>().exit_counter=0;
+ fsm.template get_state<player_::ErrorMode&>().entry_counter=0;
+ fsm.template get_state<player_::ErrorMode&>().exit_counter=0;
+ fsm.template get_state<player_::ErrorTerminate&>().entry_counter=0;
+ fsm.template get_state<player_::ErrorTerminate&>().exit_counter=0;
}
};
// Pick a back-end
Copied: branches/release/libs/msm/test/OrthogonalDeferredEuml.cpp (from r62473, /trunk/libs/msm/test/OrthogonalDeferredEuml.cpp)
==============================================================================
--- /trunk/libs/msm/test/OrthogonalDeferredEuml.cpp (original)
+++ branches/release/libs/msm/test/OrthogonalDeferredEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -55,7 +65,7 @@
BOOST_MSM_EUML_INTERRUPT_STATE(( end_error,++state_(entry_counter),++state_(exit_counter),attributes_ << entry_counter << exit_counter),
ErrorMode)
- // Playing is now a state machine itself.
+ // Playing is now a state machine itself.
BOOST_MSM_EUML_DECLARE_ATTRIBUTE(unsigned int,start_next_song_counter)
BOOST_MSM_EUML_DECLARE_ATTRIBUTE(unsigned int,start_prev_song_guard_counter)
@@ -67,10 +77,10 @@
// Playing has a transition table
BOOST_MSM_EUML_TRANSITION_TABLE((
// +------------------------------------------------------------------------------+
- Song2 == Song1 + next_song ,
- Song1 == Song2 + previous_song [True_()] / ++fsm_(start_prev_song_guard_counter) ,
- Song3 == Song2 + next_song / ++fsm_(start_next_song_counter) ,
- Song2 == Song3 + previous_song [True_()] / ++fsm_(start_prev_song_guard_counter)
+ Song2 == Song1 + next_song ,
+ Song1 == Song2 + previous_song [True_()] / ++fsm_(start_prev_song_guard_counter) ,
+ Song3 == Song2 + next_song / ++fsm_(start_next_song_counter) ,
+ Song2 == Song3 + previous_song [True_()] / ++fsm_(start_prev_song_guard_counter)
// +------------------------------------------------------------------------------+
),playing_transition_table )
@@ -79,8 +89,8 @@
++state_(entry_counter), // Entry
++state_(exit_counter), // Exit
attributes_ << entry_counter << exit_counter
- << start_next_song_counter
- << start_prev_song_guard_counter, // Attributes
+ << start_next_song_counter
+ << start_prev_song_guard_counter, // Attributes
configure_<< PlayingPaused << CDLoaded //flags
),Playing_)
Copied: branches/release/libs/msm/test/SimpleEuml.cpp (from r62473, /trunk/libs/msm/test/SimpleEuml.cpp)
==============================================================================
--- /trunk/libs/msm/test/SimpleEuml.cpp (original)
+++ branches/release/libs/msm/test/SimpleEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include <boost/msm/back/state_machine.hpp>
#include <boost/msm/front/euml/euml.hpp>
@@ -12,7 +22,7 @@
namespace
{
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -102,7 +112,7 @@
BOOST_AUTO_TEST_CASE( my_test )
{
- player p;
+ player p;
p.start();
BOOST_CHECK_MESSAGE(p.get_state<BOOST_MSM_EUML_STATE_NAME(Empty)&>().get_attribute(entry_counter) == 1,
Copied: branches/release/libs/msm/test/SimpleEuml2.cpp (from r62473, /trunk/libs/msm/test/SimpleEuml2.cpp)
==============================================================================
--- /trunk/libs/msm/test/SimpleEuml2.cpp (original)
+++ branches/release/libs/msm/test/SimpleEuml2.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include <boost/msm/back/state_machine.hpp>
#include <boost/msm/front/euml/euml.hpp>
@@ -12,7 +22,7 @@
namespace
{
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -102,7 +112,7 @@
BOOST_AUTO_TEST_CASE( my_test )
{
- player p;
+ player p;
p.start();
BOOST_CHECK_MESSAGE(p.get_state<BOOST_MSM_EUML_STATE_NAME(Empty)&>().get_attribute(entry_counter) == 1,
Copied: branches/release/libs/msm/test/SimpleInternal.cpp (from r62473, /trunk/libs/msm/test/SimpleInternal.cpp)
==============================================================================
--- /trunk/libs/msm/test/SimpleInternal.cpp (original)
+++ branches/release/libs/msm/test/SimpleInternal.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -21,7 +31,7 @@
struct to_ignore {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -63,7 +73,7 @@
int exit_counter;
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -74,7 +84,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -115,7 +125,7 @@
void pause_playback(pause const&) { }
void resume_playback(end_pause const&) { }
void stop_and_open(open_close const&) { }
- void stopped_again(stop const&) {}
+ void stopped_again(stop const&){}
void internal_action(internal_evt const&){++internal_action_counter; }
bool internal_guard(cd_detected const&){++internal_guard_counter;return false;}
bool internal_guard2(internal_evt const&){++internal_guard_counter;return true;}
@@ -139,7 +149,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -172,16 +182,16 @@
template <class Event,class FSM>
void on_entry(Event const&,FSM& fsm)
{
- fsm.get_state<player_::Stopped&>().entry_counter=0;
- fsm.get_state<player_::Stopped&>().exit_counter=0;
- fsm.get_state<player_::Open&>().entry_counter=0;
- fsm.get_state<player_::Open&>().exit_counter=0;
- fsm.get_state<player_::Empty&>().entry_counter=0;
- fsm.get_state<player_::Empty&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().exit_counter=0;
- fsm.get_state<player_::Paused&>().entry_counter=0;
- fsm.get_state<player_::Paused&>().exit_counter=0;
+ fsm.template get_state<player_::Stopped&>().entry_counter=0;
+ fsm.template get_state<player_::Stopped&>().exit_counter=0;
+ fsm.template get_state<player_::Open&>().entry_counter=0;
+ fsm.template get_state<player_::Open&>().exit_counter=0;
+ fsm.template get_state<player_::Empty&>().entry_counter=0;
+ fsm.template get_state<player_::Empty&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().exit_counter=0;
+ fsm.template get_state<player_::Paused&>().entry_counter=0;
+ fsm.template get_state<player_::Paused&>().exit_counter=0;
}
};
@@ -193,7 +203,7 @@
BOOST_AUTO_TEST_CASE( my_test )
{
- player p;
+ player p;
p.start();
BOOST_CHECK_MESSAGE(p.get_state<player_::Empty&>().entry_counter == 1,"Empty entry not called correctly");
@@ -228,7 +238,7 @@
BOOST_CHECK_MESSAGE(p.get_state<player_::Stopped&>().entry_counter == 1,"Stopped entry not called correctly");
BOOST_CHECK_MESSAGE(p.internal_guard_counter == 3,"Internal guard not called correctly");
- p.process_event(play());
+ p.process_event(play());
BOOST_CHECK_MESSAGE(p.current_state()[0] == 3,"Playing should be active"); //Playing
BOOST_CHECK_MESSAGE(p.get_state<player_::Stopped&>().exit_counter == 1,"Stopped exit not called correctly");
BOOST_CHECK_MESSAGE(p.get_state<player_::Playing&>().entry_counter == 1,"Playing entry not called correctly");
Copied: branches/release/libs/msm/test/SimpleInternalEuml.cpp (from r62473, /trunk/libs/msm/test/SimpleInternalEuml.cpp)
==============================================================================
--- /trunk/libs/msm/test/SimpleInternalEuml.cpp (original)
+++ branches/release/libs/msm/test/SimpleInternalEuml.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
#include <boost/msm/back/state_machine.hpp>
#include <boost/msm/front/euml/euml.hpp>
@@ -12,7 +22,7 @@
namespace
{
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -40,6 +50,9 @@
BOOST_MSM_EUML_STATE(( ++state_(entry_counter),++state_(exit_counter),attributes_ << entry_counter << exit_counter),Playing)
BOOST_MSM_EUML_STATE(( ++state_(entry_counter),++state_(exit_counter),attributes_ << entry_counter << exit_counter),Paused)
+ BOOST_MSM_EUML_DECLARE_ATTRIBUTE(unsigned int,empty_internal_guard_counter)
+ BOOST_MSM_EUML_DECLARE_ATTRIBUTE(unsigned int,empty_internal_action_counter)
+
BOOST_MSM_EUML_ACTION(internal_guard_fct)
{
template <class FSM,class EVT,class SourceState,class TargetState>
@@ -49,8 +62,6 @@
return false;
}
};
- BOOST_MSM_EUML_DECLARE_ATTRIBUTE(unsigned int,empty_internal_guard_counter)
- BOOST_MSM_EUML_DECLARE_ATTRIBUTE(unsigned int,empty_internal_action_counter)
BOOST_MSM_EUML_DECLARE_STATE((++state_(entry_counter),++state_(exit_counter),
attributes_ << entry_counter << exit_counter
<< empty_internal_guard_counter << empty_internal_action_counter),Empty_def)
@@ -148,7 +159,7 @@
BOOST_AUTO_TEST_CASE( my_test )
{
- player p;
+ player p;
p.start();
BOOST_CHECK_MESSAGE(p.get_state<Empty_impl&>().get_attribute(entry_counter) == 1,
Copied: branches/release/libs/msm/test/SimpleInternalFunctors.cpp (from r62473, /trunk/libs/msm/test/SimpleInternalFunctors.cpp)
==============================================================================
--- /trunk/libs/msm/test/SimpleInternalFunctors.cpp (original)
+++ branches/release/libs/msm/test/SimpleInternalFunctors.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -26,7 +36,7 @@
struct to_ignore {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -87,13 +97,13 @@
};
// Transition table for Empty
struct internal_transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
Internal < internal_evt , internal_action_fct ,internal_guard_fct >
// +---------+-------------+---------+---------------------+----------------------+
> {};
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -104,7 +114,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -145,7 +155,7 @@
void pause_playback(pause const&) { }
void resume_playback(end_pause const&) { }
void stop_and_open(open_close const&) { }
- void stopped_again(stop const&) {}
+ void stopped_again(stop const&){}
struct internal_action
{
template <class EVT,class FSM,class SourceState,class TargetState>
@@ -192,7 +202,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -225,18 +235,18 @@
template <class Event,class FSM>
void on_entry(Event const&,FSM& fsm)
{
- fsm.get_state<player_::Stopped&>().entry_counter=0;
- fsm.get_state<player_::Stopped&>().exit_counter=0;
- fsm.get_state<player_::Open&>().entry_counter=0;
- fsm.get_state<player_::Open&>().exit_counter=0;
- fsm.get_state<player_::Empty&>().entry_counter=0;
- fsm.get_state<player_::Empty&>().exit_counter=0;
- fsm.get_state<player_::Empty&>().empty_internal_guard_counter=0;
- fsm.get_state<player_::Empty&>().empty_internal_action_counter=0;
- fsm.get_state<player_::Playing&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().exit_counter=0;
- fsm.get_state<player_::Paused&>().entry_counter=0;
- fsm.get_state<player_::Paused&>().exit_counter=0;
+ fsm.template get_state<player_::Stopped&>().entry_counter=0;
+ fsm.template get_state<player_::Stopped&>().exit_counter=0;
+ fsm.template get_state<player_::Open&>().entry_counter=0;
+ fsm.template get_state<player_::Open&>().exit_counter=0;
+ fsm.template get_state<player_::Empty&>().entry_counter=0;
+ fsm.template get_state<player_::Empty&>().exit_counter=0;
+ fsm.template get_state<player_::Empty&>().empty_internal_guard_counter=0;
+ fsm.template get_state<player_::Empty&>().empty_internal_action_counter=0;
+ fsm.template get_state<player_::Playing&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().exit_counter=0;
+ fsm.template get_state<player_::Paused&>().entry_counter=0;
+ fsm.template get_state<player_::Paused&>().exit_counter=0;
}
};
@@ -248,7 +258,7 @@
BOOST_AUTO_TEST_CASE( my_test )
{
- player p;
+ player p;
p.start();
BOOST_CHECK_MESSAGE(p.get_state<player_::Empty&>().entry_counter == 1,"Empty entry not called correctly");
@@ -285,7 +295,7 @@
BOOST_CHECK_MESSAGE(p.get_state<player_::Stopped&>().entry_counter == 1,"Stopped entry not called correctly");
BOOST_CHECK_MESSAGE(p.internal_guard_counter == 3,"Internal guard not called correctly");
- p.process_event(play());
+ p.process_event(play());
BOOST_CHECK_MESSAGE(p.current_state()[0] == 3,"Playing should be active"); //Playing
BOOST_CHECK_MESSAGE(p.get_state<player_::Stopped&>().exit_counter == 1,"Stopped exit not called correctly");
BOOST_CHECK_MESSAGE(p.get_state<player_::Playing&>().entry_counter == 1,"Playing entry not called correctly");
Copied: branches/release/libs/msm/test/SimpleMachine.cpp (from r62473, /trunk/libs/msm/test/SimpleMachine.cpp)
==============================================================================
--- /trunk/libs/msm/test/SimpleMachine.cpp (original)
+++ branches/release/libs/msm/test/SimpleMachine.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -19,7 +29,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -57,7 +67,7 @@
int exit_counter;
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -68,7 +78,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -109,7 +119,7 @@
void pause_playback(pause const&) { }
void resume_playback(end_pause const&) { }
void stop_and_open(open_close const&) { }
- void stopped_again(stop const&) {}
+ void stopped_again(stop const&){}
// guard conditions
bool good_disk_format(cd_detected const& evt)
{
@@ -130,7 +140,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
a_row < Stopped , play , Playing , &p::start_playback >,
a_row < Stopped , open_close , Open , &p::open_drawer >,
@@ -160,16 +170,16 @@
template <class Event,class FSM>
void on_entry(Event const&,FSM& fsm)
{
- fsm.get_state<player_::Stopped&>().entry_counter=0;
- fsm.get_state<player_::Stopped&>().exit_counter=0;
- fsm.get_state<player_::Open&>().entry_counter=0;
- fsm.get_state<player_::Open&>().exit_counter=0;
- fsm.get_state<player_::Empty&>().entry_counter=0;
- fsm.get_state<player_::Empty&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().exit_counter=0;
- fsm.get_state<player_::Paused&>().entry_counter=0;
- fsm.get_state<player_::Paused&>().exit_counter=0;
+ fsm.template get_state<player_::Stopped&>().entry_counter=0;
+ fsm.template get_state<player_::Stopped&>().exit_counter=0;
+ fsm.template get_state<player_::Open&>().entry_counter=0;
+ fsm.template get_state<player_::Open&>().exit_counter=0;
+ fsm.template get_state<player_::Empty&>().entry_counter=0;
+ fsm.template get_state<player_::Empty&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().exit_counter=0;
+ fsm.template get_state<player_::Paused&>().entry_counter=0;
+ fsm.template get_state<player_::Paused&>().exit_counter=0;
}
};
@@ -181,7 +191,7 @@
BOOST_AUTO_TEST_CASE( my_test )
{
- player p;
+ player p;
p.start();
BOOST_CHECK_MESSAGE(p.get_state<player_::Empty&>().entry_counter == 1,"Empty entry not called correctly");
@@ -209,7 +219,7 @@
BOOST_CHECK_MESSAGE(p.get_state<player_::Empty&>().exit_counter == 2,"Empty exit not called correctly");
BOOST_CHECK_MESSAGE(p.get_state<player_::Stopped&>().entry_counter == 1,"Stopped entry not called correctly");
- p.process_event(play());
+ p.process_event(play());
BOOST_CHECK_MESSAGE(p.current_state()[0] == 3,"Playing should be active"); //Playing
BOOST_CHECK_MESSAGE(p.get_state<player_::Stopped&>().exit_counter == 1,"Stopped exit not called correctly");
BOOST_CHECK_MESSAGE(p.get_state<player_::Playing&>().entry_counter == 1,"Playing entry not called correctly");
Copied: branches/release/libs/msm/test/SimpleWithFunctors.cpp (from r62473, /trunk/libs/msm/test/SimpleWithFunctors.cpp)
==============================================================================
--- /trunk/libs/msm/test/SimpleWithFunctors.cpp (original)
+++ branches/release/libs/msm/test/SimpleWithFunctors.cpp 2010-06-17 15:47:50 EDT (Thu, 17 Jun 2010)
@@ -1,3 +1,13 @@
+// Copyright 2010 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// This is an extended version of the state machine available in the boost::mpl library
+// Distributed under the same license as the original.
+// Copyright for the original version:
+// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
+// under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#include <iostream>
// back-end
#include <boost/msm/back/state_machine.hpp>
@@ -29,7 +39,7 @@
struct open_close {};
// A "complicated" event type that carries some data.
- enum DiskTypeEnum
+ enum DiskTypeEnum
{
DISK_CD=0,
DISK_DVD=1
@@ -50,12 +60,12 @@
{
unsigned int start_playback_counter;
unsigned int can_close_drawer_counter;
- unsigned int test_fct_counter;
+ unsigned int test_fct_counter;
player_():
start_playback_counter(0),
can_close_drawer_counter(0),
- test_fct_counter(0)
+ test_fct_counter(0)
{}
// The list of FSM states
@@ -69,7 +79,7 @@
int exit_counter;
};
struct Open : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -80,7 +90,7 @@
// sm_ptr still supported but deprecated as functors are a much better way to do the same thing
struct Stopped : public msm::front::state<>
- {
+ {
template <class Event,class FSM>
void on_entry(Event const&,FSM& ) {++entry_counter;}
template <class Event,class FSM>
@@ -114,12 +124,12 @@
typedef Empty initial_state;
// transition actions
- struct TestFct
+ struct TestFct
{
template <class EVT,class FSM,class SourceState,class TargetState>
void operator()(EVT const&, FSM& fsm,SourceState& ,TargetState& )
{
- ++fsm.test_fct_counter;
+ ++fsm.test_fct_counter;
}
};
struct start_playback
@@ -127,7 +137,7 @@
template <class EVT,class FSM,class SourceState,class TargetState>
void operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState& )
{
- ++fsm.start_playback_counter;
+ ++fsm.start_playback_counter;
}
};
struct open_drawer
@@ -217,12 +227,12 @@
return true;
}
};
- struct can_close_drawer
+ struct can_close_drawer
{
template <class EVT,class FSM,class SourceState,class TargetState>
bool operator()(EVT const& evt ,FSM& fsm,SourceState& ,TargetState& )
{
- ++fsm.can_close_drawer_counter;
+ ++fsm.can_close_drawer_counter;
return true;
}
};
@@ -231,7 +241,7 @@
// Transition table for player
struct transition_table : mpl::vector<
- // Start Event Next Action Guard
+ // Start Event Next Action Guard
// +---------+-------------+---------+---------------------+----------------------+
Row < Stopped , play , Playing , ActionSequence_
<mpl::vector<
@@ -266,16 +276,16 @@
template <class Event,class FSM>
void on_entry(Event const&,FSM& fsm)
{
- fsm.get_state<player_::Stopped&>().entry_counter=0;
- fsm.get_state<player_::Stopped&>().exit_counter=0;
- fsm.get_state<player_::Open&>().entry_counter=0;
- fsm.get_state<player_::Open&>().exit_counter=0;
- fsm.get_state<player_::Empty&>().entry_counter=0;
- fsm.get_state<player_::Empty&>().exit_counter=0;
- fsm.get_state<player_::Playing&>().entry_counter=0;
- fsm.get_state<player_::Playing&>().exit_counter=0;
- fsm.get_state<player_::Paused&>().entry_counter=0;
- fsm.get_state<player_::Paused&>().exit_counter=0;
+ fsm.template get_state<player_::Stopped&>().entry_counter=0;
+ fsm.template get_state<player_::Stopped&>().exit_counter=0;
+ fsm.template get_state<player_::Open&>().entry_counter=0;
+ fsm.template get_state<player_::Open&>().exit_counter=0;
+ fsm.template get_state<player_::Empty&>().entry_counter=0;
+ fsm.template get_state<player_::Empty&>().exit_counter=0;
+ fsm.template get_state<player_::Playing&>().entry_counter=0;
+ fsm.template get_state<player_::Playing&>().exit_counter=0;
+ fsm.template get_state<player_::Paused&>().entry_counter=0;
+ fsm.template get_state<player_::Paused&>().exit_counter=0;
}
};
@@ -287,7 +297,7 @@
BOOST_AUTO_TEST_CASE( my_test )
{
- player p;
+ player p;
p.start();
BOOST_CHECK_MESSAGE(p.get_state<player_::Empty&>().entry_counter == 1,"Empty entry not called correctly");
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk