Mantid
Loading...
Searching...
No Matches
Citation.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
9
10#include <boost/python/class.hpp>
11#include <boost/python/copy_const_reference.hpp>
12#include <boost/python/operators.hpp>
13#include <boost/python/overloads.hpp>
14
15using namespace Mantid::API;
16using namespace boost::python;
17
19 using return_copy = return_value_policy<copy_const_reference>;
20
21 class_<Citation, boost::noncopyable>("Citation",
22 init<optional<const std::string &, const std::string &, const std::string &,
23 const std::string &, const std::string &>>())
24 .def(init<NeXus::File *, const std::string &>())
25 .def("description", &Citation::description, arg("self"), return_copy(),
26 "Returns the description on the citation object")
27 .def("url", &Citation::url, arg("self"), return_copy(), "Returns the url on the citation object")
28 .def("doi", &Citation::doi, arg("self"), return_copy(), "Returns the doi on the citation object")
29 .def("bibtex", &Citation::bibtex, arg("self"), return_copy(),
30 "Returns the bibtex formatted citation from the citation object")
31 .def("endnote", &Citation::endnote, arg("self"), return_copy(),
32 "Returns the endnote formatted citation from the citation object")
33 .def("saveNexus", &Citation::saveNexus, (arg("self"), arg("file"), arg("group")), return_copy(),
34 "Save data from this object to a NeXus file")
35 .def("__eq__", &Citation::operator==);
36}
void export_Citation()
Definition: Citation.cpp:18
const std::string & endnote() const
Definition: Citation.cpp:60
const std::string & bibtex() const
Definition: Citation.cpp:59
void saveNexus(::NeXus::File *file, const std::string &group)
Definition: Citation.cpp:72
const std::string & doi() const
Definition: Citation.cpp:58
const std::string & url() const
Definition: Citation.cpp:57
const std::string & description() const
Definition: Citation.cpp:56