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