v8toolkit
0.0.1
Utility library for embedding V8 Javascript engine in a c++ program
|
Public Types | |
enum | EnumClass { EnumClass::A, EnumClass::B, EnumClass::C, EnumClass::D } |
Public Member Functions | |
int | simple_member_function (char const *some_string="asdf") |
void | std_function_default_parameter (std::function< void()> some_function=std::function< void()>()) |
template<class A = int, int b = 4> | |
void | templated_method () |
void | after_templated_method () |
void | parse_all_methods () |
set< unique_ptr< MemberFunction > > const & | get_member_functions () |
set< unique_ptr< StaticFunction > > const & | get_static_functions () |
set< unique_ptr< DataMember > > & | get_members () |
set< unique_ptr< ConstructorFunction > > const & | get_constructors () |
void | set_error (string const &error_message) |
std::string | get_short_name () const |
bool | has_static_method () |
bool | is_template_specialization () |
void | foreach_inheritance_level (function< void(WrappedClass &)> callback) |
void | add_member_name (string const &name) |
void | add_static_name (string const &name) |
void | update_data () |
std::string | make_sfinae_to_match_wrapped_class () const |
bool | should_be_wrapped () const |
bool | ready_for_wrapping (set< WrappedClass * > dumped_classes) const |
std::set< string > | get_base_type_includes () |
std::set< string > | get_derived_type_includes () |
std::string | generate_js_stub () |
std::string | get_derived_classes_string (int level=0, const std::string indent="") |
std::string | get_base_class_string () |
std::string | get_bindings () |
bool | found_method_means_wrapped () |
int | takes_int_5 (int x) |
int | takes_const_int_6 (int const x) const |
void | default_parameters (int j=1, char const *s="asdf", vector< std::string > &&={}, CopyableWrappedClass={}, CopyableWrappedClass &&={}, CopyableWrappedClass *=nullptr) |
Static Public Member Functions | |
static V8TOOLKIT_EXTEND_WRAPPER void | extend_wrapper () |
static V8TOOLKIT_CUSTOM_EXTENSION void | custom_extension () |
static std::string | simple_static_function (double some_double) |
static void | insert_wrapped_class (WrappedClass *wrapped_class) |
static WrappedClass * | get_if_exists (const CXXRecordDecl *decl) |
static WrappedClass & | get_or_insert_wrapped_class (const CXXRecordDecl *decl, CompilerInstance &compiler_instance, FOUND_METHOD found_method) |
static std::string | static_method () |
Public Attributes | |
double | double_member_readwrite |
V8TOOLKIT_READONLY double | double_member_readonly1 |
double const | double_member_readonly2 |
std::vector< std::string > | vector_of_ints |
std::vector< WrappedClass * > | vector_of_selfs |
CXXRecordDecl const * | decl = nullptr |
CXXRecordDecl const * | instantiation_pattern = nullptr |
string | class_name |
string | name_alias |
this is the possibly shortened javascript name of the type - not necessarily valid in generated c++ More... | |
set< string > | include_files |
int | declaration_count = 3 |
string | my_header_filename = "" |
set< string > | used_member_names |
set< string > | used_static_names |
vector< string > | data_errors |
set< WrappedClass * > | derived_types |
set< WrappedClass * > | base_types |
tracked base_types - if it's more than one, that's a data error because javascript only allows one More... | |
set< string > | wrapper_extension_methods |
set< string > | wrapper_custom_extensions |
CompilerInstance & | compiler_instance |
string | my_include |
bool | done = false |
bool | valid = false |
Annotations | annotations |
bool | dumped = false |
set< WrappedClass * > | used_classes |
FOUND_METHOD | found_method |
bool | force_no_constructors = false |
bool | bidirectional = false |
CXXConstructorDecl const * | bidirectional_constructor = nullptr |
int | i = 5 |
int | ci = 5 |
std::unique_ptr< float > | upf = std::make_unique<float>(3.5) |
std::unique_ptr< float > | cupf = std::make_unique<float>(4.5) |
std::string | string = "string value" |
bool | default_parameters_called = false |
CopyableWrappedClass | copyable_wrapped_class |
std::unique_ptr< WrappedClass > | up_wrapped_class |
Static Public Attributes | |
static vector< WrappedClass * > | wrapped_classes |
Definition at line 90 of file sample.cpp.
|
stronginherited |
Enumerator | |
---|---|
A | |
B | |
C | |
D |
Definition at line 72 of file sample.cpp.
|
staticinherited |
|
staticinherited |
|
inherited |
|
staticinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Builds data structures associated with the methods of this class
Definition at line 251 of file wrapped_class.cpp.
References WrappedClass::annotations, data_error(), WrappedClass::decl, EXPORT_ALL, EXPORT_EXCEPT, WrappedClass::force_no_constructors, get_export_type(), get_type_string(), Annotations::has(), WrappedClass::i, testing::internal::move(), print_logging, PRINT_SKIPPED_EXPORT_REASONS, V8TOOLKIT_CUSTOM_EXTENSION_STRING, V8TOOLKIT_DO_NOT_WRAP_CONSTRUCTORS_STRING, V8TOOLKIT_EXTEND_WRAPPER_STRING, WrappedClass::wrapper_custom_extensions, and WrappedClass::wrapper_extension_methods.
Referenced by WrappedClass::get_constructors(), WrappedClass::get_member_functions(), and WrappedClass::get_static_functions().
|
inherited |
Definition at line 239 of file wrapped_class.cpp.
References WrappedClass::parse_all_methods().
Referenced by WrappedClass::generate_js_stub(), and WrappedClass::get_bindings().
|
inherited |
Definition at line 245 of file wrapped_class.cpp.
References WrappedClass::parse_all_methods().
Referenced by WrappedClass::generate_js_stub(), and WrappedClass::get_bindings().
|
inherited |
Definition at line 456 of file wrapped_class.cpp.
References WrappedClass::decl, EXPORT_ALL, EXPORT_EXCEPT, WrappedClass::foreach_inheritance_level(), get_export_type(), and PRINT_SKIPPED_EXPORT_REASONS.
Referenced by WrappedClass::generate_js_stub().
|
inherited |
Definition at line 233 of file wrapped_class.cpp.
References WrappedClass::parse_all_methods().
Referenced by WrappedClass::generate_js_stub(), and WrappedClass::get_bindings().
|
inherited |
Definition at line 729 of file wrapped_class.cpp.
References WrappedClass::data_errors, and WrappedClass::valid.
Referenced by WrappedClass::add_member_name(), WrappedClass::add_static_name(), and WrappedClass::WrappedClass().
|
inlineinherited |
Definition at line 88 of file wrapped_class.h.
Referenced by ClassHandler::run().
|
inlineinherited |
Definition at line 95 of file wrapped_class.h.
References WrappedClass::add_member_name(), WrappedClass::add_static_name(), WrappedClass::foreach_inheritance_level(), and WrappedClass::is_template_specialization().
Referenced by WrappedClass::get_bindings(), and ClassHandler::run().
|
inherited |
Definition at line 779 of file wrapped_class.cpp.
References WrappedClass::decl.
Referenced by WrappedClass::has_static_method().
|
inherited |
callback | called on each parameterized type for this template specialization |
Definition at line 442 of file wrapped_class.cpp.
References WrappedClass::base_types.
Referenced by WrappedClass::get_members(), and WrappedClass::has_static_method().
|
inherited |
Sets a member name as being in use and sets valid = false if it was already in use For member functions and data members (not constructors or static methods)
name | name to add |
Definition at line 710 of file wrapped_class.cpp.
References WrappedClass::set_error(), and WrappedClass::used_member_names.
Referenced by DataMember::DataMember(), WrappedClass::has_static_method(), and MemberFunction::MemberFunction().
|
inherited |
Definition at line 718 of file wrapped_class.cpp.
References WrappedClass::set_error(), and WrappedClass::used_static_names.
Referenced by WrappedClass::has_static_method(), and StaticFunction::StaticFunction().
|
inlineinherited |
Definition at line 118 of file wrapped_class.h.
References WrappedClass::decl, Annotations::get(), and Annotations::names_for_record_decls.
|
inlineinherited |
Definition at line 132 of file wrapped_class.h.
References FOUND_ANNOTATION, WrappedClass::generate_js_stub(), WrappedClass::get_base_type_includes(), WrappedClass::get_derived_type_includes(), WrappedClass::operator=(), WrappedClass::ready_for_wrapping(), WrappedClass::should_be_wrapped(), and WrappedClass::WrappedClass().
|
inherited |
Definition at line 547 of file wrapped_class.cpp.
References WrappedClass::annotations, WrappedClass::base_types, WrappedClass::class_name, data_error(), FOUND_ANNOTATION, FOUND_BASE_CLASS, FOUND_GENERATED, FOUND_INHERITANCE, WrappedClass::found_method, FOUND_UNSPECIFIED, Annotations::get(), Annotations::has(), join(), WrappedClass::name_alias, V8TOOLKIT_ALL_STRING, and V8TOOLKIT_NONE_STRING.
Referenced by WrappedClass::make_sfinae_to_match_wrapped_class(), and WrappedClass::ready_for_wrapping().
|
inherited |
Definition at line 617 of file wrapped_class.cpp.
References WrappedClass::base_types, WrappedClass::class_name, and WrappedClass::should_be_wrapped().
Referenced by WrappedClass::make_sfinae_to_match_wrapped_class().
|
inherited |
Definition at line 737 of file wrapped_class.cpp.
References WrappedClass::base_types, WrappedClass::include_files, and WrappedClass::my_include.
Referenced by WrappedClass::make_sfinae_to_match_wrapped_class().
|
inherited |
Definition at line 757 of file wrapped_class.cpp.
References WrappedClass::derived_types, join(), WrappedClass::my_include, and WrappedClass::name_alias.
Referenced by WrappedClass::make_sfinae_to_match_wrapped_class().
|
inherited |
Definition at line 501 of file wrapped_class.cpp.
References WrappedClass::base_types, WrappedClass::get_constructors(), WrappedClass::get_member_functions(), WrappedClass::get_members(), WrappedClass::get_static_functions(), and WrappedClass::name_alias.
Referenced by WrappedClass::make_sfinae_to_match_wrapped_class().
|
inlineinherited |
Definition at line 166 of file wrapped_class.h.
References join().
Referenced by WrappedClass::get_bindings().
|
inlineinherited |
Definition at line 178 of file wrapped_class.h.
References base_types_to_ignore, data_error(), WrappedClass::get_bindings(), and WrappedClass::i.
Referenced by WrappedClass::get_bindings().
|
inherited |
Definition at line 656 of file wrapped_class.cpp.
References WrappedClass::class_name, WrappedClass::derived_types, WrappedClass::get_base_class_string(), WrappedClass::get_constructors(), WrappedClass::get_derived_classes_string(), WrappedClass::get_member_functions(), WrappedClass::get_static_functions(), WrappedClass::has_static_method(), WrappedClass::name_alias, WrappedClass::wrapper_custom_extensions, and WrappedClass::wrapper_extension_methods.
Referenced by WrappedClass::get_base_class_string().
|
inlinestaticinherited |
Definition at line 197 of file wrapped_class.h.
References WrappedClass::wrapped_classes.
Referenced by ClassHandler::run(), and WrappedClass::WrappedClass().
|
inlinestaticinherited |
Returns the wrapped class corresponding to the decl if it exists
decl | the decl to search for in existing wrapped classes |
Definition at line 206 of file wrapped_class.h.
References WrappedClass::wrapped_classes.
Referenced by ClassHandler::run().
|
inlinestaticinherited |
Definition at line 218 of file wrapped_class.h.
References FOUND_BASE_CLASS, WrappedClass::found_method_means_wrapped(), get_canonical_name_for_decl(), WrappedClass::wrapped_classes, and WrappedClass::WrappedClass().
Referenced by ClassHandler::run(), update_wrapped_class_for_type(), and WrappedClass::WrappedClass().
|
inherited |
Definition at line 788 of file wrapped_class.cpp.
References FOUND_ANNOTATION, FOUND_BASE_CLASS, FOUND_GENERATED, FOUND_INHERITANCE, and WrappedClass::found_method.
Referenced by WrappedClass::get_or_insert_wrapped_class(), and WrappedClass::WrappedClass().
|
inlineinherited |
Definition at line 36 of file wrapped_types_test.cpp.
References EXPECT_EQ.
Referenced by WrappedClassFixture::WrappedClassFixture().
|
inlineinherited |
Definition at line 40 of file wrapped_types_test.cpp.
References EXPECT_EQ.
Referenced by WrappedClassFixture::WrappedClassFixture().
|
inlineinherited |
Definition at line 47 of file wrapped_types_test.cpp.
References EXPECT_EQ, and EXPECT_STREQ.
Referenced by WrappedClassFixture::WrappedClassFixture().
|
inlinestaticinherited |
Definition at line 58 of file wrapped_types_test.cpp.
Referenced by WrappedClassFixture::WrappedClassFixture().
|
inherited |
Definition at line 58 of file sample.cpp.
|
inherited |
Definition at line 59 of file sample.cpp.
|
inherited |
Definition at line 60 of file sample.cpp.
|
inherited |
Definition at line 61 of file sample.cpp.
|
inherited |
Definition at line 62 of file sample.cpp.
|
staticinherited |
Definition at line 29 of file wrapped_class.h.
Referenced by generate_bidirectional_classes(), generate_bindings(), generate_javascript_stub(), WrappedClass::get_if_exists(), WrappedClass::get_or_insert_wrapped_class(), WrappedClass::insert_wrapped_class(), and WrappedClass::WrappedClass().
|
inherited |
Definition at line 31 of file wrapped_class.h.
Referenced by WrappedClass::get_members(), WrappedClass::is_template_specialization(), WrappedClass::parse_all_methods(), ClassHandler::run(), WrappedClass::update_data(), and WrappedClass::WrappedClass().
|
inherited |
Definition at line 34 of file wrapped_class.h.
|
inherited |
Definition at line 43 of file wrapped_class.h.
Referenced by WrappedClass::get_bindings(), ClassHandler::onEndOfTranslationUnit(), WrappedClass::ready_for_wrapping(), ClassHandler::run(), WrappedClass::should_be_wrapped(), update_wrapped_class_for_type(), and WrappedClass::WrappedClass().
|
inherited |
this is the possibly shortened javascript name of the type - not necessarily valid in generated c++
Definition at line 46 of file wrapped_class.h.
Referenced by ConstructorFunction::ConstructorFunction(), WrappedClass::generate_js_stub(), WrappedClass::get_bindings(), WrappedClass::get_derived_type_includes(), ClassHandler::onEndOfTranslationUnit(), ClassFunction::ParameterInfo::ParameterInfo(), ClassHandler::run(), WrappedClass::should_be_wrapped(), update_wrapped_class_for_type(), and WrappedClass::WrappedClass().
|
inherited |
Definition at line 48 of file wrapped_class.h.
Referenced by WrappedClass::get_base_type_includes(), ClassHandler::run(), update_wrapped_class_for_type(), and WrappedClass::WrappedClass().
|
inherited |
Definition at line 52 of file wrapped_class.h.
Referenced by ClassFunction::ClassFunction(), and DataMember::DataMember().
|
inherited |
Definition at line 54 of file wrapped_class.h.
|
inherited |
Definition at line 61 of file wrapped_class.h.
Referenced by WrappedClass::add_member_name().
|
inherited |
Definition at line 62 of file wrapped_class.h.
Referenced by WrappedClass::add_static_name().
|
inherited |
Definition at line 63 of file wrapped_class.h.
Referenced by WrappedClass::set_error().
|
inherited |
Definition at line 64 of file wrapped_class.h.
Referenced by WrappedClass::get_bindings(), WrappedClass::get_derived_type_includes(), ClassHandler::run(), and WrappedClass::WrappedClass().
|
inherited |
tracked base_types - if it's more than one, that's a data error because javascript only allows one
Definition at line 67 of file wrapped_class.h.
Referenced by WrappedClass::foreach_inheritance_level(), WrappedClass::generate_js_stub(), WrappedClass::get_base_type_includes(), WrappedClass::ready_for_wrapping(), WrappedClass::should_be_wrapped(), and WrappedClass::WrappedClass().
|
inherited |
Definition at line 69 of file wrapped_class.h.
Referenced by WrappedClass::get_bindings(), and WrappedClass::parse_all_methods().
|
inherited |
Definition at line 70 of file wrapped_class.h.
Referenced by WrappedClass::get_bindings(), and WrappedClass::parse_all_methods().
|
inherited |
Definition at line 71 of file wrapped_class.h.
Referenced by update_wrapped_class_for_type().
|
inherited |
Definition at line 73 of file wrapped_class.h.
Referenced by WrappedClass::get_base_type_includes(), WrappedClass::get_derived_type_includes(), and WrappedClass::WrappedClass().
|
inherited |
Definition at line 74 of file wrapped_class.h.
|
inherited |
Definition at line 75 of file wrapped_class.h.
Referenced by WrappedClass::set_error().
|
inherited |
Definition at line 76 of file wrapped_class.h.
Referenced by WrappedClass::parse_all_methods(), ClassHandler::run(), WrappedClass::should_be_wrapped(), and WrappedClass::WrappedClass().
|
inherited |
Definition at line 77 of file wrapped_class.h.
|
inherited |
Definition at line 78 of file wrapped_class.h.
Referenced by update_wrapped_class_for_type().
|
inherited |
Definition at line 79 of file wrapped_class.h.
Referenced by WrappedClass::found_method_means_wrapped(), ClassHandler::run(), and WrappedClass::should_be_wrapped().
|
inherited |
Definition at line 80 of file wrapped_class.h.
Referenced by WrappedClass::parse_all_methods(), and ClassHandler::run().
|
inherited |
Definition at line 85 of file wrapped_class.h.
Referenced by WrappedClass::WrappedClass().
|
inherited |
Definition at line 86 of file wrapped_class.h.
Referenced by WrappedClass::WrappedClass().
|
inherited |
Definition at line 29 of file wrapped_types_test.cpp.
Referenced by WrappedClass::get_base_class_string(), WrappedClass::parse_all_methods(), and WrappedClassFixture::WrappedClassFixture().
|
inherited |
Definition at line 30 of file wrapped_types_test.cpp.
Referenced by WrappedClassFixture::WrappedClassFixture().
|
inherited |
Definition at line 31 of file wrapped_types_test.cpp.
Referenced by WrappedClassFixture::WrappedClassFixture().
|
inherited |
Definition at line 32 of file wrapped_types_test.cpp.
Referenced by WrappedClassFixture::WrappedClassFixture().
|
inherited |
Definition at line 34 of file wrapped_types_test.cpp.
Referenced by WrappedClassFixture::WrappedClassFixture().
|
inherited |
Definition at line 45 of file wrapped_types_test.cpp.
Referenced by TEST_F().
|
inherited |
Definition at line 60 of file wrapped_types_test.cpp.
Referenced by WrappedClassFixture::WrappedClassFixture().
|
inherited |
Definition at line 61 of file wrapped_types_test.cpp.
Referenced by WrappedClassFixture::WrappedClassFixture().