Lines Matching refs:Dog
244 struct Dog : Pet {
245 Dog(const std::string &name) : Pet(name) { }
260 py::class_<Dog, Pet /* <- specify C++ parent type */>(m, "Dog")
262 .def("bark", &Dog::bark);
265 :class:`class_` object and reference it when binding the ``Dog`` class:
274 py::class_<Dog>(m, "Dog", pet /* <- specify Python parent type */)
276 .def("bark", &Dog::bark);
283 >>> p = example.Dog('Molly')
295 m.def("pet_store", []() { return std::unique_ptr<Pet>(new Dog("Molly")); });
300 >>> type(p) # `Dog` instance behind `Pet` pointer
305 The function returned a ``Dog`` instance, but because it's a non-polymorphic
456 Dog = 0,
477 .value("Dog", Pet::Kind::Dog)
500 {'Dog': Kind.Dog, 'Cat': Kind.Cat}