ReFRACtor
swig_type_mapper.h
Go to the documentation of this file.
1 #ifndef SWIG_TYPE_MAPPER_H
2 #define SWIG_TYPE_MAPPER_H
4 #include "swig_to_python.h"
5 
6 namespace FullPhysics {
7 
8 /****************************************************************/
12 template<class T> class SwigTypeMapper : public SwigTypeMapperBase {
13 public:
14  SwigTypeMapper(const char* Typename) {
15  sinfo = SWIG_TypeQuery(Typename);
16 #ifdef SWIG_TYPE_MAPPER_DIAGNOSTIC
17  std::cerr << "sinfo - " << sinfo->str << "\n";
18 #endif
19  }
20  virtual PyObject* to_python(const boost::shared_ptr<GenericObject>& V)
21  {
22  boost::shared_ptr<T> v2 = boost::dynamic_pointer_cast<T>(V);
23  boost::shared_ptr<T> *v3 = v2 ? new boost::shared_ptr<T>(v2) : 0;
24  return SWIG_NewPointerObj(SWIG_as_voidptr(v3), sinfo,
25  SWIG_POINTER_OWN);
26  }
27 private:
28  swig_type_info* sinfo;
29 };
30 }
31 #endif
This is the implementation of SwigTypeMapperBase.
SwigTypeMapper(const char *Typename)
virtual PyObject * to_python(const boost::shared_ptr< GenericObject > &V)
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
This is the base class that is used by fp_shared_ptr.i to map a shared_ptr to a python object...

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