bibliography.cpp
Go to the documentation of this file.
1 #include "bibliography.h"
2 
3 #include "Bibliography.h"
4 
5 namespace python
6 {
7  namespace pointmatchersupport
8  {
9  void pybindBibliography(py::module& p_module)
10  {
11  py::bind_vector<pms::StringVector>(p_module, "StringVector");
12 
13  py::bind_map<pms::Bibliography>(p_module, "Bibliography")
14  .def("clear", &pms::Bibliography::clear, "Remove all items from D.");
15 
16  py::bind_map<pms::BibIndices>(p_module, "BibIndices")
17  .def("clear", &pms::BibIndices::clear, "Remove all items from D.");
18 
20  py::class_<pms::CurrentBibliography> pyCurrentBibliography(p_module, "CurrentBibliography");
21 
22  using Mode = CurrentBibliography::Mode;
23  py::enum_<Mode>(pyCurrentBibliography, "Mode").value("NORMAL", Mode::NORMAL).value("ROSWIKI", Mode::ROSWIKI)
24  .value("BIBTEX", Mode::BIBTEX);
25 
26  pyCurrentBibliography.def_readwrite("mode", &CurrentBibliography::mode)
27  .def_readwrite("indices", &CurrentBibliography::indices)
28  .def_readwrite("entries", &CurrentBibliography::entries)
29 
30  .def(py::init<Mode>(), py::arg("mode") = Mode::NORMAL).def("dump", [](const CurrentBibliography& self)
31  {
32  std::ostringstream oss;
33  self.dump(oss);
34  py::print(oss.str());
35  });
36 
37  p_module.def("getAndReplaceBibEntries", &pms::getAndReplaceBibEntries, py::arg(""), py::arg("currentBib"));
38  }
39  }
40 }
PointMatcherSupport::CurrentBibliography::Mode
Mode
Definition: Bibliography.h:53
PointMatcherSupport::CurrentBibliography::entries
StringVector entries
Definition: Bibliography.h:60
python::pointmatchersupport::pybindBibliography
void pybindBibliography(py::module &p_module)
Definition: bibliography.cpp:9
PointMatcherSupport::getAndReplaceBibEntries
std::string getAndReplaceBibEntries(const std::string &, CurrentBibliography &curBib)
python
Definition: add_descriptor.cpp:5
CurrentBibliography
PointMatcherSupport::CurrentBibliography CurrentBibliography
Definition: examples/icp.cpp:51
PointMatcherSupport::CurrentBibliography::indices
BibIndices indices
Definition: Bibliography.h:59
Bibliography.h
PointMatcherSupport::CurrentBibliography::mode
enum PointMatcherSupport::CurrentBibliography::Mode mode
PointMatcherSupport::CurrentBibliography
Definition: Bibliography.h:51
bibliography.h


libpointmatcher
Author(s):
autogenerated on Mon Sep 16 2024 02:24:07