Dynamically linked library. More...
#include <importer_internal.hpp>
Extra doc: https://github.com/casadi/casadi/wiki/L_21i
Definition at line 187 of file importer_internal.hpp.
Public Types | |
typedef ImporterInternal *(* | Creator) (const std::string &name) |
using | weak_ref_type = WeakRefInternal |
typedef int(* | RegFcn) (Plugin *plugin) |
Public Member Functions | |
DllLibrary (const std::string &bin_name) | |
void | finalize () override |
void | init_handle () |
~DllLibrary () override | |
std::string | class_name () const override |
Get type name. More... | |
signal_t | get_function (const std::string &symname) override |
Get a function pointer for numerical evaluation. More... | |
std::string | library () const override |
Get library name. More... | |
bool | can_have_meta () const override |
Can meta information be read? More... | |
void | disp (std::ostream &stream, bool more) const override |
Print. More... | |
void | construct (const Dict &opts) |
Construct. More... | |
virtual void | init (const Dict &opts) |
Initialize. More... | |
const char * | plugin_name () const override |
Queery plugin name. More... | |
bool | has_function (const std::string &symname) const |
Get a function pointer for numerical evaluation. More... | |
bool | has_meta (const std::string &cmd, casadi_int ind=-1) const |
Does an entry exist? More... | |
std::string | get_meta (const std::string &cmd, casadi_int ind=-1) const |
Get entry as a text. More... | |
void | read_meta (std::istream &file, casadi_int &offset) |
Get meta information. More... | |
void | read_external (const std::string &sym, bool inlined, std::istream &file, casadi_int &offset) |
Get an external function declaration. More... | |
bool | inlined (const std::string &symname) const |
std::string | body (const std::string &symname) const |
Get the function body, if inlined. More... | |
std::string | to_text (const std::string &cmd, casadi_int ind=-1) const |
Get entry as a text. More... | |
void | serialize (SerializingStream &s) const |
virtual void | serialize_type (SerializingStream &s) const |
virtual void | serialize_body (SerializingStream &s) const |
casadi_int | getCount () const |
Get the reference count. More... | |
std::string | debug_repr (const SharedObjectInternal *) const |
GenericWeakRef< SharedObject, SharedObjectInternal > * | weak () |
Get a weak reference to the object. More... | |
Static Public Member Functions | |
static ImporterInternal * | deserialize (DeserializingStream &s) |
static std::string | shortname () |
Short name. More... | |
static std::string | indexed (const std::string &cmd, casadi_int ind) |
static bool | has_plugin (const std::string &pname, bool verbose=false) |
Check if a plugin is available or can be loaded. More... | |
static const Options & | plugin_options (const std::string &pname) |
Get the plugin options. More... | |
static Deserialize | plugin_deserialize (const std::string &pname) |
Get the plugin deserialize_map. More... | |
static Plugin | pluginFromRegFcn (RegFcn regfcn) |
Instantiate a Plugin struct from a factory function. More... | |
static Plugin | load_plugin (const std::string &pname, bool register_plugin=true, bool needs_lock=true) |
Load a plugin dynamically. More... | |
static handle_t | load_library (const std::string &libname, std::string &resultpath, bool global) |
Load a library dynamically. More... | |
static void | registerPlugin (const Plugin &plugin, bool needs_lock=true) |
Register an integrator in the factory. More... | |
static void | registerPlugin (RegFcn regfcn, bool needs_lock=true) |
Register an integrator in the factory. More... | |
static Plugin & | getPlugin (const std::string &pname) |
Load and get the creator function. More... | |
static ImporterInternal * | instantiate (const std::string &fname, const std::string &pname, Problem problem) |
Public Attributes | |
std::string | name_ |
C filename. More... | |
std::map< std::string, std::pair< casadi_int, std::string > > | meta_ |
Meta data. More... | |
std::map< std::string, std::pair< bool, std::string > > | external_ |
External functions. More... | |
bool | verbose_ |
Verbose – for debugging purposes. More... | |
Static Public Attributes | |
static std::map< std::string, Plugin > | solvers_ |
Collection of solvers. More... | |
static const std::string | infix_ = "importer" |
Infix. More... | |
Protected Member Functions | |
DllLibrary (DeserializingStream &s) | |
void | initSingleton () |
void | destroySingleton () |
B | shared_from_this () |
Get a shared object from the current internal object. More... | |
const B | shared_from_this () const |
Get a shared object from the current internal object. More... | |
virtual const Options & | get_options () const |
Options. More... | |
static const Options | options_ |
Options. More... | |
|
inherited |
Definition at line 66 of file importer_internal.hpp.
|
inherited |
Definition at line 73 of file plugin_interface.hpp.
|
inherited |
Definition at line 152 of file shared_object.hpp.
|
explicit |
Definition at line 222 of file importer_internal.cpp.
Referenced by deserialize().
|
override |
Definition at line 255 of file importer_internal.cpp.
|
inlineexplicitprotected |
Definition at line 225 of file importer_internal.hpp.
|
inherited |
Definition at line 299 of file importer_internal.cpp.
References casadi::ImporterInternal::external_.
|
inlineoverridevirtual |
Reimplemented from casadi::ImporterInternal.
Definition at line 220 of file importer_internal.hpp.
|
inlineoverridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_21j
Reimplemented from casadi::ImporterInternal.
Definition at line 211 of file importer_internal.hpp.
|
inherited |
Prepares the function for evaluation
Extra doc: https://github.com/casadi/casadi/wiki/L_21b
Definition at line 57 of file importer_internal.cpp.
References casadi::Options::check(), casadi::ImporterInternal::finalize(), casadi::ImporterInternal::get_options(), casadi::ImporterInternal::init(), casadi::Options::is_sane(), and casadi::Options::sanitize().
Referenced by casadi::Importer::create().
|
inherited |
Definition at line 62 of file generic_shared_internal.hpp.
|
static |
Definition at line 342 of file importer_internal.cpp.
References DllLibrary(), and finalize().
Referenced by casadi::ImporterInternal::deserialize().
|
inlineprotectedinherited |
Called in the destructor of singletons
Definition at line 77 of file generic_shared_internal.hpp.
|
overridevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_21a
Implements casadi::SharedObjectInternal.
Definition at line 38 of file importer_internal.cpp.
|
overridevirtual |
Reimplemented from casadi::ImporterInternal.
Definition at line 251 of file importer_internal.cpp.
References init_handle().
Referenced by deserialize().
|
overridevirtual |
Reimplemented from casadi::ImporterInternal.
Definition at line 261 of file importer_internal.cpp.
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_21f
Definition at line 283 of file importer_internal.cpp.
References casadi::ImporterInternal::has_meta(), casadi::ImporterInternal::indexed(), and casadi::ImporterInternal::meta_.
|
inlinevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_21c
Reimplemented in casadi::ShellCompiler, and casadi::ClangCompiler.
Definition at line 80 of file importer_internal.hpp.
Referenced by casadi::ImporterInternal::construct().
|
inherited |
Definition at line 60 of file generic_shared_internal.hpp.
|
staticinherited |
Definition at line 102 of file plugin_interface.hpp.
|
inherited |
Definition at line 214 of file importer_internal.cpp.
References casadi::ImporterInternal::external_, and casadi::ImporterInternal::get_function().
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_21e
Definition at line 289 of file importer_internal.cpp.
References casadi::ImporterInternal::indexed(), and casadi::ImporterInternal::meta_.
Referenced by casadi::ImporterInternal::get_meta().
|
staticinherited |
Definition at line 76 of file plugin_interface.hpp.
|
inlinestaticinherited |
Convert indexed command
Definition at line 150 of file importer_internal.hpp.
Referenced by casadi::ImporterInternal::get_meta(), and casadi::ImporterInternal::has_meta().
|
virtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_21d
Reimplemented in casadi::ShellCompiler, and casadi::ClangCompiler.
Definition at line 74 of file importer_internal.cpp.
References casadi::ImporterInternal::can_have_meta(), casadi::ImporterInternal::inlined(), casadi::ImporterInternal::name_, casadi::ImporterInternal::read_external(), casadi::ImporterInternal::read_meta(), and casadi::ImporterInternal::verbose_.
Referenced by casadi::ImporterInternal::construct(), casadi::ClangCompiler::init(), and casadi::ShellCompiler::init().
void casadi::DllLibrary::init_handle | ( | ) |
Definition at line 227 of file importer_internal.cpp.
References casadi::get_search_paths(), casadi::Filesystem::has_parent_path(), casadi::Filesystem::is_enabled(), casadi::ImporterInternal::name_, casadi::Filesystem::parent_path(), and casadi::path().
Referenced by finalize().
|
inlineprotectedinherited |
Called in the constructor of singletons to avoid that the counter reaches zero
Definition at line 71 of file generic_shared_internal.hpp.
|
inherited |
Definition at line 294 of file importer_internal.cpp.
References casadi::ImporterInternal::external_.
Referenced by casadi::ImporterInternal::init(), and casadi::ImporterInternal::read_external().
|
staticinherited |
Definition at line 106 of file plugin_interface.hpp.
|
overridevirtual |
Reimplemented from casadi::ImporterInternal.
Definition at line 348 of file importer_internal.cpp.
References casadi::ImporterInternal::name_.
|
staticinherited |
Definition at line 92 of file plugin_interface.hpp.
|
staticinherited |
Definition at line 88 of file plugin_interface.hpp.
|
staticinherited |
Definition at line 82 of file plugin_interface.hpp.
|
inlineoverridevirtualinherited |
Implements casadi::PluginInterface< ImporterInternal >.
Reimplemented in casadi::ShellCompiler, and casadi::ClangCompiler.
Definition at line 107 of file importer_internal.hpp.
|
staticinherited |
Definition at line 79 of file plugin_interface.hpp.
|
staticinherited |
Definition at line 85 of file plugin_interface.hpp.
|
inherited |
Definition at line 179 of file importer_internal.cpp.
References casadi::ImporterInternal::external_, and casadi::ImporterInternal::inlined().
Referenced by casadi::ImporterInternal::init().
|
inherited |
Definition at line 132 of file importer_internal.cpp.
References casadi::ImporterInternal::meta_.
Referenced by casadi::ImporterInternal::init().
|
staticinherited |
Definition at line 96 of file plugin_interface.hpp.
|
staticinherited |
Definition at line 99 of file plugin_interface.hpp.
|
inherited |
Definition at line 309 of file importer_internal.cpp.
References casadi::ImporterInternal::serialize_body(), and casadi::ImporterInternal::serialize_type().
|
virtualinherited |
Definition at line 318 of file importer_internal.cpp.
References casadi::ImporterInternal::external_, casadi::ImporterInternal::meta_, casadi::ImporterInternal::name_, casadi::SerializingStream::pack(), and casadi::SerializingStream::version().
Referenced by casadi::ImporterInternal::serialize().
|
virtualinherited |
Definition at line 314 of file importer_internal.cpp.
References casadi::ImporterInternal::class_name(), and casadi::SerializingStream::pack().
Referenced by casadi::ImporterInternal::serialize().
|
inlineprotectedinherited |
Definition at line 83 of file generic_shared_internal.hpp.
|
inlineprotectedinherited |
Definition at line 92 of file generic_shared_internal.hpp.
|
inlinestaticinherited |
Definition at line 104 of file importer_internal.hpp.
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_21g
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_1ai
Definition at line 67 of file generic_shared_internal.hpp.
|
inherited |
Definition at line 163 of file importer_internal.hpp.
Referenced by casadi::ImporterInternal::body(), casadi::ImporterInternal::has_function(), casadi::ImporterInternal::ImporterInternal(), casadi::ImporterInternal::inlined(), casadi::ImporterInternal::read_external(), and casadi::ImporterInternal::serialize_body().
|
staticinherited |
Definition at line 101 of file importer_internal.hpp.
|
inherited |
Definition at line 160 of file importer_internal.hpp.
Referenced by casadi::ImporterInternal::get_meta(), casadi::ImporterInternal::has_meta(), casadi::ImporterInternal::ImporterInternal(), casadi::ImporterInternal::read_meta(), and casadi::ImporterInternal::serialize_body().
|
inherited |
Definition at line 157 of file importer_internal.hpp.
Referenced by casadi::ImporterInternal::ImporterInternal(), casadi::ImporterInternal::init(), casadi::ClangCompiler::init(), casadi::ShellCompiler::init(), init_handle(), library(), and casadi::ImporterInternal::serialize_body().
|
staticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_21c
Definition at line 79 of file importer_internal.hpp.
|
staticinherited |
Definition at line 94 of file importer_internal.hpp.
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_21h
Definition at line 168 of file importer_internal.hpp.
Referenced by casadi::ImporterInternal::ImporterInternal(), casadi::ImporterInternal::init(), and casadi::ShellCompiler::init().