MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
shcore::polyglot::Polyglot_object Class Reference

Utility class to allow wrapping a Polyglot object to be used from the C++. More...

#include <types_polyglot.h>

Public Member Functions

 Polyglot_object ()=delete
 
 Polyglot_object (const Polyglot_type_bridger *type_bridger, poly_thread thread, poly_context context, poly_value object, const std::string &class_name)
 
 Polyglot_object (const Polyglot_object &)=delete
 
Polyglot_objectoperator= (const Polyglot_object &)=delete
 
 Polyglot_object (Polyglot_object &&)=delete
 
Polyglot_objectoperator= (Polyglot_object &&)=delete
 
virtual ~Polyglot_object ()=default
 
std::string class_name () const
 
void append_json (JSON_dumper &dumper) const
 
std::vector< std::string > get_members () const
 
Value get_member (const std::string &prop) const
 
poly_value get_poly_member (const std::string &prop) const
 
bool has_member (const std::string &prop) const
 
void set_member (const std::string &prop, Value value)
 
void set_poly_member (const std::string &prop, poly_value value)
 
Value get_property (const std::string &prop) const
 
void set_property (const std::string &prop, Value value)
 
Value call (const std::string &name, const std::vector< Value > &args)
 
poly_value get () const
 
bool remove_member (const std::string &name)
 
bool is_exception () const
 
void throw_exception () const
 

Private Attributes

const Polyglot_type_bridgerm_types
 
poly_thread m_thread
 
poly_context m_context
 
Store m_object
 
std::string m_class_name
 

Detailed Description

Utility class to allow wrapping a Polyglot object to be used from the C++.

Constructor & Destructor Documentation

◆ Polyglot_object() [1/4]

shcore::polyglot::Polyglot_object::Polyglot_object ( )
delete

◆ Polyglot_object() [2/4]

shcore::polyglot::Polyglot_object::Polyglot_object ( const Polyglot_type_bridger type_bridger,
poly_thread  thread,
poly_context  context,
poly_value  object,
const std::string &  class_name 
)

◆ Polyglot_object() [3/4]

shcore::polyglot::Polyglot_object::Polyglot_object ( const Polyglot_object )
delete

◆ Polyglot_object() [4/4]

shcore::polyglot::Polyglot_object::Polyglot_object ( Polyglot_object &&  )
delete

◆ ~Polyglot_object()

virtual shcore::polyglot::Polyglot_object::~Polyglot_object ( )
virtualdefault

Member Function Documentation

◆ append_json()

void shcore::polyglot::Polyglot_object::append_json ( JSON_dumper dumper) const

◆ call()

Value shcore::polyglot::Polyglot_object::call ( const std::string &  name,
const std::vector< Value > &  args 
)

◆ class_name()

std::string shcore::polyglot::Polyglot_object::class_name ( ) const

◆ get()

poly_value shcore::polyglot::Polyglot_object::get ( ) const
inline

◆ get_member()

Value shcore::polyglot::Polyglot_object::get_member ( const std::string &  prop) const

◆ get_members()

std::vector< std::string > shcore::polyglot::Polyglot_object::get_members ( ) const

◆ get_poly_member()

poly_value shcore::polyglot::Polyglot_object::get_poly_member ( const std::string &  prop) const

◆ get_property()

Value shcore::polyglot::Polyglot_object::get_property ( const std::string &  prop) const

◆ has_member()

bool shcore::polyglot::Polyglot_object::has_member ( const std::string &  prop) const

◆ is_exception()

bool shcore::polyglot::Polyglot_object::is_exception ( ) const

◆ operator=() [1/2]

Polyglot_object & shcore::polyglot::Polyglot_object::operator= ( const Polyglot_object )
delete

◆ operator=() [2/2]

Polyglot_object & shcore::polyglot::Polyglot_object::operator= ( Polyglot_object &&  )
delete

◆ remove_member()

bool shcore::polyglot::Polyglot_object::remove_member ( const std::string &  name)

◆ set_member()

void shcore::polyglot::Polyglot_object::set_member ( const std::string &  prop,
Value  value 
)

◆ set_poly_member()

void shcore::polyglot::Polyglot_object::set_poly_member ( const std::string &  prop,
poly_value  value 
)

◆ set_property()

void shcore::polyglot::Polyglot_object::set_property ( const std::string &  prop,
Value  value 
)

◆ throw_exception()

void shcore::polyglot::Polyglot_object::throw_exception ( ) const

Member Data Documentation

◆ m_class_name

std::string shcore::polyglot::Polyglot_object::m_class_name
private

◆ m_context

poly_context shcore::polyglot::Polyglot_object::m_context
private

◆ m_object

Store shcore::polyglot::Polyglot_object::m_object
private

◆ m_thread

poly_thread shcore::polyglot::Polyglot_object::m_thread
private

◆ m_types

const Polyglot_type_bridger* shcore::polyglot::Polyglot_object::m_types
private

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