| 285 | } |
| 286 | |
| 287 | void bindCompoundObject() |
| 288 | { |
| 289 | |
| 290 | RunTimeTypedClass<CompoundObject>() |
| 291 | .def( init<>() ) |
| 292 | .def("__init__", make_constructor(©Constructor), "Copy constructor.") |
| 293 | .def( "__repr__", &repr ) |
| 294 | .def( "__len__", &len ) |
| 295 | .def( "__getitem__", &getItem ) |
| 296 | .def( "__setitem__", &setItem ) |
| 297 | .def( "__delitem__", &delItem ) |
| 298 | .def( "__contains__", &contains ) |
| 299 | .def( "has_key", &contains ) |
| 300 | .def( "keys", &keys ) |
| 301 | .def( "values", &values ) |
| 302 | .def( "items", &items ) |
| 303 | .def( "update", &update ) |
| 304 | .def( "get", &get, "m.get(k [, v])\nReturns m[k] if found; otherwise, returns v.", |
| 305 | ( |
| 306 | boost::python::arg( "self" ), |
| 307 | boost::python::arg( "key" ), |
| 308 | boost::python::arg( "defaultValue" ) = object() |
| 309 | ) |
| 310 | ) |
| 311 | .def( "defaultInstance", &defaultInstance ).staticmethod( "defaultInstance" ) |
| 312 | ; |
| 313 | |
| 314 | CompoundObjectFromPythonDict(); |
| 315 | |
| 316 | } |
| 317 | |
| 318 | } // namespace IECorePython |
no test coverage detected