![]()  | 
  
    ReFRACtor
    
   | 
 
This is a light wrapper around the luabind::object. More...
#include <luabind_object.h>
 Inheritance diagram for FullPhysics::LuabindObject:
 Collaboration diagram for FullPhysics::LuabindObject:Public Member Functions | |
| LuabindObject () | |
| LuabindObject (const luabind::object &Obj, const boost::shared_ptr< LuaState > &Ls) | |
| Constructor.  More... | |
| template<class T > | |
| LuabindObject (const boost::shared_ptr< LuaState > &Ls, const T &V) | |
| Conversion constructor.  More... | |
| LuabindObject (const boost::shared_ptr< LuaState > &Ls, const LuabindObject &V) | |
| virtual | ~LuabindObject () | 
| LuabindObject | call () | 
| Call a function pointed to by this object.  More... | |
| template<class T1 > | |
| LuabindObject | call (const T1 &Arg1) | 
| template<class T1 , class T2 > | |
| LuabindObject | call (const T1 &Arg1, const T2 &Arg2) | 
| template<class T1 , class T2 , class T3 > | |
| LuabindObject | call (const T1 &Arg1, const T2 &Arg2, const T3 &Arg3) | 
| template<class T1 , class T2 , class T3 , class T4 > | |
| LuabindObject | call (const T1 &Arg1, const T2 &Arg2, const T3 &Arg3, const T4 &Arg4) | 
| template<class T1 , class T2 , class T3 , class T4 , class T5 > | |
| LuabindObject | call (const T1 &Arg1, const T2 &Arg2, const T3 &Arg3, const T4 &Arg4, const T5 &Arg5) | 
| template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 > | |
| LuabindObject | call (const T1 &Arg1, const T2 &Arg2, const T3 &Arg3, const T4 &Arg4, const T5 &Arg5, const T6 &Arg6) | 
| template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 > | |
| LuabindObject | call (const T1 &Arg1, const T2 &Arg2, const T3 &Arg3, const T4 &Arg4, const T5 &Arg5, const T6 &Arg6, const T7 &Arg7) | 
| template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 > | |
| LuabindObject | call (const T1 &Arg1, const T2 &Arg2, const T3 &Arg3, const T4 &Arg4, const T5 &Arg5, const T6 &Arg6, const T7 &Arg7, const T8 &Arg8) | 
| LuabindObject | get_index (int Vidx) const | 
| bool | is_boolean () const | 
| bool | is_function () const | 
| bool | is_nil () const | 
| Test type of an object.  More... | |
| bool | is_number () const | 
| bool | is_string () const | 
| bool | is_table () const | 
| template<class T > | |
| bool | is_type () const | 
| Test if value in a table is the given type.  More... | |
| template<class T > | |
| bool | is_type_ptr () const | 
| Test if value in a table is the given type.  More... | |
| int | length (int index=0) const | 
| Return the "length" of the value at the given index using the Lua interpreter method that evaluates as the length operator.  More... | |
| const boost::shared_ptr< LuaState > & | lua_state () const | 
| Lua state pointer.  More... | |
| LuabindObject | new_table () | 
| Creates a new table object.  More... | |
| luabind::object & | object () | 
| Underlying object.  More... | |
| const luabind::object & | object () const | 
| LuabindObject | operator[] (const std::string &Vname) const | 
| Return a variable found in this table as another LuabindObject.  More... | |
| void | print (std::ostream &Os) const | 
| std::string | print_to_string () const | 
| Print to string.  More... | |
| void | set_index (int Vidx, const boost::shared_ptr< GenericObject > &V) | 
| Set value as a GenericObject, returning true if this succeeds.  More... | |
| template<class T > | |
| void | set_index (int Vidx, const boost::shared_ptr< T > &V) | 
| Set an index.  More... | |
| void | set_index (int Vidx, const std::string &V) | 
| void | set_index (int Vidx, const char *V) | 
| void | set_index (int Vidx, int V) | 
| void | set_index (int Vidx, double V) | 
| void | set_index (int Vidx, bool V) | 
| void | set_index (int Vidx, const LuabindObject &V) | 
| void | set_value (const std::string &Vname, const boost::shared_ptr< GenericObject > &V) | 
| Set value as a GenericObject, returning true if this succeeds.  More... | |
| template<class T > | |
| void | set_value (const std::string &Vname, const boost::shared_ptr< T > &V) | 
| Set a value.  More... | |
| template<class T , int D> | |
| void | set_value (const std::string &Vname, const blitz::Array< T, D > &V) | 
| void | set_value (const std::string &Vname, const std::string &V) | 
| void | set_value (const std::string &Vname, const char *V) | 
| void | set_value (const std::string &Vname, int V) | 
| void | set_value (const std::string &Vname, double V) | 
| void | set_value (const std::string &Vname, bool V) | 
| void | set_value (const std::string &Vname, const LuabindObject &V) | 
| template<class T > | |
| T | value () const | 
| Return value of a variable.  More... | |
| boost::shared_ptr< GenericObject > | value_generic_object () const | 
| Return value as a GenericObject, or return a null pointer if we can't convert to a GenericObject.  More... | |
| template<class T > | |
| boost::shared_ptr< T > | value_ptr () const | 
| Return value of a variable found in this table.  More... | |
Static Public Member Functions | |
| static boost::shared_ptr< LuabindObject > | create_luabind_object (const boost::shared_ptr< LuaState > &Ls, const boost::shared_ptr< GenericObject > &Obj) | 
| Create a LuabindObject from a GenericObject.  More... | |
| static LuabindObject | nil (const boost::shared_ptr< LuaState > &Ls) | 
| Return a nil value.  More... | |
Static Public Attributes | |
| static std::vector< boost::shared_ptr< BridgeLuabindAndGenericBase > > | base_bridge | 
| Map used for mapping base classes to and from Lua and GenericObject.  More... | |
| static std::vector< boost::shared_ptr< BridgeLuabindAndGenericBase > > | derived_bridge | 
| Map used for mapping derived class to and from Lua and GenericObject.  More... | |
This is a light wrapper around the luabind::object.
This adds a few convenience routines.
Definition at line 65 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 67 of file luabind_object.h.
      
  | 
  inline | 
Constructor.
Definition at line 72 of file luabind_object.h.
      
  | 
  inline | 
Conversion constructor.
Definition at line 85 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 91 of file luabind_object.h.
      
  | 
  inlinevirtual | 
Definition at line 95 of file luabind_object.h.
      
  | 
  inline | 
Call a function pointed to by this object.
Definition at line 282 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 296 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 311 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 327 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 343 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 361 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 378 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 396 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 415 of file luabind_object.h.
      
  | 
  static | 
Create a LuabindObject from a GenericObject.
This is really meant for use in python, in C++ you can just directly use the templated constructor with the actually type.
Definition at line 82 of file luabind_object.cc.
      
  | 
  inline | 
Definition at line 130 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 263 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 267 of file luabind_object.h.
      
  | 
  inline | 
Test type of an object.
Definition at line 262 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 264 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 265 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 266 of file luabind_object.h.
      
  | 
  inline | 
Test if value in a table is the given type.
Return true if it is, false otherwise.
Definition at line 171 of file luabind_object.h.
      
  | 
  inline | 
Test if value in a table is the given type.
This is a shortcut for is_type where you can leave off the boost::shared_ptr, since that is so common.
Definition at line 180 of file luabind_object.h.
      
  | 
  inline | 
Return the "length" of the value at the given index using the Lua interpreter method that evaluates as the length operator.
Definition at line 274 of file luabind_object.h.
      
  | 
  inline | 
Lua state pointer.
You can use this to do things with luabind (or directly with Lua) that this class doesn't already support.
Definition at line 454 of file luabind_object.h.
      
  | 
  inline | 
Creates a new table object.
Definition at line 437 of file luabind_object.h.
      
  | 
  inlinestatic | 
Return a nil value.
Definition at line 78 of file luabind_object.h.
      
  | 
  inline | 
Underlying object.
You can use this to do things with luabind that this class doesn't already support.
Definition at line 446 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 447 of file luabind_object.h.
      
  | 
  inline | 
Return a variable found in this table as another LuabindObject.
Definition at line 127 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 97 of file luabind_object.h.
      
  | 
  inlineinherited | 
Print to string.
This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.
Definition at line 31 of file printable.h.
| void LuabindObject::set_index | ( | int | Vidx, | 
| const boost::shared_ptr< GenericObject > & | V | ||
| ) | 
Set value as a GenericObject, returning true if this succeeds.
This is useful for use with Python.
Definition at line 57 of file luabind_object.cc.
      
  | 
  inline | 
Set an index.
Definition at line 228 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 233 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 237 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 241 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 245 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 249 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 253 of file luabind_object.h.
| void LuabindObject::set_value | ( | const std::string & | Vname, | 
| const boost::shared_ptr< GenericObject > & | V | ||
| ) | 
Set value as a GenericObject, returning true if this succeeds.
This is useful for use with Python.
Definition at line 35 of file luabind_object.cc.
      
  | 
  inline | 
Set a value.
Definition at line 189 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 194 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 199 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 203 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 207 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 211 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 215 of file luabind_object.h.
      
  | 
  inline | 
Definition at line 219 of file luabind_object.h.
      
  | 
  inline | 
Return value of a variable.
Definition at line 138 of file luabind_object.h.
| boost::shared_ptr< GenericObject > LuabindObject::value_generic_object | ( | ) | const | 
Return value as a GenericObject, or return a null pointer if we can't convert to a GenericObject.
This is useful for use with Python.
Definition at line 17 of file luabind_object.cc.
      
  | 
  inline | 
Return value of a variable found in this table.
Shortcut of value that lets you leave the boost::shared_ptr off in the type, since this is so common.
Definition at line 161 of file luabind_object.h.
      
  | 
  static | 
Map used for mapping base classes to and from Lua and GenericObject.
See discussion above BridgeLuabindAndGenericBase.
Definition at line 105 of file luabind_object.h.
      
  | 
  static | 
Map used for mapping derived class to and from Lua and GenericObject.
See discussion above BridgeLuabindAndGenericBase.
Definition at line 113 of file luabind_object.h.