26 #ifndef CASADI_GRAPH_MODEL_INTERNAL_HPP
27 #define CASADI_GRAPH_MODEL_INTERNAL_HPP
29 #include "graph_model_impl.hpp"
30 #include "function_internal.hpp"
31 #include "plugin_interface.hpp"
37 class GraphBuilderInternal;
54 std::string
class_name()
const override {
return "GraphModelInternal"; }
55 void disp(std::ostream& stream,
bool more)
const override;
72 void construct(
const Dict& opts);
77 virtual void init(
const Dict& opts);
84 const std::string& name) = 0;
90 const std::vector<uint8_t>&
model_data()
const {
return model_data_; }
98 #ifdef CASADI_WITH_THREADSAFE_SYMBOLICS
99 static std::mutex mutex_solvers_;
Internal class for GraphBuilder.
Base interface for format-specific graph-model backends.
virtual const Options & get_options() const
Options.
static const Options options_
Options.
std::string class_name() const override
Readable name of the internal class.
virtual std::vector< uint8_t > export_symbolic(const Function &f, const Dict &opts)=0
Serialize a CasADi Function as model bytes (symbolic export; mutates the backend's engine)
virtual void fill_metadata(GraphBuilderInternal &gb) const =0
Populate a builder's Node metadata from the parsed model.
const std::vector< uint8_t > & model_data() const
Raw model bytes.
static std::string shortname()
Short name.
static const std::string infix_
Infix used to form plugin registration symbols (casadi_register_graphmodel_<name>)
const char * plugin_name() const override=0
Query plugin name.
bool verbose_
Verbose – for debugging.
std::vector< uint8_t > model_data_
Raw model bytes (empty when constructed for export only)
static std::map< std::string, Plugin > solvers_
Collection of available format plugins.
virtual Function import_symbolic(const GraphBuilderInternal &gb, const std::string &name)=0
Rebuild the graph as a CasADi Function (symbolic import; mutates the backend's engine)
Interface for accessing input and output data structures.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
No statically-exposed plugin functions.
Options metadata for a class.