Some "global" variables needed all over the place. More...
#include <mim/driver.h>
Classes | |
| class | Imports |
Public Member Functions | |
Construction | |
| Driver (std::string name) | |
| Driver () | |
| Driver (const Driver &)=delete | |
| Driver (Driver &&)=delete | |
| Driver & | operator= (Driver)=delete |
Getters | |
| Flags & | flags () |
| const Flags & | flags () const |
| Log & | log () const |
| World & | world () |
| const Version & | version () const |
| MimIR Version. | |
Manage Search Paths | |
Search paths for plugins are in the following order:
| |
| const auto & | search_paths () const |
| void | add_search_path (fs::path path) |
Manage Imports | |
This tracks:
| |
| const Imports & | imports () const |
| Imports & | imports () |
Load Plugin | |
Finds and loads a shared object file that implements the MimIR Plugin If name is an absolute path to a .so/.dll file, this is used. Otherwise, "name", "libmim_name.so" (Linux, Mac), "mim_name.dll" (Win) are searched for in Driver::search_paths(). | |
| void | load (Sym name) |
| void | load (const std::string &name) |
| bool | is_loaded (Sym sym) const |
| void * | get_fun_ptr (Sym plugin, const char *name) |
| template<class F> | |
| auto | get_fun_ptr (Sym plugin, const char *name) |
| template<class F> | |
| auto | get_fun_ptr (const char *plugin, const char *name) |
Manage Plugins | |
All these lookups yield nullptr if the key has not been found. | |
| auto | stage (flags_t flags) |
| const auto & | stages () const |
| auto | normalizer (flags_t flags) const |
| auto | normalizer (plugin_t d, tag_t t, sub_t s) const |
Some "global" variables needed all over the place.
Well, there are not really global - that's the point of this class.
| mim::Driver::Driver | ( | std::string | name | ) |
Definition at line 47 of file driver.cpp.
References add_search_path(), MIM_INSTALL_PREFIX, MIM_LIBDIR, MIM_VERSION, mim::sys::path_to_libmim(), and search_paths().
Referenced by Driver(), Driver(), Driver(), mim::Driver::Imports::Imports(), and operator=().
|
delete |
References Driver().
|
delete |
References Driver().
|
inline |
|
inline |
Definition at line 34 of file driver.h.
Referenced by mim::World::flags(), load(), mim::ast::load_plugins(), main(), normalizer(), and stage().
|
inline |
Definition at line 112 of file driver.h.
References get_fun_ptr().
|
inline |
Definition at line 107 of file driver.h.
References get_fun_ptr().
| void * mim::Driver::get_fun_ptr | ( | Sym | plugin, |
| const char * | name ) |
Definition at line 122 of file driver.cpp.
References mim::dl::get(), and mim::lookup().
Referenced by get_fun_ptr(), and get_fun_ptr().
|
inline |
|
inline |
| void mim::Driver::load | ( | Sym | name | ) |
Definition at line 76 of file driver.cpp.
References mim::assert_emplace(), mim::dl::close(), mim::error(), mim::dl::extension, flags(), mim::dl::get(), ILOG, is_loaded(), mim::mim_get_plugin(), mim::dl::open(), search_paths(), version(), and WLOG.
Referenced by mim::ast::Parser::import().
|
inline |
Definition at line 36 of file driver.h.
Referenced by mim::World::log(), and main().
|
inline |
Definition at line 122 of file driver.h.
References flags(), and mim::lookup().
Definition at line 123 of file driver.h.
References mim::Annex::flags(), and normalizer().
Referenced by normalizer().
|
inline |
|
inline |
Definition at line 120 of file driver.h.
References flags(), and mim::lookup().
Referenced by mim::optimize(), and mim::Stage::recreate().
|
inline |