diff --git a/include/boost/phoenix/core.hpp b/include/boost/phoenix/core.hpp new file mode 100644 index 0000000..d5c9375 --- /dev/null +++ b/include/boost/phoenix/core.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2010 Joel de Guzman + + 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 PHOENIX_CORE_HPP +#define PHOENIX_CORE_HPP + +#include + +#endif diff --git a/include/boost/phoenix/core/actor.hpp b/include/boost/phoenix/core/actor.hpp new file mode 100644 index 0000000..aaf7e4c --- /dev/null +++ b/include/boost/phoenix/core/actor.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2005-2010 Joel de Guzman + Copyright (c) 2010 Eric Niebler + + 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 PHOENIX_CORE_ACTOR_HPP +#define PHOENIX_CORE_ACTOR_HPP + +#include + +namespace boost { namespace phoenix +{ + //////////////////////////////////////////////////////////////////////////// + // The actor class. The main thing! In phoenix, everything is an actor + // This class is responsible for full function evaluation. Partial + // function evaluation involves creating a hierarchy of actor objects. + //////////////////////////////////////////////////////////////////////////// + template + struct actor + { + BOOST_PROTO_BASIC_EXTENDS(Expr, actor, phoenix_domain) + BOOST_PROTO_EXTENDS_ASSIGN() + BOOST_PROTO_EXTENDS_SUBSCRIPT() + + template + struct result : actor_result {}; + + typedef actor actor_type; + + template + typename boost::result_of::type + operator()(A0 const& a0) const + { + BOOST_PROTO_ASSERT_MATCHES(*this, eval_grammar); + fusion::vector args(a0); + return eval(*this, args); + } + + /*... more...*/ + }; +}} + +#endif diff --git a/include/boost/phoenix/core/actor_result.hpp b/include/boost/phoenix/core/actor_result.hpp new file mode 100644 index 0000000..19161b5 --- /dev/null +++ b/include/boost/phoenix/core/actor_result.hpp @@ -0,0 +1,30 @@ +/*============================================================================= + Copyright (c) 2005-2010 Joel de Guzman + Copyright (c) 2010 Eric Niebler + + 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 PHOENIX_CORE_ACTOR_RESULT_HPP +#define PHOENIX_CORE_ACTOR_RESULT_HPP + +#include +#include + +namespace boost { namespace phoenix +{ + //////////////////////////////////////////////////////////////////////////// + // Return type computation + //////////////////////////////////////////////////////////////////////////// + template + struct actor_result; + + template