![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Classes | |
| struct | CallRow |
| struct | Element |
| struct | TaskRef |
Functions | |
| UnsupportedError | unsup (const std::string &msg) |
| InputError | xerr (const std::string &msg) |
| const std::string * | get (const Element *el, const std::string &key) |
| el.get(key), with Python's None as a null pointer. | |
| std::string | get (const Element *el, const std::string &key, const std::string &dflt) |
| el.get(key, dflt). | |
| std::string | show (const Element *el, const std::string &key) |
| 's' % el.get(key): None prints as "None". | |
| std::string | lower (std::string s) |
| std::string | upper (std::string s) |
| bool | starts_with (const std::string &s, const char *p) |
| void | utf8 (std::string &out, unsigned long cp) |
| std::string | normalize_attr (const std::string &v) |
| An attribute value as expat delivers it: literal tab, CR and LF become spaces (a CR LF pair one space), and &#n; / &#xh; are expanded afterwards. | |
| void | normalize_tree (Element *el) |
| bool | is_output_tag (const std::string &tag) |
| Output requests: read and dropped, as the reader drops H, R and observations. | |
| std::vector< const Element * > | kids (const Element *el) |
| Model children of el: results and output requests are skipped. | |
| const Element * | find (const Element *el, const std::string &tag) |
| el.find(tag): the first direct child with that tag, or null. | |
| std::vector< const Element * > | findall (const Element *el, const std::string &tag) |
| bool | in (const std::string &s, std::initializer_list< const char * > set) |
| void | check (const Element *el, std::initializer_list< const char * > allowed, std::initializer_list< const char * > kidtags={}) |
| bool | py_float (const std::string &text, double &x) |
| Python's float(text): surrounding whitespace, underscores between digits, inf/nan. | |
| const std::string * | num (const Element *el, const std::string &key, std::string &buf, const char *dflt=NULL) |
| _num: the attribute as format_number(float(text)), or dflt (null = None) when absent. | |
| std::string | numd (const Element *el, const std::string &key, const char *dflt) |
| _num with a default, which never returns None. | |
| bool | srvn_name_ok (const std::string &nm) |
| [A-Za-z_][A-Za-z0-9_]+$ under re.match, where $ also matches before a final newline. | |
| std::string | name (const Element *el, const std::string &key="name") |
| std::string | join (const std::vector< std::string > &v, const std::string &sep) |
| void | phase_lists (const std::map< int, const Element * > &acts, std::vector< std::pair< std::string, std::vector< std::string > > > &lines, std::vector< CallRow > &calls) |
| acts maps phase -> <activity>; the E-section lines of one entry's phases. | |
| const char * | proc_letter (const std::string &s) |
| const char * | task_letter (const std::string &s) |
| const char * | rwlock_letter (const std::string &s) |
| const char * | sem_letter (const std::string &s) |
| void | activity_section (const Element *t, const Element *ta, std::vector< std::string > &out) |
| One task's A section, appended to out. | |
|
inline |
One task's A section, appended to out.
Definition at line 403 of file srvn_writer.h.
References activity_section(), check(), findall(), get(), in(), join(), kids(), LINE_SRVN_ACT_ATTRS, name(), line::xml::Element::name, num(), numd(), show(), starts_with(), unsup(), upper(), and xerr().
Referenced by activity_section().
|
inline |
Definition at line 188 of file srvn_writer.h.
References check().
Referenced by activity_section(), and check().
el.find(tag): the first direct child with that tag, or null.
Definition at line 172 of file srvn_writer.h.
References line::xml::Element::children, and find().
Referenced by find().
|
inline |
Definition at line 178 of file srvn_writer.h.
References line::xml::Element::child_tags(), and findall().
Referenced by activity_section(), and findall().
|
inline |
el.get(key), with Python's None as a null pointer.
Definition at line 62 of file srvn_writer.h.
References line::xml::Element::attrs, and get().
Referenced by activity_section(), get(), get(), name(), num(), phase_lists(), and show().
|
inline |
|
inline |
Definition at line 182 of file srvn_writer.h.
References in().
Referenced by activity_section(), and in().
|
inline |
Output requests: read and dropped, as the reader drops H, R and observations.
Definition at line 158 of file srvn_writer.h.
References is_output_tag(), and starts_with().
Referenced by is_output_tag(), and kids().
|
inline |
Definition at line 295 of file srvn_writer.h.
References join().
Referenced by activity_section(), and join().
Model children of el: results and output requests are skipped.
Definition at line 164 of file srvn_writer.h.
References line::xml::Element::children, is_output_tag(), and kids().
Referenced by activity_section(), kids(), and phase_lists().
|
inline |
Definition at line 80 of file srvn_writer.h.
References lower().
Referenced by lower(), and py_float().
|
inline |
Definition at line 285 of file srvn_writer.h.
References get(), name(), line::xml::Element::name, srvn_name_ok(), unsup(), and xerr().
Referenced by activity_section(), line::lqn::lqnx2srvn(), name(), and phase_lists().
|
inline |
An attribute value as expat delivers it: literal tab, CR and LF become spaces (a CR LF pair one space), and &#n; / &#xh; are expanded afterwards.
Definition at line 115 of file srvn_writer.h.
References line::lqn::srvn_detail::is_digit(), normalize_attr(), and utf8().
Referenced by normalize_attr(), and normalize_tree().
|
inline |
Definition at line 152 of file srvn_writer.h.
References line::xml::Element::attrs, line::xml::Element::children, normalize_attr(), and normalize_tree().
Referenced by normalize_tree().
|
inline |
_num: the attribute as format_number(float(text)), or dflt (null = None) when absent.
Definition at line 250 of file srvn_writer.h.
References line::lqn::format_number(), get(), line::xml::Element::name, num(), py_float(), and unsup().
Referenced by activity_section(), num(), numd(), and phase_lists().
|
inline |
_num with a default, which never returns None.
Definition at line 268 of file srvn_writer.h.
Referenced by activity_section(), numd(), and phase_lists().
|
inline |
acts maps phase -> <activity>; the E-section lines of one entry's phases.
Definition at line 307 of file srvn_writer.h.
References get(), kids(), name(), num(), numd(), phase_lists(), show(), unsup(), and upper().
Referenced by phase_lists().
|
inline |
Definition at line 363 of file srvn_writer.h.
References proc_letter().
Referenced by proc_letter().
|
inline |
Python's float(text): surrounding whitespace, underscores between digits, inf/nan.
Definition at line 201 of file srvn_writer.h.
References line::lqn::srvn_detail::is_digit(), line::lqn::srvn_detail::is_space(), lower(), and py_float().
Referenced by num(), and py_float().
|
inline |
Definition at line 379 of file srvn_writer.h.
References rwlock_letter().
Referenced by rwlock_letter().
|
inline |
|
inline |
's' % el.get(key): None prints as "None".
Definition at line 75 of file srvn_writer.h.
Referenced by activity_section(), phase_lists(), and show().
|
inline |
[A-Za-z_][A-Za-z0-9_]+$ under re.match, where $ also matches before a final newline.
Definition at line 274 of file srvn_writer.h.
References line::lqn::srvn_detail::is_digit(), and srvn_name_ok().
Referenced by name(), and srvn_name_ok().
|
inline |
Definition at line 92 of file srvn_writer.h.
References starts_with().
Referenced by activity_section(), is_output_tag(), and starts_with().
|
inline |
Definition at line 371 of file srvn_writer.h.
References task_letter().
Referenced by task_letter().
|
inline |
Definition at line 55 of file srvn_writer.h.
References unsup(), and line::UnsupportedError::UnsupportedError().
Referenced by activity_section(), name(), num(), phase_lists(), and unsup().
|
inline |
Definition at line 86 of file srvn_writer.h.
References upper().
Referenced by activity_section(), phase_lists(), and upper().
|
inline |
Definition at line 94 of file srvn_writer.h.
References utf8().
Referenced by normalize_attr(), and utf8().
|
inline |
Definition at line 59 of file srvn_writer.h.
References line::InputError::InputError(), and xerr().
Referenced by activity_section(), name(), and xerr().