26 #include "importer.hpp"
27 #include "importer_internal.hpp"
35 const std::string& compiler,
37 if (compiler==
"none") {
39 }
else if (compiler==
"dll") {
44 (*this)->construct(opts);
72 return (*this)->plugin_name();
76 return (*this)->has_function(symname);
80 return (*this)->get_function(symname);
84 return (*this)->has_meta(cmd, ind);
88 return (*this)->get_meta(cmd, ind);
92 return (*this)->inlined(symname);
96 return (*this)->body(symname);
100 return (*this)->library();
104 return (*this)->serialize(s);
Helper class for Serialization.
Dynamically linked library.
void own(SharedObjectInternal *node)
SharedObjectInternal * operator->() const
Access a member function or object.
void construct(const Dict &opts)
Construct.
static ImporterInternal * deserialize(DeserializingStream &s)
std::string library() const
Get library name.
static bool test_cast(const SharedObjectInternal *ptr)
Check if a particular cast is allowed.
std::string body(const std::string &symname) const
Get the function body, if inlined.
static bool has_plugin(const std::string &name)
Check if a plugin is available.
void serialize(SerializingStream &s) const
Serialize an object.
static Importer deserialize(DeserializingStream &s)
Deserialize with type disambiguation.
Importer()
Default constructor.
static void load_plugin(const std::string &name)
Explicitly load a plugin dynamically.
bool has_meta(const std::string &cmd, casadi_int ind=-1) const
Does a meta entry exist?
static std::string doc(const std::string &name)
Get solver specific documentation.
std::string get_meta(const std::string &cmd, casadi_int ind=-1) const
Get entry as a text.
ImporterInternal * operator->()
Access functions of the node.
bool has_function(const std::string &symname) const
static Importer create(ImporterInternal *node)
Create from node.
std::string plugin_name() const
Query plugin name.
bool inlined(const std::string &symname) const
Check if a function is inlined.
signal_t get_function(const std::string &symname)
Get a function pointer for numerical evaluation.
static bool has_plugin(const std::string &pname, bool verbose=false)
Check if a plugin is available or can be loaded.
static Plugin & getPlugin(const std::string &pname)
Load and get the creator function.
static Plugin load_plugin(const std::string &pname, bool register_plugin=true, bool needs_lock=true)
Load a plugin dynamically.
Helper class for Serialization.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
void(* signal_t)(void)
Function pointer types for the C API.