Lines Matching refs:Pet
53 class Pet { in TEST_SUBMODULE() class
55 Pet(const std::string &name, const std::string &species) in TEST_SUBMODULE() function in TEST_SUBMODULE::Pet
64 class Dog : public Pet { in TEST_SUBMODULE()
66 Dog(const std::string &name) : Pet(name, "dog") {} in TEST_SUBMODULE()
70 class Rabbit : public Pet { in TEST_SUBMODULE()
72 Rabbit(const std::string &name) : Pet(name, "parrot") {} in TEST_SUBMODULE()
75 class Hamster : public Pet { in TEST_SUBMODULE()
77 Hamster(const std::string &name) : Pet(name, "rodent") {} in TEST_SUBMODULE()
80 class Chimera : public Pet { in TEST_SUBMODULE()
81 Chimera() : Pet("Kimmy", "chimera") {} in TEST_SUBMODULE()
84 py::class_<Pet> pet_class(m, "Pet"); in TEST_SUBMODULE()
87 .def("name", &Pet::name) in TEST_SUBMODULE()
88 .def("species", &Pet::species); in TEST_SUBMODULE()
95 py::class_<Rabbit, Pet>(m, "Rabbit") in TEST_SUBMODULE()
99 py::class_<Hamster, Pet>(m, "Hamster") in TEST_SUBMODULE()
103 py::class_<Chimera, Pet>(m, "Chimera"); in TEST_SUBMODULE()
105 m.def("pet_name_species", [](const Pet &pet) { return pet.name() + " is a " + pet.species(); }); in TEST_SUBMODULE()
136 py::isinstance<Pet>(l[2]), in TEST_SUBMODULE()
137 py::isinstance<Pet>(l[3]), in TEST_SUBMODULE()