00001
00012 #ifdef _MSC_VER
00013
00014 # pragma warning(disable:4231)
00015
00016
00017 # pragma warning(disable:4251)
00018
00019
00020 # pragma warning(disable:4275)
00021
00022
00023 # pragma warning(disable:4800)
00024 #endif
00025
00026 #include "ListTuple.h"
00027
00028 using namespace boost::python;
00029
00030 namespace hippodraw {
00031 namespace Python {
00032
00033 void
00034 export_ListTuple()
00035 {
00036 class_ < ListTuple, bases < DataSource > >
00037 ( "ListTuple",
00038 "A derived class from DataSource containing columns as references to\n"
00039 "Python list objects. This allows the data to be used without making\n"
00040 "a copy of it. However, access to the data is slower than for most\n"
00041 "of the other classes derived from DataSource",
00042 init< >
00043 ( "ListTuple ( None ) -> ListTuple\n"
00044 "\n"
00045 "Creates an empty ListTuple" ) )
00046
00047
00048
00049 .def ( "setLabels", &ListTuple::setLabels,
00050 "setLabels ( list or tuple ) -> None\n"
00051 "\n"
00052 "Sets the labels of the columns from list of string objects.\n"
00053 "For an empty ListTuple object, implicitly sets the number of\n"
00054 "columns." )
00055
00056 .def ( "getLabel", &ListTuple::getLabelAt,
00057 return_value_policy < copy_const_reference > (),
00058 "getLabel ( index ) -> string\n"
00059 "\n"
00060 "Returns label of column." )
00061
00062
00063
00064
00065 .def ( "addColumn",
00066 &ListTuple::addColumn,
00067 "addColumn ( string, list ) -> value\n"
00068 "\n"
00069 "Addes the array as a new column with label from the string.\n"
00070 "Returns the index of the new column." )
00071
00072 .def ( "replaceColumn",
00073 ( void ( ListTuple:: * )
00074 ( unsigned int, boost::python::list ) )
00075 &ListTuple::replaceColumn,
00076 "replaceColumn ( index, list ) -> None\n"
00077 "\n"
00078 "Replaces existing column with list\n" )
00079
00080 .def ( "replaceColumn",
00081 ( void ( ListTuple:: * )
00082 ( const std::string &, boost::python::list ) )
00083 &ListTuple::replaceColumn,
00084 "replaceColumn ( string, list ) -> None\n"
00085 "\n"
00086 "Replaces existing column with new array\n" )
00087
00088 .def ( "notifyObservers",
00089 &ListTuple::notifyObservers,
00090 "notifyObservers ( None ) -> None\n"
00091 "\n"
00092 "Sends update message to all observers. Use this member if the\n"
00093 "contents of the reference Python list has changed and Display\n"
00094 "objects bound to it require updating." )
00095
00096 ;
00097 }
00098
00099 }
00100 }