XML parser. More...
#include <xml_file.hpp>
Can be used for parsing XML files into CasADi data structures.
Extra doc: https://github.com/casadi/casadi/wiki/L_7k
Definition at line 47 of file xml_file.hpp.
Public Types | |
using | internal_base_type = SharedObjectInternal |
using | base_type = SharedObject |
Public Member Functions | |
XmlFile () | |
XmlFile (const std::string &name) | |
~XmlFile () | |
XmlFileInternal * | operator-> () |
Access functions of the node. More... | |
const XmlFileInternal * | operator-> () const |
Const access functions of the node. More... | |
XmlNode | parse (const std::string &filename) |
void | dump (const std::string &filename, const XmlNode &node) |
std::string | class_name () const |
Get class name. More... | |
void | disp (std::ostream &stream, bool more=false) const |
Print a description of the object. More... | |
std::string | get_str (bool more=false) const |
Get string representation. More... | |
void | print_ptr (std::ostream &stream=casadi::uout()) const |
void | own (SharedObjectInternal *node) |
void | assign (SharedObjectInternal *node) |
Assign the node to a node class pointer without reference counting. More... | |
SharedObjectInternal * | get () const |
Get a const pointer to the node. More... | |
casadi_int | getCount () const |
Get the reference count. More... | |
void | swap (GenericShared &other) |
Swap content with another instance. More... | |
std::string | debug_repr () const |
bool | is_null () const |
Is a null pointer? More... | |
casadi_int | __hash__ () const |
Returns a number that is unique for a given Node. More... | |
GenericWeakRef< SharedObject, SharedObjectInternal > * | weak () |
Get a weak reference to the object. More... | |
Static Public Member Functions | |
static std::string | type_name () |
Get type name. More... | |
static void | load_plugin (const std::string &name) |
Load a plugin dynamically. More... | |
static std::string | doc (const std::string &name) |
Get solver specific documentation. More... | |
Protected Member Functions | |
void | count_up () |
void | count_down () |
|
inherited |
Definition at line 103 of file shared_object.hpp.
|
inherited |
Definition at line 102 of file shared_object.hpp.
casadi::XmlFile::XmlFile | ( | ) |
Definition at line 30 of file xml_file.cpp.
casadi::XmlFile::XmlFile | ( | const std::string & | name | ) |
Definition at line 33 of file xml_file.cpp.
References casadi::PluginInterface< XmlFileInternal >::getPlugin(), and casadi::GenericShared< SharedObject, SharedObjectInternal >::own().
casadi::XmlFile::~XmlFile | ( | ) |
Definition at line 37 of file xml_file.cpp.
|
inherited |
If the Object does not point to any node, "0" is returned.
Extra doc: https://github.com/casadi/casadi/wiki/L_av
Definition at line 124 of file generic_shared_impl.hpp.
|
inherited |
improper use will cause memory leaks!
Extra doc: https://github.com/casadi/casadi/wiki/L_at
Definition at line 97 of file generic_shared_impl.hpp.
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_au
Definition at line 31 of file shared_object.cpp.
Referenced by casadi::FmuFunction::check_mem_count(), casadi::MXFunction::export_code_body(), and casadi::BlazingSplineFunction::merge().
|
protectedinherited |
Definition at line 134 of file generic_shared_impl.hpp.
|
protectedinherited |
Definition at line 133 of file generic_shared_impl.hpp.
|
inherited |
Definition at line 113 of file generic_shared_impl.hpp.
|
inherited |
Definition at line 35 of file shared_object.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::is_null().
Referenced by casadi::Nlpsol::disp_more(), and casadi::CsparseInterface::nfact().
|
static |
Definition at line 60 of file xml_file.cpp.
References casadi::PluginInterface< XmlFileInternal >::getPlugin().
void casadi::XmlFile::dump | ( | const std::string & | filename, |
const XmlNode & | node | ||
) |
Definition at line 52 of file xml_file.cpp.
References casadi::filename().
Referenced by casadi::DaeBuilderInternal::generate_build_description(), and casadi::DaeBuilderInternal::generate_model_description().
|
inherited |
Definition at line 100 of file generic_shared_impl.hpp.
|
inlineinherited |
Definition at line 91 of file shared_object.hpp.
|
inherited |
Definition at line 103 of file generic_shared_impl.hpp.
|
inherited |
Definition at line 117 of file generic_shared_impl.hpp.
|
static |
Definition at line 56 of file xml_file.cpp.
References casadi::PluginInterface< XmlFileInternal >::load_plugin().
XmlFileInternal * casadi::XmlFile::operator-> | ( | ) |
Extra doc: https://github.com/casadi/casadi/wiki/L_7m
Definition at line 44 of file xml_file.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::operator->().
const XmlFileInternal * casadi::XmlFile::operator-> | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_7n
Definition at line 40 of file xml_file.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::operator->().
|
inherited |
Assign the node to a node class pointer (or null)
Definition at line 90 of file generic_shared_impl.hpp.
XmlNode casadi::XmlFile::parse | ( | const std::string & | filename | ) |
Definition at line 48 of file xml_file.cpp.
References casadi::filename().
Referenced by casadi::DaeBuilderInternal::load_fmi_description().
|
inherited |
Print the pointer to the internal class
Definition at line 43 of file shared_object.cpp.
References casadi::GenericShared< SharedObject, SharedObjectInternal >::get().
|
inherited |
Definition at line 106 of file generic_shared_impl.hpp.
|
inlinestatic |
Extra doc: https://github.com/casadi/casadi/wiki/L_7l
Definition at line 54 of file xml_file.hpp.
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_aw
Definition at line 131 of file generic_shared_impl.hpp.