LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::xml Namespace Reference

Classes

struct  Element

Functions

std::unique_ptr< Elementparse (const std::string &text)
 Parse a whole XML document and return its root element.
std::unique_ptr< Elementparse_file (const std::string &path)
 Read and parse a file.
std::unique_ptr< Elementelement (const std::string &tag)
 A fresh detached element, the createElement of the write side.
std::string serialize (const Element &root)
 Serialize a document: the XML declaration MATLAB's xmlwrite emits, then the root subtree.
void write_file (const std::string &path, const Element &root)
 Serialize to a file, creating or truncating it.

Function Documentation

◆ element()

std::unique_ptr< Element > line::xml::element ( const std::string & tag)
inline

A fresh detached element, the createElement of the write side.

Definition at line 299 of file xml.h.

References element().

Referenced by element(), and line::io::JmtWriter< T >::write_jsim().

◆ parse()

std::unique_ptr< Element > line::xml::parse ( const std::string & text)
inline

Parse a whole XML document and return its root element.

Definition at line 184 of file xml.h.

References line::xml::Element::attrs, line::InputError::InputError(), line::xml::Element::name, line::xml::Element::parent, and parse().

Referenced by parse(), and parse_file().

◆ parse_file()

std::unique_ptr< Element > line::xml::parse_file ( const std::string & path)
inline

◆ serialize()

std::string line::xml::serialize ( const Element & root)
inline

Serialize a document: the XML declaration MATLAB's xmlwrite emits, then the root subtree.

Definition at line 369 of file xml.h.

References serialize().

Referenced by serialize(), write_file(), and line::io::JmtWriter< T >::write_jsim().

◆ write_file()

void line::xml::write_file ( const std::string & path,
const Element & root )
inline

Serialize to a file, creating or truncating it.

Definition at line 376 of file xml.h.

References line::InputError::InputError(), serialize(), and write_file().

Referenced by write_file(), and line::lqn::write_lqnx().