15 # pragma warning(disable:4231)
18 # pragma warning(disable:4251)
21 # pragma warning(disable:4275)
24 # pragma warning(disable:4800)
28 #include <boost/python.hpp>
33 using namespace boost::python;
41 class_ < NTuple, bases < DataSource > >
43 "A derived class of DataSource that stores its tabular data vectors of\n"
44 "double precision numbers in C++. An NTuple object can be created in\n"
45 "a number of ways including reading from a file using the\n"
48 (
"NTuple ( None ) -> NTuple\n"
49 "NTuple ( value ) -> NTuple\n"
50 "NTuple ( sequence ) -> NTuple\n"
51 "NTuple ( NTuple ) -> NTuple\n"
53 "The form with no arguments creates an empty NTuple with no rows\n"
54 "or columns. The form with one value argument creates an empty\n"
55 "NTuple with `value' number of columns. The form with a sequence\n"
56 "argument creates an empty NTuple with the number of columns equal\n"
57 "to size of the sequence. The sequence should contain string which\n"
58 "are used as the column labels. The last form form creates an\n"
59 "NTuple\n whose contents is a copy of an existing one." ) )
61 .def ( init < unsigned int > ( ) )
63 .def ( init <
const std::vector < std::string > & > ( ) )
65 .def ( init < const NTuple & > () )
67 .def (
"setLabels", &NTuple::setLabels,
68 "setLabels ( sequence ) -> None\n"
70 "Sets the labels of the columns from the list of strings. If the\n"
71 "NTuple is empty, then also sets the number of columns to be the\n"
72 "size of the list. If the number of columns has already been\n"
73 "set, the the size of the list should be the same, otherwise\n"
74 "a RuntimeError exception is thrown." )
76 .def (
"getLabel", &NTuple::getLabelAt,
77 return_value_policy < copy_const_reference > (),
78 "getLabel ( index ) -> string\n"
80 "Returns the label at column index." )
82 .def (
"getRow", &NTuple::getRow,
83 return_value_policy < copy_const_reference> (),
84 "getRow ( index ) -> list\n"
86 "Returns the index row as list floats." )
88 .def (
"setIntervalCount", &NTuple::setIntervalCount,
89 "setIntervalCount ( count ) -> None\n"
91 "Sets the interval count between updates to the observers." )
93 .def (
"setIntervalEnabled", &NTuple::setIntervalEnabled,
94 "setIntervalEnable ( Boolean ) -> None\n"
96 "Sets the interval counting on or off" )
hippodraw::NTuple class interface.
void export_NTuple()
Exports the NTuple class to Python.