|
UGDK
0.4.1
|
Abstract class representing virtual script data. More...
#include <ugdk/script/virtualdata.h>


Public Types | |
| typedef std::tr1::shared_ptr < VirtualData > | Ptr |
| typedef std::tr1::shared_ptr < const VirtualData > | ConstPtr |
| typedef std::tr1::weak_ptr < VirtualData > | WeakPtr |
| typedef std::vector< Ptr > | Vector |
| typedef std::list< Ptr > | List |
| typedef std::map< Ptr, Ptr > | Map |
Public Member Functions | |
| virtual | ~VirtualData () |
| Ptr | Copy () |
| virtual void * | Unwrap (const VirtualType &type, bool disown) const =0 |
| Tries to unwrap the data contained in this object using the given type. | |
| virtual const char * | UnwrapString () const =0 |
| virtual bool | UnwrapBoolean () const =0 |
| virtual int | UnwrapInteger () const =0 |
| virtual double | UnwrapNumber () const =0 |
| virtual Vector | UnwrapVector () const =0 |
| virtual List | UnwrapList () const =0 |
| virtual Map | UnwrapMap () const =0 |
| virtual void | Wrap (void *data, const VirtualType &type)=0 |
| Tries to wrap the given data with the given type. | |
| virtual void | WrapString (const char *str)=0 |
| virtual void | WrapBoolean (bool boolean)=0 |
| virtual void | WrapInteger (int number)=0 |
| virtual void | WrapNumber (double number)=0 |
| virtual LangWrapper * | wrapper () const =0 |
| virtual Ptr | Execute (const Vector &args)=0 |
| virtual Ptr | GetAttribute (Ptr key)=0 |
| Tries to get a attribute with the given name from this object. | |
| virtual Ptr | SetAttribute (Ptr key, Ptr value)=0 |
| virtual void * | unsafe_data () const =0 |
| virtual void | AddToBuffer () |
| virtual void | RemoveFromBuffer () |
Protected Member Functions | |
| VirtualData () | |
Abstract class representing virtual script data.
| typedef std::tr1::shared_ptr<const VirtualData> ugdk::script::VirtualData::ConstPtr |
| typedef std::list<Ptr> ugdk::script::VirtualData::List |
| typedef std::map<Ptr, Ptr> ugdk::script::VirtualData::Map |
| typedef std::tr1::shared_ptr<VirtualData> ugdk::script::VirtualData::Ptr |
| typedef std::vector<Ptr> ugdk::script::VirtualData::Vector |
| typedef std::tr1::weak_ptr<VirtualData> ugdk::script::VirtualData::WeakPtr |
|
inlinevirtual |
|
inlineprotected |
|
inlinevirtual |
Reimplemented in ugdk::script::lua::LuaData.
|
inline |
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.
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
inlinevirtual |
Reimplemented in ugdk::script::lua::LuaData.
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Tries to unwrap the data contained in this object using the given type.
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Tries to wrap the given data with the given type.
Returns a new VirtualData::Ptr with the data wrapped upon success.
The VirtualData object returned by this method is NOT NECESSARILY the same as the one that called it. Thus a safe way to use this is like this:
VirtualData::Ptr vdata;
// ...
vdata = vdata->Wrap(...);
| data | - a void pointer to the data being wrapped. |
| type | - a virtual type got from TypeRegistry<T>::type(), where T is the original declarated type of the data. |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.
|
pure virtual |
Implemented in ugdk::script::python::PythonData, and ugdk::script::lua::LuaData.