export_FitsNTuple.cxx
Go to the documentation of this file.
1 
12 #ifdef _MSC_VER
13 // nonstandard extension used 'extern' before...
14 # pragma warning(disable:4231)
15 
16 // needs to have dll-interface used by client
17 # pragma warning(disable:4251)
18 
19 // non dll-interface struct
20 # pragma warning(disable:4275)
21 
22 // 'int' : forcing value to bool 'true' or 'false' (performance warning)
23 # pragma warning(disable:4800)
24 #endif
25 
26 // include first to avoid _POSIX_C_SOURCE warning.
27 #include <boost/python.hpp>
28 
29 #include "fits/FitsNTuple.h"
30 
31 using std::vector;
32 using namespace boost::python;
33 
34 namespace hippodraw {
35 namespace Python {
36 
37 void
39 {
40  class_ < FitsNTuple, bases < DataSource > >
41  ( "FitsNTuple",
42  "a derived class of DataSource that references a table or image in a\n"
43  "FITS file. A FitNTuple object must be created by the FitsController."
44  "Changes made to this object will not be reflected in the FITS file.",
45  no_init )
46 
47  .def ( "addColumn",
48  ( int ( FitsNTuple::* ) // function pointer
49  ( const std::string &,
50  const std::vector < double > & ) ) // signature
51  &FitsNTuple::addColumn,
52  "addColumn ( string, list or tuple ) -> value\n"
53  "\n"
54  "Adds a column to the data source. The string argument is used\n"
55  "for the label of the new column. The length of the new column\n"
56  "must the same as existing columns. The value returns is the\n"
57  "index to the column." )
58 
59  .def ( "replaceColumn",
60  ( void ( DataSource::* ) // function pointer
61  ( const std::string &,
62  const std::vector < double > & ) ) // signature
63  &DataSource::replaceColumn,
64  "replaceColumn ( index, list ) -> None\n"
65  "replaceColumn ( label, list ) -> None\n"
66  "\n"
67  "Replaces the column of data by index or label. Does not\n"
68  "modify the FITS file." )
69 
70  .def ( "replaceColumn",
71  ( void ( FitsNTuple::* ) // function pointer
72  ( unsigned int,
73  const std::vector < double > & ) ) // signature
74  &FitsNTuple::replaceColumn )
75  ;
76 }
77 
78 } // namespace Python
79 } // namespace hippodraw

Generated for HippoDraw Class Library by doxygen