1 #include "pybind11/pybind11.h" 2 #include "pybind11/stl.h" 13 py::class_<Citizen, std::shared_ptr<Citizen>>
cls(mod,
"Citizen");
19 py::return_value_policy::reference);
25 py::return_value_policy::reference);
unsigned long memId
Type of the block's ID.
PYBIND11_MODULE(citizen, mod)
void markPersistent(void)
Mark a Citizen as persistent and not destroyed until process end.
static memId setNewCallbackId(memId id)
Call the NewCallback when block is allocated.
A base class for image defects.
std::string repr() const
Return a string representation of a Citizen.
static memId setDeleteCallbackId(memId id)
Call the current DeleteCallback when block is deleted.
memId getId() const
Return the Citizen's ID.
static memId getNextMemId()
Return the memId of the next object to be allocated.
static const std::vector< const Citizen * > * census()
Return a (newly allocated) std::vector of active Citizens sorted by ID.