ReFRACtor
luabind_object.cc
Go to the documentation of this file.
1 #include "luabind_object.h"
2 #include <boost/foreach.hpp>
3 using namespace FullPhysics;
4 
5 std::vector<boost::shared_ptr<BridgeLuabindAndGenericBase> >
7 
8 std::vector<boost::shared_ptr<BridgeLuabindAndGenericBase> >
10 
11 //-----------------------------------------------------------------------
15 //-----------------------------------------------------------------------
16 
18 {
21  base_bridge) {
22  res = v->value(*this);
23  if(res)
24  return res;
25  }
26  return res;
27 }
28 
29 //-----------------------------------------------------------------------
32 //-----------------------------------------------------------------------
33 
35 (const std::string& Vname,
37 {
40  if(v->set_value(*this, Vname, V))
41  return;
42  }
44  base_bridge) {
45  if(v->set_value(*this, Vname, V))
46  return;
47  }
48  throw Exception("Unrecognized type in LuabindObject::set_value");
49 }
50 
51 //-----------------------------------------------------------------------
54 //-----------------------------------------------------------------------
55 
57 (int Vidx,
59 {
62  if(v->set_index(*this, Vidx, V))
63  return;
64  }
66  base_bridge) {
67  if(v->set_index(*this, Vidx, V))
68  return;
69  }
70  throw Exception("Unrecognized type in LuabindObject::set_index");
71 }
72 
73 
74 //-----------------------------------------------------------------------
78 //-----------------------------------------------------------------------
79 
84 {
88  res = v->luabind_object(Ls, Obj);
89  if(res)
90  return res;
91  }
93  base_bridge) {
94  res = v->luabind_object(Ls, Obj);
95  if(res)
96  return res;
97  }
98  throw Exception("Unrecognized type in LuabindObject::set_index");
99 }
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.
void set_value(const std::string &Vname, const boost::shared_ptr< GenericObject > &V)
Set value as a GenericObject, returning true if this succeeds.
static std::vector< boost::shared_ptr< BridgeLuabindAndGenericBase > > base_bridge
Map used for mapping base classes to and from Lua and GenericObject.
This is the base of the exception hierarchy for Full Physics code.
Definition: fp_exception.h:16
void set_index(int Vidx, const boost::shared_ptr< GenericObject > &V)
Set value as a GenericObject, returning true if this succeeds.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
boost::shared_ptr< GenericObject > value_generic_object() const
Return value as a GenericObject, or return a null pointer if we can&#39;t convert to a GenericObject...
static std::vector< boost::shared_ptr< BridgeLuabindAndGenericBase > > derived_bridge
Map used for mapping derived class to and from Lua and GenericObject.

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:10