Commit 3ee74723bfff8517c317ce1dc7adde61baaf2e7d

Authored by Jürgen Knödlseder
1 parent 3013163b

Remove casts to GModelPointSource, GModelExtendedSource and GModelDiffuseSource.

The GModelPointSource, GModelExtendedSource and GModelDiffuseSource classes have been removed and are now replaced by GModelSky.
Showing 1 changed file with 2 additions and 16 deletions
pyext/GModels.i
1 /*************************************************************************** 1 /***************************************************************************
2 * GModels.i - Model container class * 2 * GModels.i - Model container class *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 - * copyright (C) 2009-2012 by Juergen Knoedlseder * 4 + * copyright (C) 2009-2013 by Juergen Knoedlseder *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
6 * * 6 * *
7 * This program is free software: you can redistribute it and/or modify * 7 * This program is free software: you can redistribute it and/or modify *
@@ -29,26 +29,12 @@ @@ -29,26 +29,12 @@
29 #include "GModel.hpp" 29 #include "GModel.hpp"
30 #include "GModelSky.hpp" 30 #include "GModelSky.hpp"
31 #include "GModelData.hpp" 31 #include "GModelData.hpp"
32 -#include "GModelDiffuseSource.hpp"  
33 -#include "GModelExtendedSource.hpp"  
34 -#include "GModelPointSource.hpp"  
35 %} 32 %}
36 33
37 /* __ Typemaps ___________________________________________________________ */ 34 /* __ Typemaps ___________________________________________________________ */
38 %typemap(out) GModel* { 35 %typemap(out) GModel* {
39 if (dynamic_cast<GModelSky*>($1) != NULL) { 36 if (dynamic_cast<GModelSky*>($1) != NULL) {
40 - if (dynamic_cast<GModelDiffuseSource*>($1) != NULL) {  
41 - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GModelDiffuseSource, 0 | 0 );  
42 - }  
43 - else if (dynamic_cast<GModelExtendedSource*>($1) != NULL) {  
44 - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GModelExtendedSource, 0 | 0 );  
45 - }  
46 - else if (dynamic_cast<GModelPointSource*>($1) != NULL) {  
47 - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GModelPointSource, 0 | 0 );  
48 - }  
49 - else {  
50 - $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GModelSky, 0 | 0 );  
51 - } 37 + $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GModelSky, 0 | 0 );
52 } 38 }
53 else if (dynamic_cast<GModelData*>($1) != NULL) { 39 else if (dynamic_cast<GModelData*>($1) != NULL) {
54 $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GModelData, 0 | 0 ); 40 $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), SWIGTYPE_p_GModelData, 0 | 0 );