v8toolkit
0.0.1
Utility library for embedding V8 Javascript engine in a c++ program
|
#include "helper_functions.h"
#include <iostream>
#include <fstream>
#include <fmt/ostream.h>
#include <clang/AST/CXXInheritance.h>
#include "wrapped_class.h"
Go to the source code of this file.
Functions | |
string | make_macro_safe_comma (string const &input) |
void | update_wrapped_class_for_type (WrappedClass &wrapped_class, QualType qual_type) |
EXPORT_TYPE | get_export_type (const NamedDecl *decl, EXPORT_TYPE previous) |
std::string | get_canonical_name_for_decl (const TypeDecl *decl) |
void | data_error (const string &error) |
void | data_warning (const string &warning) |
QualType | get_plain_type (QualType qual_type) |
void | generate_bindings () |
void | generate_javascript_stub (std::string const &filename) |
void | generate_bidirectional_classes (CompilerInstance &compiler_instance) |
Variables | |
vector< string > | data_errors |
vector< string > | data_warnings |
string make_macro_safe_comma | ( | string const & | input | ) |
Definition at line 14 of file helper_functions.cpp.
Referenced by generate_bidirectional_classes().
void update_wrapped_class_for_type | ( | WrappedClass & | wrapped_class, |
QualType | qual_type | ||
) |
Definition at line 21 of file helper_functions.cpp.
References WrappedClass::class_name, WrappedClass::compiler_instance, FOUND_UNSPECIFIED, get_include_for_type_decl(), WrappedClass::get_or_insert_wrapped_class(), has_wrapped_class(), WrappedClass::include_files, WrappedClass::name_alias, print_logging, update_wrapped_class_for_type(), and WrappedClass::used_classes.
Referenced by ClassFunction::ClassFunction(), DataMember::DataMember(), ClassHandler::onEndOfTranslationUnit(), update_wrapped_class_for_type(), and WrappedClass::WrappedClass().
EXPORT_TYPE get_export_type | ( | const NamedDecl * | decl, |
EXPORT_TYPE | previous | ||
) |
Definition at line 118 of file helper_functions.cpp.
References data_error(), EXPORT_ALL, EXPORT_EXCEPT, EXPORT_NONE, EXPORT_SOME, get_canonical_name_for_decl(), V8TOOLKIT_ALL_STRING, and V8TOOLKIT_NONE_STRING.
Referenced by foreach_constructor(), WrappedClass::get_members(), ClassHandler::onEndOfTranslationUnit(), and WrappedClass::parse_all_methods().
std::string get_canonical_name_for_decl | ( | const TypeDecl * | decl | ) |
Definition at line 174 of file helper_functions.cpp.
Referenced by Annotations::Annotations(), get_export_type(), WrappedClass::get_or_insert_wrapped_class(), has_wrapped_class(), print_specialization_info(), ClassHandler::run(), and WrappedClass::WrappedClass().
void data_error | ( | const string & | error | ) |
Definition at line 202 of file helper_functions.cpp.
Referenced by ConstructorFunction::ConstructorFunction(), WrappedClass::get_base_class_string(), get_export_type(), ClassHandler::onEndOfTranslationUnit(), WrappedClass::parse_all_methods(), WrappedClass::should_be_wrapped(), and WrappedClass::WrappedClass().
void data_warning | ( | const string & | warning | ) |
Definition at line 208 of file helper_functions.cpp.
Referenced by ClassFunction::ClassFunction(), and ClassFunction::ParameterInfo::ParameterInfo().
QualType get_plain_type | ( | QualType | qual_type | ) |
Definition at line 213 of file helper_functions.cpp.
void generate_bindings | ( | ) |
Definition at line 223 of file helper_functions.cpp.
References matched_classes_returned, MAX_DECLARATIONS_PER_FILE, WrappedClass::wrapped_classes, and write_classes().
Referenced by ClassHandler::onEndOfTranslationUnit().
void generate_javascript_stub | ( | std::string const & | filename | ) |
Definition at line 343 of file helper_functions.cpp.
References js_api_header, and WrappedClass::wrapped_classes.
Referenced by ClassHandler::onEndOfTranslationUnit().
void generate_bidirectional_classes | ( | CompilerInstance & | compiler_instance | ) |
Definition at line 366 of file helper_functions.cpp.
References class_templates, function_templates, generate_variable_names(), get_method_param_qual_types(), join(), make_macro_safe_comma(), ClassFunction::parameters, TEMPLATED_CLASS_PRINT_THRESHOLD, TEMPLATED_FUNCTION_PRINT_THRESHOLD, and WrappedClass::wrapped_classes.
Referenced by ClassHandler::onEndOfTranslationUnit().
vector<string> data_errors |
Definition at line 201 of file helper_functions.cpp.
Referenced by ClassHandler::onEndOfTranslationUnit().
vector<string> data_warnings |
Definition at line 207 of file helper_functions.cpp.
Referenced by ClassHandler::onEndOfTranslationUnit().