![]() |
MySQL 9.3.0
Source Code Documentation
|
Exposure of C++ objects to the polyglot library is done through the usage of Proxy objects provided by the polyglot library. More...
#include <polyglot_native_wrapper.h>
Public Types | |
using | Collectable_t = Collectable< T, t > |
using | Native_ptr = std::shared_ptr< T > |
Public Member Functions | |
Polyglot_native_wrapper ()=delete | |
Polyglot_native_wrapper (std::weak_ptr< Polyglot_language > language) | |
Polyglot_native_wrapper (const Polyglot_native_wrapper &)=delete | |
Polyglot_native_wrapper & | operator= (const Polyglot_native_wrapper &)=delete |
Polyglot_native_wrapper (Polyglot_native_wrapper &&)=delete | |
Polyglot_native_wrapper & | operator= (Polyglot_native_wrapper &&)=delete |
virtual | ~Polyglot_native_wrapper ()=default |
poly_value | wrap (const Native_ptr &native_value) const |
Static Public Member Functions | |
static bool | unwrap (poly_thread thread, poly_value value, Native_ptr *ret_object) |
Protected Member Functions | |
virtual poly_value | create_wrapper (poly_thread thread, poly_context context, ICollectable *collectable) const =0 |
Static Protected Member Functions | |
static poly_value | handler_release_collectable (poly_thread thread, poly_callback_info args) |
template<typename Config > | |
static poly_value | native_handler_no_args (poly_thread thread, poly_callback_info args) |
Generic handler to be used with pure native functions, no interaction with the polyglot library is done: More... | |
template<typename Config > | |
static poly_value | polyglot_handler_no_args (poly_thread thread, poly_callback_info args) |
Generic handler to be used with functions that interact with the polyglot library: More... | |
template<typename Config > | |
static poly_value | native_handler_fixed_args (poly_thread thread, poly_callback_info args) |
Generic handler to be used with pure native functions, no interaction with the polyglot library is done: More... | |
template<typename Config > | |
static poly_value | polyglot_handler_fixed_args (poly_thread thread, poly_callback_info args) |
Generic handler to be used with functions that interact with the polyglot library, this is: More... | |
template<typename Config > | |
static poly_value | native_handler_variable_args (poly_thread thread, poly_callback_info args) |
Generic handler to be used with pure native functions, no interaction with the polyglot library is done: More... | |
Protected Attributes | |
std::weak_ptr< Polyglot_language > | m_language |
Exposure of C++ objects to the polyglot library is done through the usage of Proxy objects provided by the polyglot library.
Those proxy objects implement the needed operations to treat a C++ object as a standard polyglot object, each of those operations require a C++ callback for the execution.
In the C++ side it is needed to create the callbacks required by the proxy objects in the polyglot library, for each C++ object type to be supported there's a wrapper class which provides the needed callbacks.
When a C++ object is given to the polyglot library, 2 things are needed:
Each object wrapper provides the above. For the second item, a Collectable object is created and given to the polyglot proxy object. This Collectable object contains the necessary information to identify the target C++ object on which the operation will be executed.
This class holds general callback function to be used to release the created Collectable objects once the Proxy object is garbage collected in the Polyglot library.
using shcore::polyglot::Polyglot_native_wrapper< T, t >::Collectable_t = Collectable<T, t> |
using shcore::polyglot::Polyglot_native_wrapper< T, t >::Native_ptr = std::shared_ptr<T> |
|
delete |
|
inlineexplicit |
|
delete |
|
delete |
|
virtualdefault |
|
protectedpure virtual |
Implemented in shcore::polyglot::Polyglot_array_wrapper, shcore::polyglot::Polyglot_file_system_wrapper, shcore::polyglot::Polyglot_function_wrapper, shcore::polyglot::Polyglot_iterator_wrapper, shcore::polyglot::Polyglot_map_wrapper, shcore::polyglot::Polyglot_method_wrapper, shcore::polyglot::Polyglot_object_wrapper, and shcore::polyglot::Polyglot_seekable_channel_wrapper.
|
inlinestaticprotected |
|
inlinestaticprotected |
Generic handler to be used with pure native functions, no interaction with the polyglot library is done:
|
inlinestaticprotected |
Generic handler to be used with pure native functions, no interaction with the polyglot library is done:
|
inlinestaticprotected |
Generic handler to be used with pure native functions, no interaction with the polyglot library is done:
|
delete |
|
delete |
|
inlinestaticprotected |
Generic handler to be used with functions that interact with the polyglot library, this is:
|
inlinestaticprotected |
Generic handler to be used with functions that interact with the polyglot library:
|
inlinestatic |
|
inline |
|
protected |