8#ifndef ADOBE_VIRTUAL_MACHINE_HPP
9#define ADOBE_VIRTUAL_MACHINE_HPP
21#define BOOST_FUNCTION_NO_DEPRECATED
22#include <boost/operators.hpp>
43 if constexpr (!std::is_same_v<T, adobe::any_regular_t>) {
46 "` found `" +
type_name(x.type_info()) +
"`");
54 if constexpr (!std::is_same_v<T, adobe::any_regular_t>) {
57 "` found `" +
type_name(x.type_info()) +
"`");
89#if !defined(ADOBE_NO_DOCUMENTATION)
115 class implementation_t;
118 implementation_t* object_m;
A runtime polymorphic type similar to boost::any which can hold any type which models Regular.
void set_variable_lookup(const variable_lookup_t &)
void override_operator(name_t, const binary_op_override_t &)
std::function< dictionary_function_lookup_signature_t > dictionary_function_lookup_t
any_regular_t numeric_index_lookup_signature_t(const any_regular_t &, std::size_t index)
std::function< array_function_lookup_signature_t > array_function_lookup_t
virtual_machine_t(const virtual_machine_t &)
any_regular_t binary_op_override_signature_t(const any_regular_t &, const any_regular_t &)
void set_dictionary_function_lookup(const dictionary_function_lookup_t &)
const any_regular_t & back() const
void set_numeric_index_lookup(const numeric_index_lookup_t &)
virtual_machine_t & operator=(const virtual_machine_t &rhs)
std::function< binary_op_override_signature_t > binary_op_override_t
std::function< numeric_index_lookup_signature_t > numeric_index_lookup_t
std::function< variable_lookup_signature_t > variable_lookup_t
any_regular_t dictionary_function_lookup_signature_t(name_t, const dictionary_t &)
std::function< named_index_lookup_signature_t > named_index_lookup_t
any_regular_t array_function_lookup_signature_t(name_t, const array_t &)
any_regular_t named_index_lookup_signature_t(const any_regular_t &, name_t index)
any_regular_t variable_lookup_signature_t(name_t)
void set_named_index_lookup(const named_index_lookup_t &)
void set_array_function_lookup(const array_function_lookup_t &)
void evaluate(const expression_t &expression)
closed_hash_map< name_t, any_regular_t > dictionary_t
const char * type_name(const std::type_info &type)
Returns a simple name for the core types used by the virtual machine.
auto cast(adobe::any_regular_t &x) -> decltype(x.cast< T >())
Does a runtime cast on an any_regular_t with better error reporting.
std::vector< any_regular_t > array_t
typename promote< T >::type promote_t
A character string class for immutable strings.