80 Code(
string const& c) : string{c} { }
81 Code(
string && c) : string{move(c)}{ }
97 lines.emplace_back(code);
110 :
Code{
"N"+toString(id)}
147 :
Code{
"{ /*"+toString(id)+
"*/ }"}
161 return add(
Code{
"rank="+rankSetting});
187 buff_ << string(indent,
' ');
201 for (
string const& line : sect.
lines)
205 template<
class P,
class...PS>
207 put (
P const& part, PS
const& ...parts)
215 operator string()
const
226 template<
class...COD>
231 script.putLine (
Code{
"digraph {"});
232 script.put (parts...);
233 script.putLine (
Code{
"}"});
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Helper to collect DOT-Graphviz code for output.
void put(Section const §)
void put(P const &part, PS const &...parts)
void put(Code const &code)
void putLine(string line, uint indent=0)
static uint const IDENT_STEP
Code connect(size_t src, size_t dest)
generate a directed node connectivity clause
DotOut digraph(COD ...parts)
Entrance-point: generate a graph spec in DOT-Language.
Implementation namespace for support and library code.
std::string toString(TY const &val) noexcept
get some string representation of any object, reliably.
bool isnil(lib::time::Duration const &dur)
markup to generate a piece of code
generate a Node name or a node_statement defining attributes of that node.
Node && addAttrib(string def)
Node && label(string text)
Node && style(Code const &code)
accumulator to collect nodes grouped into a scope
Scope && add(Code const &code)
Scope && rank(string rankSetting)
Accumulator to collect lines of DOT code.
std::vector< string > lines
Section && operator+=(Code const &code)
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...