Skip to content

#631 Construct non-app-framework output

Albert Hofkamp requested to merge 631-add-non-app-fromework-output into develop

While the code seems sufficient for now, there are some higher level things to discuss I think.

  • I opted for splitting the output streams, so you don't have to handle all streams if the code has no use for it. This also allows some interface re-use which is nice.

  • As the split causes the code to have an instance for a particular output stream, the suffix idea dout, out, iout became less useful, and I changed it to

    Old function New function
    warn(">%s<", x) warn.line(">%s<", x);
    iout() out.inc()
    ddbg() dbg.dec()
    dowarn() warn.isEnabled()

    Where warn, out, and dbg represent the output stream object with the new function.

  • I haven't changed the plcgen WarnOutput class yet.

  • Does it make sense to keep the old OutputProvider functions for anything else besides backward compatibility? (that is, should they be marked deprecated?)

  • Should the interface be changed more than the above (now is the time if we want to make more adjustments if so desired).

    • Not sure where I did it, but one time I add a count to the output primitive that functioned as pre- increment or decrement, eg dbg.line(1, "text); which is equivalent to dbg.inc(); dbg,out("text");
    • Add a count to increment and decrement?
  • Is there still value in specifying 4 space indent steps? Afaik we use the default everywhere so the feature seems unused.

I'll change the DSM clustering code to use these new functions as an example soon.

Closes #631 (closed)

Merge request reports