PageRenderTime 17ms CodeModel.GetById 12ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/msm/msm_grammar.hpp

http://hadesmem.googlecode.com/
C++ Header | 46 lines | 25 code | 9 blank | 12 comment | 0 complexity | 7625e57e7d5a53c22ffa5842470e1f4b MD5 | raw file
 1// Copyright 2008 Christophe Henry
 2// henry UNDERSCORE christophe AT hotmail DOT com
 3// This is an extended version of the state machine available in the boost::mpl library
 4// Distributed under the same license as the original.
 5// Copyright for the original version:
 6// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
 7// under the Boost Software License, Version 1.0. (See accompanying
 8// file LICENSE_1_0.txt or copy at
 9// http://www.boost.org/LICENSE_1_0.txt)
10
11#ifndef BOOST_MSM_GRAMMAR_H
12#define BOOST_MSM_GRAMMAR_H
13
14#include <boost/msm/common.hpp>
15
16
17namespace boost { namespace msm
18{
19// base grammar for all of msm's proto-based grammars
20struct basic_grammar : proto::_
21{};
22
23// Forward-declare an expression wrapper
24template<typename Expr>
25struct msm_terminal;
26
27struct msm_domain
28    : proto::domain< proto::generator<msm_terminal>, basic_grammar >
29{};
30
31template<typename Expr>
32struct msm_terminal
33    : proto::extends<Expr, msm_terminal<Expr>, msm_domain>
34{
35    typedef
36        proto::extends<Expr, msm_terminal<Expr>, msm_domain>
37        base_type;
38    // Needs a constructor
39    msm_terminal(Expr const &e = Expr())
40        : base_type(e)
41    {}
42};
43
44} } // boost::msm
45#endif //BOOST_MSM_GRAMMAR_H
46