Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/msm/event_traits.hpp @ 125:34e428693f5d vext
Vext -> Repoint
author | Chris Cannam |
---|---|
date | Thu, 14 Jun 2018 11:15:39 +0100 |
parents | 2665513ce2d3 |
children |
rev | line source |
---|---|
Chris@16 | 1 // Copyright 2008 Christophe Henry |
Chris@16 | 2 // henry UNDERSCORE christophe AT hotmail DOT com |
Chris@16 | 3 // This is an extended version of the state machine available in the boost::mpl library |
Chris@16 | 4 // Distributed under the same license as the original. |
Chris@16 | 5 // Copyright for the original version: |
Chris@16 | 6 // Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed |
Chris@16 | 7 // under the Boost Software License, Version 1.0. (See accompanying |
Chris@16 | 8 // file LICENSE_1_0.txt or copy at |
Chris@16 | 9 // http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 10 |
Chris@16 | 11 #ifndef BOOST_MSM_EVENT_TRAITS_H |
Chris@16 | 12 #define BOOST_MSM_EVENT_TRAITS_H |
Chris@16 | 13 |
Chris@16 | 14 #include <boost/any.hpp> |
Chris@16 | 15 #include <boost/mpl/bool.hpp> |
Chris@16 | 16 |
Chris@16 | 17 namespace boost { namespace msm |
Chris@16 | 18 { |
Chris@16 | 19 |
Chris@16 | 20 template< typename Event > |
Chris@16 | 21 struct is_kleene_event |
Chris@16 | 22 { |
Chris@16 | 23 // default: no event is a kleene event (kleene: matches any event in a transitions) |
Chris@16 | 24 typedef ::boost::mpl::false_ type; |
Chris@16 | 25 }; |
Chris@16 | 26 |
Chris@16 | 27 // add this way in this namespace specializations for events which you want to use as kleene |
Chris@16 | 28 // requirement: a copy-constructor matching the events which will be converted to this kleene |
Chris@16 | 29 template<> |
Chris@16 | 30 struct is_kleene_event< boost::any > |
Chris@16 | 31 { |
Chris@16 | 32 typedef ::boost::mpl::true_ type; |
Chris@16 | 33 }; |
Chris@16 | 34 |
Chris@16 | 35 } } // boost::msm |
Chris@16 | 36 #endif //BOOST_MSM_EVENT_TRAITS_H |