26 #ifndef CASADI_OPTIONS_HPP
27 #define CASADI_OPTIONS_HPP
29 #include "generic_type.hpp"
41 struct CASADI_EXPORT Options {
43 std::vector<const Options*> bases;
48 std::string description;
51 void disp(
const std::string& name, std::ostream &stream)
const;
55 std::map<std::string, Entry> entries;
58 const Options::Entry* find(
const std::string& name)
const;
61 std::vector<std::string> all()
const;
64 std::string type(
const std::string& name)
const;
67 std::string info(
const std::string& name)
const;
70 void disp(std::ostream& stream)
const;
75 static double word_distance(
const std::string &a,
const std::string &b);
80 std::vector<std::string> suggestions(
const std::string& word, casadi_int amount=5)
const;
85 void best_matches(
const std::string& word,
86 std::vector<std::pair<double, std::string> >& best)
const;
89 static bool has_dot(
const Dict& opts);
92 static bool has_null(
const Dict& opts);
95 static bool is_sane(
const Dict& opts);
98 static Dict sanitize(
const Dict& opts);
101 void check(
const Dict& opts)
const;
106 void print_all(std::ostream &stream)
const;
111 void print_one(
const std::string &name, std::ostream &stream)
const;
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.