v8toolkit  0.0.1
Utility library for embedding V8 Javascript engine in a c++ program
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
WrappedClassDerived Class Reference
Inheritance diagram for WrappedClassDerived:
Inheritance graph
[legend]
Collaboration diagram for WrappedClassDerived:
Collaboration graph
[legend]

Public Types

enum  EnumClass { EnumClass::A, EnumClass::B, EnumClass::C, EnumClass::D }
 

Public Member Functions

 WrappedClassDerived ()
 
void method_with_no_constructor_on_class (int, int const &=5, char const *="five", WrappedClassDerived const &s={})
 
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< stringget_base_type_includes ()
 
std::set< stringget_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 void static_method_with_no_constructor_on_class (int, int=5, char const *="five")
 
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 WrappedClassget_if_exists (const CXXRecordDecl *decl)
 
static WrappedClassget_or_insert_wrapped_class (const CXXRecordDecl *decl, CompilerInstance &compiler_instance, FOUND_METHOD found_method)
 
static std::string static_method ()
 

Public Attributes

double double_member_readwrite2
 
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< stringinclude_files
 
int declaration_count = 3
 
string my_header_filename = ""
 
set< stringused_member_names
 
set< stringused_static_names
 
vector< stringdata_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< stringwrapper_extension_methods
 
set< stringwrapper_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< WrappedClassup_wrapped_class
 

Static Public Attributes

static vector< WrappedClass * > wrapped_classes
 

Detailed Description

Definition at line 81 of file sample.cpp.

Member Enumeration Documentation

enum WrappedClass::EnumClass
stronginherited
Enumerator

Definition at line 72 of file sample.cpp.

Constructor & Destructor Documentation

WrappedClassDerived::WrappedClassDerived ( )

Member Function Documentation

static void WrappedClassDerived::static_method_with_no_constructor_on_class ( int  ,
int  = 5,
char const *  = "five" 
)
static
void WrappedClassDerived::method_with_no_constructor_on_class ( int  ,
int const &  = 5,
char const *  = "five",
WrappedClassDerived const &  s = {} 
)
static V8TOOLKIT_EXTEND_WRAPPER void WrappedClass::extend_wrapper ( )
staticinherited
static V8TOOLKIT_CUSTOM_EXTENSION void WrappedClass::custom_extension ( )
staticinherited
int WrappedClass::simple_member_function ( char const *  some_string = "asdf")
inherited
static std::string WrappedClass::simple_static_function ( double  some_double)
staticinherited
void WrappedClass::std_function_default_parameter ( std::function< void()>  some_function = std::function< void()>())
inherited
template<class A = int, int b = 4>
void WrappedClass::templated_method ( )
inherited
void WrappedClass::after_templated_method ( )
inherited
void WrappedClass::parse_all_methods ( )
inherited
set< unique_ptr< MemberFunction > > const & WrappedClass::get_member_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().

Here is the call graph for this function:

Here is the caller graph for this function:

set< unique_ptr< StaticFunction > > const & WrappedClass::get_static_functions ( )
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().

Here is the call graph for this function:

Here is the caller graph for this function:

set< unique_ptr< DataMember > > & WrappedClass::get_members ( )
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().

Here is the call graph for this function:

Here is the caller graph for this function:

set< unique_ptr< ConstructorFunction > > const & WrappedClass::get_constructors ( )
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().

Here is the call graph for this function:

Here is the caller graph for this function:

void WrappedClass::set_error ( string const &  error_message)
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().

Here is the caller graph for this function:

std::string WrappedClass::get_short_name ( ) const
inlineinherited

Definition at line 88 of file wrapped_class.h.

Referenced by ClassHandler::run().

Here is the caller graph for this function:

bool WrappedClass::has_static_method ( )
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().

Here is the call graph for this function:

Here is the caller graph for this function:

bool WrappedClass::is_template_specialization ( )
inherited
Returns
whether this type is a specialization of a template

Definition at line 779 of file wrapped_class.cpp.

References WrappedClass::decl.

Referenced by WrappedClass::has_static_method().

Here is the caller graph for this function:

void WrappedClass::foreach_inheritance_level ( function< void(WrappedClass &)>  callback)
inherited
Parameters
callbackcalled 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().

Here is the caller graph for this function:

void WrappedClass::add_member_name ( string const &  name)
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)

Parameters
namename 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().

Here is the call graph for this function:

Here is the caller graph for this function:

void WrappedClass::add_static_name ( string const &  name)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

void WrappedClass::update_data ( )
inlineinherited

Definition at line 118 of file wrapped_class.h.

References WrappedClass::decl, Annotations::get(), and Annotations::names_for_record_decls.

Here is the call graph for this function:

std::string WrappedClass::make_sfinae_to_match_wrapped_class ( ) const
inlineinherited
bool WrappedClass::should_be_wrapped ( ) const
inherited
bool WrappedClass::ready_for_wrapping ( set< WrappedClass * >  dumped_classes) const
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().

Here is the call graph for this function:

Here is the caller graph for this function:

std::set< string > WrappedClass::get_base_type_includes ( )
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().

Here is the caller graph for this function:

std::set< string > WrappedClass::get_derived_type_includes ( )
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().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string WrappedClass::generate_js_stub ( )
inherited
std::string WrappedClass::get_derived_classes_string ( int  level = 0,
const std::string  indent = "" 
)
inlineinherited

Definition at line 166 of file wrapped_class.h.

References join().

Referenced by WrappedClass::get_bindings().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string WrappedClass::get_base_class_string ( )
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().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string WrappedClass::get_bindings ( )
inherited
static void WrappedClass::insert_wrapped_class ( WrappedClass wrapped_class)
inlinestaticinherited

Definition at line 197 of file wrapped_class.h.

References WrappedClass::wrapped_classes.

Referenced by ClassHandler::run(), and WrappedClass::WrappedClass().

Here is the caller graph for this function:

static WrappedClass* WrappedClass::get_if_exists ( const CXXRecordDecl *  decl)
inlinestaticinherited

Returns the wrapped class corresponding to the decl if it exists

Parameters
declthe decl to search for in existing wrapped classes
Returns
the existing wrapped class or nullptr if no match found

Definition at line 206 of file wrapped_class.h.

References WrappedClass::wrapped_classes.

Referenced by ClassHandler::run().

Here is the caller graph for this function:

static WrappedClass& WrappedClass::get_or_insert_wrapped_class ( const CXXRecordDecl *  decl,
CompilerInstance &  compiler_instance,
FOUND_METHOD  found_method 
)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

bool WrappedClass::found_method_means_wrapped ( )
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().

Here is the caller graph for this function:

int WrappedClass::takes_int_5 ( int  x)
inlineinherited

Definition at line 36 of file wrapped_types_test.cpp.

References EXPECT_EQ.

Referenced by WrappedClassFixture::WrappedClassFixture().

Here is the caller graph for this function:

int WrappedClass::takes_const_int_6 ( int const  x) const
inlineinherited

Definition at line 40 of file wrapped_types_test.cpp.

References EXPECT_EQ.

Referenced by WrappedClassFixture::WrappedClassFixture().

Here is the caller graph for this function:

void WrappedClass::default_parameters ( int  j = 1,
char const *  s = "asdf",
vector< std::string > &&  = {},
CopyableWrappedClass  = {},
CopyableWrappedClass &&  = {},
CopyableWrappedClass = nullptr 
)
inlineinherited

Definition at line 47 of file wrapped_types_test.cpp.

References EXPECT_EQ, and EXPECT_STREQ.

Referenced by WrappedClassFixture::WrappedClassFixture().

Here is the caller graph for this function:

static std::string WrappedClass::static_method ( )
inlinestaticinherited

Definition at line 58 of file wrapped_types_test.cpp.

Referenced by WrappedClassFixture::WrappedClassFixture().

Here is the caller graph for this function:

Member Data Documentation

double WrappedClassDerived::double_member_readwrite2

Definition at line 83 of file sample.cpp.

double WrappedClass::double_member_readwrite
inherited

Definition at line 58 of file sample.cpp.

V8TOOLKIT_READONLY double WrappedClass::double_member_readonly1
inherited

Definition at line 59 of file sample.cpp.

double const WrappedClass::double_member_readonly2
inherited

Definition at line 60 of file sample.cpp.

std::vector<std::string> WrappedClass::vector_of_ints
inherited

Definition at line 61 of file sample.cpp.

std::vector<WrappedClass *> WrappedClass::vector_of_selfs
inherited

Definition at line 62 of file sample.cpp.

vector< WrappedClass * > WrappedClass::wrapped_classes
staticinherited
CXXRecordDecl const* WrappedClass::decl = nullptr
inherited
CXXRecordDecl const* WrappedClass::instantiation_pattern = nullptr
inherited

Definition at line 34 of file wrapped_class.h.

string WrappedClass::class_name
inherited
string WrappedClass::name_alias
inherited
set<string> WrappedClass::include_files
inherited
int WrappedClass::declaration_count = 3
inherited

Definition at line 52 of file wrapped_class.h.

Referenced by ClassFunction::ClassFunction(), and DataMember::DataMember().

string WrappedClass::my_header_filename = ""
inherited

Definition at line 54 of file wrapped_class.h.

set<string> WrappedClass::used_member_names
inherited

Definition at line 61 of file wrapped_class.h.

Referenced by WrappedClass::add_member_name().

set<string> WrappedClass::used_static_names
inherited

Definition at line 62 of file wrapped_class.h.

Referenced by WrappedClass::add_static_name().

vector<string> WrappedClass::data_errors
inherited

Definition at line 63 of file wrapped_class.h.

Referenced by WrappedClass::set_error().

set<WrappedClass *> WrappedClass::derived_types
inherited
set<WrappedClass *> WrappedClass::base_types
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().

set<string> WrappedClass::wrapper_extension_methods
inherited

Definition at line 69 of file wrapped_class.h.

Referenced by WrappedClass::get_bindings(), and WrappedClass::parse_all_methods().

set<string> WrappedClass::wrapper_custom_extensions
inherited

Definition at line 70 of file wrapped_class.h.

Referenced by WrappedClass::get_bindings(), and WrappedClass::parse_all_methods().

CompilerInstance& WrappedClass::compiler_instance
inherited

Definition at line 71 of file wrapped_class.h.

Referenced by update_wrapped_class_for_type().

string WrappedClass::my_include
inherited
bool WrappedClass::done = false
inherited

Definition at line 74 of file wrapped_class.h.

bool WrappedClass::valid = false
inherited

Definition at line 75 of file wrapped_class.h.

Referenced by WrappedClass::set_error().

Annotations WrappedClass::annotations
inherited
bool WrappedClass::dumped = false
inherited

Definition at line 77 of file wrapped_class.h.

set<WrappedClass *> WrappedClass::used_classes
inherited

Definition at line 78 of file wrapped_class.h.

Referenced by update_wrapped_class_for_type().

FOUND_METHOD WrappedClass::found_method
inherited
bool WrappedClass::force_no_constructors = false
inherited

Definition at line 80 of file wrapped_class.h.

Referenced by WrappedClass::parse_all_methods(), and ClassHandler::run().

bool WrappedClass::bidirectional = false
inherited

Definition at line 85 of file wrapped_class.h.

Referenced by WrappedClass::WrappedClass().

CXXConstructorDecl const* WrappedClass::bidirectional_constructor = nullptr
inherited

Definition at line 86 of file wrapped_class.h.

Referenced by WrappedClass::WrappedClass().

int WrappedClass::i = 5
inherited
int WrappedClass::ci = 5
inherited

Definition at line 30 of file wrapped_types_test.cpp.

Referenced by WrappedClassFixture::WrappedClassFixture().

std::unique_ptr<float> WrappedClass::upf = std::make_unique<float>(3.5)
inherited

Definition at line 31 of file wrapped_types_test.cpp.

Referenced by WrappedClassFixture::WrappedClassFixture().

std::unique_ptr<float> WrappedClass::cupf = std::make_unique<float>(4.5)
inherited

Definition at line 32 of file wrapped_types_test.cpp.

Referenced by WrappedClassFixture::WrappedClassFixture().

std::string WrappedClass::string = "string value"
inherited

Definition at line 34 of file wrapped_types_test.cpp.

Referenced by WrappedClassFixture::WrappedClassFixture().

bool WrappedClass::default_parameters_called = false
inherited

Definition at line 45 of file wrapped_types_test.cpp.

Referenced by TEST_F().

CopyableWrappedClass WrappedClass::copyable_wrapped_class
inherited

Definition at line 60 of file wrapped_types_test.cpp.

Referenced by WrappedClassFixture::WrappedClassFixture().

std::unique_ptr<WrappedClass> WrappedClass::up_wrapped_class
inherited

Definition at line 61 of file wrapped_types_test.cpp.

Referenced by WrappedClassFixture::WrappedClassFixture().


The documentation for this class was generated from the following file: