source: trunk/src/python_SrcType.cpp

Last change on this file was 2526, checked in by Malte Marquarding, 12 years ago

OS X 10.7 gcc fails when stl's are included before boost

File size: 3.1 KB
Line 
1//#---------------------------------------------------------------------------
2//# python_SrcType.cc: python exposure of c++ atnf/PKSIO/SrcType class
3//#---------------------------------------------------------------------------
4//# Copyright (C) 2004-2012
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 <boost/python.hpp>
32#include <boost/python/enum.hpp>
33
34#include <vector>
35
36#include <atnf/PKSIO/SrcType.h>
37
38using namespace boost::python;
39
40//SrcType::type identity_( SrcType::type x ) { return x ; }
41
42namespace asap {
43  namespace python {
44    void python_SrcType() {
45      enum_<SrcType::type>("srctype")
46        .value( "pson", SrcType::PSON )
47        .value( "psoff", SrcType::PSOFF )
48        .value( "nod", SrcType::NOD )
49        .value( "fson", SrcType::FSON )
50        .value( "fsoff", SrcType::FSOFF )
51        .value( "sky", SrcType::SKY )
52        .value( "hot", SrcType::HOT )
53        .value( "warm", SrcType::WARM )
54        .value( "cold", SrcType::COLD )
55        .value( "poncal", SrcType::PONCAL )
56        .value( "poffcal", SrcType::POFFCAL )
57        .value( "nodcal", SrcType::NODCAL )
58        .value( "foncal", SrcType::FONCAL )
59        .value( "foffcal", SrcType::FOFFCAL )
60        .value( "fslo", SrcType::FSLO )
61        .value( "flooff", SrcType::FLOOFF )
62        .value( "flosky", SrcType::FLOSKY )
63        .value( "flohot", SrcType::FLOHOT )
64        .value( "flowarm", SrcType::FLOWARM )
65        .value( "flocold", SrcType::FLOCOLD )
66        .value( "fshi", SrcType::FSHI )
67        .value( "fhioff", SrcType::FHIOFF )
68        .value( "fhisky", SrcType::FHISKY )
69        .value( "fhihot", SrcType::FHIHOT )
70        .value( "fhiwarm", SrcType::FHIWARM )
71        .value( "fhicold", SrcType::FHICOLD )
72        .value( "sig", SrcType::SIG )
73        .value( "ref", SrcType::REF )
74        .value( "cal", SrcType::CAL )
75        .value( "notype", SrcType::NOTYPE )
76        ;
77
78      //def( "identity", identity_ ) ;
79    };
80
81  } //namespace python
82} // namespace asap
83
Note: See TracBrowser for help on using the repository browser.