Chris@16: /*============================================================================= Chris@16: Copyright (c) 2001-2007 Joel de Guzman Chris@16: Copyright (c) 2004 Daniel Wallin Chris@16: Chris@16: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: ==============================================================================*/ Chris@16: #ifndef PHOENIX_SCOPE_SCOPED_ENVIRONMENT_HPP Chris@16: #define PHOENIX_SCOPE_SCOPED_ENVIRONMENT_HPP Chris@16: Chris@16: namespace boost { namespace phoenix Chris@16: { Chris@16: template Chris@16: struct scoped_environment Chris@16: { Chris@16: typedef Env env_type; Chris@16: typedef OuterEnv outer_env_type; Chris@16: typedef Locals locals_type; Chris@16: typedef Map map_type; Chris@16: typedef typename Env::args_type args_type; Chris@16: typedef typename Env::tie_type tie_type; Chris@16: Chris@16: scoped_environment( Chris@16: Env const& env Chris@16: , OuterEnv const& outer_env Chris@16: , Locals& locals) Chris@16: : env(env) Chris@16: , outer_env(outer_env) Chris@16: , locals(locals) {} Chris@16: Chris@16: tie_type const& Chris@16: args() const Chris@16: { Chris@16: return env.args(); Chris@16: } Chris@16: Chris@16: Env const& env; Chris@16: OuterEnv const& outer_env; Chris@16: Locals& locals; Chris@16: Chris@16: private: Chris@16: // silence MSVC warning C4512: assignment operator could not be generated Chris@16: scoped_environment& operator= (scoped_environment const&); Chris@16: }; Chris@16: }} Chris@16: Chris@16: #endif