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 file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
29 #ifndef _psi_src_lib_liboptions_python_h
30 #define _psi_src_lib_liboptions_python_h
31 
32 #include "liboptions.h"
33 #include "psi4/pybind11.h"
34 #include "psi4/pragma.h"
35 
36 namespace psi {
37 
38 class PythonDataType : public DataType
39 {
40  py::object python_object_;
41 public:
43  PythonDataType(const py::object& p);
44  virtual ~PythonDataType();
45 
46  virtual std::string type() const;
47 
48  const py::object& to_python() const;
49 
50  PRAGMA_WARNING_PUSH
51  PRAGMA_WARNING_IGNORE_OVERLOADED_VIRTUAL
52  void assign(const py::object& p);
54 };
55 
56 }
57 
58 #endif // _psi_src_lib_liboptions_python_h
py::object python_object_
Definition: liboptions_python.h:40
Definition: liboptions_python.h:38
PythonDataType()
Definition: python.cc:35
PRAGMA_WARNING_PUSH PRAGMA_WARNING_IGNORE_DEPRECATED_DECLARATIONS PRAGMA_WARNING_POP
Definition: integraliter.cc:43
virtual std::string type() const
Definition: python.cc:47
Definition: liboptions.h:76
PRAGMA_WARNING_PUSH PRAGMA_WARNING_IGNORE_OVERLOADED_VIRTUAL void assign(const py::object &p)
Definition: python.cc:51
virtual ~PythonDataType()
Definition: python.cc:44
const py::object & to_python() const
Definition: python.cc:57