Namespaces | |
| namespace | detail |
| Interpreter-independent implementation details. | |
| namespace | encodings |
| namespace | io |
| IO support. | |
| namespace | xml |
| XML support. | |
Classes | |
| class | arguments |
| Holds the arguments for a Javascript function call. More... | |
| class | array |
| A class for holding a Javascript Array. More... | |
| class | binary |
| class | byte_string |
| class | byte_array |
| struct | call_context |
| Context information about a function call. More... | |
| struct | class_info |
| Information about classes exposed to javascript. More... | |
| class | context |
| Javascript context. More... | |
| class | convert |
| class | current_context_scope |
| Load a context while in scope. More... | |
| class | exception |
| Exception class. More... | |
| class | js_quit |
| Indicator exception. More... | |
| class | function |
| A Javascript function. More... | |
| class | function_adapter |
| Function adapter. More... | |
| class | function_adapter_memfn |
| Function adapter. More... | |
| class | init |
| Manage the current context and the initialisation of the Javascript engine. More... | |
| class | local_root_scope |
| Automatically root all newly created GC objects. More... | |
| class | require |
| Functor object that backs the require('foo') in JavaScript. More... | |
| class | native_function |
| Native function. More... | |
| class | native_member_function |
| Native member function. More... | |
| class | native_function_base |
| Native function base. More... | |
| class | native_object_base |
| Native object base. More... | |
| class | object |
| A Javascript object. More... | |
| struct | property_attributes |
| A property's attributes: flags, getters and setters. More... | |
| class | property_iterator |
| Property iterator. More... | |
| class | security |
| class | string |
| A Javascript string. More... | |
| class | tracer |
| Garbage collection tracer. More... | |
| class | value |
| Any Javascript value. More... | |
Typedefs | |
| typedef void(* | flusspferd_load_t )(object &exports, object &context) |
| The prototype for module loader functions. | |
| typedef detail::root< value > | root_value |
| Javascript root scope for a flusspferd::value. | |
| typedef detail::root< object > | root_object |
| Javascript root scope for a flusspferd::object. | |
| typedef detail::root< string > | root_string |
| Javascript root scope for a flusspferd::string. | |
| typedef detail::root< function > | root_function |
| Javascript root scope for a flusspferd::function. | |
| typedef detail::root< array > | root_array |
| Javascript root scope for a flusspferd::array. | |
| typedef jschar | char16_t |
Enumerations | |
| enum | property_flag { no_property_flag = 0U, dont_enumerate = 1U, read_only_property = 2U, permanent_property = 4U, shared_property = 8U, permanent_shared_property = 12U } |
Functions | |
| void | load_binary_module (object container) |
| template<typename T > | |
| object | load_class (object container=global()) |
| Expose a class to Javascript. | |
| void | load_encodings_module (object container) |
| template<typename T > | |
| T & | cast_to_derived (native_object_base &) |
| void | load_getopt_module (object container) |
| object | getopt (object spec, boost::optional< array const & > const &arguments=boost::none) |
| Parse the options. | |
| string | getopt_help (object spec) |
| Returns a help text to a corresponding getopt call. | |
| string | getopt_man (object spec) |
| Returns a (nroff formated) manpage part to a corresponding getopt call. | |
| string | getopt_bash (object spec) |
| Returns the content of a bash_completion function. | |
| context | enter_current_context (context const &c) |
Set the current context to c. | |
| bool | leave_current_context (context const &c) |
| Unset the current context. | |
| context & | current_context () |
| Get the current context. | |
| object | global () |
| Get the global object of the current context. | |
| object | scope_chain () |
| Get the global object of the current context. | |
| void | gc () |
| Run the garbage collector on the current context. | |
| template<typename T > | |
| object | prototype () |
| Get a prototype from the current context's prototype registry. | |
| template<typename T > | |
| object | constructor () |
| Get a constructor from the current context's constructor registry. | |
| object | prototype (std::string const &ID) |
| Get a prototype from the current context's prototype registry. | |
| object | constructor (std::string const &ID) |
| Get a constructor from the current context's constructor registry. | |
| void | load_filesystem_base_module (object container) |
| void | load_core (object const &scope, std::string const &argv0) |
| void | load_flusspferd_module (object container, std::string const &argv0) |
| void | load_require_function (object container) |
Load the 'require()' function into container. | |
| template<typename T > | |
| T & | get_native (object const &o) |
Gets o as native object of class T. | |
| template<typename T > | |
| bool | is_derived (native_object_base &o) |
| template<typename T > | |
| bool | is_native (object const &o) |
Checks if o is a native object of class T. | |
| void | load_properties_functions (object o=global()) |
| Load the properties function Object.defineProperty and Object.defineProperties modelled after [[DefineOwnProperty]] from the ES6 specification. | |
| property_flag | operator& (property_flag a, property_flag b) |
| Combine (intersection). | |
| property_flag | operator~ (property_flag x) |
| Invert. | |
| void | load_system_module (object &context) |
| std::string | version () |
| bool | is_relocatable () |
Creating values | |
| object | create_object (object const &proto=object()) |
| Create a simple object. | |
| array | create_array (unsigned int length=0) |
| Create an array. | |
| template<typename T > | |
| T & | create_native_object (object const &proto,...) |
Create a new native object of type T. | |
Creating functions | |
| function | create_function (std::string const &name, unsigned n_args, std::vector< std::string > argnames, flusspferd::string const &body, std::string const &file, unsigned line) |
| function | create_native_function (native_function_base *ptr) |
| Create a new native function. | |
| function | create_native_function (object const &o, native_function_base *ptr) |
| Create a new native function as method of an object. | |
| template<typename F > | |
| object | create_native_functor_function (object const &o,...) |
Create a new native function of type F as method of an object. | |
| function | create_native_function (object const &o, std::string const &name, boost::function< void(call_context &)> const &fn, unsigned arity=0) |
| Create a new native method of an object. | |
| template<typename T > | |
| function | create_native_function (object const &o, std::string const &name, boost::function< T > const &fn) |
| Create a new native method of an object. | |
| template<typename T > | |
| function | create_native_method (object const &o, std::string const &name, boost::function< T > const &fn) |
| Create a new native method of an object. | |
| template<typename T > | |
| function | create_native_function (object const &o, std::string const &name, T *fnptr, typename boost::enable_if_c< boost::is_function< T >::value >::type *=0) |
| Create a new native method of an object. | |
| template<typename T > | |
| function | create_native_method (object const &o, std::string const &name, T *fnptr, typename boost::enable_if_c< boost::is_function< T >::value >::type *=0) |
| Create a new native method of an object. | |
| template<typename T > | |
| function | create_native_method (object const &o, std::string const &name, void(T::*memfnptr)(call_context &), unsigned arity=0) |
| Create a new native method of an object. | |
| template<typename R , typename T > | |
| function | create_native_method (object const &o, std::string const &name, R T::*memfnptr) |
| Create a new native method of an object. | |
Evaluating Javascript source code | |
| value | evaluate (char const *source, std::size_t n, char const *file=0x0, unsigned int line=0) |
| Evaluate Javascript code. | |
| value | evaluate_in_scope (char const *source, std::size_t n, char const *file, unsigned int line, object const &scope) |
| Evaluate Javascript code in a scope. | |
| value | evaluate_in_scope (std::string const &source, char const *file, unsigned int line, object const &scope) |
| Evaluate Javascript code in a scope. | |
| value | evaluate_in_scope (char const *source, char const *file, unsigned int line, object const &scope) |
| Evaluate Javascript code in a scope. | |
| value | evaluate (char const *source, char const *file=0x0, unsigned int line=0) |
| Evaluate Javascript code. | |
| value | evaluate (std::string const &source, char const *file=0x0, unsigned int line=0) |
| Evaluate Javascript code. | |
| value | execute (char const *file, object const &scope=object()) |
| Execute a Javascript file. | |
| bool | is_compilable (char const *source, std::size_t length, object const &scope=object()) |
| Check if the Code is Compileable. | |
| bool | is_compilable (char const *source, object const &scope=object()) |
| Check if the Code is Compileable. | |
| bool | is_compilable (std::string const &source, object const &scope=object()) |
| Check if the Code is Compileable. | |
| typedef jschar flusspferd::char16_t |
| T & flusspferd::cast_to_derived | ( | native_object_base & | o | ) | [inline] |
| object flusspferd::constructor | ( | std::string const & | ID | ) | [inline] |
Get a constructor from the current context's constructor registry.
| object flusspferd::constructor | ( | ) | [inline] |
Get a constructor from the current context's constructor registry.
| object flusspferd::getopt | ( | object | spec, | |
| boost::optional< array const & > const & | arguments = boost::none | |||
| ) |
Parse the options.
Specification syntax:
{
"[options]": {
"stop-early": true //default: false
},
"name": {
"alias": ["abc", "d"],
"argument": "none", // or "optional" or "required"
"argument_type": "file", // or "dir" or "module" or ...
"argument_bash": "bash script", // completion script for unkown types
"doc": "documentation string",
"hidden": true, // optional. if true no documentation is generated
"callback": myfunction // takes (option, argument)
},
"name2": {}
}
{
"name": ["arguments"],
...,
"_": ["arguments"]
}
| string flusspferd::getopt_bash | ( | object | spec | ) |
Returns the content of a bash_completion function.
Has completions for all argument types supported by compgen/complete -A. See http://www.gnu.org/software/bash/manual/bashref.html#Programmable-Completion-Builtins Use the "argument_bash" property for your own completion scripts.
cout << "_foo() {\n" + getopt_bash(spec) + "}\ncomplete -F _foo foo\n";
| string flusspferd::getopt_help | ( | object | spec | ) |
Returns a help text to a corresponding getopt call.
| string flusspferd::getopt_man | ( | object | spec | ) |
Returns a (nroff formated) manpage part to a corresponding getopt call.
| object flusspferd::global | ( | ) | [inline] |
| bool flusspferd::is_derived | ( | native_object_base & | o | ) | [inline] |
| bool flusspferd::is_relocatable | ( | ) |
| void flusspferd::load_binary_module | ( | object | container | ) |
| void flusspferd::load_core | ( | object const & | scope, | |
| std::string const & | argv0 | |||
| ) |
| void flusspferd::load_encodings_module | ( | object | container | ) |
| void flusspferd::load_filesystem_base_module | ( | object | container | ) |
| void flusspferd::load_flusspferd_module | ( | object | container, | |
| std::string const & | argv0 | |||
| ) |
| void flusspferd::load_getopt_module | ( | object | container | ) |
| void flusspferd::load_system_module | ( | object & | context | ) |
| property_flag flusspferd::operator& | ( | property_flag | a, | |
| property_flag | b | |||
| ) | [inline] |
Combine (intersection).
| property_flag flusspferd::operator~ | ( | property_flag | x | ) | [inline] |
Invert.
| object flusspferd::prototype | ( | std::string const & | ID | ) | [inline] |
Get a prototype from the current context's prototype registry.
| object flusspferd::prototype | ( | ) | [inline] |
Get a prototype from the current context's prototype registry.
| object flusspferd::scope_chain | ( | ) | [inline] |
| std::string flusspferd::version | ( | ) |
Contact us at team -AT- flusspferd -DOT- org or as described on our homepage.
Generated on Mon Oct 26 08:51:13 2009 for Flusspferd by
1.5.8