14 py::class_<InspectorsImpl, std::shared_ptr<InspectorsImpl>> pyInspectorsImpl(p_module,
"InspectorsImpl");
17 py::class_<NullInspector, std::shared_ptr<NullInspector>,
Inspector>(pyInspectorsImpl,
"NullInspector",
"Clearer name when no inspector is required")
18 .def(py::init<>(),
"This constructor is not required. It make the attribute className == \"NullInspector\" instead of 'unknown'")
19 .def_static(
"description", &NullInspector::description);
22 py::class_<PerformanceInspector, std::shared_ptr<PerformanceInspector>,
Inspector>(pyInspectorsImpl,
"PerformanceInspector")
23 .def(py::init<const std::string&, const ParametersDoc, const Parameters&>(), py::arg(
"className"), py::arg(
"paramsDoc"), py::arg(
"params"))
24 .def(py::init<const Parameters&>(), py::arg(
"params"))
25 .def_static(
"description", &PerformanceInspector::description)
26 .def_static(
"availableParameters", &PerformanceInspector::availableParameters)
27 .def_readonly(
"baseFileName", &PerformanceInspector::baseFileName)
28 .def_readonly(
"bDumpPerfOnExit", &PerformanceInspector::bDumpPerfOnExit)
29 .def_readonly(
"bDumpStats", &PerformanceInspector::bDumpStats)
30 .def(
"addStat", &PerformanceInspector::addStat).def(
"dumpStats", [](PerformanceInspector&
self)
32 std::ostringstream oss;
35 }).def(
"dumpStatsHeader", [](PerformanceInspector&
self)
37 std::ostringstream oss;
38 self.dumpStatsHeader(oss);
43 py::class_<AbstractVTKInspector, std::shared_ptr<AbstractVTKInspector>, PerformanceInspector>(pyInspectorsImpl,
"AbstractVTKInspector")
44 .def(
"init", &AbstractVTKInspector::init)
45 .def(
"dumpDataPoints", (
void (AbstractVTKInspector::*)(
const DataPoints&,
const std::string&)) &AbstractVTKInspector::dumpDataPoints, py::arg(
"cloud"), py::arg(
"name"))
46 .def(
"dumpMeshNodes", (
void (AbstractVTKInspector::*)(
const DataPoints&,
const std::string&)) &AbstractVTKInspector::dumpMeshNodes, py::arg(
"cloud"), py::arg(
"name"))
47 .def(
"dumpIteration", &AbstractVTKInspector::dumpIteration)
48 .def(
"finish", &AbstractVTKInspector::finish);
51 py::class_<VTKFileInspector, std::shared_ptr<VTKFileInspector>, AbstractVTKInspector>(pyInspectorsImpl,
"VTKFileInspector")
52 .def_static(
"description", &VTKFileInspector::description)
53 .def_static(
"availableParameters", &VTKFileInspector::availableParameters)
55 .def_readonly(
"baseFileName", &VTKFileInspector::baseFileName)
56 .def_readonly(
"bDumpIterationInfo", &VTKFileInspector::bDumpIterationInfo)
57 .def_readonly(
"bDumpDataLinks", &VTKFileInspector::bDumpDataLinks)
58 .def_readonly(
"bDumpReading", &VTKFileInspector::bDumpReading)
59 .def_readonly(
"bDumpReference", &VTKFileInspector::bDumpReference)
61 .def(py::init<const Parameters&>(), py::arg(
"params") =
Parameters())
63 .def(
"init", &VTKFileInspector::init).def(
"finish", &VTKFileInspector::finish);