PageRenderTime 15ms CodeModel.GetById 11ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/src/contrib/boost/spirit/home/phoenix/scope/scoped_environment.hpp

http://pythonocc.googlecode.com/
C++ Header | 47 lines | 33 code | 6 blank | 8 comment | 0 complexity | 050cb5ed05a338c25f1aa56c322f127a MD5 | raw file
 1/*=============================================================================
 2    Copyright (c) 2001-2007 Joel de Guzman
 3    Copyright (c) 2004 Daniel Wallin
 4
 5    Distributed under the Boost Software License, Version 1.0. (See accompanying 
 6    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 7==============================================================================*/
 8#ifndef PHOENIX_SCOPE_SCOPED_ENVIRONMENT_HPP
 9#define PHOENIX_SCOPE_SCOPED_ENVIRONMENT_HPP
10
11namespace boost { namespace phoenix
12{
13    template <typename Env, typename OuterEnv, typename Locals, typename Map>
14    struct scoped_environment
15    {
16        typedef Env env_type;
17        typedef OuterEnv outer_env_type;
18        typedef Locals locals_type;
19        typedef Map map_type;
20        typedef typename Env::args_type args_type;
21        typedef typename Env::tie_type tie_type;
22
23        scoped_environment(
24            Env const& env
25          , OuterEnv const& outer_env
26          , Locals& locals)
27            : env(env)
28            , outer_env(outer_env)
29            , locals(locals) {}
30
31        tie_type const& 
32        args() const
33        {
34            return env.args();
35        }
36
37        Env const& env;
38        OuterEnv const& outer_env;
39        Locals& locals;
40
41    private:
42        // silence MSVC warning C4512: assignment operator could not be generated
43        scoped_environment& operator= (scoped_environment const&);
44    };
45}}
46
47#endif