1 #ifndef SWIG_TO_PYTHON_H 2 #define SWIG_TO_PYTHON_H 12 template<
typename T>
inline PyObject*
28 Swig::Director* d =
dynamic_cast<Swig::Director*
>(V.get());
30 #ifdef SWIG_TYPE_MAPPER_DIAGNOSTIC 31 std::cerr <<
"Return underlying python object\n";
33 return d->swig_get_self();
43 #ifdef SWIG_TYPE_MAPPER_DIAGNOSTIC 44 std::cerr << tid.name() <<
"\n";
47 #ifdef SWIG_TYPE_MAPPER_DIAGNOSTIC 48 std::cerr <<
"Trying to_python for " << tid.name() <<
"\n";
57 #ifdef SWIG_TYPE_MAPPER_DIAGNOSTIC 58 std::cerr <<
"Returning most general type\n";
78 Swig::Director* d =
dynamic_cast<Swig::Director*
>(V.get());
80 #ifdef SWIG_TYPE_MAPPER_DIAGNOSTIC 81 std::cerr <<
"Return underlying python object\n";
83 return d->swig_get_self();
93 #ifdef SWIG_TYPE_MAPPER_DIAGNOSTIC 94 std::cerr << tid.name() <<
"\n";
97 #ifdef SWIG_TYPE_MAPPER_DIAGNOSTIC 98 std::cerr <<
"Trying to_python for " << tid.name() <<
"\n";
107 #ifdef SWIG_TYPE_MAPPER_DIAGNOSTIC 108 std::cerr <<
"Returning None\n";
113 template<
typename T>
inline PyObject*
PyObject * swig_to_python_or_none(const boost::shared_ptr< GenericObject > &V)
PyObject * swig_to_python(const boost::shared_ptr< T > &V)
Function to map from a shared point to a python object.
std::map< type_index, boost::shared_ptr< SwigTypeMapperBase > > swig_type_map
Map to go from type_index to the SwigTypeMapperBase object associated with it.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
For use with SWIG, it is useful to have a base class that everything can be cast to.
This is a wrapper around std::type_info that allows it to be used as an index in a associative contai...