#ifndef VM_FUNC_HPP__ #define VM_FUNC_HPP__ /** \file vm_func.hpp defines vm-specfic functions that can be called as remote procedure calls */ #include using std::vector; namespace BMD { class Value; //! typedef describing the values for a VM function typedef Value (*VMFunction)(vector&); //! transforms a value into a string representation Value to_string(vector& args); //! parse values from a string Value parse_int(vector& args); Value parse_float(vector& args); //! returns the length of the argument Value value_length(vector& args); Value string_length(vector& args); Value array_length(vector& args); //! returns a random float between zero and 1 Value random_float(vector& args); //! print a value to stdout Value print(vector& args); Value println(vector& args); //! print a value to stderr Value print_error(vector& args); } #endif