Psi4
plugin.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 __psi4_src_lib_libplugin_plugin_h
30 #define __psi4_src_lib_libplugin_plugin_h
31 
32 
34 #include "psi4/psi4-dec.h"
35 #include <string>
36 
37 namespace psi {
38 
39 // Useful typedef's
41 typedef int (*read_options_t)(std::string, Options&);
42 
43 // DEPRECATED but left so that existing plugins will work.
44 #define INIT_PLUGIN
45 
46 // The following lines are used by the PSI4 driver.
47 typedef struct plugin_info_struct
48 {
49  // Uppercased plugin name.
50  std::string name;
51 
52  // File handle to plugin
54 
55  // Used to call the user provided plugin code
57 
58  // Function pointer to the plugin's read_options function
60 } plugin_info;
61 
68 plugin_info plugin_load(std::string& plugin_path);
69 
75 void plugin_close(const plugin_info& plugin);
76 }
77 
78 #endif
SharedWavefunction(* plugin_t)(SharedWavefunction, Options &)
Definition: plugin.h:40
plugin_t plugin
Definition: plugin.h:56
struct psi::plugin_info_struct plugin_info
read_options_t read_options
Definition: plugin.h:59
Definition: plugin.h:47
Definition: liboptions.h:360
std::string name
Definition: plugin.h:50
plugin_info plugin_load(std::string &plugin_path)
Definition: load_plugin.cc:95
std::shared_ptr< Wavefunction > SharedWavefunction
Definition: typedefs.h:52
void plugin_close(const plugin_info &info)
Definition: close_plugin.cc:46
int(* read_options_t)(std::string, Options &)
Definition: plugin.h:41
void * plugin_handle
Definition: plugin.h:53