stlab.adobe.com Adobe Systems Incorporated

virtual_machine.hpp

Go to the documentation of this file.
00001 /*
00002     Copyright 2005-2007 Adobe Systems Incorporated
00003     Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
00004     or a copy at http://stlab.adobe.com/licenses.html)
00005 */
00006 
00007 /*************************************************************************************************/
00008 
00009 #ifndef ADOBE_VIRTUAL_MACHINE_HPP
00010 #define ADOBE_VIRTUAL_MACHINE_HPP
00011 
00012 #include <adobe/config.hpp>
00013 
00014 #include <bitset>
00015 #include <vector>
00016 
00017 #define BOOST_FUNCTION_NO_DEPRECATED
00018 #include <boost/function.hpp>
00019 #include <boost/operators.hpp>
00020 
00021 #include <adobe/array_fwd.hpp>
00022 #include <adobe/name_fwd.hpp>
00023 #include <adobe/dictionary_fwd.hpp>
00024 
00025 #include <adobe/move.hpp>
00026 
00027 #include <adobe/any_regular.hpp>
00028 
00029 /*************************************************************************************************/
00030 
00031 namespace adobe {
00032 
00033 /*************************************************************************************************/
00034 
00035 class virtual_machine_t
00036 {
00037  public:
00038     typedef array_t             expression_t;
00039 
00040     typedef any_regular_t(variable_lookup_signature_t)(name_t);
00041     typedef any_regular_t(dictionary_function_lookup_signature_t)(name_t, const dictionary_t&);
00042     typedef any_regular_t(array_function_lookup_signature_t)(name_t, const array_t&);
00043 
00044     typedef boost::function<variable_lookup_signature_t>            variable_lookup_t;
00045     typedef boost::function<dictionary_function_lookup_signature_t> dictionary_function_lookup_t;
00046     typedef boost::function<array_function_lookup_signature_t>      array_function_lookup_t;
00047 
00048 #if !defined(ADOBE_NO_DOCUMENTATION)
00049     virtual_machine_t();
00050     virtual_machine_t(const virtual_machine_t&);
00051 
00052     virtual_machine_t& operator = (const virtual_machine_t& rhs);
00053 
00054     ~virtual_machine_t();
00055 #endif
00056 
00057     void evaluate(const expression_t& expression);
00058 #if 0
00059     void evaluate_named_arguments(const dictionary_t&);
00060 #endif
00061 
00062     const any_regular_t& back() const;
00063     any_regular_t& back();
00064     void pop_back();
00065 
00066     void set_variable_lookup(const variable_lookup_t&);
00067     void set_array_function_lookup(const array_function_lookup_t&);
00068     void set_dictionary_function_lookup(const dictionary_function_lookup_t&);
00069 
00070     class implementation_t;
00071  private:
00072 
00073     implementation_t* object_m;
00074 };
00075 
00076 /*************************************************************************************************/
00077 
00078 } // namespace adobe
00079 
00080 /*************************************************************************************************/
00081 
00082 #endif
00083 
00084 /*************************************************************************************************/

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google