|
nsgenbind
|
Go to the source code of this file.
Functions | |
| int | duk_libdom_output (struct ir *ir) |
| int | output_interface (struct ir *ir, struct ir_entry *interfacee) |
| int | output_dictionary (struct ir *ir, struct ir_entry *dictionarye) |
| int | output_interface_declaration (struct opctx *outc, struct ir_entry *interfacee) |
| int | output_dictionary_declaration (struct opctx *outc, struct ir_entry *dictionarye) |
| int | output_tool_preface (struct opctx *outc) |
| int | output_tool_prologue (struct opctx *outc) |
| int | output_cdata (struct opctx *outc, struct genbind_node *node, enum genbind_node_type nodetype) |
| int | output_ccode (struct opctx *outc, struct genbind_node *node) |
| int | output_method_cdata (struct opctx *outc, struct genbind_node *node, enum genbind_method_type sel_method_type) |
| int | output_ctype (struct opctx *outc, struct genbind_node *node, bool identifier) |
| char * | gen_idl2c_name (const char *idlname) |
| int | output_generated_attribute_setter (struct opctx *outc, struct ir_entry *interfacee, struct ir_attribute_entry *atributee) |
| int | output_generated_attribute_getter (struct opctx *outc, struct ir_entry *interfacee, struct ir_attribute_entry *atributee) |
| int duk_libdom_output | ( | struct ir * | ir | ) |
Generate output for duktape and libdom bindings.
Definition at line 579 of file duk-libdom.c.
| char * gen_idl2c_name | ( | const char * | idlname | ) |
Generate a C name from an IDL name.
The IDL interface names are camelcase and not similar to libdom naming so it is necessary to convert them to a libdom compatible class name. This implementation is simple ASCII capable only and cannot cope with multibyte codepoints.
The algorithm is:
Definition at line 181 of file duk-libdom-common.c.
| int output_ccode | ( | struct opctx * | outc, |
| struct genbind_node * | node | ||
| ) |
output c code with line directives if possible.
used for any cdata sections
| outf | The file handle to write output. |
| node | The node to search. |
| nodetype | the type of child node to search for. |
Definition at line 62 of file duk-libdom-common.c.
| int output_cdata | ( | struct opctx * | outc, |
| struct genbind_node * | node, | ||
| enum genbind_node_type | nodetype | ||
| ) |
output character data of node of given type.
used for any cdata sections
| outf | The file handle to write output. |
| node | The node to search. |
| nodetype | the type of child node to search for. |
Definition at line 43 of file duk-libdom-common.c.
| int output_ctype | ( | struct opctx * | outc, |
| struct genbind_node * | node, | ||
| bool | identifier | ||
| ) |
output a C variable type
Used to output c type and optionlly identifier declarations for parameters and structure entries. If the optional identifier is output it is ensured the type is separated from the identifier with either a * or space.
| outf | The file handle to write output. |
| node | The node to generate content for. |
| identifier | If the indentifier should be output. |
Definition at line 111 of file duk-libdom-common.c.
generate a source file to implement a dictionary using duk and libdom.
Definition at line 314 of file duk-libdom-dictionary.c.
generate a declaration to implement a dictionary using duk and libdom.
Definition at line 466 of file duk-libdom-dictionary.c.
| int output_generated_attribute_getter | ( | struct opctx * | outc, |
| struct ir_entry * | interfacee, | ||
| struct ir_attribute_entry * | atributee | ||
| ) |
Generate class property getter for a single attribute.
Definition at line 82 of file duk-libdom-generated.c.
| int output_generated_attribute_setter | ( | struct opctx * | outc, |
| struct ir_entry * | interfacee, | ||
| struct ir_attribute_entry * | atributee | ||
| ) |
Generate class property setter for a single attribute.
Definition at line 275 of file duk-libdom-generated.c.
generate a source file to implement an interface using duk and libdom.
| ir | The intermediate representation of the binding tree. |
| interfacee | The interface entry to output within the ir. |
Definition at line 1643 of file duk-libdom-interface.c.
generate a declaration to implement a dictionary using duk and libdom.
Definition at line 1742 of file duk-libdom-interface.c.
| int output_method_cdata | ( | struct opctx * | outc, |
| struct genbind_node * | node, | ||
| enum genbind_method_type | sel_method_type | ||
| ) |
output character data of method node of given type.
used for any cdata including pre/pro/epi/post sections
| outf | The file handle to write output. |
| node | The node to search. |
| nodetype | the type of child node to search for. |
Definition at line 149 of file duk-libdom-common.c.
| int output_tool_preface | ( | struct opctx * | outc | ) |
generate preface block for nsgenbind
Definition at line 35 of file duk-libdom-common.c.
| int output_tool_prologue | ( | struct opctx * | outc | ) |
generate preface block for nsgenbind
Definition at line 90 of file duk-libdom-common.c.