Psi4
liboptions_python.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  *
25  * @END LICENSE
26  */
27 
28 #ifndef _psi_src_lib_liboptions_python_h
29 #define _psi_src_lib_liboptions_python_h
30 
31 #include "psi4/pybind11.h"
32 
33 namespace psi {
34 
35 class PythonDataType : public DataType
36 {
37  py::object python_object_;
38 public:
40  PythonDataType(const py::object& p);
41  virtual ~PythonDataType();
42 
43  virtual std::string type() const;
44 
45  const py::object& to_python() const;
46 #ifdef __clang__
47 #pragma clang diagnostic push
48 #pragma clang diagnostic ignored "-Woverloaded-virtual"
49 #endif
50  void assign(const py::object& p);
51 #ifdef __clang__
52 #pragma clang diagnostic pop
53 #endif
54 };
55 
56 }
57 
58 #endif // _psi_src_lib_liboptions_python_h
py::object python_object_
Definition: liboptions_python.h:37
Definition: liboptions_python.h:35
PythonDataType()
Definition: python.cc:69
virtual std::string type() const
Definition: python.cc:81
Definition: liboptions.h:78
void assign(const py::object &p)
Definition: python.cc:85
virtual ~PythonDataType()
Definition: python.cc:78
const py::object & to_python() const
Definition: python.cc:91