UGDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Attributes
ugdk::script::python::PythonData Class Reference

#include <pythondata.h>

Inheritance diagram for ugdk::script::python::PythonData:
Inheritance graph
[legend]
Collaboration diagram for ugdk::script::python::PythonData:
Collaboration graph
[legend]

List of all members.

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 LangWrapperwrapper () 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

PythonWrapperwrapper_
bool own_ref_
PyObject * py_data_

Constructor & Destructor Documentation

ugdk::script::python::PythonData::PythonData ( PythonWrapper wrapper,
PyObject *  data_object,
bool  owns_ref 
) [inline]
virtual ugdk::script::python::PythonData::~PythonData ( ) [inline, virtual]

Member Function Documentation

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.

Tries to get a attribute with the given name from this object.

Implements ugdk::script::VirtualData.

void* ugdk::script::python::PythonData::unsafe_data ( ) const [inline, virtual]
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.

const char * ugdk::script::python::PythonData::UnwrapString ( ) const [virtual]
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]
void ugdk::script::python::PythonData::WrapInteger ( int  number) [virtual]
void ugdk::script::python::PythonData::WrapNumber ( double  number) [virtual]
virtual LangWrapper* ugdk::script::python::PythonData::wrapper ( ) const [inline, virtual]
void ugdk::script::python::PythonData::WrapString ( const char *  str) [virtual]

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines