UGDK
|
#include <pythondata.h>
Public Member Functions | |
PythonData (PythonWrapper *wrapper, PyObject *data_object, bool owns_ref) | |
virtual | ~PythonData () |
virtual void * | Unwrap (const VirtualType &type, bool disown) const |
Tries to unwrap the data contained in this object using the given type. | |
const char * | UnwrapString () const |
bool | UnwrapBoolean () const |
int | UnwrapInteger () const |
double | UnwrapNumber () const |
Vector | UnwrapVector () const |
List | UnwrapList () const |
Map | UnwrapMap () const |
virtual void | Wrap (void *data, const VirtualType &type) |
Tries to wrap the given data with the given type into this object. | |
virtual void | WrapString (const char *str) |
virtual void | WrapBoolean (bool boolean) |
virtual void | WrapInteger (int number) |
virtual void | WrapNumber (double number) |
virtual LangWrapper * | wrapper () const |
virtual Ptr | Execute (const std::vector< Ptr > &args) |
virtual Ptr | GetAttribute (Ptr key) |
Tries to get a attribute with the given name from this object. | |
virtual Ptr | SetAttribute (Ptr key, Ptr value) |
void * | unsafe_data () const |
Protected Attributes | |
PythonWrapper * | wrapper_ |
bool | own_ref_ |
PyObject * | py_data_ |
ugdk::script::python::PythonData::PythonData | ( | PythonWrapper * | wrapper, |
PyObject * | data_object, | ||
bool | owns_ref | ||
) | [inline] |
virtual ugdk::script::python::PythonData::~PythonData | ( | ) | [inline, virtual] |
VirtualData::Ptr ugdk::script::python::PythonData::Execute | ( | const std::vector< Ptr > & | args | ) | [virtual] |
Tries to execute ourselves as a function in a script language, passing thee given arguments and returning the result.
Tries to execute ourselves as a function in a script language, passing the given arguments and returning the result.
VirtualData::Ptr ugdk::script::python::PythonData::GetAttribute | ( | Ptr | key | ) | [virtual] |
Tries to get a attribute with the given name from this object.
Implements ugdk::script::VirtualData.
VirtualData::Ptr ugdk::script::python::PythonData::SetAttribute | ( | Ptr | key, |
Ptr | value | ||
) | [virtual] |
Implements ugdk::script::VirtualData.
void* ugdk::script::python::PythonData::unsafe_data | ( | ) | const [inline, virtual] |
Implements ugdk::script::VirtualData.
void * ugdk::script::python::PythonData::Unwrap | ( | const VirtualType & | type, |
bool | disown | ||
) | const [virtual] |
Tries to unwrap the data contained in this object using the given type.
Implements ugdk::script::VirtualData.
bool ugdk::script::python::PythonData::UnwrapBoolean | ( | ) | const [virtual] |
Implements ugdk::script::VirtualData.
int ugdk::script::python::PythonData::UnwrapInteger | ( | ) | const [virtual] |
Implements ugdk::script::VirtualData.
VirtualData::List ugdk::script::python::PythonData::UnwrapList | ( | ) | const [virtual] |
Implements ugdk::script::VirtualData.
VirtualData::Map ugdk::script::python::PythonData::UnwrapMap | ( | ) | const [virtual] |
Implements ugdk::script::VirtualData.
double ugdk::script::python::PythonData::UnwrapNumber | ( | ) | const [virtual] |
Implements ugdk::script::VirtualData.
const char * ugdk::script::python::PythonData::UnwrapString | ( | ) | const [virtual] |
Implements ugdk::script::VirtualData.
VirtualData::Vector ugdk::script::python::PythonData::UnwrapVector | ( | ) | const [virtual] |
Implements ugdk::script::VirtualData.
void ugdk::script::python::PythonData::Wrap | ( | void * | data, |
const VirtualType & | type | ||
) | [virtual] |
Tries to wrap the given data with the given type into this object.
Implements ugdk::script::VirtualData.
void ugdk::script::python::PythonData::WrapBoolean | ( | bool | boolean | ) | [virtual] |
Implements ugdk::script::VirtualData.
void ugdk::script::python::PythonData::WrapInteger | ( | int | number | ) | [virtual] |
Implements ugdk::script::VirtualData.
void ugdk::script::python::PythonData::WrapNumber | ( | double | number | ) | [virtual] |
Implements ugdk::script::VirtualData.
virtual LangWrapper* ugdk::script::python::PythonData::wrapper | ( | ) | const [inline, virtual] |
Implements ugdk::script::VirtualData.
void ugdk::script::python::PythonData::WrapString | ( | const char * | str | ) | [virtual] |
Implements ugdk::script::VirtualData.
bool ugdk::script::python::PythonData::own_ref_ [protected] |
PyObject* ugdk::script::python::PythonData::py_data_ [protected] |
PythonWrapper* ugdk::script::python::PythonData::wrapper_ [protected] |