| 1 | //#--------------------------------------------------------------------------- | 
|---|
| 2 | //# python_SrcType.cc: python exposure of c++ atnf/PKSIO/SrcType class | 
|---|
| 3 | //#--------------------------------------------------------------------------- | 
|---|
| 4 | //# Copyright (C) 2004 | 
|---|
| 5 | //# ATNF | 
|---|
| 6 | //# | 
|---|
| 7 | //# This program is free software; you can redistribute it and/or modify it | 
|---|
| 8 | //# under the terms of the GNU General Public License as published by the Free | 
|---|
| 9 | //# Software Foundation; either version 2 of the License, or (at your option) | 
|---|
| 10 | //# any later version. | 
|---|
| 11 | //# | 
|---|
| 12 | //# This program is distributed in the hope that it will be useful, but | 
|---|
| 13 | //# WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 14 | //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General | 
|---|
| 15 | //# Public License for more details. | 
|---|
| 16 | //# | 
|---|
| 17 | //# You should have received a copy of the GNU General Public License along | 
|---|
| 18 | //# with this program; if not, write to the Free Software Foundation, Inc., | 
|---|
| 19 | //# 675 Massachusetts Ave, Cambridge, MA 02139, USA. | 
|---|
| 20 | //# | 
|---|
| 21 | //# Correspondence concerning this software should be addressed as follows: | 
|---|
| 22 | //#        Internet email: Malte.Marquarding@csiro.au | 
|---|
| 23 | //#        Postal address: Malte Marquarding, | 
|---|
| 24 | //#                        Australia Telescope National Facility, | 
|---|
| 25 | //#                        P.O. Box 76, | 
|---|
| 26 | //#                        Epping, NSW, 2121, | 
|---|
| 27 | //#                        AUSTRALIA | 
|---|
| 28 | //# | 
|---|
| 29 | //# $Id: python_SrcType.cpp 1677 2010-01-27 07:29:48Z TakeshiNakazato $ | 
|---|
| 30 | //#--------------------------------------------------------------------------- | 
|---|
| 31 | #include <vector> | 
|---|
| 32 | #include <boost/python.hpp> | 
|---|
| 33 | #include <boost/python/enum.hpp> | 
|---|
| 34 |  | 
|---|
| 35 | #include <atnf/PKSIO/SrcType.h> | 
|---|
| 36 |  | 
|---|
| 37 | using namespace boost::python; | 
|---|
| 38 |  | 
|---|
| 39 | //SrcType::type identity_( SrcType::type x ) { return x ; } | 
|---|
| 40 |  | 
|---|
| 41 | namespace asap { | 
|---|
| 42 | namespace python { | 
|---|
| 43 | void python_SrcType() { | 
|---|
| 44 | enum_<SrcType::type>("srctype") | 
|---|
| 45 | .value( "pson", SrcType::PSON ) | 
|---|
| 46 | .value( "psoff", SrcType::PSOFF ) | 
|---|
| 47 | .value( "nod", SrcType::NOD ) | 
|---|
| 48 | .value( "fson", SrcType::FSON ) | 
|---|
| 49 | .value( "fsoff", SrcType::FSOFF ) | 
|---|
| 50 | .value( "sky", SrcType::SKY ) | 
|---|
| 51 | .value( "hot", SrcType::HOT ) | 
|---|
| 52 | .value( "warm", SrcType::WARM ) | 
|---|
| 53 | .value( "cold", SrcType::COLD ) | 
|---|
| 54 | .value( "poncal", SrcType::PONCAL ) | 
|---|
| 55 | .value( "poffcal", SrcType::POFFCAL ) | 
|---|
| 56 | .value( "nodcal", SrcType::NODCAL ) | 
|---|
| 57 | .value( "foncal", SrcType::FONCAL ) | 
|---|
| 58 | .value( "foffcal", SrcType::FOFFCAL ) | 
|---|
| 59 | .value( "fslo", SrcType::FSLO ) | 
|---|
| 60 | .value( "flooff", SrcType::FLOOFF ) | 
|---|
| 61 | .value( "flosky", SrcType::FLOSKY ) | 
|---|
| 62 | .value( "flohot", SrcType::FLOHOT ) | 
|---|
| 63 | .value( "flowarm", SrcType::FLOWARM ) | 
|---|
| 64 | .value( "flocold", SrcType::FLOCOLD ) | 
|---|
| 65 | .value( "fshi", SrcType::FSHI ) | 
|---|
| 66 | .value( "fhioff", SrcType::FHIOFF ) | 
|---|
| 67 | .value( "fhisky", SrcType::FHISKY ) | 
|---|
| 68 | .value( "fhihot", SrcType::FHIHOT ) | 
|---|
| 69 | .value( "fhiwarm", SrcType::FHIWARM ) | 
|---|
| 70 | .value( "fhicold", SrcType::FHICOLD ) | 
|---|
| 71 | .value( "sig", SrcType::SIG ) | 
|---|
| 72 | .value( "ref", SrcType::REF ) | 
|---|
| 73 | .value( "cal", SrcType::CAL ) | 
|---|
| 74 | .value( "notype", SrcType::NOTYPE ) | 
|---|
| 75 | ; | 
|---|
| 76 |  | 
|---|
| 77 | //def( "identity", identity_ ) ; | 
|---|
| 78 | }; | 
|---|
| 79 |  | 
|---|
| 80 | } //namespace python | 
|---|
| 81 | } // namespace asap | 
|---|
| 82 |  | 
|---|